summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-07-23 20:26:19 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-07-23 21:09:13 (GMT)
commit4a63515b91f8f8dcb4dfc5841741b4684ccc7a2a (patch)
tree676f90a211bb67c6dd47d94d77a6509d9093d59e
parent8c169086e60ce5c2fc039b6d146373b126edb355 (diff)
downloadframeworks_base-4a63515b91f8f8dcb4dfc5841741b4684ccc7a2a.zip
frameworks_base-4a63515b91f8f8dcb4dfc5841741b4684ccc7a2a.tar.gz
frameworks_base-4a63515b91f8f8dcb4dfc5841741b4684ccc7a2a.tar.bz2
ProfilesTile: Enable authentication for handleClick()
* This disallows enabling profile on secure lockscreen which could allow enabling last profile that could potentially have a disabled lockscreen. * Fixes : https://gitlab.com/LineageOS/issues/android/issues/965 Change-Id: Ic9a845f1b6e4a408134c4a9ad31810d88375a99b
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
index 85f35bd..322394b 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
@@ -96,6 +96,12 @@ public class ProfilesTile extends QSTileImpl<State> {
@Override
protected void handleClick() {
+ if (mKeyguardMonitor.isSecure() && mKeyguardMonitor.isShowing()) {
+ mActivityStarter.postQSRunnableDismissingKeyguard(() -> {
+ setProfilesEnabled(!profilesEnabled());
+ });
+ return;
+ }
setProfilesEnabled(!profilesEnabled());
}