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

Commit c3a67cd6 authored by guangl's avatar guangl Committed by Gerrit - the friendly Code Review server
Browse files

Settings: Fix settings force close in monkey test.

No Activity found to handle Intent
{act=com.android.settings.sim.SIM_SUB_INFO_SETTINGS}

Check whether activity exists before start activity.

Change-Id: I0684a951afa785d5a5900ae819944862cb3d36bd
CRs-Fixed: 1069244
parent 3f63f667
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1052,7 +1052,9 @@ public class SettingsActivity extends SettingsDrawerActivity
            Log.i(LOG_TAG, "switchToFragment, launch simSettings  ");
            Intent provisioningIntent =
                    new Intent("com.android.settings.sim.SIM_SUB_INFO_SETTINGS");
            if (!getPackageManager().queryIntentActivities(provisioningIntent, 0).isEmpty()) {
                startActivity(provisioningIntent);
            }
            finish();
            return null;
        }