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

Commit f781326a authored by Felipe Leme's avatar Felipe Leme Committed by Android (Google) Code Review
Browse files

Merge "Removed @Deprecated SystemService callback methods that take a userId."

parents 37484b91 54bd08f8
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());
    }
}