Merge "Remove keyguard state callback onViewDetached." into sc-dev am: d232ab98b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15273145

Change-Id: I963a832b198787c1a2997e86771168cae7a03f46
This commit is contained in:
TreeHugger Robot
2021-07-13 18:24:22 +00:00
committed by Automerger Merge Worker

View File

@@ -80,18 +80,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ true);
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
mSmartspaceTransitionController = smartspaceTransitionController;
mKeyguardStateController.addCallback(new KeyguardStateController.Callback() {
@Override
public void onKeyguardShowingChanged() {
// If we explicitly re-show the keyguard, make sure that all the child views are
// visible. They might have been animating out as part of the SmartSpace shared
// element transition.
if (keyguardStateController.isShowing()) {
mView.setChildrenAlphaExcludingClockView(1f);
}
}
});
}
@Override
@@ -103,12 +91,14 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
protected void onViewAttached() {
mKeyguardUpdateMonitor.registerCallback(mInfoCallback);
mConfigurationController.addCallback(mConfigurationListener);
mKeyguardStateController.addCallback(mKeyguardStateControllerCallback);
}
@Override
protected void onViewDetached() {
mKeyguardUpdateMonitor.removeCallback(mInfoCallback);
mConfigurationController.removeCallback(mConfigurationListener);
mKeyguardStateController.removeCallback(mKeyguardStateControllerCallback);
}
/**
@@ -278,6 +268,19 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
}
};
private KeyguardStateController.Callback mKeyguardStateControllerCallback =
new KeyguardStateController.Callback() {
@Override
public void onKeyguardShowingChanged() {
// If we explicitly re-show the keyguard, make sure that all the child views are
// visible. They might have been animating out as part of the SmartSpace shared
// element transition.
if (mKeyguardStateController.isShowing()) {
mView.setChildrenAlphaExcludingClockView(1f);
}
}
};
/**
* Rect that specifies how KSV should be clipped, on its parent's coordinates.
*/