mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 08:56:55 +00:00
Fixing potential NullPointer exceptions when Launcher is
created before TouchInteractionService is initialized SystemUiProxy is a wrapper opject which holds the state information until the actual proxy is initialized. It is safe to be initialized lazily. Bug: 221961069 Test: Verified on device Change-Id: I1a621cad52e5b8384439ef02de6b95c6452bcb06
This commit is contained in:
@@ -1161,7 +1161,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
new LauncherAnimationRunner(mHandler, mWallpaperOpenTransitionRunner,
|
||||
false /* startAtFrontOfQueue */), mLauncher.getIApplicationThread());
|
||||
mLauncherOpenTransition.addHomeOpenCheck(mLauncher.getComponentName());
|
||||
SystemUiProxy.INSTANCE.getNoCreate().registerRemoteTransition(mLauncherOpenTransition);
|
||||
SystemUiProxy.INSTANCE.get(mLauncher).registerRemoteTransition(mLauncherOpenTransition);
|
||||
}
|
||||
if (mBackAnimationController != null) {
|
||||
mBackAnimationController.registerBackCallbacks(mHandler);
|
||||
@@ -1172,7 +1172,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
unregisterRemoteAnimations();
|
||||
unregisterRemoteTransitions();
|
||||
mStartingWindowListener.setTransitionManager(null);
|
||||
SystemUiProxy.INSTANCE.getNoCreate().setStartingWindowListener(null);
|
||||
SystemUiProxy.INSTANCE.get(mLauncher).setStartingWindowListener(null);
|
||||
}
|
||||
|
||||
private void unregisterRemoteAnimations() {
|
||||
@@ -1196,7 +1196,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
}
|
||||
if (hasControlRemoteAppTransitionPermission()) {
|
||||
if (mLauncherOpenTransition == null) return;
|
||||
SystemUiProxy.INSTANCE.getNoCreate().unregisterRemoteTransition(
|
||||
SystemUiProxy.INSTANCE.get(mLauncher).unregisterRemoteTransition(
|
||||
mLauncherOpenTransition);
|
||||
mLauncherOpenTransition = null;
|
||||
mWallpaperOpenTransitionRunner = null;
|
||||
|
||||
Reference in New Issue
Block a user