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

Commit df0f6b5b authored by guangl's avatar guangl Committed by Arne Coucheron
Browse files

Settings: Fix settings force close

No Activity found to handle Intent
{com.android.settings.Settings$ScreenLockSuggestionActivity}

Check whether activity exists before start activity.

Change-Id: Ib8736577fb280b4af0ba22126a094e788e570e5d
CRs-Fixed: 1101735
parent 5b51a2ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1330,7 +1330,8 @@ public class SettingsActivity extends SettingsDrawerActivity
    }

    public void startSuggestion(Intent intent) {
        if (intent == null || ActivityManager.isUserAMonkey()) {
        if (intent == null || ActivityManager.isUserAMonkey()
                || getPackageManager().queryIntentActivities(intent, 0).isEmpty()) {
            return;
        }
        mCurrentSuggestion = intent.getComponent();