Merge "Hook up blocked keys" into pi-dev

This commit is contained in:
TreeHugger Robot
2018-05-23 20:41:22 +00:00
committed by Android (Google) Code Review
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)) {