mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Fix null-pointers in SurfaceTransactionApplier constructor.
A recurring class of null pointers are caused by using views with no view root implementation in SurfaceTransactionApplier from QuickstepTransitionManager. This can happen when we use launcher views after it has been destroyed. - No longer using mDragLayer in getFallbackClosingWindowAnimators; simply applying the transaction immediately. - Forcefully using getFallbackClosingWindowAnimators when launcher is destroyed. Flag: not needed Bug: 278833389 Test: launches and closed several apps in 3-button and gesture nav mode Change-Id: I83b3aec1488fe9666bd0301a6044a181bb05dbdd
This commit is contained in:
@@ -1448,7 +1448,6 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
*/
|
||||
private Animator getFallbackClosingWindowAnimators(RemoteAnimationTarget[] appTargets) {
|
||||
final int rotationChange = getRotationChange(appTargets);
|
||||
SurfaceTransactionApplier surfaceApplier = new SurfaceTransactionApplier(mDragLayer);
|
||||
Matrix matrix = new Matrix();
|
||||
Point tmpPos = new Point();
|
||||
Rect tmpRect = new Rect();
|
||||
@@ -1504,7 +1503,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
.setAlpha(1f);
|
||||
}
|
||||
}
|
||||
surfaceApplier.scheduleApply(transaction);
|
||||
transaction.getTransaction().apply();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1592,7 +1591,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
boolean playFallBackAnimation = (launcherView == null
|
||||
&& launcherIsForceInvisibleOrOpening)
|
||||
|| mLauncher.getWorkspace().isOverlayShown()
|
||||
|| hasMultipleTargetsWithMode(appTargets, MODE_CLOSING);
|
||||
|| hasMultipleTargetsWithMode(appTargets, MODE_CLOSING)
|
||||
|| mLauncher.isDestroyed();
|
||||
|
||||
boolean playWorkspaceReveal = true;
|
||||
boolean skipAllAppsScale = false;
|
||||
|
||||
Reference in New Issue
Block a user