Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -2786,7 +2786,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A @VisibleForTesting boolean canLaunchHomeActivity(int uid, ActivityRecord sourceRecord) { if (uid == Process.myUid() || uid == 0) { if (uid == SYSTEM_UID || uid == 0) { // System process can launch home activity. return true; } Loading services/core/java/com/android/server/wm/ActivityRecordInputSink.java +2 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.wm; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.os.InputConfig; import android.os.Process; import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; Loading Loading @@ -102,8 +101,8 @@ class ActivityRecordInputSink { inputWindowHandle.replaceTouchableRegionWithCrop = true; inputWindowHandle.name = mName; inputWindowHandle.layoutParamsType = WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; inputWindowHandle.ownerUid = Process.myUid(); inputWindowHandle.ownerPid = Process.myPid(); inputWindowHandle.ownerPid = WindowManagerService.MY_PID; inputWindowHandle.ownerUid = WindowManagerService.MY_UID; inputWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.NO_INPUT_CHANNEL; return inputWindowHandle; } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_IMMERSIVE; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_LOCKTASK; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_TASKS; import static com.android.server.am.ActivityManagerService.ANR_TRACE_DIR; import static com.android.server.am.ActivityManagerService.MY_PID; import static com.android.server.am.ActivityManagerService.STOCK_PM_FLAGS; import static com.android.server.am.ActivityManagerService.dumpStackTraces; import static com.android.server.am.ActivityManagerServiceDumpActivitiesProto.ROOT_WINDOW_CONTAINER; Loading Loading @@ -117,6 +116,7 @@ import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_TO_O import static com.android.server.wm.RootWindowContainer.MATCH_ATTACHED_TASK_ONLY; import static com.android.server.wm.RootWindowContainer.MATCH_ATTACHED_TASK_OR_RECENT_TASKS; import static com.android.server.wm.Task.REPARENT_KEEP_ROOT_TASK_AT_FRONT; import static com.android.server.wm.WindowManagerService.MY_PID; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL; import android.Manifest; Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +5 −7 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import static android.content.pm.PackageManager.PERMISSION_DENIED; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.PowerManager.PARTIAL_WAKE_LOCK; import static android.os.Process.INVALID_UID; import static android.os.Process.SYSTEM_UID; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -122,7 +123,6 @@ import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; Loading Loading @@ -1318,7 +1318,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } void acquireLaunchWakelock() { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.acquire(); Loading Loading @@ -1391,8 +1391,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { if (mLaunchingActivityWakeLock.isHeld()) { mHandler.removeMessages(LAUNCH_TIMEOUT_MSG); if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading Loading @@ -1802,7 +1801,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { if (!mGoingToSleepWakeLock.isHeld()) { mGoingToSleepWakeLock.acquire(); if (mLaunchingActivityWakeLock.isHeld()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading Loading @@ -2463,8 +2462,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { case LAUNCH_TIMEOUT_MSG: { if (mLaunchingActivityWakeLock.isHeld()) { Slog.w(TAG, "Launch timeout has expired, giving up wake lock!"); if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading services/core/java/com/android/server/wm/AnrController.java +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ class AnrController { Slog.i(TAG_WM, "Pre-dump for unresponsive"); final ArrayList<Integer> firstPids = new ArrayList<>(1); firstPids.add(ActivityManagerService.MY_PID); firstPids.add(WindowManagerService.MY_PID); ArrayList<Integer> nativePids = null; final int[] pids = shouldDumpSf[0] ? Process.getPidsForCommands(new String[] { "/system/bin/surfaceflinger" }) Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Diff line number Diff line Loading @@ -2786,7 +2786,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A @VisibleForTesting boolean canLaunchHomeActivity(int uid, ActivityRecord sourceRecord) { if (uid == Process.myUid() || uid == 0) { if (uid == SYSTEM_UID || uid == 0) { // System process can launch home activity. return true; } Loading
services/core/java/com/android/server/wm/ActivityRecordInputSink.java +2 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.server.wm; import android.app.compat.CompatChanges; import android.compat.annotation.ChangeId; import android.os.InputConfig; import android.os.Process; import android.view.InputWindowHandle; import android.view.SurfaceControl; import android.view.WindowManager; Loading Loading @@ -102,8 +101,8 @@ class ActivityRecordInputSink { inputWindowHandle.replaceTouchableRegionWithCrop = true; inputWindowHandle.name = mName; inputWindowHandle.layoutParamsType = WindowManager.LayoutParams.TYPE_INPUT_CONSUMER; inputWindowHandle.ownerUid = Process.myUid(); inputWindowHandle.ownerPid = Process.myPid(); inputWindowHandle.ownerPid = WindowManagerService.MY_PID; inputWindowHandle.ownerUid = WindowManagerService.MY_UID; inputWindowHandle.inputConfig = InputConfig.NOT_FOCUSABLE | InputConfig.NO_INPUT_CHANNEL; return inputWindowHandle; } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_IMMERSIVE; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_LOCKTASK; import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_TASKS; import static com.android.server.am.ActivityManagerService.ANR_TRACE_DIR; import static com.android.server.am.ActivityManagerService.MY_PID; import static com.android.server.am.ActivityManagerService.STOCK_PM_FLAGS; import static com.android.server.am.ActivityManagerService.dumpStackTraces; import static com.android.server.am.ActivityManagerServiceDumpActivitiesProto.ROOT_WINDOW_CONTAINER; Loading Loading @@ -117,6 +116,7 @@ import static com.android.server.wm.RecentsAnimationController.REORDER_MOVE_TO_O import static com.android.server.wm.RootWindowContainer.MATCH_ATTACHED_TASK_ONLY; import static com.android.server.wm.RootWindowContainer.MATCH_ATTACHED_TASK_OR_RECENT_TASKS; import static com.android.server.wm.Task.REPARENT_KEEP_ROOT_TASK_AT_FRONT; import static com.android.server.wm.WindowManagerService.MY_PID; import static com.android.server.wm.WindowManagerService.UPDATE_FOCUS_NORMAL; import android.Manifest; Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +5 −7 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import static android.content.pm.PackageManager.PERMISSION_DENIED; import static android.content.pm.PackageManager.PERMISSION_GRANTED; import static android.os.PowerManager.PARTIAL_WAKE_LOCK; import static android.os.Process.INVALID_UID; import static android.os.Process.SYSTEM_UID; import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.WindowManager.TRANSIT_TO_FRONT; Loading Loading @@ -122,7 +123,6 @@ import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; import android.os.Process; import android.os.RemoteException; import android.os.SystemClock; import android.os.Trace; Loading Loading @@ -1318,7 +1318,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } void acquireLaunchWakelock() { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.acquire(); Loading Loading @@ -1391,8 +1391,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { if (mLaunchingActivityWakeLock.isHeld()) { mHandler.removeMessages(LAUNCH_TIMEOUT_MSG); if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading Loading @@ -1802,7 +1801,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { if (!mGoingToSleepWakeLock.isHeld()) { mGoingToSleepWakeLock.acquire(); if (mLaunchingActivityWakeLock.isHeld()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading Loading @@ -2463,8 +2462,7 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { case LAUNCH_TIMEOUT_MSG: { if (mLaunchingActivityWakeLock.isHeld()) { Slog.w(TAG, "Launch timeout has expired, giving up wake lock!"); if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != Process.myUid()) { if (VALIDATE_WAKE_LOCK_CALLER && Binder.getCallingUid() != SYSTEM_UID) { throw new IllegalStateException("Calling must be system uid"); } mLaunchingActivityWakeLock.release(); Loading
services/core/java/com/android/server/wm/AnrController.java +1 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ class AnrController { Slog.i(TAG_WM, "Pre-dump for unresponsive"); final ArrayList<Integer> firstPids = new ArrayList<>(1); firstPids.add(ActivityManagerService.MY_PID); firstPids.add(WindowManagerService.MY_PID); ArrayList<Integer> nativePids = null; final int[] pids = shouldDumpSf[0] ? Process.getPidsForCommands(new String[] { "/system/bin/surfaceflinger" }) Loading