From 5973434dcd2f0220be0e21745dd8839b9d656c8a Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Thu, 4 Sep 2025 22:23:32 +0700 Subject: [PATCH] Revert to Launcher3 method Signed-off-by: Pun Butrach --- src/com/android/launcher3/views/ActivityContext.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java index 3397b3af2a..f583dd9c13 100644 --- a/src/com/android/launcher3/views/ActivityContext.java +++ b/src/com/android/launcher3/views/ActivityContext.java @@ -421,11 +421,7 @@ public interface ActivityContext extends SavedStateRegistryOwner { Preconditions.assertUIThread(); Context context = (Context) this; - // Lawnchair: Reimplementation of isSafeModeEnabled of LauncherAppState - var isSafeModeEnabled = - TraceHelper.allowIpcs("isSafeMode", () -> context.getPackageManager().isSafeMode()); - - if (isSafeModeEnabled + if (LauncherAppState.getInstance(context).isSafeModeEnabled() && !new ApplicationInfoWrapper(context, intent).isSystem()) { Toast.makeText(context, R.string.safemode_shortcut_error, Toast.LENGTH_SHORT).show(); return null;