Push full slice index to device index

Test: make RunSettingsRoboTests
Bug: 74555610
Change-Id: I3f0aa1218e1d7e736dc918d83e76423fa81ac6ab
This commit is contained in:
Jason Monk
2018-04-20 14:08:57 -04:00
parent ab3aa6989a
commit fcd5f0f1aa
12 changed files with 383 additions and 48 deletions

View File

@@ -24,6 +24,7 @@ import android.content.Intent;
import android.graphics.drawable.Icon;
import android.net.Uri;
import android.net.wifi.WifiManager;
import android.os.StrictMode;
import android.provider.Settings;
import android.provider.SettingsSlicesContract;
import android.support.annotation.VisibleForTesting;
@@ -148,6 +149,11 @@ public class SettingsSliceProvider extends SliceProvider {
@Override
public Slice onBindSlice(Uri sliceUri) {
// TODO: Remove this when all slices are not breaking strict mode
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.permitAll()
.build());
String path = sliceUri.getPath();
// If adding a new Slice, do not directly match Slice URIs.
// Use {@link SlicesDatabaseAccessor}.
@@ -277,7 +283,8 @@ public class SettingsSliceProvider extends SliceProvider {
* {@link SliceData} is loaded from {@link SlicesDatabaseHelper.Tables#TABLE_SLICES_INDEX}.
*/
private Slice getSliceStub(Uri uri) {
return new ListBuilder(getContext(), uri).build();
// TODO: Switch back to ListBuilder when slice loading states are fixed.
return new Slice.Builder(uri).build();
}
// TODO (b/70622039) remove this when the proper wifi slice is enabled.