diff options
author | cyberta <cyberta@riseup.net> | 2020-06-19 05:22:34 -0700 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2020-06-19 05:22:34 -0700 |
commit | 4198c9b3bb1fee4bfcb3009ac9d80610ead13466 (patch) | |
tree | e75f9115a76d00802af4a6906e8457fdba8d86a2 /app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java | |
parent | e4d66c554123a33b035b27999f1809593c5b6f17 (diff) | |
parent | 69e11a98f00f04d9a6996c3f2c98f9b75b603f55 (diff) |
Merge branch 'fix_crashes' into 'master'
Fix crashes
See merge request leap/bitmask_android!107
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java index d2454d77..046acad4 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java @@ -1,6 +1,7 @@ package se.leap.bitmaskclient.fragments; import android.app.Dialog; +import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.net.Uri; @@ -57,7 +58,11 @@ public class DonationReminderDialog extends AppCompatDialogFragment { builder.setView(view); btnDonate.setOnClickListener(v -> { Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DONATION_URL)); - startActivity(browserIntent); + try { + startActivity(browserIntent); + } catch (ActivityNotFoundException e) { + e.printStackTrace(); + } PreferenceHelper.putString(getContext(), LAST_DONATION_REMINDER_DATE, DateHelper.getCurrentDateString()); dismiss(); |