Merge "Hook up blocked keys" into pi-dev

am: a60ea38f67

Change-Id: I464e3068051471f05512068bc020866f8d8d8f85
This commit is contained in:
Matthew Fritze
2018-05-23 14:49:32 -07:00
committed by android-build-merger
2 changed files with 28 additions and 0 deletions

View File

@@ -176,6 +176,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)) {