Hook up blocked keys
Block any slice in onBind that is the in the blacklist Change-Id: I9687d07cbfef5fcb94842046bc5dc3296eed4252 Fixes: 80195653 Test: robotests
This commit is contained in:
@@ -175,6 +175,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)) {
|
||||
|
Reference in New Issue
Block a user