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

Commit a8850892 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Clear calling identity when calling getConnectionState internally" into main

parents 678cef6b c65ac73d
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