Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +89 −70 Original line number Diff line number Diff line Loading @@ -123,11 +123,17 @@ public class ActivityLaunchAnimator { IRemoteAnimationFinishedCallback iRemoteAnimationFinishedCallback) throws RemoteException { mSourceNotification.post(() -> { for (RemoteAnimationTarget app : remoteAnimationTargets) { if (app.mode == RemoteAnimationTarget.MODE_OPENING) { RemoteAnimationTarget primary = getPrimaryRemoteAnimationTarget( remoteAnimationTargets); if (primary == null) { setAnimationPending(false); invokeCallback(iRemoteAnimationFinishedCallback); return; } setExpandAnimationRunning(true); mInstantCollapsePanel = app.position.y == 0 && app.sourceContainerBounds.height() mInstantCollapsePanel = primary.position.y == 0 && primary.sourceContainerBounds.height() >= mNotificationPanel.getHeight(); if (!mInstantCollapsePanel) { mNotificationPanel.collapseWithDuration(ANIMATION_DURATION); Loading @@ -150,7 +156,7 @@ public class ActivityLaunchAnimator { } } } int targetWidth = app.sourceContainerBounds.width(); int targetWidth = primary.sourceContainerBounds.width(); int notificationHeight = mSourceNotification.getActualHeight() - mSourceNotification.getClipBottomAmount(); int notificationWidth = mSourceNotification.getWidth(); Loading @@ -168,12 +174,12 @@ public class ActivityLaunchAnimator { mParams.left = (int) ((targetWidth - newWidth) / 2.0f); mParams.right = mParams.left + newWidth; mParams.top = (int) MathUtils.lerp(mParams.startPosition[1], app.position.y, progress); primary.position.y, progress); mParams.bottom = (int) MathUtils.lerp(mParams.startPosition[1] + notificationHeight, app.position.y + app.sourceContainerBounds.bottom, primary.position.y + primary.sourceContainerBounds.bottom, progress); applyParamsToWindow(app); applyParamsToWindow(primary); applyParamsToNotification(mParams); applyParamsToNotificationList(mParams); } Loading @@ -185,19 +191,32 @@ public class ActivityLaunchAnimator { if (mInstantCollapsePanel) { mStatusBar.collapsePanel(false /* animate */); } invokeCallback(iRemoteAnimationFinishedCallback); } }); anim.start(); setAnimationPending(false); }); } private void invokeCallback(IRemoteAnimationFinishedCallback callback) { try { iRemoteAnimationFinishedCallback.onAnimationFinished(); callback.onAnimationFinished(); } catch (RemoteException e) { e.printStackTrace(); } } }); anim.start(); private RemoteAnimationTarget getPrimaryRemoteAnimationTarget( RemoteAnimationTarget[] remoteAnimationTargets) { RemoteAnimationTarget primary = null; for (RemoteAnimationTarget app : remoteAnimationTargets) { if (app.mode == RemoteAnimationTarget.MODE_OPENING) { primary = app; break; } } setAnimationPending(false); }); return primary; } private void setExpandAnimationRunning(boolean running) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimator.java +89 −70 Original line number Diff line number Diff line Loading @@ -123,11 +123,17 @@ public class ActivityLaunchAnimator { IRemoteAnimationFinishedCallback iRemoteAnimationFinishedCallback) throws RemoteException { mSourceNotification.post(() -> { for (RemoteAnimationTarget app : remoteAnimationTargets) { if (app.mode == RemoteAnimationTarget.MODE_OPENING) { RemoteAnimationTarget primary = getPrimaryRemoteAnimationTarget( remoteAnimationTargets); if (primary == null) { setAnimationPending(false); invokeCallback(iRemoteAnimationFinishedCallback); return; } setExpandAnimationRunning(true); mInstantCollapsePanel = app.position.y == 0 && app.sourceContainerBounds.height() mInstantCollapsePanel = primary.position.y == 0 && primary.sourceContainerBounds.height() >= mNotificationPanel.getHeight(); if (!mInstantCollapsePanel) { mNotificationPanel.collapseWithDuration(ANIMATION_DURATION); Loading @@ -150,7 +156,7 @@ public class ActivityLaunchAnimator { } } } int targetWidth = app.sourceContainerBounds.width(); int targetWidth = primary.sourceContainerBounds.width(); int notificationHeight = mSourceNotification.getActualHeight() - mSourceNotification.getClipBottomAmount(); int notificationWidth = mSourceNotification.getWidth(); Loading @@ -168,12 +174,12 @@ public class ActivityLaunchAnimator { mParams.left = (int) ((targetWidth - newWidth) / 2.0f); mParams.right = mParams.left + newWidth; mParams.top = (int) MathUtils.lerp(mParams.startPosition[1], app.position.y, progress); primary.position.y, progress); mParams.bottom = (int) MathUtils.lerp(mParams.startPosition[1] + notificationHeight, app.position.y + app.sourceContainerBounds.bottom, primary.position.y + primary.sourceContainerBounds.bottom, progress); applyParamsToWindow(app); applyParamsToWindow(primary); applyParamsToNotification(mParams); applyParamsToNotificationList(mParams); } Loading @@ -185,19 +191,32 @@ public class ActivityLaunchAnimator { if (mInstantCollapsePanel) { mStatusBar.collapsePanel(false /* animate */); } invokeCallback(iRemoteAnimationFinishedCallback); } }); anim.start(); setAnimationPending(false); }); } private void invokeCallback(IRemoteAnimationFinishedCallback callback) { try { iRemoteAnimationFinishedCallback.onAnimationFinished(); callback.onAnimationFinished(); } catch (RemoteException e) { e.printStackTrace(); } } }); anim.start(); private RemoteAnimationTarget getPrimaryRemoteAnimationTarget( RemoteAnimationTarget[] remoteAnimationTargets) { RemoteAnimationTarget primary = null; for (RemoteAnimationTarget app : remoteAnimationTargets) { if (app.mode == RemoteAnimationTarget.MODE_OPENING) { primary = app; break; } } setAnimationPending(false); }); return primary; } private void setExpandAnimationRunning(boolean running) { Loading