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

Commit b12e6723 authored by Alex Chau's avatar Alex Chau
Browse files

API Review: Nullability annotation for DeviceAdminReceiver device owner user callback

Bug: 73088491
Test: None
Change-Id: If5c885b128d7447ad80c299b15c2a23a3b648f7d
parent ce706f6b
Loading
Loading
Loading
Loading
+28 −29
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package android.app.admin;
import android.accounts.AccountManager;
import android.annotation.BroadcastBehavior;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SystemApi;
@@ -34,9 +36,6 @@ import android.os.Process;
import android.os.UserHandle;
import android.security.KeyChain;

import libcore.util.NonNull;
import libcore.util.Nullable;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@@ -937,7 +936,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
     * @param intent The received intent as per {@link #onReceive}.
     * @param newUser The {@link UserHandle} of the user that has just been added.
     */
     public void onUserAdded(Context context, Intent intent, UserHandle newUser) {
    public void onUserAdded(Context context, Intent intent, @NonNull UserHandle newUser) {
    }

    /**
@@ -949,7 +948,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
     * @param intent The received intent as per {@link #onReceive}.
     * @param removedUser The {@link UserHandle} of the user that has just been removed.
     */
     public void onUserRemoved(Context context, Intent intent, UserHandle removedUser) {
    public void onUserRemoved(Context context, Intent intent, @NonNull UserHandle removedUser) {
    }

    /**
@@ -961,7 +960,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
     * @param intent The received intent as per {@link #onReceive}.
     * @param startedUser The {@link UserHandle} of the user that has just been started.
     */
    public void onUserStarted(Context context, Intent intent, UserHandle startedUser) {
    public void onUserStarted(Context context, Intent intent, @NonNull UserHandle startedUser) {
    }

    /**
@@ -973,7 +972,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
     * @param intent The received intent as per {@link #onReceive}.
     * @param stoppedUser The {@link UserHandle} of the user that has just been stopped.
     */
    public void onUserStopped(Context context, Intent intent, UserHandle stoppedUser) {
    public void onUserStopped(Context context, Intent intent, @NonNull UserHandle stoppedUser) {
    }

    /**
@@ -985,7 +984,7 @@ public class DeviceAdminReceiver extends BroadcastReceiver {
     * @param intent The received intent as per {@link #onReceive}.
     * @param switchedUser The {@link UserHandle} of the user that has just been switched to.
     */
    public void onUserSwitched(Context context, Intent intent, UserHandle switchedUser) {
    public void onUserSwitched(Context context, Intent intent, @NonNull UserHandle switchedUser) {
    }

    /**