Merge "Fix lockscreen notification launch animation" into pi-dev
am: a1d6bd94fe
Change-Id: I12cbc8fbd9b087d882eebc8a1b2052e6988128c9
This commit is contained in:
@@ -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 */);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user