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

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

Merge "GetNameAndAddress: run on proper thread" into main

parents 031d7cb1 6a426fda
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1200,6 +1200,11 @@ public class AdapterService extends Service {
    }

    void updateAdapterName(String name) {
        // TODO: b/372775662 - remove post once caller is on correct thread
        mHandler.post(() -> updateAdapterNameInternal(name));
    }

    private void updateAdapterNameInternal(String name) {
        int n = mRemoteCallbacks.beginBroadcast();
        Log.d(TAG, "updateAdapterName(" + name + ")");
        for (int i = 0; i < n; i++) {
@@ -1213,6 +1218,11 @@ public class AdapterService extends Service {
    }

    void updateAdapterAddress(String address) {
        // TODO: b/372775662 - remove post once caller is on correct thread
        mHandler.post(() -> updateAdapterAddressInternal(address));
    }

    private void updateAdapterAddressInternal(String address) {
        int n = mRemoteCallbacks.beginBroadcast();
        Log.d(TAG, "updateAdapterAddress(" + BluetoothUtils.toAnonymizedAddress(address) + ")");
        for (int i = 0; i < n; i++) {