Merge "Hook up blocked keys" into pi-dev am: a60ea38f67

am: a8e1a02bfa

Change-Id: Ib79a5fe4721086f400477dc159e14ab5e641e304
This commit is contained in:
Matthew Fritze
2018-05-23 16:06:57 -07:00
committed by android-build-merger
2 changed files with 28 additions and 0 deletions

View File

@@ -177,6 +177,13 @@ public class SettingsSliceProvider extends SliceProvider {
@Override
public Slice onBindSlice(Uri sliceUri) {
final Set<String> blockedKeys = getBlockedKeys();
final String key = sliceUri.getLastPathSegment();
if (blockedKeys.contains(key)) {
Log.e(TAG, "Requested blocked slice with Uri: " + sliceUri);
return null;
}
// If adding a new Slice, do not directly match Slice URIs.
// Use {@link SlicesDatabaseAccessor}.
if (WifiCallingSliceHelper.WIFI_CALLING_URI.equals(sliceUri)) {