Update usage of ActivityManagerNative.
Bug: 30977067 Test: N/A Change-Id: I46e37a09cff059d2784a819bc2651d6973fbd268
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
package com.android.settings.users;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManagerNative;
|
||||
import android.app.ActivityManager;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.app.admin.DevicePolicyManager;
|
||||
@@ -681,7 +681,7 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
return;
|
||||
}
|
||||
try {
|
||||
ActivityManagerNative.getDefault().switchUser(UserHandle.USER_SYSTEM);
|
||||
ActivityManager.getService().switchUser(UserHandle.USER_SYSTEM);
|
||||
getContext().getSystemService(UserManager.class).removeUser(UserHandle.myUserId());
|
||||
} catch (RemoteException re) {
|
||||
Log.e(TAG, "Unable to remove self user");
|
||||
@@ -724,7 +724,7 @@ public class UserSettings extends SettingsPreferenceFragment
|
||||
|
||||
private void switchUserNow(int userId) {
|
||||
try {
|
||||
ActivityManagerNative.getDefault().switchUser(userId);
|
||||
ActivityManager.getService().switchUser(userId);
|
||||
} catch (RemoteException re) {
|
||||
// Nothing to do
|
||||
}
|
||||
|
Reference in New Issue
Block a user