Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class DisplayContent extends WindowContainer<TaskStack> { final WindowManagerService mService; /** Remove this display when animation on it has completed. */ boolean mDeferredRemoval; private boolean mDeferredRemoval; final DockedStackDividerController mDividerControllerLocked; Loading services/core/java/com/android/server/wm/RootWindowContainer.java +5 −5 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { private long mUserActivityTimeout = -1; private boolean mUpdateRotation = false; private boolean mObscured = false; boolean mSyswin = false; private boolean mSyswin = false; // Set to true when the display contains content to show the user. // When false, the display manager may choose to mirror or blank the display. private boolean mDisplayHasContent = false; Loading @@ -116,7 +116,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // Last window that requires screen wakelock WindowState mHoldScreenWindow = null; // Last window that obscures all windows below WindowState mObsuringWindow = null; WindowState mObscuringWindow = null; // Only set while traversing the default display based on its content. // Affects the behavior of mirroring on secondary displays. private boolean mObscureApplicationContentOnSecondaryDisplays = false; Loading Loading @@ -368,7 +368,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { * Callback used to trigger bounds update after configuration change and get ids of stacks whose * bounds were updated. */ int[] updateStackBoundsAfterConfigChange() { private int[] updateStackBoundsAfterConfigChange() { mChangedStackList.clear(); final int numDisplays = mChildren.size(); Loading Loading @@ -969,7 +969,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // TODO: Super crazy long method that should be broken down... private void applySurfaceChangesTransaction(boolean recoveringMemory, int defaultDw, int defaultDh) { mHoldScreenWindow = null; mObsuringWindow = null; mObscuringWindow = null; if (mService.mWatermark != null) { mService.mWatermark.positionSurface(defaultDw, defaultDh); Loading Loading @@ -1195,7 +1195,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // so we want to leave all of them as undimmed (for // performance reasons). if (!mObscured) { mObsuringWindow = w; mObscuringWindow = w; } mObscured = true; Loading services/core/java/com/android/server/wm/WindowManagerService.java +41 −61 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import static android.Manifest.permission.MANAGE_APP_TOKENS; import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT; import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; Loading Loading @@ -203,6 +204,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static android.view.WindowManagerGlobal.RELAYOUT_DEFER_SURFACE_DESTROY; import static android.view.WindowManagerGlobal.RELAYOUT_RES_SURFACE_CHANGED; import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import static com.android.server.EventLogTags.WM_TASK_CREATED; import static com.android.server.wm.AppTransition.TRANSIT_UNSET; import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_END; import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_START; Loading Loading @@ -2738,10 +2740,8 @@ public class WindowManagerService extends IWindowManager.Stub == PackageManager.PERMISSION_GRANTED) { return true; } String msg = "Permission Denial: " + func + " from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + permission; final String msg = "Permission Denial: " + func + " from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + permission; Slog.w(TAG_WM, msg); return false; } Loading @@ -2760,8 +2760,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void addWindowToken(IBinder token, int type) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addWindowToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "addWindowToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -2780,8 +2779,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void removeWindowToken(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "removeWindowToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeWindowToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -2808,9 +2806,9 @@ public class WindowManagerService extends IWindowManager.Stub + " atoken=" + atoken + " bounds=" + bounds); final TaskStack stack = mStackIdToStack.get(stackId); if (stack == null) { throw new IllegalArgumentException("addAppToken: invalid stackId=" + stackId); throw new IllegalArgumentException("createTaskLocked: invalid stackId=" + stackId); } EventLog.writeEvent(EventLogTags.WM_TASK_CREATED, taskId, stackId); EventLog.writeEvent(WM_TASK_CREATED, taskId, stackId); Task task = new Task(taskId, stack, userId, this, bounds, overrideConfig, isOnTopLauncher); mTaskIdToTask.put(taskId, task); stack.addTask(task, !atoken.mLaunchTaskBehind /* toTop */, atoken.showForAllUsers); Loading @@ -2824,8 +2822,7 @@ public class WindowManagerService extends IWindowManager.Stub Rect taskBounds, Configuration overrideConfig, int taskResizeMode, boolean alwaysFocusable, boolean homeTask, int targetSdkVersion, int rotationAnimationHint, boolean isOnTopLauncher) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addAppToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "addAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -2880,8 +2877,7 @@ public class WindowManagerService extends IWindowManager.Stub public void setAppTask(IBinder token, int taskId, int stackId, Rect taskBounds, Configuration overrideConfig, int taskResizeMode, boolean homeTask, boolean isOnTopLauncher) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppTask()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppTask()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -2978,8 +2974,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public Configuration updateOrientationFromAppTokens( Configuration currentConfig, IBinder freezeThisOneIfNeeded) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3092,8 +3087,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public int[] setNewConfiguration(Configuration config) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setNewConfiguration()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setNewConfiguration()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3118,8 +3112,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setAppOrientation(IApplicationToken token, int requestedOrientation) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppOrientation()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppOrientation()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3158,8 +3151,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setFocusedApp(IBinder token, boolean moveFocusNow) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setFocusedApp()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setFocusedApp()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3200,8 +3192,7 @@ public class WindowManagerService extends IWindowManager.Stub */ @Override public void prepareAppTransition(int transit, boolean alwaysKeepCurrent) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "prepareAppTransition()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "prepareAppTransition()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } synchronized(mWindowMap) { Loading Loading @@ -3329,8 +3320,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void executeAppTransition() { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "executeAppTransition()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "executeAppTransition()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3354,8 +3344,7 @@ public class WindowManagerService extends IWindowManager.Stub int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppStartingWindow()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppStartingWindow()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3426,7 +3415,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (wtoken != null && wtoken.transferStartingWindow(transferFrom)) { if (wtoken.transferStartingWindow(transferFrom)) { return true; } Loading Loading @@ -3473,10 +3462,10 @@ public class WindowManagerService extends IWindowManager.Stub } } public void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { AppWindowToken wtoken = findAppWindowToken(token); private void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { final AppWindowToken wtoken = findAppWindowToken(token); if (wtoken != null) { WindowState win = wtoken.findMainWindow(); final WindowState win = wtoken.findMainWindow(); if (win != null) { win.mWinAnimator.setOpaqueLocked(isOpaque); } Loading @@ -3494,8 +3483,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "notifyAppResumed()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppResumed()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3512,8 +3500,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void notifyAppStopped(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "notifyAppStopped()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppStopped()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3530,8 +3517,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setAppVisibility(IBinder token, boolean visible) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppVisibility()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppVisibility()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3648,8 +3634,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void startAppFreezingScreen(IBinder token, int configChanges) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3672,19 +3657,18 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void stopAppFreezingScreen(IBinder token, boolean force) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } synchronized(mWindowMap) { AppWindowToken wtoken = findAppWindowToken(token); final AppWindowToken wtoken = findAppWindowToken(token); if (wtoken == null || wtoken.appToken == null) { return; } final long origId = Binder.clearCallingIdentity(); if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token + ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen); if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token + ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen); wtoken.stopFreezingScreen(true, force); Binder.restoreCallingIdentity(origId); } Loading @@ -3692,8 +3676,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void removeAppToken(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "removeAppToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -6628,8 +6611,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void pauseKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -6643,8 +6625,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void resumeKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "resumeKeyDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "resumeKeyDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -6658,8 +6639,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setEventDispatching(boolean enabled) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setEventDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setEventDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -8133,10 +8113,10 @@ public class WindowManagerService extends IWindowManager.Stub } else { if (DEBUG_KEEP_SCREEN_ON) { Slog.d(TAG_KEEP_SCREEN_ON, "Releasing screen wakelock, obscured by " + mRoot.mObsuringWindow); + mRoot.mObscuringWindow); } mLastWakeLockHoldingWindow = null; mLastWakeLockObscuringWindow = mRoot.mObsuringWindow; mLastWakeLockObscuringWindow = mRoot.mObscuringWindow; mPolicy.keepScreenOnStoppedLw(); mHoldingScreenWakeLock.release(); } Loading Loading @@ -8711,17 +8691,17 @@ public class WindowManagerService extends IWindowManager.Stub return getDefaultDisplayContentLocked().getDockedDividerController().getContentInsets(); } void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) { private void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) { pw.println("WINDOW MANAGER POLICY STATE (dumpsys window policy)"); mPolicy.dump(" ", pw, args); } void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) { private void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) { pw.println("WINDOW MANAGER ANIMATOR STATE (dumpsys window animator)"); mAnimator.dumpLocked(pw, " ", dumpAll); } void dumpTokensLocked(PrintWriter pw, boolean dumpAll) { private void dumpTokensLocked(PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)"); if (!mTokenMap.isEmpty()) { pw.println(" All tokens:"); Loading Loading @@ -8764,7 +8744,7 @@ public class WindowManagerService extends IWindowManager.Stub } } void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) { private void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER SESSIONS (dumpsys window sessions)"); for (int i=0; i<mSessions.size(); i++) { Session s = mSessions.valueAt(i); Loading @@ -8773,13 +8753,13 @@ public class WindowManagerService extends IWindowManager.Stub } } void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, ArrayList<WindowState> windows) { pw.println("WINDOW MANAGER WINDOWS (dumpsys window windows)"); dumpWindowsNoHeaderLocked(pw, dumpAll, windows); } void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll, private void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll, ArrayList<WindowState> windows) { mRoot.dumpWindowsNoHeader(pw, dumpAll, windows); Loading services/core/java/com/android/server/wm/WindowState.java +37 −37 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // to capture touch events in that area. static final int RESIZE_HANDLE_WIDTH_IN_DP = 30; static final boolean DEBUG_DISABLE_SAVING_SURFACES = false; private static final boolean DEBUG_DISABLE_SAVING_SURFACES = false; final WindowManagerService mService; final WindowManagerPolicy mPolicy; Loading @@ -182,7 +182,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean mLayoutAttached; final boolean mIsImWindow; final boolean mIsWallpaper; final boolean mIsFloatingLayer; private final boolean mIsFloatingLayer; int mSeq; boolean mEnforceSizeCompat; int mViewVisibility; Loading @@ -199,16 +199,16 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * animation is done. */ boolean mPolicyVisibilityAfterAnim = true; boolean mAppOpVisibility = true; private boolean mAppOpVisibility = true; boolean mPermanentlyHidden; // the window should never be shown again boolean mAppFreezing; boolean mHidden; // Used to determine if to show child windows. boolean mWallpaperVisible; // for wallpaper, what was last vis report? boolean mDragResizing; boolean mDragResizingChangeReported; int mResizeMode; private boolean mDragResizing; private boolean mDragResizingChangeReported; private int mResizeMode; RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks; private RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks; /** * The window size that was requested by the application. These are in Loading @@ -216,8 +216,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ int mRequestedWidth; int mRequestedHeight; int mLastRequestedWidth; int mLastRequestedHeight; private int mLastRequestedWidth; private int mLastRequestedHeight; int mLayer; boolean mHaveFrame; Loading @@ -244,8 +244,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * coordinate space (without compatibility scale applied). */ final Rect mVisibleInsets = new Rect(); final Rect mLastVisibleInsets = new Rect(); boolean mVisibleInsetsChanged; private final Rect mLastVisibleInsets = new Rect(); private boolean mVisibleInsetsChanged; /** * Insets that are covered by system windows (such as the status bar) and Loading @@ -254,31 +254,31 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ final Rect mContentInsets = new Rect(); final Rect mLastContentInsets = new Rect(); boolean mContentInsetsChanged; private boolean mContentInsetsChanged; /** * Insets that determine the area covered by the display overscan region. These are in the * application's coordinate space (without compatibility scale applied). */ final Rect mOverscanInsets = new Rect(); final Rect mLastOverscanInsets = new Rect(); boolean mOverscanInsetsChanged; private final Rect mLastOverscanInsets = new Rect(); private boolean mOverscanInsetsChanged; /** * Insets that determine the area covered by the stable system windows. These are in the * application's coordinate space (without compatibility scale applied). */ final Rect mStableInsets = new Rect(); final Rect mLastStableInsets = new Rect(); boolean mStableInsetsChanged; private final Rect mLastStableInsets = new Rect(); private boolean mStableInsetsChanged; /** * Outsets determine the area outside of the surface where we want to pretend that it's possible * to draw anyway. */ final Rect mOutsets = new Rect(); final Rect mLastOutsets = new Rect(); boolean mOutsetsChanged = false; private final Rect mLastOutsets = new Rect(); private boolean mOutsetsChanged = false; /** * Set to true if we are waiting for this window to receive its Loading Loading @@ -321,14 +321,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // "Real" frame that the application sees, in display coordinate space. final Rect mFrame = new Rect(); final Rect mLastFrame = new Rect(); boolean mFrameSizeChanged = false; private boolean mFrameSizeChanged = false; // Frame that is scaled to the application's coordinate space when in // screen size compatibility mode. final Rect mCompatFrame = new Rect(); final Rect mContainingFrame = new Rect(); final Rect mParentFrame = new Rect(); private final Rect mParentFrame = new Rect(); // The entire screen area of the {@link TaskStack} this window is in. Usually equal to the // screen area of the device. Loading @@ -338,11 +338,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // is mostly a special case for TV where some displays don’t have the entire display usable. // {@link WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag can be used to allow // window display contents to extend into the overscan region. final Rect mOverscanFrame = new Rect(); private final Rect mOverscanFrame = new Rect(); // The display frame minus the stable insets. This value is always constant regardless of if // the status bar or navigation bar is visible. final Rect mStableFrame = new Rect(); private final Rect mStableFrame = new Rect(); // The area not occupied by the status and navigation bars. So, if both status and navigation // bars are visible, the decor frame is equal to the stable frame. Loading @@ -350,7 +350,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Equal to the decor frame if the IME (e.g. keyboard) is not present. Equal to the decor frame // minus the area occupied by the IME if the IME is present. final Rect mContentFrame = new Rect(); private final Rect mContentFrame = new Rect(); // Legacy stuff. Generally equal to the content frame expect when the IME for older apps // displays hint text. Loading @@ -358,13 +358,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Frame that includes dead area outside of the surface but where we want to pretend that it's // possible to draw. final Rect mOutsetFrame = new Rect(); private final Rect mOutsetFrame = new Rect(); /** * Usually empty. Set to the task's tempInsetFrame. See *{@link android.app.IActivityManager#resizeDockedStack}. */ final Rect mInsetFrame = new Rect(); private final Rect mInsetFrame = new Rect(); boolean mContentChanged; Loading Loading @@ -446,7 +446,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * or some other higher level component said so (e.g. activity manager). * TODO: We should either have different booleans for the removal reason or use a bit-field. */ boolean mWindowRemovalAllowed; private boolean mWindowRemovalAllowed; /** * Temp for keeping track of windows that have been removed when Loading @@ -457,18 +457,18 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Input channel and input window handle used by the input dispatcher. final InputWindowHandle mInputWindowHandle; InputChannel mInputChannel; InputChannel mClientChannel; private InputChannel mClientChannel; // Used to improve performance of toString() String mStringNameCache; CharSequence mLastTitle; boolean mWasExiting; private String mStringNameCache; private CharSequence mLastTitle; private boolean mWasExiting; final WindowStateAnimator mWinAnimator; boolean mHasSurface = false; boolean mNotOnAppsDisplay = false; private boolean mNotOnAppsDisplay = false; DisplayContent mDisplayContent; /** When true this window can be displayed on screens owther than mOwnerUid's */ Loading @@ -486,26 +486,26 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Whether the window was visible when we set the app to invisible last time. WM uses // this as a hint to restore the surface (if available) for early animation next time // the app is brought visible. boolean mWasVisibleBeforeClientHidden; private boolean mWasVisibleBeforeClientHidden; // This window will be replaced due to relaunch. This allows window manager // to differentiate between simple removal of a window and replacement. In the latter case it // will preserve the old window until the new one is drawn. boolean mWillReplaceWindow = false; // If true, the replaced window was already requested to be removed. boolean mReplacingRemoveRequested = false; private boolean mReplacingRemoveRequested = false; // Whether the replacement of the window should trigger app transition animation. boolean mAnimateReplacingWindow = false; private boolean mAnimateReplacingWindow = false; // If not null, the window that will be used to replace the old one. This is being set when // the window is added and unset when this window reports its first draw. WindowState mReplacementWindow = null; private WindowState mReplacementWindow = null; // For the new window in the replacement transition, if we have // requested to replace without animation, then we should // make sure we also don't apply an enter animation for // the new window. boolean mSkipEnterAnimationForSeamlessReplacement = false; // Whether this window is being moved via the resize API boolean mMovedByResize; private boolean mMovedByResize; /** * Wake lock for drawing. Loading @@ -514,7 +514,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * who is preventing the system from suspending. * This lock is only acquired on first use. */ PowerManager.WakeLock mDrawLock; private PowerManager.WakeLock mDrawLock; final private Rect mTmpRect = new Rect(); Loading services/core/java/com/android/server/wm/WindowSurfacePlacer.java +1 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -127,7 +127,7 @@ class DisplayContent extends WindowContainer<TaskStack> { final WindowManagerService mService; /** Remove this display when animation on it has completed. */ boolean mDeferredRemoval; private boolean mDeferredRemoval; final DockedStackDividerController mDividerControllerLocked; Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +5 −5 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { private long mUserActivityTimeout = -1; private boolean mUpdateRotation = false; private boolean mObscured = false; boolean mSyswin = false; private boolean mSyswin = false; // Set to true when the display contains content to show the user. // When false, the display manager may choose to mirror or blank the display. private boolean mDisplayHasContent = false; Loading @@ -116,7 +116,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // Last window that requires screen wakelock WindowState mHoldScreenWindow = null; // Last window that obscures all windows below WindowState mObsuringWindow = null; WindowState mObscuringWindow = null; // Only set while traversing the default display based on its content. // Affects the behavior of mirroring on secondary displays. private boolean mObscureApplicationContentOnSecondaryDisplays = false; Loading Loading @@ -368,7 +368,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { * Callback used to trigger bounds update after configuration change and get ids of stacks whose * bounds were updated. */ int[] updateStackBoundsAfterConfigChange() { private int[] updateStackBoundsAfterConfigChange() { mChangedStackList.clear(); final int numDisplays = mChildren.size(); Loading Loading @@ -969,7 +969,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // TODO: Super crazy long method that should be broken down... private void applySurfaceChangesTransaction(boolean recoveringMemory, int defaultDw, int defaultDh) { mHoldScreenWindow = null; mObsuringWindow = null; mObscuringWindow = null; if (mService.mWatermark != null) { mService.mWatermark.positionSurface(defaultDw, defaultDh); Loading Loading @@ -1195,7 +1195,7 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { // so we want to leave all of them as undimmed (for // performance reasons). if (!mObscured) { mObsuringWindow = w; mObscuringWindow = w; } mObscured = true; Loading
services/core/java/com/android/server/wm/WindowManagerService.java +41 −61 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import static android.Manifest.permission.MANAGE_APP_TOKENS; import static android.app.ActivityManager.DOCKED_STACK_CREATE_MODE_TOP_OR_LEFT; import static android.app.ActivityManager.StackId.DOCKED_STACK_ID; import static android.app.ActivityManager.StackId.PINNED_STACK_ID; Loading Loading @@ -203,6 +204,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_WALLPAPER; import static android.view.WindowManagerGlobal.RELAYOUT_DEFER_SURFACE_DESTROY; import static android.view.WindowManagerGlobal.RELAYOUT_RES_SURFACE_CHANGED; import static android.view.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER; import static com.android.server.EventLogTags.WM_TASK_CREATED; import static com.android.server.wm.AppTransition.TRANSIT_UNSET; import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_END; import static com.android.server.wm.AppWindowAnimator.PROLONG_ANIMATION_AT_START; Loading Loading @@ -2738,10 +2740,8 @@ public class WindowManagerService extends IWindowManager.Stub == PackageManager.PERMISSION_GRANTED) { return true; } String msg = "Permission Denial: " + func + " from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + permission; final String msg = "Permission Denial: " + func + " from pid=" + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid() + " requires " + permission; Slog.w(TAG_WM, msg); return false; } Loading @@ -2760,8 +2760,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void addWindowToken(IBinder token, int type) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addWindowToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "addWindowToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -2780,8 +2779,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void removeWindowToken(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "removeWindowToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeWindowToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -2808,9 +2806,9 @@ public class WindowManagerService extends IWindowManager.Stub + " atoken=" + atoken + " bounds=" + bounds); final TaskStack stack = mStackIdToStack.get(stackId); if (stack == null) { throw new IllegalArgumentException("addAppToken: invalid stackId=" + stackId); throw new IllegalArgumentException("createTaskLocked: invalid stackId=" + stackId); } EventLog.writeEvent(EventLogTags.WM_TASK_CREATED, taskId, stackId); EventLog.writeEvent(WM_TASK_CREATED, taskId, stackId); Task task = new Task(taskId, stack, userId, this, bounds, overrideConfig, isOnTopLauncher); mTaskIdToTask.put(taskId, task); stack.addTask(task, !atoken.mLaunchTaskBehind /* toTop */, atoken.showForAllUsers); Loading @@ -2824,8 +2822,7 @@ public class WindowManagerService extends IWindowManager.Stub Rect taskBounds, Configuration overrideConfig, int taskResizeMode, boolean alwaysFocusable, boolean homeTask, int targetSdkVersion, int rotationAnimationHint, boolean isOnTopLauncher) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "addAppToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "addAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -2880,8 +2877,7 @@ public class WindowManagerService extends IWindowManager.Stub public void setAppTask(IBinder token, int taskId, int stackId, Rect taskBounds, Configuration overrideConfig, int taskResizeMode, boolean homeTask, boolean isOnTopLauncher) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppTask()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppTask()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -2978,8 +2974,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public Configuration updateOrientationFromAppTokens( Configuration currentConfig, IBinder freezeThisOneIfNeeded) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "updateOrientationFromAppTokens()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3092,8 +3087,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public int[] setNewConfiguration(Configuration config) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setNewConfiguration()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setNewConfiguration()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3118,8 +3112,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setAppOrientation(IApplicationToken token, int requestedOrientation) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppOrientation()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppOrientation()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3158,8 +3151,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setFocusedApp(IBinder token, boolean moveFocusNow) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setFocusedApp()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setFocusedApp()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3200,8 +3192,7 @@ public class WindowManagerService extends IWindowManager.Stub */ @Override public void prepareAppTransition(int transit, boolean alwaysKeepCurrent) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "prepareAppTransition()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "prepareAppTransition()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } synchronized(mWindowMap) { Loading Loading @@ -3329,8 +3320,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void executeAppTransition() { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "executeAppTransition()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "executeAppTransition()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3354,8 +3344,7 @@ public class WindowManagerService extends IWindowManager.Stub int theme, CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppStartingWindow()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppStartingWindow()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3426,7 +3415,7 @@ public class WindowManagerService extends IWindowManager.Stub } } if (wtoken != null && wtoken.transferStartingWindow(transferFrom)) { if (wtoken.transferStartingWindow(transferFrom)) { return true; } Loading Loading @@ -3473,10 +3462,10 @@ public class WindowManagerService extends IWindowManager.Stub } } public void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { AppWindowToken wtoken = findAppWindowToken(token); private void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { final AppWindowToken wtoken = findAppWindowToken(token); if (wtoken != null) { WindowState win = wtoken.findMainWindow(); final WindowState win = wtoken.findMainWindow(); if (win != null) { win.mWinAnimator.setOpaqueLocked(isOpaque); } Loading @@ -3494,8 +3483,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "notifyAppResumed()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppResumed()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3512,8 +3500,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void notifyAppStopped(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "notifyAppStopped()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "notifyAppStopped()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3530,8 +3517,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setAppVisibility(IBinder token, boolean visible) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppVisibility()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppVisibility()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -3648,8 +3634,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void startAppFreezingScreen(IBinder token, int configChanges) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -3672,19 +3657,18 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void stopAppFreezingScreen(IBinder token, boolean force) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setAppFreezingScreen()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } synchronized(mWindowMap) { AppWindowToken wtoken = findAppWindowToken(token); final AppWindowToken wtoken = findAppWindowToken(token); if (wtoken == null || wtoken.appToken == null) { return; } final long origId = Binder.clearCallingIdentity(); if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token + ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen); if (DEBUG_ORIENTATION) Slog.v(TAG_WM, "Clear freezing of " + token + ": hidden=" + wtoken.hidden + " freezing=" + wtoken.mAppAnimator.freezingScreen); wtoken.stopFreezingScreen(true, force); Binder.restoreCallingIdentity(origId); } Loading @@ -3692,8 +3676,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void removeAppToken(IBinder token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "removeAppToken()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "removeAppToken()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -6628,8 +6611,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void pauseKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "pauseKeyDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -6643,8 +6625,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void resumeKeyDispatching(IBinder _token) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "resumeKeyDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "resumeKeyDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading @@ -6658,8 +6639,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void setEventDispatching(boolean enabled) { if (!checkCallingPermission(android.Manifest.permission.MANAGE_APP_TOKENS, "setEventDispatching()")) { if (!checkCallingPermission(MANAGE_APP_TOKENS, "setEventDispatching()")) { throw new SecurityException("Requires MANAGE_APP_TOKENS permission"); } Loading Loading @@ -8133,10 +8113,10 @@ public class WindowManagerService extends IWindowManager.Stub } else { if (DEBUG_KEEP_SCREEN_ON) { Slog.d(TAG_KEEP_SCREEN_ON, "Releasing screen wakelock, obscured by " + mRoot.mObsuringWindow); + mRoot.mObscuringWindow); } mLastWakeLockHoldingWindow = null; mLastWakeLockObscuringWindow = mRoot.mObsuringWindow; mLastWakeLockObscuringWindow = mRoot.mObscuringWindow; mPolicy.keepScreenOnStoppedLw(); mHoldingScreenWakeLock.release(); } Loading Loading @@ -8711,17 +8691,17 @@ public class WindowManagerService extends IWindowManager.Stub return getDefaultDisplayContentLocked().getDockedDividerController().getContentInsets(); } void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) { private void dumpPolicyLocked(PrintWriter pw, String[] args, boolean dumpAll) { pw.println("WINDOW MANAGER POLICY STATE (dumpsys window policy)"); mPolicy.dump(" ", pw, args); } void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) { private void dumpAnimatorLocked(PrintWriter pw, String[] args, boolean dumpAll) { pw.println("WINDOW MANAGER ANIMATOR STATE (dumpsys window animator)"); mAnimator.dumpLocked(pw, " ", dumpAll); } void dumpTokensLocked(PrintWriter pw, boolean dumpAll) { private void dumpTokensLocked(PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)"); if (!mTokenMap.isEmpty()) { pw.println(" All tokens:"); Loading Loading @@ -8764,7 +8744,7 @@ public class WindowManagerService extends IWindowManager.Stub } } void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) { private void dumpSessionsLocked(PrintWriter pw, boolean dumpAll) { pw.println("WINDOW MANAGER SESSIONS (dumpsys window sessions)"); for (int i=0; i<mSessions.size(); i++) { Session s = mSessions.valueAt(i); Loading @@ -8773,13 +8753,13 @@ public class WindowManagerService extends IWindowManager.Stub } } void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, ArrayList<WindowState> windows) { pw.println("WINDOW MANAGER WINDOWS (dumpsys window windows)"); dumpWindowsNoHeaderLocked(pw, dumpAll, windows); } void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll, private void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll, ArrayList<WindowState> windows) { mRoot.dumpWindowsNoHeader(pw, dumpAll, windows); Loading
services/core/java/com/android/server/wm/WindowState.java +37 −37 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // to capture touch events in that area. static final int RESIZE_HANDLE_WIDTH_IN_DP = 30; static final boolean DEBUG_DISABLE_SAVING_SURFACES = false; private static final boolean DEBUG_DISABLE_SAVING_SURFACES = false; final WindowManagerService mService; final WindowManagerPolicy mPolicy; Loading @@ -182,7 +182,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP final boolean mLayoutAttached; final boolean mIsImWindow; final boolean mIsWallpaper; final boolean mIsFloatingLayer; private final boolean mIsFloatingLayer; int mSeq; boolean mEnforceSizeCompat; int mViewVisibility; Loading @@ -199,16 +199,16 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * animation is done. */ boolean mPolicyVisibilityAfterAnim = true; boolean mAppOpVisibility = true; private boolean mAppOpVisibility = true; boolean mPermanentlyHidden; // the window should never be shown again boolean mAppFreezing; boolean mHidden; // Used to determine if to show child windows. boolean mWallpaperVisible; // for wallpaper, what was last vis report? boolean mDragResizing; boolean mDragResizingChangeReported; int mResizeMode; private boolean mDragResizing; private boolean mDragResizingChangeReported; private int mResizeMode; RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks; private RemoteCallbackList<IWindowFocusObserver> mFocusCallbacks; /** * The window size that was requested by the application. These are in Loading @@ -216,8 +216,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ int mRequestedWidth; int mRequestedHeight; int mLastRequestedWidth; int mLastRequestedHeight; private int mLastRequestedWidth; private int mLastRequestedHeight; int mLayer; boolean mHaveFrame; Loading @@ -244,8 +244,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * coordinate space (without compatibility scale applied). */ final Rect mVisibleInsets = new Rect(); final Rect mLastVisibleInsets = new Rect(); boolean mVisibleInsetsChanged; private final Rect mLastVisibleInsets = new Rect(); private boolean mVisibleInsetsChanged; /** * Insets that are covered by system windows (such as the status bar) and Loading @@ -254,31 +254,31 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP */ final Rect mContentInsets = new Rect(); final Rect mLastContentInsets = new Rect(); boolean mContentInsetsChanged; private boolean mContentInsetsChanged; /** * Insets that determine the area covered by the display overscan region. These are in the * application's coordinate space (without compatibility scale applied). */ final Rect mOverscanInsets = new Rect(); final Rect mLastOverscanInsets = new Rect(); boolean mOverscanInsetsChanged; private final Rect mLastOverscanInsets = new Rect(); private boolean mOverscanInsetsChanged; /** * Insets that determine the area covered by the stable system windows. These are in the * application's coordinate space (without compatibility scale applied). */ final Rect mStableInsets = new Rect(); final Rect mLastStableInsets = new Rect(); boolean mStableInsetsChanged; private final Rect mLastStableInsets = new Rect(); private boolean mStableInsetsChanged; /** * Outsets determine the area outside of the surface where we want to pretend that it's possible * to draw anyway. */ final Rect mOutsets = new Rect(); final Rect mLastOutsets = new Rect(); boolean mOutsetsChanged = false; private final Rect mLastOutsets = new Rect(); private boolean mOutsetsChanged = false; /** * Set to true if we are waiting for this window to receive its Loading Loading @@ -321,14 +321,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // "Real" frame that the application sees, in display coordinate space. final Rect mFrame = new Rect(); final Rect mLastFrame = new Rect(); boolean mFrameSizeChanged = false; private boolean mFrameSizeChanged = false; // Frame that is scaled to the application's coordinate space when in // screen size compatibility mode. final Rect mCompatFrame = new Rect(); final Rect mContainingFrame = new Rect(); final Rect mParentFrame = new Rect(); private final Rect mParentFrame = new Rect(); // The entire screen area of the {@link TaskStack} this window is in. Usually equal to the // screen area of the device. Loading @@ -338,11 +338,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // is mostly a special case for TV where some displays don’t have the entire display usable. // {@link WindowManager.LayoutParams#FLAG_LAYOUT_IN_OVERSCAN} flag can be used to allow // window display contents to extend into the overscan region. final Rect mOverscanFrame = new Rect(); private final Rect mOverscanFrame = new Rect(); // The display frame minus the stable insets. This value is always constant regardless of if // the status bar or navigation bar is visible. final Rect mStableFrame = new Rect(); private final Rect mStableFrame = new Rect(); // The area not occupied by the status and navigation bars. So, if both status and navigation // bars are visible, the decor frame is equal to the stable frame. Loading @@ -350,7 +350,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Equal to the decor frame if the IME (e.g. keyboard) is not present. Equal to the decor frame // minus the area occupied by the IME if the IME is present. final Rect mContentFrame = new Rect(); private final Rect mContentFrame = new Rect(); // Legacy stuff. Generally equal to the content frame expect when the IME for older apps // displays hint text. Loading @@ -358,13 +358,13 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Frame that includes dead area outside of the surface but where we want to pretend that it's // possible to draw. final Rect mOutsetFrame = new Rect(); private final Rect mOutsetFrame = new Rect(); /** * Usually empty. Set to the task's tempInsetFrame. See *{@link android.app.IActivityManager#resizeDockedStack}. */ final Rect mInsetFrame = new Rect(); private final Rect mInsetFrame = new Rect(); boolean mContentChanged; Loading Loading @@ -446,7 +446,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * or some other higher level component said so (e.g. activity manager). * TODO: We should either have different booleans for the removal reason or use a bit-field. */ boolean mWindowRemovalAllowed; private boolean mWindowRemovalAllowed; /** * Temp for keeping track of windows that have been removed when Loading @@ -457,18 +457,18 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Input channel and input window handle used by the input dispatcher. final InputWindowHandle mInputWindowHandle; InputChannel mInputChannel; InputChannel mClientChannel; private InputChannel mClientChannel; // Used to improve performance of toString() String mStringNameCache; CharSequence mLastTitle; boolean mWasExiting; private String mStringNameCache; private CharSequence mLastTitle; private boolean mWasExiting; final WindowStateAnimator mWinAnimator; boolean mHasSurface = false; boolean mNotOnAppsDisplay = false; private boolean mNotOnAppsDisplay = false; DisplayContent mDisplayContent; /** When true this window can be displayed on screens owther than mOwnerUid's */ Loading @@ -486,26 +486,26 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP // Whether the window was visible when we set the app to invisible last time. WM uses // this as a hint to restore the surface (if available) for early animation next time // the app is brought visible. boolean mWasVisibleBeforeClientHidden; private boolean mWasVisibleBeforeClientHidden; // This window will be replaced due to relaunch. This allows window manager // to differentiate between simple removal of a window and replacement. In the latter case it // will preserve the old window until the new one is drawn. boolean mWillReplaceWindow = false; // If true, the replaced window was already requested to be removed. boolean mReplacingRemoveRequested = false; private boolean mReplacingRemoveRequested = false; // Whether the replacement of the window should trigger app transition animation. boolean mAnimateReplacingWindow = false; private boolean mAnimateReplacingWindow = false; // If not null, the window that will be used to replace the old one. This is being set when // the window is added and unset when this window reports its first draw. WindowState mReplacementWindow = null; private WindowState mReplacementWindow = null; // For the new window in the replacement transition, if we have // requested to replace without animation, then we should // make sure we also don't apply an enter animation for // the new window. boolean mSkipEnterAnimationForSeamlessReplacement = false; // Whether this window is being moved via the resize API boolean mMovedByResize; private boolean mMovedByResize; /** * Wake lock for drawing. Loading @@ -514,7 +514,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * who is preventing the system from suspending. * This lock is only acquired on first use. */ PowerManager.WakeLock mDrawLock; private PowerManager.WakeLock mDrawLock; final private Rect mTmpRect = new Rect(); Loading
services/core/java/com/android/server/wm/WindowSurfacePlacer.java +1 −2 File changed.Preview size limit exceeded, changes collapsed. Show changes