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

Commit f1a5389e authored by Eric Jeong's avatar Eric Jeong
Browse files

Add isHeadlessSystemUserMode() to UserManager

- isHeadlessSystemUserMode() returns whether the device is running with
headless system user (go/multi-user-headless-user0)
- RoSystemProperties.MULTIUSER_HEADLESS_SYSTEM_USER is replaced by
isHeadlessSystemUserMode()

Bug: 137755681
Test: Bluetooth service and Network policy manager should work fine with
headless system user. A profile user should be created with headless
system user.

Change-Id: Ic48d98426f7a5ea47dde2008ae51f78855f622e6
parent 2f6daf45
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -18,8 +18,7 @@ package com.android.server;

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

import com.android.internal.os.RoSystemProperties;
import android.os.UserManager;

class BluetoothService extends SystemService {
    private BluetoothManagerService mBluetoothManagerService;
@@ -47,7 +46,7 @@ class BluetoothService extends SystemService {
            publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE,
                    mBluetoothManagerService);
        } else if (phase == SystemService.PHASE_ACTIVITY_MANAGER_READY &&
                !RoSystemProperties.MULTIUSER_HEADLESS_SYSTEM_USER) {
                !UserManager.isHeadlessSystemUserMode()) {
            initialize();
        }
    }