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

Commit 636f4a9a authored by Palash Ahuja's avatar Palash Ahuja
Browse files

Add check for AdapterService being enabled before connecting profiles

Test: m com.android.btservices and test all profiles here
Bug: 345564021
Flag: EXEMPT, minor extra check
Change-Id: I708d6e45ff20c0bd089fd952f587bc74fd4a26f7
parent 43bfbd1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2858,7 +2858,7 @@ public class AdapterService extends Service {
        @Override
        public int connectAllEnabledProfiles(BluetoothDevice device, AttributionSource source) {
            AdapterService service = getService();
            if (service == null) {
            if (service == null || !service.isEnabled()) {
                return BluetoothStatusCodes.ERROR_BLUETOOTH_NOT_ENABLED;
            }
            if (!callerIsSystemOrActiveOrManagedUser(service, TAG, "connectAllEnabledProfiles")) {