Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −9 Original line number Diff line number Diff line Loading @@ -1429,14 +1429,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return mTokenMap.get(binder); } ActivityRecord getActivityRecord(IBinder binder) { final WindowToken token = getWindowToken(binder); if (token == null) { return null; } return token.asActivityRecord(); } void addWindowToken(IBinder binder, WindowToken token) { final DisplayContent dc = mWmService.mRoot.getWindowTokenDisplay(token); if (dc != null) { Loading Loading @@ -6984,7 +6976,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void onAppTransitionFinishedLocked(IBinder token) { final ActivityRecord r = getActivityRecord(token); final ActivityRecord r = ActivityRecord.forTokenLocked(token); // Ignore the animating recents so the fixed rotation transform won't be switched twice // by finishing the recents animation and moving it to top. That also avoids flickering // due to wait for previous activity to be paused if it supports PiP that ignores the Loading services/core/java/com/android/server/wm/RootWindowContainer.java +0 −16 Original line number Diff line number Diff line Loading @@ -571,22 +571,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> }, true /* traverseTopToBottom */); } /** * Returns the app window token for the input binder if it exist in the system. * NOTE: Only one AppWindowToken is allowed to exist in the system for a binder token, since * AppWindowToken represents an activity which can only exist on one display. */ ActivityRecord getActivityRecord(IBinder binder) { for (int i = mChildren.size() - 1; i >= 0; --i) { final DisplayContent dc = mChildren.get(i); final ActivityRecord activity = dc.getActivityRecord(binder); if (activity != null) { return activity; } } return null; } /** Returns the window token for the input binder if it exist in the system. */ WindowToken getWindowToken(IBinder binder) { for (int i = mChildren.size() - 1; i >= 0; --i) { Loading services/core/java/com/android/server/wm/Task.java +1 −1 Original line number Diff line number Diff line Loading @@ -5070,7 +5070,7 @@ class Task extends TaskFragment { mHandler.removeMessages(TRANSLUCENT_TIMEOUT_MSG); if (waitingActivity != null) { mWmService.setWindowOpaqueLocked(waitingActivity.token, false); waitingActivity.setMainWindowOpaque(false); if (waitingActivity.attachedToProcess()) { try { waitingActivity.app.getThread().scheduleTranslucentConversionComplete( Loading services/core/java/com/android/server/wm/WindowManagerService.java +1 −8 Original line number Diff line number Diff line Loading @@ -1073,7 +1073,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void onAppTransitionFinishedLocked(IBinder token) { final ActivityRecord atoken = mRoot.getActivityRecord(token); final ActivityRecord atoken = ActivityRecord.forTokenLocked(token); if (atoken == null) { return; } Loading Loading @@ -3105,13 +3105,6 @@ public class WindowManagerService extends IWindowManager.Stub return mRecentsAnimationController != null && mRecentsAnimationController.isTargetApp(r); } void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { final ActivityRecord wtoken = mRoot.getActivityRecord(token); if (wtoken != null) { wtoken.setMainWindowOpaque(isOpaque); } } boolean isValidPictureInPictureAspectRatio(DisplayContent displayContent, float aspectRatio) { return displayContent.getPinnedTaskController().isValidPictureInPictureAspectRatio( aspectRatio); Loading services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +2 −4 Original line number Diff line number Diff line Loading @@ -1802,8 +1802,7 @@ class WindowTestsBase extends SystemServiceTestsBase { @Override public void addStartingWindow(StartingWindowInfo info) { synchronized (mWMService.mGlobalLock) { final ActivityRecord activity = mWMService.mRoot.getActivityRecord( info.appToken); final ActivityRecord activity = ActivityRecord.forTokenLocked(info.appToken); IWindow iWindow = mock(IWindow.class); doReturn(mock(IBinder.class)).when(iWindow).asBinder(); final WindowState window = WindowTestsBase.createWindow(null, Loading @@ -1825,8 +1824,7 @@ class WindowTestsBase extends SystemServiceTestsBase { final IBinder appToken = mTaskAppMap.get(removalInfo.taskId); if (appToken != null) { mTaskAppMap.remove(removalInfo.taskId); final ActivityRecord activity = mWMService.mRoot.getActivityRecord( appToken); final ActivityRecord activity = ActivityRecord.forTokenLocked(appToken); WindowState win = mAppWindowMap.remove(appToken); activity.removeChild(win); activity.mStartingWindow = null; Loading Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −9 Original line number Diff line number Diff line Loading @@ -1429,14 +1429,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp return mTokenMap.get(binder); } ActivityRecord getActivityRecord(IBinder binder) { final WindowToken token = getWindowToken(binder); if (token == null) { return null; } return token.asActivityRecord(); } void addWindowToken(IBinder binder, WindowToken token) { final DisplayContent dc = mWmService.mRoot.getWindowTokenDisplay(token); if (dc != null) { Loading Loading @@ -6984,7 +6976,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp @Override public void onAppTransitionFinishedLocked(IBinder token) { final ActivityRecord r = getActivityRecord(token); final ActivityRecord r = ActivityRecord.forTokenLocked(token); // Ignore the animating recents so the fixed rotation transform won't be switched twice // by finishing the recents animation and moving it to top. That also avoids flickering // due to wait for previous activity to be paused if it supports PiP that ignores the Loading
services/core/java/com/android/server/wm/RootWindowContainer.java +0 −16 Original line number Diff line number Diff line Loading @@ -571,22 +571,6 @@ class RootWindowContainer extends WindowContainer<DisplayContent> }, true /* traverseTopToBottom */); } /** * Returns the app window token for the input binder if it exist in the system. * NOTE: Only one AppWindowToken is allowed to exist in the system for a binder token, since * AppWindowToken represents an activity which can only exist on one display. */ ActivityRecord getActivityRecord(IBinder binder) { for (int i = mChildren.size() - 1; i >= 0; --i) { final DisplayContent dc = mChildren.get(i); final ActivityRecord activity = dc.getActivityRecord(binder); if (activity != null) { return activity; } } return null; } /** Returns the window token for the input binder if it exist in the system. */ WindowToken getWindowToken(IBinder binder) { for (int i = mChildren.size() - 1; i >= 0; --i) { Loading
services/core/java/com/android/server/wm/Task.java +1 −1 Original line number Diff line number Diff line Loading @@ -5070,7 +5070,7 @@ class Task extends TaskFragment { mHandler.removeMessages(TRANSLUCENT_TIMEOUT_MSG); if (waitingActivity != null) { mWmService.setWindowOpaqueLocked(waitingActivity.token, false); waitingActivity.setMainWindowOpaque(false); if (waitingActivity.attachedToProcess()) { try { waitingActivity.app.getThread().scheduleTranslucentConversionComplete( Loading
services/core/java/com/android/server/wm/WindowManagerService.java +1 −8 Original line number Diff line number Diff line Loading @@ -1073,7 +1073,7 @@ public class WindowManagerService extends IWindowManager.Stub @Override public void onAppTransitionFinishedLocked(IBinder token) { final ActivityRecord atoken = mRoot.getActivityRecord(token); final ActivityRecord atoken = ActivityRecord.forTokenLocked(token); if (atoken == null) { return; } Loading Loading @@ -3105,13 +3105,6 @@ public class WindowManagerService extends IWindowManager.Stub return mRecentsAnimationController != null && mRecentsAnimationController.isTargetApp(r); } void setWindowOpaqueLocked(IBinder token, boolean isOpaque) { final ActivityRecord wtoken = mRoot.getActivityRecord(token); if (wtoken != null) { wtoken.setMainWindowOpaque(isOpaque); } } boolean isValidPictureInPictureAspectRatio(DisplayContent displayContent, float aspectRatio) { return displayContent.getPinnedTaskController().isValidPictureInPictureAspectRatio( aspectRatio); Loading
services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +2 −4 Original line number Diff line number Diff line Loading @@ -1802,8 +1802,7 @@ class WindowTestsBase extends SystemServiceTestsBase { @Override public void addStartingWindow(StartingWindowInfo info) { synchronized (mWMService.mGlobalLock) { final ActivityRecord activity = mWMService.mRoot.getActivityRecord( info.appToken); final ActivityRecord activity = ActivityRecord.forTokenLocked(info.appToken); IWindow iWindow = mock(IWindow.class); doReturn(mock(IBinder.class)).when(iWindow).asBinder(); final WindowState window = WindowTestsBase.createWindow(null, Loading @@ -1825,8 +1824,7 @@ class WindowTestsBase extends SystemServiceTestsBase { final IBinder appToken = mTaskAppMap.get(removalInfo.taskId); if (appToken != null) { mTaskAppMap.remove(removalInfo.taskId); final ActivityRecord activity = mWMService.mRoot.getActivityRecord( appToken); final ActivityRecord activity = ActivityRecord.forTokenLocked(appToken); WindowState win = mAppWindowMap.remove(appToken); activity.removeChild(win); activity.mStartingWindow = null; Loading