Skip to content

Commit

Permalink
replace assert with explicit check
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jul 10, 2023
1 parent 6de80b9 commit 6e22fa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/src/main/java/co/tinode/tindroid/AttachmentHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ static Operation enqueueMsgAttachmentUploadRequest(AppCompatActivity activity, S

UploadType type = UploadType.parse(operation);
Uri uri = args.getParcelable(AttachmentHandler.ARG_LOCAL_URI);
assert uri != null;
if (uri == null) {
Log.w(TAG, "Missing local attachment URI");
return null;
}

Data.Builder data = new Data.Builder()
.putString(ARG_OPERATION, operation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ private void setupCredentials(Activity activity, String[] methods) {

activity.runOnUiThread(() -> {
String method = mCredMethods[0];

if (method.equals("tel")) {
activity.findViewById(R.id.emailWrapper).setVisibility(View.GONE);
activity.findViewById(R.id.will_send_email).setVisibility(View.GONE);
Expand Down

0 comments on commit 6e22fa8

Please sign in to comment.