Merge "Limit keyguard views on alt displays" into sc-dev
This commit is contained in:
@@ -97,6 +97,8 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
|||||||
private final KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
private final KeyguardUnlockAnimationController mKeyguardUnlockAnimationController;
|
||||||
private SmartspaceTransitionController mSmartspaceTransitionController;
|
private SmartspaceTransitionController mSmartspaceTransitionController;
|
||||||
|
|
||||||
|
private boolean mOnlyClock = false;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public KeyguardClockSwitchController(
|
public KeyguardClockSwitchController(
|
||||||
KeyguardClockSwitch keyguardClockSwitch,
|
KeyguardClockSwitch keyguardClockSwitch,
|
||||||
@@ -128,6 +130,13 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
|||||||
mSmartspaceTransitionController = smartspaceTransitionController;
|
mSmartspaceTransitionController = smartspaceTransitionController;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mostly used for alternate displays, limit the information shown
|
||||||
|
*/
|
||||||
|
public void setOnlyClock(boolean onlyClock) {
|
||||||
|
mOnlyClock = onlyClock;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attach the controller to the view it relates to.
|
* Attach the controller to the view it relates to.
|
||||||
*/
|
*/
|
||||||
@@ -166,6 +175,16 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
|
|||||||
}
|
}
|
||||||
mColorExtractor.addOnColorsChangedListener(mColorsListener);
|
mColorExtractor.addOnColorsChangedListener(mColorsListener);
|
||||||
mView.updateColors(getGradientColors());
|
mView.updateColors(getGradientColors());
|
||||||
|
|
||||||
|
if (mOnlyClock) {
|
||||||
|
View ksa = mView.findViewById(R.id.keyguard_status_area);
|
||||||
|
ksa.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
View nic = mView.findViewById(
|
||||||
|
R.id.left_aligned_notification_icon_container);
|
||||||
|
nic.setVisibility(View.GONE);
|
||||||
|
return;
|
||||||
|
}
|
||||||
updateAodIcons();
|
updateAodIcons();
|
||||||
|
|
||||||
if (mSmartspaceController.isEnabled()) {
|
if (mSmartspaceController.isEnabled()) {
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ public class KeyguardDisplayManager {
|
|||||||
.build(findViewById(R.id.clock))
|
.build(findViewById(R.id.clock))
|
||||||
.getKeyguardClockSwitchController();
|
.getKeyguardClockSwitchController();
|
||||||
|
|
||||||
|
mKeyguardClockSwitchController.setOnlyClock(true);
|
||||||
mKeyguardClockSwitchController.init();
|
mKeyguardClockSwitchController.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user