Merge "Fix divider bar floating on keyguard panel"

This commit is contained in:
TreeHugger Robot
2020-09-12 06:19:56 +00:00
committed by Android (Google) Code Review

View File

@@ -82,6 +82,9 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr
private final ShellTaskOrganizer mShellTaskOrganizer;
private final ProtoTracer mProtoTracer;
private KeyguardUpdateMonitorCallback mSplitScreenKeyguardCallback;
private KeyguardUpdateMonitorCallback mOneHandedKeyguardCallback;
@Inject
public WMShell(Context context, CommandQueue commandQueue,
KeyguardUpdateMonitor keyguardUpdateMonitor,
@@ -134,7 +137,7 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr
@VisibleForTesting
void initSplitScreen(SplitScreen splitScreen) {
mKeyguardUpdateMonitor.registerCallback(new KeyguardUpdateMonitorCallback() {
mSplitScreenKeyguardCallback = new KeyguardUpdateMonitorCallback() {
@Override
public void onKeyguardVisibilityChanged(boolean showing) {
// Hide the divider when keyguard is showing. Even though keyguard/statusbar is
@@ -143,7 +146,8 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr
// TODO(b/148906453): Figure out keyguard dismiss animation for divider view.
splitScreen.onKeyguardVisibilityChanged(showing);
}
});
};
mKeyguardUpdateMonitor.registerCallback(mSplitScreenKeyguardCallback);
mActivityManagerWrapper.registerTaskStackListener(
new TaskStackChangeListener() {
@@ -223,7 +227,7 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr
}
});
mKeyguardUpdateMonitor.registerCallback(new KeyguardUpdateMonitorCallback() {
mOneHandedKeyguardCallback = new KeyguardUpdateMonitorCallback() {
@Override
public void onKeyguardBouncerChanged(boolean bouncer) {
if (bouncer) {
@@ -235,7 +239,8 @@ public final class WMShell extends SystemUI implements ProtoTraceable<SystemUiTr
public void onKeyguardVisibilityChanged(boolean showing) {
oneHanded.stopOneHanded();
}
});
};
mKeyguardUpdateMonitor.registerCallback(mOneHandedKeyguardCallback);
mScreenLifecycle.addObserver(new ScreenLifecycle.Observer() {
@Override