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

Commit 54bd08f8 authored by Felipe Leme's avatar Felipe Leme
Browse files

Removed @Deprecated SystemService callback methods that take a userId.

This is just a plain refactoring: the removed methods in the changed
classes were called by default by the new methods in the superclass
(SystemService).

Test: m
Test: atest NotificationManagerServiceTest BackupManagerServiceRoboTest

Fixes: 161943081

Exempt-From-Owner-Approval: refactoring without side-effects

Change-Id: Ifd8df592eb4494cc0922b7e0b2ff20187b8a8b3e
parent db22e129
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());
    }
}