Merge "Remove keyguard state callback onViewDetached." into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d232ab98b3
@@ -79,18 +79,6 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
|||||||
dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ true);
|
dozeParameters, unlockedScreenOffAnimationController, /* animateYPos= */ true);
|
||||||
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
mKeyguardUnlockAnimationController = keyguardUnlockAnimationController;
|
||||||
mSmartspaceTransitionController = smartspaceTransitionController;
|
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
|
@Override
|
||||||
@@ -102,12 +90,14 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV
|
|||||||
protected void onViewAttached() {
|
protected void onViewAttached() {
|
||||||
mKeyguardUpdateMonitor.registerCallback(mInfoCallback);
|
mKeyguardUpdateMonitor.registerCallback(mInfoCallback);
|
||||||
mConfigurationController.addCallback(mConfigurationListener);
|
mConfigurationController.addCallback(mConfigurationListener);
|
||||||
|
mKeyguardStateController.addCallback(mKeyguardStateControllerCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onViewDetached() {
|
protected void onViewDetached() {
|
||||||
mKeyguardUpdateMonitor.removeCallback(mInfoCallback);
|
mKeyguardUpdateMonitor.removeCallback(mInfoCallback);
|
||||||
mConfigurationController.removeCallback(mConfigurationListener);
|
mConfigurationController.removeCallback(mConfigurationListener);
|
||||||
|
mKeyguardStateController.removeCallback(mKeyguardStateControllerCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -276,6 +266,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.
|
* Rect that specifies how KSV should be clipped, on its parent's coordinates.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user