Merge "Fix lockscreen notification launch animation" into pi-dev

This commit is contained in:
Jorim Jaggi
2018-03-19 13:23:30 +00:00
committed by Android (Google) Code Review
5 changed files with 19 additions and 4 deletions

View File

@@ -77,6 +77,9 @@ public class ActivityLaunchAnimator {
public RemoteAnimationAdapter getLaunchAnimation(
ExpandableNotificationRow sourceNotification) {
if (mStatusBar.getBarState() != StatusBarState.SHADE) {
return null;
}
AnimationRunner animationRunner = new AnimationRunner(sourceNotification);
return new RemoteAnimationAdapter(animationRunner, ANIMATION_DURATION,
0 /* statusBarTransitionDelay */);

View File

@@ -5044,8 +5044,11 @@ public class StatusBar extends SystemUI implements DemoMode,
RemoteAnimationAdapter adapter = mActivityLaunchAnimator.getLaunchAnimation(
row);
try {
ActivityManager.getService().registerRemoteAnimationForNextActivityStart(
intent.getCreatorPackage(), adapter);
if (adapter != null) {
ActivityManager.getService()
.registerRemoteAnimationForNextActivityStart(
intent.getCreatorPackage(), adapter);
}
launchResult = intent.sendAndReturnResult(mContext, 0, fillInIntent, null,
null, null, getActivityOptions(adapter));
mActivityLaunchAnimator.setLaunchResult(launchResult);

View File

@@ -617,7 +617,8 @@ public class AppWindowContainerController
if (DEBUG_STARTING_WINDOW) Slog.v(TAG_WM, "Schedule remove starting " + mContainer
+ " startingWindow=" + mContainer.startingWindow
+ " startingView=" + mContainer.startingSurface);
+ " startingView=" + mContainer.startingSurface
+ " Callers=" + Debug.getCallers(5));
// Use the same thread to remove the window as we used to add it, as otherwise we end up
// with things in the view hierarchy being called from different threads.

View File

@@ -2079,6 +2079,13 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
super.prepareSurfaces();
}
/**
* @return Whether our {@link #getSurfaceControl} is currently showing.
*/
boolean isSurfaceShowing() {
return mLastSurfaceShowing;
}
boolean isFreezingScreen() {
return mFreezingScreen;
}

View File

@@ -247,7 +247,8 @@ class TaskSnapshotController {
// Ensure at least one window for the top app is visible before attempting to take
// a screenshot. Visible here means that the WSA surface is shown and has an alpha
// greater than 0.
ws -> ws.mWinAnimator != null && ws.mWinAnimator.getShown()
ws -> (ws.mAppToken == null || ws.mAppToken.isSurfaceShowing())
&& ws.mWinAnimator != null && ws.mWinAnimator.getShown()
&& ws.mWinAnimator.mLastAlpha > 0f, true);
if (!hasVisibleChild) {