Loading services/core/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ java_genrule { srcs: [":services.core.unboosted"], tools: ["lockedregioncodeinjection"], cmd: "$(location lockedregioncodeinjection) " + " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowHashMap;\" " + " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + " -o $(out) " + Loading services/core/java/com/android/server/wm/AccessibilityController.java +8 −8 Original line number Diff line number Diff line Loading @@ -735,7 +735,7 @@ final class AccessibilityController { } public void setShown(boolean shown, boolean animate) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mShown == shown) { return; } Loading @@ -750,13 +750,13 @@ final class AccessibilityController { @SuppressWarnings("unused") // Called reflectively from an animator. public int getAlpha() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { return mAlpha; } } public void setAlpha(int alpha) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mAlpha == alpha) { return; } Loading @@ -769,7 +769,7 @@ final class AccessibilityController { } public void setBounds(Region bounds) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mBounds.equals(bounds)) { return; } Loading @@ -782,7 +782,7 @@ final class AccessibilityController { } public void updateSize() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { mWindowManager.getDefaultDisplay().getRealSize(mTempPoint); mSurfaceControl.setSize(mTempPoint.x, mTempPoint.y); invalidate(mDirtyRect); Loading @@ -801,7 +801,7 @@ final class AccessibilityController { /** NOTE: This has to be called within a surface transaction. */ public void drawIfNeeded() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (!mInvalidated) { return; } Loading Loading @@ -948,7 +948,7 @@ final class AccessibilityController { } break; case MESSAGE_SHOW_MAGNIFIED_REGION_BOUNDS_IF_NEEDED : { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mMagnifedViewport.isMagnifyingLocked() || isForceShowingMagnifiableBoundsLocked()) { mMagnifedViewport.setMagnifiedRegionBorderShownLocked(true, true); Loading Loading @@ -1039,7 +1039,7 @@ final class AccessibilityController { boolean windowsChanged = false; List<WindowInfo> windows = new ArrayList<WindowInfo>(); synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { // Do not send the windows if there is no current focus as // the window manager is still looking for where to put it. // We will do the work when we get a focus change callback. Loading services/core/java/com/android/server/wm/AppTransition.java +2 −2 Original line number Diff line number Diff line Loading @@ -1924,7 +1924,7 @@ public class AppTransition implements Dump { } catch (RemoteException e) { Slog.w(TAG, "Failed to fetch app transition specs: " + e); } synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { mNextAppTransitionAnimationsSpecsPending = false; overridePendingAppTransitionMultiThumb(specs, mNextAppTransitionFutureCallback, null /* finishedCallback */, Loading Loading @@ -2220,7 +2220,7 @@ public class AppTransition implements Dump { } private void handleAppTransitionTimeout() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { final DisplayContent dc = mDisplayContent; if (dc == null) { return; Loading services/core/java/com/android/server/wm/AppWindowContainerController.java +22 −22 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class AppWindowContainerController final StartingData startingData; final AppWindowToken container; synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "mContainer was null while trying to" + " add starting window"); Loading Loading @@ -169,7 +169,7 @@ public class AppWindowContainerController } if (surface != null) { boolean abort = false; synchronized (mWindowMap) { synchronized (mGlobalLock) { // If the window was successfully added, then // we need to remove it. if (container.removed || container.startingData == null) { Loading Loading @@ -219,7 +219,7 @@ public class AppWindowContainerController super(listener, service); mHandler = new H(service.mH.getLooper()); mToken = token; synchronized(mWindowMap) { synchronized (mGlobalLock) { AppWindowToken atoken = mRoot.getAppWindowToken(mToken.asBinder()); if (atoken != null) { // TODO: Should this throw an exception instead? Loading Loading @@ -256,7 +256,7 @@ public class AppWindowContainerController } public void removeContainer(int displayId) { synchronized(mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { Slog.w(TAG_WM, "removeAppToken: Attempted to remove binder token: " Loading @@ -274,7 +274,7 @@ public class AppWindowContainerController } public void reparent(TaskWindowContainerController taskController, int position) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_ADD_REMOVE) Slog.i(TAG_WM, "reparent: moving app token=" + mToken + " to task=" + taskController + " at " + position); if (mContainer == null) { Loading @@ -294,7 +294,7 @@ public class AppWindowContainerController public Configuration setOrientation(int requestedOrientation, int displayId, Configuration displayConfig, boolean freezeScreenIfNeeded) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set orientation of non-existing app token: " + mToken); Loading @@ -310,7 +310,7 @@ public class AppWindowContainerController } public int getOrientation() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return SCREEN_ORIENTATION_UNSPECIFIED; } Loading @@ -320,7 +320,7 @@ public class AppWindowContainerController } public void setDisablePreviewScreenshots(boolean disable) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set disable screenshots of non-existing app" + " token: " + mToken); Loading @@ -331,7 +331,7 @@ public class AppWindowContainerController } public void setVisibility(boolean visible, boolean deferHidingClient) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set visibility of non-existing app token: " + mToken); Loading Loading @@ -449,7 +449,7 @@ public class AppWindowContainerController * of Keyguard flags it's going to set on its windows. */ public void notifyUnknownVisibilityLaunched() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().mUnknownAppVisibilityController.notifyLaunched( mContainer); Loading @@ -461,7 +461,7 @@ public class AppWindowContainerController CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean newTask, boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "setAppStartingWindow: token=" + mToken + " pkg=" + pkg + " transferFrom=" + transferFrom + " newTask=" + newTask + " taskSwitch=" + taskSwitch + " processRunning=" + processRunning Loading Loading @@ -611,7 +611,7 @@ public class AppWindowContainerController } public void removeStartingWindow() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer.startingWindow == null) { if (mContainer.startingData != null) { // Starting window has not been added yet, but it is scheduled to be added. Loading Loading @@ -664,7 +664,7 @@ public class AppWindowContainerController } public void pauseKeyDispatching() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().getInputMonitor().pauseDispatchingLw(mContainer); } Loading @@ -672,7 +672,7 @@ public class AppWindowContainerController } public void resumeKeyDispatching() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().getInputMonitor().resumeDispatchingLw(mContainer); } Loading @@ -680,7 +680,7 @@ public class AppWindowContainerController } public void notifyAppResumed(boolean wasStopped) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify resumed of non-existing app token: " + mToken); return; Loading @@ -690,7 +690,7 @@ public class AppWindowContainerController } public void notifyAppStopping() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify stopping on non-existing app token: " + mToken); Loading @@ -701,7 +701,7 @@ public class AppWindowContainerController } public void notifyAppStopped() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify stopped of non-existing app token: " + mToken); Loading @@ -712,7 +712,7 @@ public class AppWindowContainerController } public void startFreezingScreen(int configChanges) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to freeze screen with non-existing app token: " + mContainer); Loading @@ -729,7 +729,7 @@ public class AppWindowContainerController } public void stopFreezingScreen(boolean force) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return; } Loading @@ -740,7 +740,7 @@ public class AppWindowContainerController } public void registerRemoteAnimations(RemoteAnimationDefinition definition) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to register remote animations with non-existing app" + " token: " + mToken); Loading Loading @@ -775,7 +775,7 @@ public class AppWindowContainerController * Apply override app transition base on options & animation type. */ public void applyOptionsLocked(ActivityOptions pendingOptions, Intent intent) { synchronized (mWindowMap) { synchronized (mGlobalLock) { final int animationType = pendingOptions.getAnimationType(); final DisplayContent displayContent = mContainer.getDisplayContent(); switch (animationType) { Loading Loading @@ -875,7 +875,7 @@ public class AppWindowContainerController * signal on the WM side. */ public void setWillCloseOrEnterPip(boolean willCloseOrEnterPip) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return; } Loading services/core/java/com/android/server/wm/DisplayWindowController.java +18 −18 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class DisplayWindowController super(listener, WindowManagerService.getInstance()); mDisplayId = display.getDisplayId(); synchronized (mWindowMap) { synchronized (mGlobalLock) { final long callingIdentity = Binder.clearCallingIdentity(); try { mRoot.createDisplayContent(display, this /* controller */); Loading @@ -75,7 +75,7 @@ public class DisplayWindowController @Override public void removeContainer() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if(mContainer == null) { if (DEBUG_DISPLAY) Slog.i(TAG_WM, "removeDisplay: could not find displayId=" + mDisplayId); Loading @@ -102,7 +102,7 @@ public class DisplayWindowController * {@link android.hardware.display.DisplayManager.DisplayListener#onDisplayChanged(int)}. */ public void onDisplayChanged() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_DISPLAY) Slog.i(TAG_WM, "onDisplayChanged: could not find display=" + mDisplayId); Loading @@ -118,7 +118,7 @@ public class DisplayWindowController */ public void positionChildAt(StackWindowController child, int position, boolean includingParents) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_STACK) Slog.i(TAG_WM, "positionTaskStackAt: positioning stack=" + child + " at " + position); if (mContainer == null) { Loading @@ -140,7 +140,7 @@ public class DisplayWindowController * attempt to update the IME target before all information about the Windows have been updated. */ public void deferUpdateImeTarget() { synchronized (mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(mDisplayId); if (dc != null) { dc.deferUpdateImeTarget(); Loading @@ -152,7 +152,7 @@ public class DisplayWindowController * Resumes updating the IME target after deferring. See {@link #deferUpdateImeTarget()} */ public void continueUpdateImeTarget() { synchronized (mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(mDisplayId); if (dc != null) { dc.continueUpdateImeTarget(); Loading @@ -167,7 +167,7 @@ public class DisplayWindowController * @param moveFocusNow Specifies if we should update the focused window immediately. */ public void setFocusedApp(IBinder token, boolean moveFocusNow) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_FOCUS_LIGHT) Slog.i(TAG_WM, "setFocusedApp: could not find displayId=" + mDisplayId); Loading Loading @@ -213,21 +213,21 @@ public class DisplayWindowController public void prepareAppTransition(@WindowManager.TransitionType int transit, boolean alwaysKeepCurrent, @WindowManager.TransitionFlags int flags, boolean forceOverride) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).prepareAppTransition(transit, alwaysKeepCurrent, flags, forceOverride); } } public void executeAppTransition() { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).executeAppTransition(); } } public void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim, IRemoteCallback startedCallback) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).mAppTransition.overridePendingAppTransition( packageName, enterAnim, exitAnim, startedCallback); } Loading @@ -235,7 +235,7 @@ public class DisplayWindowController public void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).mAppTransition.overridePendingAppTransitionScaleUp( startX, startY, startWidth, startHeight); } Loading @@ -243,7 +243,7 @@ public class DisplayWindowController public void overridePendingAppTransitionClipReveal(int startX, int startY, int startWidth, int startHeight) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionClipReveal(startX, startY, startWidth, startHeight); Loading @@ -252,7 +252,7 @@ public class DisplayWindowController public void overridePendingAppTransitionThumb(GraphicBuffer srcThumb, int startX, int startY, IRemoteCallback startedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionThumb(srcThumb, startX, startY, startedCallback, scaleUp); Loading @@ -262,7 +262,7 @@ public class DisplayWindowController public void overridePendingAppTransitionAspectScaledThumb(GraphicBuffer srcThumb, int startX, int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionAspectScaledThumb(srcThumb, startX, startY, targetWidth, targetHeight, startedCallback, scaleUp); Loading @@ -272,7 +272,7 @@ public class DisplayWindowController public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, IRemoteCallback onAnimationStartedCallback, IRemoteCallback onAnimationFinishedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionMultiThumb(specs, onAnimationStartedCallback, onAnimationFinishedCallback, scaleUp); Loading @@ -280,14 +280,14 @@ public class DisplayWindowController } public void overridePendingAppTransitionStartCrossProfileApps() { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionStartCrossProfileApps(); } } public void overridePendingAppTransitionInPlace(String packageName, int anim) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overrideInPlaceAppTransition(packageName, anim); } Loading @@ -299,7 +299,7 @@ public class DisplayWindowController * @return The pending app transition of the display. */ public @TransitionType int getPendingAppTransition() { synchronized (mWindowMap) { synchronized (mGlobalLock) { return mRoot.getDisplayContent(mDisplayId).mAppTransition.getAppTransition(); } } Loading Loading
services/core/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ java_genrule { srcs: [":services.core.unboosted"], tools: ["lockedregioncodeinjection"], cmd: "$(location lockedregioncodeinjection) " + " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowHashMap;\" " + " --targets \"Lcom/android/server/am/ActivityManagerService;,Lcom/android/server/wm/WindowManagerGlobalLock;\" " + " --pre \"com/android/server/am/ActivityManagerService.boostPriorityForLockedSection,com/android/server/wm/WindowManagerService.boostPriorityForLockedSection\" " + " --post \"com/android/server/am/ActivityManagerService.resetPriorityAfterLockedSection,com/android/server/wm/WindowManagerService.resetPriorityAfterLockedSection\" " + " -o $(out) " + Loading
services/core/java/com/android/server/wm/AccessibilityController.java +8 −8 Original line number Diff line number Diff line Loading @@ -735,7 +735,7 @@ final class AccessibilityController { } public void setShown(boolean shown, boolean animate) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mShown == shown) { return; } Loading @@ -750,13 +750,13 @@ final class AccessibilityController { @SuppressWarnings("unused") // Called reflectively from an animator. public int getAlpha() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { return mAlpha; } } public void setAlpha(int alpha) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mAlpha == alpha) { return; } Loading @@ -769,7 +769,7 @@ final class AccessibilityController { } public void setBounds(Region bounds) { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mBounds.equals(bounds)) { return; } Loading @@ -782,7 +782,7 @@ final class AccessibilityController { } public void updateSize() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { mWindowManager.getDefaultDisplay().getRealSize(mTempPoint); mSurfaceControl.setSize(mTempPoint.x, mTempPoint.y); invalidate(mDirtyRect); Loading @@ -801,7 +801,7 @@ final class AccessibilityController { /** NOTE: This has to be called within a surface transaction. */ public void drawIfNeeded() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (!mInvalidated) { return; } Loading Loading @@ -948,7 +948,7 @@ final class AccessibilityController { } break; case MESSAGE_SHOW_MAGNIFIED_REGION_BOUNDS_IF_NEEDED : { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { if (mMagnifedViewport.isMagnifyingLocked() || isForceShowingMagnifiableBoundsLocked()) { mMagnifedViewport.setMagnifiedRegionBorderShownLocked(true, true); Loading Loading @@ -1039,7 +1039,7 @@ final class AccessibilityController { boolean windowsChanged = false; List<WindowInfo> windows = new ArrayList<WindowInfo>(); synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { // Do not send the windows if there is no current focus as // the window manager is still looking for where to put it. // We will do the work when we get a focus change callback. Loading
services/core/java/com/android/server/wm/AppTransition.java +2 −2 Original line number Diff line number Diff line Loading @@ -1924,7 +1924,7 @@ public class AppTransition implements Dump { } catch (RemoteException e) { Slog.w(TAG, "Failed to fetch app transition specs: " + e); } synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { mNextAppTransitionAnimationsSpecsPending = false; overridePendingAppTransitionMultiThumb(specs, mNextAppTransitionFutureCallback, null /* finishedCallback */, Loading Loading @@ -2220,7 +2220,7 @@ public class AppTransition implements Dump { } private void handleAppTransitionTimeout() { synchronized (mService.mWindowMap) { synchronized (mService.mGlobalLock) { final DisplayContent dc = mDisplayContent; if (dc == null) { return; Loading
services/core/java/com/android/server/wm/AppWindowContainerController.java +22 −22 Original line number Diff line number Diff line Loading @@ -135,7 +135,7 @@ public class AppWindowContainerController final StartingData startingData; final AppWindowToken container; synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "mContainer was null while trying to" + " add starting window"); Loading Loading @@ -169,7 +169,7 @@ public class AppWindowContainerController } if (surface != null) { boolean abort = false; synchronized (mWindowMap) { synchronized (mGlobalLock) { // If the window was successfully added, then // we need to remove it. if (container.removed || container.startingData == null) { Loading Loading @@ -219,7 +219,7 @@ public class AppWindowContainerController super(listener, service); mHandler = new H(service.mH.getLooper()); mToken = token; synchronized(mWindowMap) { synchronized (mGlobalLock) { AppWindowToken atoken = mRoot.getAppWindowToken(mToken.asBinder()); if (atoken != null) { // TODO: Should this throw an exception instead? Loading Loading @@ -256,7 +256,7 @@ public class AppWindowContainerController } public void removeContainer(int displayId) { synchronized(mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(displayId); if (dc == null) { Slog.w(TAG_WM, "removeAppToken: Attempted to remove binder token: " Loading @@ -274,7 +274,7 @@ public class AppWindowContainerController } public void reparent(TaskWindowContainerController taskController, int position) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_ADD_REMOVE) Slog.i(TAG_WM, "reparent: moving app token=" + mToken + " to task=" + taskController + " at " + position); if (mContainer == null) { Loading @@ -294,7 +294,7 @@ public class AppWindowContainerController public Configuration setOrientation(int requestedOrientation, int displayId, Configuration displayConfig, boolean freezeScreenIfNeeded) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set orientation of non-existing app token: " + mToken); Loading @@ -310,7 +310,7 @@ public class AppWindowContainerController } public int getOrientation() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return SCREEN_ORIENTATION_UNSPECIFIED; } Loading @@ -320,7 +320,7 @@ public class AppWindowContainerController } public void setDisablePreviewScreenshots(boolean disable) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set disable screenshots of non-existing app" + " token: " + mToken); Loading @@ -331,7 +331,7 @@ public class AppWindowContainerController } public void setVisibility(boolean visible, boolean deferHidingClient) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to set visibility of non-existing app token: " + mToken); Loading Loading @@ -449,7 +449,7 @@ public class AppWindowContainerController * of Keyguard flags it's going to set on its windows. */ public void notifyUnknownVisibilityLaunched() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().mUnknownAppVisibilityController.notifyLaunched( mContainer); Loading @@ -461,7 +461,7 @@ public class AppWindowContainerController CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean newTask, boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated, boolean fromRecents) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "setAppStartingWindow: token=" + mToken + " pkg=" + pkg + " transferFrom=" + transferFrom + " newTask=" + newTask + " taskSwitch=" + taskSwitch + " processRunning=" + processRunning Loading Loading @@ -611,7 +611,7 @@ public class AppWindowContainerController } public void removeStartingWindow() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer.startingWindow == null) { if (mContainer.startingData != null) { // Starting window has not been added yet, but it is scheduled to be added. Loading Loading @@ -664,7 +664,7 @@ public class AppWindowContainerController } public void pauseKeyDispatching() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().getInputMonitor().pauseDispatchingLw(mContainer); } Loading @@ -672,7 +672,7 @@ public class AppWindowContainerController } public void resumeKeyDispatching() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer != null) { mContainer.getDisplayContent().getInputMonitor().resumeDispatchingLw(mContainer); } Loading @@ -680,7 +680,7 @@ public class AppWindowContainerController } public void notifyAppResumed(boolean wasStopped) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify resumed of non-existing app token: " + mToken); return; Loading @@ -690,7 +690,7 @@ public class AppWindowContainerController } public void notifyAppStopping() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify stopping on non-existing app token: " + mToken); Loading @@ -701,7 +701,7 @@ public class AppWindowContainerController } public void notifyAppStopped() { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to notify stopped of non-existing app token: " + mToken); Loading @@ -712,7 +712,7 @@ public class AppWindowContainerController } public void startFreezingScreen(int configChanges) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to freeze screen with non-existing app token: " + mContainer); Loading @@ -729,7 +729,7 @@ public class AppWindowContainerController } public void stopFreezingScreen(boolean force) { synchronized(mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return; } Loading @@ -740,7 +740,7 @@ public class AppWindowContainerController } public void registerRemoteAnimations(RemoteAnimationDefinition definition) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { Slog.w(TAG_WM, "Attempted to register remote animations with non-existing app" + " token: " + mToken); Loading Loading @@ -775,7 +775,7 @@ public class AppWindowContainerController * Apply override app transition base on options & animation type. */ public void applyOptionsLocked(ActivityOptions pendingOptions, Intent intent) { synchronized (mWindowMap) { synchronized (mGlobalLock) { final int animationType = pendingOptions.getAnimationType(); final DisplayContent displayContent = mContainer.getDisplayContent(); switch (animationType) { Loading Loading @@ -875,7 +875,7 @@ public class AppWindowContainerController * signal on the WM side. */ public void setWillCloseOrEnterPip(boolean willCloseOrEnterPip) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { return; } Loading
services/core/java/com/android/server/wm/DisplayWindowController.java +18 −18 Original line number Diff line number Diff line Loading @@ -52,7 +52,7 @@ public class DisplayWindowController super(listener, WindowManagerService.getInstance()); mDisplayId = display.getDisplayId(); synchronized (mWindowMap) { synchronized (mGlobalLock) { final long callingIdentity = Binder.clearCallingIdentity(); try { mRoot.createDisplayContent(display, this /* controller */); Loading @@ -75,7 +75,7 @@ public class DisplayWindowController @Override public void removeContainer() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if(mContainer == null) { if (DEBUG_DISPLAY) Slog.i(TAG_WM, "removeDisplay: could not find displayId=" + mDisplayId); Loading @@ -102,7 +102,7 @@ public class DisplayWindowController * {@link android.hardware.display.DisplayManager.DisplayListener#onDisplayChanged(int)}. */ public void onDisplayChanged() { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_DISPLAY) Slog.i(TAG_WM, "onDisplayChanged: could not find display=" + mDisplayId); Loading @@ -118,7 +118,7 @@ public class DisplayWindowController */ public void positionChildAt(StackWindowController child, int position, boolean includingParents) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (DEBUG_STACK) Slog.i(TAG_WM, "positionTaskStackAt: positioning stack=" + child + " at " + position); if (mContainer == null) { Loading @@ -140,7 +140,7 @@ public class DisplayWindowController * attempt to update the IME target before all information about the Windows have been updated. */ public void deferUpdateImeTarget() { synchronized (mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(mDisplayId); if (dc != null) { dc.deferUpdateImeTarget(); Loading @@ -152,7 +152,7 @@ public class DisplayWindowController * Resumes updating the IME target after deferring. See {@link #deferUpdateImeTarget()} */ public void continueUpdateImeTarget() { synchronized (mWindowMap) { synchronized (mGlobalLock) { final DisplayContent dc = mRoot.getDisplayContent(mDisplayId); if (dc != null) { dc.continueUpdateImeTarget(); Loading @@ -167,7 +167,7 @@ public class DisplayWindowController * @param moveFocusNow Specifies if we should update the focused window immediately. */ public void setFocusedApp(IBinder token, boolean moveFocusNow) { synchronized (mWindowMap) { synchronized (mGlobalLock) { if (mContainer == null) { if (DEBUG_FOCUS_LIGHT) Slog.i(TAG_WM, "setFocusedApp: could not find displayId=" + mDisplayId); Loading Loading @@ -213,21 +213,21 @@ public class DisplayWindowController public void prepareAppTransition(@WindowManager.TransitionType int transit, boolean alwaysKeepCurrent, @WindowManager.TransitionFlags int flags, boolean forceOverride) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).prepareAppTransition(transit, alwaysKeepCurrent, flags, forceOverride); } } public void executeAppTransition() { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).executeAppTransition(); } } public void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim, IRemoteCallback startedCallback) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).mAppTransition.overridePendingAppTransition( packageName, enterAnim, exitAnim, startedCallback); } Loading @@ -235,7 +235,7 @@ public class DisplayWindowController public void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId).mAppTransition.overridePendingAppTransitionScaleUp( startX, startY, startWidth, startHeight); } Loading @@ -243,7 +243,7 @@ public class DisplayWindowController public void overridePendingAppTransitionClipReveal(int startX, int startY, int startWidth, int startHeight) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionClipReveal(startX, startY, startWidth, startHeight); Loading @@ -252,7 +252,7 @@ public class DisplayWindowController public void overridePendingAppTransitionThumb(GraphicBuffer srcThumb, int startX, int startY, IRemoteCallback startedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionThumb(srcThumb, startX, startY, startedCallback, scaleUp); Loading @@ -262,7 +262,7 @@ public class DisplayWindowController public void overridePendingAppTransitionAspectScaledThumb(GraphicBuffer srcThumb, int startX, int startY, int targetWidth, int targetHeight, IRemoteCallback startedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionAspectScaledThumb(srcThumb, startX, startY, targetWidth, targetHeight, startedCallback, scaleUp); Loading @@ -272,7 +272,7 @@ public class DisplayWindowController public void overridePendingAppTransitionMultiThumb(AppTransitionAnimationSpec[] specs, IRemoteCallback onAnimationStartedCallback, IRemoteCallback onAnimationFinishedCallback, boolean scaleUp) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionMultiThumb(specs, onAnimationStartedCallback, onAnimationFinishedCallback, scaleUp); Loading @@ -280,14 +280,14 @@ public class DisplayWindowController } public void overridePendingAppTransitionStartCrossProfileApps() { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overridePendingAppTransitionStartCrossProfileApps(); } } public void overridePendingAppTransitionInPlace(String packageName, int anim) { synchronized (mWindowMap) { synchronized (mGlobalLock) { mRoot.getDisplayContent(mDisplayId) .mAppTransition.overrideInPlaceAppTransition(packageName, anim); } Loading @@ -299,7 +299,7 @@ public class DisplayWindowController * @return The pending app transition of the display. */ public @TransitionType int getPendingAppTransition() { synchronized (mWindowMap) { synchronized (mGlobalLock) { return mRoot.getDisplayContent(mDisplayId).mAppTransition.getAppTransition(); } } Loading