Loading packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1192,6 +1192,9 @@ <xliff:g id="application_personal">%3$s</xliff:g>, which can monitor your personal network activity.</string> <!-- Indication on the keyguard that appears when a trust agents unlocks the device. [CHAR LIMIT=40] --> <string name="keyguard_indication_trust_granted">Unlocked for <xliff:g id="user_name" example="John Doe">%1$s</xliff:g></string> <!-- Indication on the keyguard that appears when the user disables trust agents until the next time they unlock manually. [CHAR LIMIT=NONE] --> <string name="keyguard_indication_trust_disabled">Device will stay locked until you manually unlock</string> Loading packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +22 −8 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class KeyguardIndicationController { private int mChargingWattage; private String mMessageToShowOnScreenOn; private KeyguardUpdateMonitorCallback mUpdateMonitor; private KeyguardUpdateMonitorCallback mUpdateMonitorCallback; private final DevicePolicyManager mDevicePolicyManager; private boolean mDozing; Loading Loading @@ -153,10 +153,10 @@ public class KeyguardIndicationController { * same instance. */ protected KeyguardUpdateMonitorCallback getKeyguardCallback() { if (mUpdateMonitor == null) { mUpdateMonitor = new BaseKeyguardCallback(); if (mUpdateMonitorCallback == null) { mUpdateMonitorCallback = new BaseKeyguardCallback(); } return mUpdateMonitor; return mUpdateMonitorCallback; } private void updateDisclosure() { Loading Loading @@ -202,6 +202,15 @@ public class KeyguardIndicationController { public void setUserInfoController(UserInfoController userInfoController) { } /** * Returns the indication text indicating that trust has been granted. * * @return {@code null} or an empty string if a trust indication text should not be shown. */ protected String getTrustIndication() { return null; } /** * Hides transient indication in {@param delayMs}. */ Loading Loading @@ -250,7 +259,7 @@ public class KeyguardIndicationController { } } private void updateIndication() { protected final void updateIndication() { if (TextUtils.isEmpty(mTransientIndication)) { mWakeLock.setAcquired(false); } Loading @@ -270,14 +279,19 @@ public class KeyguardIndicationController { return; } if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) { KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext); int userId = ActivityManager.getCurrentUser(); String trustIndication = getTrustIndication(); if (!mUserManager.isUserUnlocked(userId)) { mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked); mTextView.setTextColor(Color.WHITE); } else if (!TextUtils.isEmpty(mTransientIndication)) { mTextView.switchIndication(mTransientIndication); mTextView.setTextColor(mTransientTextColor); } else if (!TextUtils.isEmpty(trustIndication) && updateMonitor.getUserHasTrust(userId)) { mTextView.switchIndication(trustIndication); mTextView.setTextColor(Color.WHITE); } else if (mPowerPluggedIn) { String indication = computePowerIndication(); if (DEBUG_CHARGING_SPEED) { Loading Loading
packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1192,6 +1192,9 @@ <xliff:g id="application_personal">%3$s</xliff:g>, which can monitor your personal network activity.</string> <!-- Indication on the keyguard that appears when a trust agents unlocks the device. [CHAR LIMIT=40] --> <string name="keyguard_indication_trust_granted">Unlocked for <xliff:g id="user_name" example="John Doe">%1$s</xliff:g></string> <!-- Indication on the keyguard that appears when the user disables trust agents until the next time they unlock manually. [CHAR LIMIT=NONE] --> <string name="keyguard_indication_trust_disabled">Device will stay locked until you manually unlock</string> Loading
packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java +22 −8 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ public class KeyguardIndicationController { private int mChargingWattage; private String mMessageToShowOnScreenOn; private KeyguardUpdateMonitorCallback mUpdateMonitor; private KeyguardUpdateMonitorCallback mUpdateMonitorCallback; private final DevicePolicyManager mDevicePolicyManager; private boolean mDozing; Loading Loading @@ -153,10 +153,10 @@ public class KeyguardIndicationController { * same instance. */ protected KeyguardUpdateMonitorCallback getKeyguardCallback() { if (mUpdateMonitor == null) { mUpdateMonitor = new BaseKeyguardCallback(); if (mUpdateMonitorCallback == null) { mUpdateMonitorCallback = new BaseKeyguardCallback(); } return mUpdateMonitor; return mUpdateMonitorCallback; } private void updateDisclosure() { Loading Loading @@ -202,6 +202,15 @@ public class KeyguardIndicationController { public void setUserInfoController(UserInfoController userInfoController) { } /** * Returns the indication text indicating that trust has been granted. * * @return {@code null} or an empty string if a trust indication text should not be shown. */ protected String getTrustIndication() { return null; } /** * Hides transient indication in {@param delayMs}. */ Loading Loading @@ -250,7 +259,7 @@ public class KeyguardIndicationController { } } private void updateIndication() { protected final void updateIndication() { if (TextUtils.isEmpty(mTransientIndication)) { mWakeLock.setAcquired(false); } Loading @@ -270,14 +279,19 @@ public class KeyguardIndicationController { return; } if (!mUserManager.isUserUnlocked(ActivityManager.getCurrentUser())) { KeyguardUpdateMonitor updateMonitor = KeyguardUpdateMonitor.getInstance(mContext); int userId = ActivityManager.getCurrentUser(); String trustIndication = getTrustIndication(); if (!mUserManager.isUserUnlocked(userId)) { mTextView.switchIndication(com.android.internal.R.string.lockscreen_storage_locked); mTextView.setTextColor(Color.WHITE); } else if (!TextUtils.isEmpty(mTransientIndication)) { mTextView.switchIndication(mTransientIndication); mTextView.setTextColor(mTransientTextColor); } else if (!TextUtils.isEmpty(trustIndication) && updateMonitor.getUserHasTrust(userId)) { mTextView.switchIndication(trustIndication); mTextView.setTextColor(Color.WHITE); } else if (mPowerPluggedIn) { String indication = computePowerIndication(); if (DEBUG_CHARGING_SPEED) { Loading