summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorDanesh M <danesh@cyngn.com>2016-06-17 14:15:00 -0700
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-06-20 09:31:00 -0700
commit55249369f762d7eb1b10f6e9d857f75b59e93347 (patch)
tree90c1c176725eca435d40a1b5c90875ded14ce535 /src/com/android
parent5004f924851585be3b2bb149eede87c35f3f28c8 (diff)
downloadpackages_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')
-rw-r--r--src/com/android/settings/SecuritySettings.java17
-rw-r--r--src/com/android/settings/TrustAgentUtils.java2
-rw-r--r--src/com/android/settings/cyanogenmod/LockscreenSettingsAlias.java17
-rw-r--r--src/com/android/settings/search/IndexDatabaseHelper.java2
4 files changed, 20 insertions, 18 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 0fd5d2c..17775ab 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -1010,20 +1010,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
result.add(data);
}
- // Advanced
- final LockPatternUtils lockPatternUtils = new LockPatternUtils(context);
- if (lockPatternUtils.isSecure(MY_USER_ID)) {
- ArrayList<TrustAgentComponentInfo> agents =
- getActiveTrustAgents(context.getPackageManager(), lockPatternUtils,
- context.getSystemService(DevicePolicyManager.class));
- for (int i = 0; i < agents.size(); i++) {
- final TrustAgentComponentInfo agent = agents.get(i);
- data = new SearchIndexableRaw(context);
- data.title = agent.title;
- data.screenTitle = screenTitle;
- result.add(data);
- }
- }
+
return result;
}
@@ -1032,8 +1019,6 @@ public class SecuritySettings extends SettingsPreferenceFragment
final List<String> keys = new ArrayList<String>();
LockPatternUtils lockPatternUtils = new LockPatternUtils(context);
- // Add options for lock/unlock screen
- int resId = getResIdForLockUnlockScreen(context, lockPatternUtils);
// Do not display SIM lock for devices without an Icc card
TelephonyManager tm = TelephonyManager.getDefault();
diff --git a/src/com/android/settings/TrustAgentUtils.java b/src/com/android/settings/TrustAgentUtils.java
index 109663a..7fed4ec 100644
--- a/src/com/android/settings/TrustAgentUtils.java
+++ b/src/com/android/settings/TrustAgentUtils.java
@@ -55,7 +55,7 @@ public class TrustAgentUtils {
public static class TrustAgentComponentInfo {
ComponentName componentName;
- String title;
+ public String title;
String summary;
boolean disabledByAdministrator;
}
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;
}
}
diff --git a/src/com/android/settings/search/IndexDatabaseHelper.java b/src/com/android/settings/search/IndexDatabaseHelper.java
index 4fc93db..146c640 100644
--- a/src/com/android/settings/search/IndexDatabaseHelper.java
+++ b/src/com/android/settings/search/IndexDatabaseHelper.java
@@ -28,7 +28,7 @@ public class IndexDatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "IndexDatabaseHelper";
private static final String DATABASE_NAME = "search_index.db";
- private static final int DATABASE_VERSION = 120;
+ private static final int DATABASE_VERSION = 121;
public interface Tables {
public static final String TABLE_PREFS_INDEX = "prefs_index";