Merge "Fix NPE for devices that don't use a lock icon in sysui." into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6490c31b4c
@@ -134,7 +134,10 @@ public class KeyguardIndicationController implements StateListener {
|
|||||||
mTextView.getTextColors() : ColorStateList.valueOf(Color.WHITE);
|
mTextView.getTextColors() : ColorStateList.valueOf(Color.WHITE);
|
||||||
mDisclosure = indicationArea.findViewById(R.id.keyguard_indication_enterprise_disclosure);
|
mDisclosure = indicationArea.findViewById(R.id.keyguard_indication_enterprise_disclosure);
|
||||||
mLockIcon = lockIcon;
|
mLockIcon = lockIcon;
|
||||||
mLockIcon.setOnLongClickListener(this::handleTrustCircleClick);
|
// lock icon is not used on all form factors.
|
||||||
|
if (mLockIcon != null) {
|
||||||
|
mLockIcon.setOnLongClickListener(this::handleTrustCircleClick);
|
||||||
|
}
|
||||||
mWakeLock = new SettableWakeLock(wakeLock, TAG);
|
mWakeLock = new SettableWakeLock(wakeLock, TAG);
|
||||||
mLockPatternUtils = lockPatternUtils;
|
mLockPatternUtils = lockPatternUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -250,6 +250,10 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateLockIcon() {
|
private void updateLockIcon() {
|
||||||
|
// Not all form factors have a lock icon
|
||||||
|
if (mLockIconContainer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
boolean keyguardWithoutQs = mStatusBarStateController.getState() == StatusBarState.KEYGUARD
|
boolean keyguardWithoutQs = mStatusBarStateController.getState() == StatusBarState.KEYGUARD
|
||||||
&& !mNotificationPanelView.isQsExpanded();
|
&& !mNotificationPanelView.isQsExpanded();
|
||||||
int lockVisibility = (mBouncer.isShowing() || keyguardWithoutQs)
|
int lockVisibility = (mBouncer.isShowing() || keyguardWithoutQs)
|
||||||
|
|||||||
Reference in New Issue
Block a user