Add auto-granting of slice permissions
Allow things that can read the index to access slices too. Test: existing tests unaffected Bug: 77313888 Change-Id: I54c4b89eefb4354aa6b7dcafb7ac09dc96cbdbeb
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings.slices;
|
package com.android.settings.slices;
|
||||||
|
|
||||||
|
import static android.Manifest.permission.READ_SEARCH_INDEXABLES;
|
||||||
|
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.slice.SliceManager;
|
import android.app.slice.SliceManager;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
@@ -113,6 +115,10 @@ public class SettingsSliceProvider extends SliceProvider {
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
Map<Uri, SliceData> mSliceDataCache;
|
Map<Uri, SliceData> mSliceDataCache;
|
||||||
|
|
||||||
|
public SettingsSliceProvider() {
|
||||||
|
super(READ_SEARCH_INDEXABLES);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateSliceProvider() {
|
public boolean onCreateSliceProvider() {
|
||||||
mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(getContext());
|
mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(getContext());
|
||||||
|
Reference in New Issue
Block a user