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

Commit a7e20131 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Automerger Merge Worker
Browse files

Merge "Grant "Nearby devices" to Bluetooth MIDI service." into sc-dev am: a224ffb2 am: 0ee9ace4

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14355589

Change-Id: I0605f8fcb564c331a109cd714fe549e9c1eb8c19
parents f3c62de9 0ee9ace4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import android.content.pm.PermissionInfo;
import android.content.pm.ProviderInfo;
import android.content.pm.ResolveInfo;
import android.media.RingtoneManager;
import android.media.midi.MidiManager;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
@@ -866,6 +867,11 @@ final class DefaultPermissionGrantPolicy {
            grantPermissionsToSystemPackage(pm, systemCaptionsServicePackageName, userId,
                    MICROPHONE_PERMISSIONS);
        }

        // Bluetooth MIDI Service
        grantSystemFixedPermissionsToSystemPackage(pm,
                MidiManager.BLUETOOTH_MIDI_SERVICE_PACKAGE, userId,
                NEARBY_DEVICES_PERMISSIONS);
    }

    private String getDefaultSystemHandlerActivityPackageForCategory(PackageManagerWrapper pm,