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

Commit 43577a66 authored by Becky Qiu's avatar Becky Qiu
Browse files

Make sure we start new activity only in UI thread.

Bug: 269576728
Test: local
Change-Id: I76ee93e54d6e645a62a427d0a779277532efae4a
parent 4004c9d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ public interface ActivityContext {
     */
    default boolean startActivitySafely(
            View v, Intent intent, @Nullable ItemInfo item) {

        Preconditions.assertUIThread();
        Context context = (Context) this;
        if (isAppBlockedForSafeMode() && !PackageManagerHelper.isSystemApp(context, intent)) {
            Toast.makeText(context, R.string.safemode_shortcut_error, Toast.LENGTH_SHORT).show();