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

Commit 4e9519ff authored by Hsin-chen Chuang's avatar Hsin-chen Chuang Committed by Gerrit Code Review
Browse files

Merge "BluetoothService: Init Bluetooth if config_bootToHeadlessSystemUser" into main

parents 65369095 006cb45e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ package com.android.server.bluetooth

import android.bluetooth.BluetoothAdapter
import android.content.Context
import android.content.res.Resources
import android.os.HandlerThread
import android.os.UserManager
import com.android.server.SystemService
@@ -52,7 +53,14 @@ class BluetoothService(context: Context) : SystemService(context) {
    }

    override fun onUserStarting(user: TargetUser) {
        if (!UserManager.isHeadlessSystemUserMode()) {
        if (
            !UserManager.isHeadlessSystemUserMode() ||
                Resources.getSystem()
                    .getBoolean(
                        Resources.getSystem()
                            .getIdentifier("config_bootToHeadlessSystemUser", "bool", "android")
                    )
        ) {
            initialize(user)
        }
    }