Loading packages/SystemUI/src/com/android/systemui/toast/ToastUI.java +8 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,14 @@ public class ToastUI implements int displayId) { Runnable showToastRunnable = () -> { UserHandle userHandle = UserHandle.getUserHandleForUid(uid); Context context = mContext.createContextAsUser(userHandle, 0); Context context; try { context = mContext.createContextAsUser(userHandle, 0); } catch (IllegalStateException e) { // b/366533044 : Own package not found for systemui Log.e(TAG, "Cannot create toast because cannot create context", e); return; } DisplayManager mDisplayManager = mContext.getSystemService(DisplayManager.class); Display display = mDisplayManager.getDisplay(displayId); Loading Loading
packages/SystemUI/src/com/android/systemui/toast/ToastUI.java +8 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,14 @@ public class ToastUI implements int displayId) { Runnable showToastRunnable = () -> { UserHandle userHandle = UserHandle.getUserHandleForUid(uid); Context context = mContext.createContextAsUser(userHandle, 0); Context context; try { context = mContext.createContextAsUser(userHandle, 0); } catch (IllegalStateException e) { // b/366533044 : Own package not found for systemui Log.e(TAG, "Cannot create toast because cannot create context", e); return; } DisplayManager mDisplayManager = mContext.getSystemService(DisplayManager.class); Display display = mDisplayManager.getDisplay(displayId); Loading