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

Commit 4aec3533 authored by Ying Zheng's avatar Ying Zheng
Browse files

Migrate to the new ro property for headless multiuser check.

Test: build
Bug: 129549399
Change-Id: I42ab7daa80da62e3d754e61721b5d7297f376419
parent bf798cb3
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -18,11 +18,10 @@ package com.android.server;


import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.content.Context;
import android.os.SystemProperties;


class BluetoothService extends SystemService {
import com.android.internal.os.RoSystemProperties;
    private static final String HEADLESS_SYSTEM_USER = "android.car.systemuser.headless";


class BluetoothService extends SystemService {
    private BluetoothManagerService mBluetoothManagerService;
    private BluetoothManagerService mBluetoothManagerService;
    private boolean mInitialized = false;
    private boolean mInitialized = false;


@@ -48,7 +47,7 @@ class BluetoothService extends SystemService {
            publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE,
            publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE,
                    mBluetoothManagerService);
                    mBluetoothManagerService);
        } else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY &&
        } else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY &&
                !SystemProperties.getBoolean(HEADLESS_SYSTEM_USER, false)) {
                !RoSystemProperties.MULTIUSER_HEADLESS_SYSTEM_USER) {
            initialize();
            initialize();
        }
        }
    }
    }