diff options
author | Danesh M <danesh@cyngn.com> | 2016-06-17 14:15:00 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-06-20 09:31:00 -0700 |
commit | 55249369f762d7eb1b10f6e9d857f75b59e93347 (patch) | |
tree | 90c1c176725eca435d40a1b5c90875ded14ce535 /src/com/android/settings/cyanogenmod | |
parent | 5004f924851585be3b2bb149eede87c35f3f28c8 (diff) | |
download | packages_apps_Settings-55249369f762d7eb1b10f6e9d857f75b59e93347.zip packages_apps_Settings-55249369f762d7eb1b10f6e9d857f75b59e93347.tar.gz packages_apps_Settings-55249369f762d7eb1b10f6e9d857f75b59e93347.tar.bz2 |
Settings : Move trust agent search index to LockscreenSettings
Ensure smart lock takes you to LockscreenSettings instead of
SecuritySettings
CYNGNOS-3053
Change-Id: I2d6f4b29cfad259cebfb3ee97b055f59a131d3de
Diffstat (limited to 'src/com/android/settings/cyanogenmod')
-rw-r--r-- | src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java b/src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java index d6ca06a..f89de89 100644 --- a/src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java +++ b/src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java @@ -16,8 +16,10 @@ package com.android.settings.cyanogenmod; +import android.app.admin.DevicePolicyManager; import com.android.internal.widget.LockPatternUtils; import com.android.settings.SecuritySettings; +import com.android.settings.TrustAgentUtils; import com.android.settings.search.BaseSearchIndexProvider; import com.android.settings.search.SearchIndexableRaw; @@ -110,6 +112,21 @@ public class LockscreenSettingsAlias extends SecuritySettings { result.add(data); } + // Advanced + final LockPatternUtils lockPatternUtils = new LockPatternUtils(context); + if (lockPatternUtils.isSecure(MY_USER_ID)) { + ArrayList<TrustAgentUtils.TrustAgentComponentInfo> agents = + getActiveTrustAgents(context.getPackageManager(), lockPatternUtils, + context.getSystemService(DevicePolicyManager.class)); + for (int i = 0; i < agents.size(); i++) { + final TrustAgentUtils.TrustAgentComponentInfo agent = agents.get(i); + data = new SearchIndexableRaw(context); + data.title = agent.title; + data.screenTitle = screenTitle; + result.add(data); + } + } + return result; } } |