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

Commit 8d5bbd3b authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6732461 from 5b8ad7d173498a7b5522321dfc7740f3fa6a40b6 to sc-release

Change-Id: I84af1363a24bfb8af39ee16f58e4655cf904d06c
parents d8a94c8b f781326a
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -16,10 +16,14 @@

package com.android.server;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.bluetooth.BluetoothAdapter;
import android.content.Context;
import android.os.UserManager;

import com.android.server.SystemService.TargetUser;

class BluetoothService extends SystemService {
    private BluetoothManagerService mBluetoothManagerService;
    private boolean mInitialized = false;
@@ -52,16 +56,16 @@ class BluetoothService extends SystemService {
    }

    @Override
    public void onSwitchUser(int userHandle) {
    public void onUserSwitching(@Nullable TargetUser from, @NonNull TargetUser to) {
        if (!mInitialized) {
            initialize();
        } else {
            mBluetoothManagerService.handleOnSwitchUser(userHandle);
            mBluetoothManagerService.handleOnSwitchUser(to.getUserIdentifier());
        }
    }

    @Override
    public void onUnlockUser(int userHandle) {
        mBluetoothManagerService.handleOnUnlockUser(userHandle);
    public void onUserUnlocking(@NonNull TargetUser user) {
        mBluetoothManagerService.handleOnUnlockUser(user.getUserIdentifier());
    }
}