summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/res/values/strings.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java1
4 files changed, 22 insertions, 1 deletions
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 93ed231..72886c6 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -782,4 +782,7 @@
<!-- Monitoring dialog legacy VPN with device owner text [CHAR LIMIT=300] -->
<string name="monitoring_description_legacy_vpn_device_owned">This device is managed by:\n<xliff:g id="organization">%1$s</xliff:g>\n\nYour administrator is capable of monitoring your network activity including emails, apps, and secure websites. For more information, contact your administrator.\n\nAlso, you\'re connected to a VPN (\"<xliff:g id="application">%2$s</xliff:g>\"). Your VPN service provider can monitor network activity too.</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>
+
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
index 6779e4e..4a6bfa10 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardAffordanceView.java
@@ -401,7 +401,9 @@ public class KeyguardAffordanceView extends ImageView {
Interpolator interpolator, Runnable runnable) {
cancelAnimator(mAlphaAnimator);
int endAlpha = (int) (alpha * 255);
+ final Drawable background = getBackground();
if (!animate) {
+ if (background != null) background.mutate().setAlpha(endAlpha);
setImageAlpha(endAlpha);
} else {
int currentAlpha = getImageAlpha();
@@ -410,7 +412,9 @@ public class KeyguardAffordanceView extends ImageView {
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
- setImageAlpha((int) animation.getAnimatedValue());
+ int alpha = (int) animation.getAnimatedValue();
+ if (background != null) background.mutate().setAlpha(alpha);
+ setImageAlpha(alpha);
}
});
animator.addListener(mAlphaEndListener);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 79f9da4..e11f20f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -38,6 +38,7 @@ import com.android.internal.widget.LockPatternUtils;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.R;
+import com.android.systemui.statusbar.KeyguardIndicationController;
import com.android.systemui.statusbar.policy.FlashlightController;
import com.android.systemui.statusbar.KeyguardAffordanceView;
import com.android.systemui.statusbar.policy.PreviewInflater;
@@ -72,6 +73,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
private LockPatternUtils mLockPatternUtils;
private FlashlightController mFlashlightController;
private PreviewInflater mPreviewInflater;
+ private KeyguardIndicationController mIndicationController;
private boolean mFaceUnlockRunning;
public KeyguardBottomAreaView(Context context) {
@@ -111,6 +113,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
setClipToPadding(false);
mPreviewInflater = new PreviewInflater(mContext, new LockPatternUtils(mContext));
inflatePreviews();
+ mLockIcon.setOnClickListener(this);
}
public void setActivityStarter(ActivityStarter activityStarter) {
@@ -204,6 +207,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
launchCamera();
} else if (v == mPhoneImageView) {
launchPhone();
+ } if (v == mLockIcon) {
+ mIndicationController.showTransientIndication(
+ R.string.keyguard_indication_trust_disabled);
+ mLockPatternUtils.requireCredentialEntry(mLockPatternUtils.getCurrentUser());
}
}
@@ -244,6 +251,7 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
boolean trustManaged = mUnlockMethodCache.isTrustManaged();
mLockIcon.setBackgroundResource(trustManaged && !mFaceUnlockRunning
? R.drawable.trust_circle : 0);
+ mLockIcon.setClickable(trustManaged);
}
public KeyguardAffordanceView getPhoneView() {
@@ -318,4 +326,9 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
updateLockIcon();
}
};
+
+ public void setKeyguardIndicationController(
+ KeyguardIndicationController keyguardIndicationController) {
+ mIndicationController = keyguardIndicationController;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index f8319c2..caecf1d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -721,6 +721,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mKeyguardIndicationController = new KeyguardIndicationController(mContext,
(KeyguardIndicationTextView) mStatusBarWindow.findViewById(
R.id.keyguard_indication_text));
+ mKeyguardBottomArea.setKeyguardIndicationController(mKeyguardIndicationController);
mTickerEnabled = res.getBoolean(R.bool.enable_ticker);
if (mTickerEnabled) {