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

Commit becc272e authored by William Escande's avatar William Escande
Browse files

SystemServer: use adapter after null check

We perform the check on adapter and not on mAdapter. We should then use
adapter and not the mAdapter (since it can change meantime)

Bug: 311772251
Flag: Exempt trivial typo fix
Test: m Bluetooth
Change-Id: I4916bd76e9a8c237e2c48530fdd22bd4dfafcda6
parent 913996b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1319,7 +1319,7 @@ class BluetoothManagerService {
        AdapterBinder adapter = mAdapter;
        if (adapter != null) {
            try {
                return mAdapter.getAddress(mContext.getAttributionSource());
                return adapter.getAddress(mContext.getAttributionSource());
            } catch (RemoteException e) {
                Log.e(TAG, "getAddress(): Returning cached address", e);
            }
@@ -1337,7 +1337,7 @@ class BluetoothManagerService {
        AdapterBinder adapter = mAdapter;
        if (adapter != null) {
            try {
                return mAdapter.getName(mContext.getAttributionSource());
                return adapter.getName(mContext.getAttributionSource());
            } catch (RemoteException e) {
                Log.e(TAG, "getName(): Returning cached name", e);
            }