Merge "Fix leakage of DisplayContent referenced from TransitionController" into sc-v2-dev am: c89faed0bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16660805 Change-Id: Ibe1d0311f47d7b4d5cfbcd68522839cdc3dff182
This commit is contained in:
@@ -1067,8 +1067,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
|
||||
|
||||
mAppTransition = new AppTransition(mWmService.mContext, mWmService, this);
|
||||
mAppTransition.registerListenerLocked(mWmService.mActivityManagerAppTransitionNotifier);
|
||||
mTransitionController.registerLegacyListener(
|
||||
mWmService.mActivityManagerAppTransitionNotifier);
|
||||
mAppTransition.registerListenerLocked(mFixedRotationTransitionListener);
|
||||
mAppTransitionController = new AppTransitionController(mWmService, this);
|
||||
mUnknownAppVisibilityController = new UnknownAppVisibilityController(mWmService, this);
|
||||
|
||||
@@ -3315,6 +3315,7 @@ public class DisplayPolicy {
|
||||
}
|
||||
|
||||
void release() {
|
||||
mDisplayContent.mTransitionController.unregisterLegacyListener(mAppTransitionListener);
|
||||
mHandler.post(mGestureNavigationSettingsObserver::unregister);
|
||||
}
|
||||
|
||||
|
||||
@@ -430,6 +430,10 @@ class TransitionController {
|
||||
mLegacyListeners.add(listener);
|
||||
}
|
||||
|
||||
void unregisterLegacyListener(WindowManagerInternal.AppTransitionListener listener) {
|
||||
mLegacyListeners.remove(listener);
|
||||
}
|
||||
|
||||
void dispatchLegacyAppTransitionPending() {
|
||||
for (int i = 0; i < mLegacyListeners.size(); ++i) {
|
||||
mLegacyListeners.get(i).onAppTransitionPendingLocked();
|
||||
|
||||
@@ -137,6 +137,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
|
||||
|
||||
void setWindowManager(WindowManagerService wms) {
|
||||
mTransitionController = new TransitionController(mService, wms.mTaskSnapshotController);
|
||||
mTransitionController.registerLegacyListener(wms.mActivityManagerAppTransitionNotifier);
|
||||
}
|
||||
|
||||
TransitionController getTransitionController() {
|
||||
|
||||
Reference in New Issue
Block a user