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

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

Merge "Replace hidden Iothread with new Thread" am: c16fcd76

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

Change-Id: Ice3988a2c6e9625494f907022b70c6efa95048e8
parents 1af5a2ad c16fcd76
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;
@@ -247,6 +248,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;
@@ -464,7 +466,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;

@@ -541,7 +546,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;