Merge "Refactor WifiScanWorker"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 651ef48..c13068f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1394,7 +1394,7 @@
<activity android:name=".accessibility.AccessibilitySettingsForSetupWizardActivity"
android:icon="@drawable/ic_accessibility_suggestion"
android:label="@string/vision_settings_title"
- android:theme="@style/GlifTheme.Light">
+ android:theme="@style/GlifV3Theme.Light">
<intent-filter android:priority="1">
<action android:name="android.settings.ACCESSIBILITY_SETTINGS_FOR_SUW" />
<category android:name="android.intent.category.DEFAULT" />
diff --git a/src/com/android/settings/search/SettingsSearchIndexablesProvider.java b/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
index 0a846de..b598224 100644
--- a/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
+++ b/src/com/android/settings/search/SettingsSearchIndexablesProvider.java
@@ -41,21 +41,28 @@
import static android.provider.SearchIndexablesContract.INDEXABLES_XML_RES_COLUMNS;
import static android.provider.SearchIndexablesContract.NON_INDEXABLES_KEYS_COLUMNS;
import static android.provider.SearchIndexablesContract.SITE_MAP_COLUMNS;
+import static android.provider.SearchIndexablesContract.SLICE_URI_PAIRS_COLUMNS;
import static com.android.settings.dashboard.DashboardFragmentRegistry.CATEGORY_KEY_TO_PARENT_MAP;
+import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.database.MatrixCursor;
+import android.net.Uri;
import android.provider.SearchIndexableResource;
import android.provider.SearchIndexablesContract;
import android.provider.SearchIndexablesProvider;
+import android.provider.SettingsSlicesContract;
import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Log;
+import androidx.slice.SliceViewManager;
+
import com.android.settings.SettingsActivity;
import com.android.settings.overlay.FeatureFactory;
+import com.android.settings.slices.SettingsSliceProvider;
import com.android.settingslib.drawer.DashboardCategory;
import com.android.settingslib.drawer.Tile;
@@ -184,6 +191,33 @@
return cursor;
}
+ @Override
+ public Cursor querySliceUriPairs() {
+ final SliceViewManager manager = SliceViewManager.getInstance(getContext());
+ final MatrixCursor cursor = new MatrixCursor(SLICE_URI_PAIRS_COLUMNS);
+ final Uri baseUri =
+ new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(SettingsSliceProvider.SLICE_AUTHORITY)
+ .build();
+ final Uri platformBaseUri =
+ new Uri.Builder()
+ .scheme(ContentResolver.SCHEME_CONTENT)
+ .authority(SettingsSlicesContract.AUTHORITY)
+ .build();
+
+ final Collection<Uri> sliceUris = manager.getSliceDescendants(baseUri);
+ sliceUris.addAll(manager.getSliceDescendants(platformBaseUri));
+
+ for (Uri uri : sliceUris) {
+ cursor.newRow()
+ .add(SearchIndexablesContract.SliceUriPairColumns.KEY, uri.getLastPathSegment())
+ .add(SearchIndexablesContract.SliceUriPairColumns.SLICE_URI, uri);
+ }
+
+ return cursor;
+ }
+
private List<String> getNonIndexableKeysFromProvider(Context context) {
final Collection<Class> values = FeatureFactory.getFactory(context)
.getSearchFeatureProvider().getSearchIndexableResources().getProviderValues();
@@ -207,7 +241,7 @@
if (System.getProperty(SYSPROP_CRASH_ON_ERROR) != null) {
throw new RuntimeException(e);
}
- Log.e(TAG, "Error trying to get non-indexable keys from: " + clazz.getName() , e);
+ Log.e(TAG, "Error trying to get non-indexable keys from: " + clazz.getName(), e);
continue;
}
diff --git a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
index d6b12c3..a0a9de9 100644
--- a/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
+++ b/tests/robotests/src/com/android/settings/accessibility/AccessibilitySettingsForSetupWizardActivityTest.java
@@ -39,6 +39,6 @@
AccessibilitySettingsForSetupWizardActivity activity =
Robolectric.buildActivity(AccessibilitySettingsForSetupWizardActivity.class, intent).get();
- assertThat(activity.getThemeResId()).isEqualTo(R.style.GlifTheme_Light);
+ assertThat(activity.getThemeResId()).isEqualTo(R.style.GlifV3Theme_Light);
}
}