Merge "Fix flickery behavior when launching notification when occluded" into oc-dr1-dev

This commit is contained in:
Adrian Roos
2017-07-26 11:47:01 +00:00
committed by Android (Google) Code Review
2 changed files with 21 additions and 5 deletions

View File

@@ -6810,7 +6810,6 @@ public class StatusBar extends SystemUI implements DemoMode,
}
});
final boolean keyguardShowing = mStatusBarKeyguardViewManager.isShowing();
final boolean afterKeyguardGone = intent.isActivity()
&& PreviewInflater.wouldLaunchResolverActivity(mContext, intent.getIntent(),
mCurrentUserId);
@@ -6837,7 +6836,7 @@ public class StatusBar extends SystemUI implements DemoMode,
}
}
final StatusBarNotification parentToCancelFinal = parentToCancel;
new Thread() {
final Runnable runnable = new Runnable() {
@Override
public void run() {
try {
@@ -6909,7 +6908,14 @@ public class StatusBar extends SystemUI implements DemoMode,
});
}
}
}.start();
};
if (mStatusBarKeyguardViewManager.isShowing()
&& mStatusBarKeyguardViewManager.isOccluded()) {
mStatusBarKeyguardViewManager.addAfterKeyguardGoneRunnable(runnable);
} else {
new Thread(runnable).start();
}
// close the shade if it was open
animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL,

View File

@@ -23981,9 +23981,19 @@ public class ActivityManagerService extends IActivityManager.Stub
// We might change the visibilities here, so prepare an empty app transition which
// might be overridden later if we actually change visibilities.
mWindowManager.prepareAppTransition(TRANSIT_NONE, false /* alwaysKeepCurrent */);
final boolean wasTransitionSet =
mWindowManager.getPendingAppTransition() != TRANSIT_NONE;
if (!wasTransitionSet) {
mWindowManager.prepareAppTransition(TRANSIT_NONE,
false /* alwaysKeepCurrent */);
}
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
mWindowManager.executeAppTransition();
// If there was a transition set already we don't want to interfere with it as we
// might be starting it too early.
if (!wasTransitionSet) {
mWindowManager.executeAppTransition();
}
}
if (callback != null) {
callback.run();