Merge "Make printing framework encryption-aware."

This commit is contained in:
Jeff Sharkey
2015-12-17 23:04:18 +00:00
committed by Android (Google) Code Review
3 changed files with 29 additions and 26 deletions

View File

@@ -852,9 +852,14 @@ public class UserManager {
* @param user to retrieve the unlocked state for.
*/
public boolean isUserUnlocked(UserHandle user) {
return isUserUnlocked(user.getIdentifier());
}
/** {@hide} */
public boolean isUserUnlocked(int userId) {
try {
return ActivityManagerNative.getDefault().isUserRunning(
user.getIdentifier(), ActivityManager.FLAG_AND_UNLOCKED);
return ActivityManagerNative.getDefault().isUserRunning(userId,
ActivityManager.FLAG_AND_UNLOCKED);
} catch (RemoteException e) {
return false;
}