summaryrefslogtreecommitdiff
path: root/src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java
diff options
context:
space:
mode:
authorMalcolm Chen <refuhoo@google.com>2017-05-04 18:42:11 -0700
committerMalcolm Chen <refuhoo@google.com>2017-05-16 11:47:06 -0700
commit67c76f156b706cc493e73c60534e96e2bdc11dc4 (patch)
tree6c036c9d97ff391e4c4c5dbfc124a85d3b2c8456 /src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java
parent6edb7b4ea5e2c325091fc27c0b6202a2c626ac27 (diff)
downloadCellBroadcastReceiver-67c76f156b706cc493e73c60534e96e2bdc11dc4.tar.gz
Clean up / refactor Cell Broadcast settings view.
Make CellBroadcast setting view's styles and themes match what Settings app has. Icon space reserved, divider removed between preferences. Re-arranged categories and preferences. Re-wrote some of texts: title, summary. Added preference linked to alert history activity. Fix: 37863851 Test: Manual test Change-Id: I92a77468ba8551521d2f65bac966c1c313c62268
Diffstat (limited to 'src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java')
-rw-r--r--src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java b/src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java
index f2fafd2d3..b5dd8f2c3 100644
--- a/src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java
+++ b/src/com/android/cellbroadcastreceiver/CellBroadcastSearchIndexableProvider.java
@@ -16,6 +16,18 @@
package com.android.cellbroadcastreceiver;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_ICON_RESID;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_ACTION;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
+import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
+import static android.provider.SearchIndexablesContract.INDEXABLES_RAW_COLUMNS;
+import static android.provider.SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS;
+import static android.provider.SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS;
+
import android.content.Context;
import android.content.res.Resources;
import android.database.Cursor;
@@ -26,19 +38,6 @@ import android.provider.Settings;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RANK;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_RESID;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_CLASS_NAME;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_ICON_RESID;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_ACTION;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE;
-import static android.provider.SearchIndexablesContract.COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS;
-
-import static android.provider.SearchIndexablesContract.INDEXABLES_RAW_COLUMNS;
-import static android.provider.SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS;
-import static android.provider.SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS;
-
public class CellBroadcastSearchIndexableProvider extends SearchIndexablesProvider {
private static final String TAG = "CellBroadcastSearchIndexableProvider";
@@ -85,12 +84,10 @@ public class CellBroadcastSearchIndexableProvider extends SearchIndexablesProvid
Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 0) != 0;
Resources res = getContext().getResources();
- boolean showEtwsSettings = res.getBoolean(R.bool.show_etws_settings);
-
Object[] ref;
// Show alert settings and ETWS categories for ETWS builds and developer mode.
- if (!enableDevSettings && !showEtwsSettings) {
+ if (!enableDevSettings) {
// Remove general emergency alert preference items (not shown for CMAS builds).
ref = new Object[1];
ref[COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE] =
@@ -105,7 +102,7 @@ public class CellBroadcastSearchIndexableProvider extends SearchIndexablesProvid
// Remove ETWS preference category.
ref = new Object[1];
ref[COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE] =
- CellBroadcastSettings.KEY_CATEGORY_ETWS_SETTINGS;
+ CellBroadcastSettings.KEY_ENABLE_ETWS_TEST_ALERTS;
cursor.addRow(ref);
}
@@ -141,7 +138,7 @@ public class CellBroadcastSearchIndexableProvider extends SearchIndexablesProvid
if (!enableChannel50Support) {
ref = new Object[1];
ref[COLUMN_INDEX_NON_INDEXABLE_KEYS_KEY_VALUE] =
- CellBroadcastSettings.KEY_CATEGORY_BRAZIL_SETTINGS;
+ CellBroadcastSettings.KEY_ENABLE_CHANNEL_50_ALERTS;
cursor.addRow(ref);
}