Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0ebc269 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix SecurityException crashes in onClick"

parents ee6637da 2efbfa3c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ import com.android.contacts.widget.QuickContactImageView;
import com.google.common.collect.Lists;
import com.google.common.collect.ImmutableList;

import java.lang.SecurityException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
@@ -417,6 +418,11 @@ public class QuickContactActivity extends ContactsActivity {
            mHasIntentLaunched = true;
            try {
                startActivity(intent);
            } catch (SecurityException ex) {
                Toast.makeText(QuickContactActivity.this, R.string.missing_app,
                        Toast.LENGTH_SHORT).show();
                Log.e(TAG, "QuickContacts does not have permission to launch "
                        + intent);
            } catch (ActivityNotFoundException ex) {
                Toast.makeText(QuickContactActivity.this, R.string.missing_app,
                        Toast.LENGTH_SHORT).show();