summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Snoeberger <snoeberger@google.com> 2019-11-18 19:39:09 +0000
committer Robert Snoeberger <snoeberger@google.com> 2019-11-18 19:40:29 +0000
commitd54a3c7c7130f599fab1e8afeeb62e71411f3f7c (patch)
treeb19fcbd4d5264202348fa21d7fb56ce7e73c13a5
parenta9593e965db697da3018f600bbe70581fbdf34fc (diff)
Revert "Break strong ref to ExpandableNotificationRow"
This reverts commit a9593e965db697da3018f600bbe70581fbdf34fc. Reason for revert: Causing NPE, see b/144701184. Bug: 144109427 Fixes: 144701184 Change-Id: Icb6f95f73219944b905822cbfa1f0c6460b3d628
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
index e48e81957225..9b312341c583 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java
@@ -125,21 +125,22 @@ public class ActivityLaunchAnimator {
return mAnimationRunning;
}
- private class AnimationRunner extends IRemoteAnimationRunner.Stub {
+ class AnimationRunner extends IRemoteAnimationRunner.Stub {
- private ExpandableNotificationRow mSourceNotification;
- private final ExpandAnimationParameters mParams = new ExpandAnimationParameters();
+ private final ExpandableNotificationRow mSourceNotification;
+ private final ExpandAnimationParameters mParams;
private final Rect mWindowCrop = new Rect();
private final float mNotificationCornerRadius;
private float mCornerRadius;
private boolean mIsFullScreenLaunch = true;
private final SyncRtSurfaceTransactionApplier mSyncRtTransactionApplier;
- AnimationRunner(ExpandableNotificationRow sourceNotification) {
- mSourceNotification = sourceNotification;
- mSyncRtTransactionApplier = new SyncRtSurfaceTransactionApplier(sourceNotification);
- mNotificationCornerRadius = Math.max(sourceNotification.getCurrentTopRoundness(),
- sourceNotification.getCurrentBottomRoundness());
+ public AnimationRunner(ExpandableNotificationRow sourceNofitication) {
+ mSourceNotification = sourceNofitication;
+ mParams = new ExpandAnimationParameters();
+ mSyncRtTransactionApplier = new SyncRtSurfaceTransactionApplier(mSourceNotification);
+ mNotificationCornerRadius = Math.max(mSourceNotification.getCurrentTopRoundness(),
+ mSourceNotification.getCurrentBottomRoundness());
}
@Override
@@ -154,7 +155,6 @@ public class ActivityLaunchAnimator {
setAnimationPending(false);
invokeCallback(iRemoteAnimationFinishedCallback);
mNotificationPanel.collapse(false /* delayed */, 1.0f /* speedUpFactor */);
- mSourceNotification = null;
return;
}
@@ -254,7 +254,6 @@ public class ActivityLaunchAnimator {
mCallback.onExpandAnimationFinished(mIsFullScreenLaunch);
applyParamsToNotification(null);
applyParamsToNotificationList(null);
- mSourceNotification = null;
}
}
@@ -282,7 +281,6 @@ public class ActivityLaunchAnimator {
mSourceNotification.post(() -> {
setAnimationPending(false);
mCallback.onLaunchAnimationCancelled();
- mSourceNotification = null;
});
}
};