Merge "Call notifyLockedProfile in TrustManagerService instead of KeyguardViewMediator." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
428fdd104c
@@ -1215,7 +1215,6 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
|
|
||||||
private void lockProfile(int userId) {
|
private void lockProfile(int userId) {
|
||||||
mTrustManager.setDeviceLockedForUser(userId, true);
|
mTrustManager.setDeviceLockedForUser(userId, true);
|
||||||
notifyLockedProfile(userId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldWaitForProvisioning() {
|
private boolean shouldWaitForProvisioning() {
|
||||||
@@ -1546,13 +1545,6 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyLockedProfile(@UserIdInt int userId) {
|
|
||||||
try {
|
|
||||||
ActivityManagerNative.getDefault().notifyLockedProfile(userId);
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle message sent by {@link #showLocked}.
|
* Handle message sent by {@link #showLocked}.
|
||||||
* @see #SHOW
|
* @see #SHOW
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
|
import android.app.ActivityManagerNative;
|
||||||
import android.app.admin.DevicePolicyManager;
|
import android.app.admin.DevicePolicyManager;
|
||||||
import android.app.trust.ITrustListener;
|
import android.app.trust.ITrustListener;
|
||||||
import android.app.trust.ITrustManager;
|
import android.app.trust.ITrustManager;
|
||||||
@@ -318,6 +319,12 @@ public class TrustManagerService extends SystemService {
|
|||||||
synchronized (mDeviceLockedForUser) {
|
synchronized (mDeviceLockedForUser) {
|
||||||
mDeviceLockedForUser.put(userId, locked);
|
mDeviceLockedForUser.put(userId, locked);
|
||||||
}
|
}
|
||||||
|
if (locked) {
|
||||||
|
try {
|
||||||
|
ActivityManagerNative.getDefault().notifyLockedProfile(userId);
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user