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

Commit 6bea950b authored by Jason Monk's avatar Jason Monk
Browse files

Guard against monkey crash

Bug: 27337783
Change-Id: Ifa1538a0a0521789a516f8cdbc0615a057611ce7
parent 596e1d3b
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package com.android.settingslib.drawer;
import android.annotation.LayoutRes;
import android.annotation.Nullable;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -235,6 +236,7 @@ public class SettingsDrawerActivity extends Activity {
                    Intent.FLAG_ACTIVITY_CLEAR_TASK));
            return true;
        }
        try {
            int numUserHandles = tile.userHandle.size();
            if (numUserHandles > 1) {
                ProfileSelectDialog.show(getFragmentManager(), tile);
@@ -250,6 +252,9 @@ public class SettingsDrawerActivity extends Activity {
                tile.intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
                startActivity(tile.intent);
            }
        } catch (ActivityNotFoundException e) {
            Log.w(TAG, "Couldn't find tile " + tile.intent, e);
        }
        return true;
    }