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

Commit 40b0b192 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Replace hidden Iothread with new Thread" am: c16fcd76 am: c6c40e9c am: 0e3a8597

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1965087

Change-Id: I0e838825a71b5f7922cbcd8fb0646003daa8c4fa
parents d2a14115 0e3a8597
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import android.database.ContentObserver;
import android.os.Binder;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
@@ -243,6 +244,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
            new ConcurrentHashMap<IBinder, ClientDeathRecipient>();

    private int mState;
    private final HandlerThread mBluetoothHandlerThread;
    private final BluetoothHandler mHandler;
    private int mErrorRecoveryRetryCounter;
    private final int mSystemUiUid;
@@ -460,7 +462,10 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
    };

    BluetoothManagerService(Context context) {
        mHandler = new BluetoothHandler(IoThread.get().getLooper());
        mBluetoothHandlerThread = new HandlerThread("BluetoothManagerService");
        mBluetoothHandlerThread.start();

        mHandler = new BluetoothHandler(mBluetoothHandlerThread.getLooper());

        mContext = context;

@@ -537,7 +542,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        if (airplaneModeRadios == null || airplaneModeRadios.contains(
                Settings.Global.RADIO_BLUETOOTH)) {
            mBluetoothAirplaneModeListener = new BluetoothAirplaneModeListener(
                    this, IoThread.get().getLooper(), context);
                    this, mBluetoothHandlerThread.getLooper(), context);
        }

        int systemUiUid = -1;