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

Commit 981c8e7d authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clear calling identity when calling getConnectionState internally" into main am: a8850892

parents 2c268470 a8850892
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -3046,7 +3046,16 @@ public class AdapterService extends Service {
                return BluetoothDevice.CONNECTION_STATE_DISCONNECTED;
            }

            if (Flags.apiGetConnectionStateUsingIdentityAddress()) {
                final long token = Binder.clearCallingIdentity();
                try {
                    return service.getConnectionState(device);
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
            } else {
                return service.getConnectionState(device);
            }
        }

        @Override