Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ef0c367 authored by Jason Monk's avatar Jason Monk
Browse files

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
parent f6e2c19f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings.slices;

import static android.Manifest.permission.READ_SEARCH_INDEXABLES;

import android.app.PendingIntent;
import android.app.slice.SliceManager;
import android.content.ContentResolver;
@@ -113,6 +115,10 @@ public class SettingsSliceProvider extends SliceProvider {
    @VisibleForTesting
    Map<Uri, SliceData> mSliceDataCache;

    public SettingsSliceProvider() {
        super(READ_SEARCH_INDEXABLES);
    }

    @Override
    public boolean onCreateSliceProvider() {
        mSlicesDatabaseAccessor = new SlicesDatabaseAccessor(getContext());