diff options
| author | Clara Bayarri <clarabayarri@google.com> | 2016-01-13 16:17:09 +0000 |
|---|---|---|
| committer | Clara Bayarri <clarabayarri@google.com> | 2016-01-15 15:19:36 +0000 |
| commit | 00a9b890853e9660dde5854fe786b80f6c3e616c (patch) | |
| tree | 375c67d963412877f517a5e0bc157a2ea2281d4d /core/java | |
| parent | 206747d9f60a0f554aac71c9da9ccfe1a6582c80 (diff) | |
Protect TrustManager.setDeviceLockedForUser with permission
Bug: 26535793
Change-Id: I172f1ec7d9285213ecd70564728c7328a3a675ff
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/app/trust/TrustManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/app/trust/TrustManager.java b/core/java/android/app/trust/TrustManager.java index ee591d37e5f7..88ba874083b5 100644 --- a/core/java/android/app/trust/TrustManager.java +++ b/core/java/android/app/trust/TrustManager.java @@ -16,7 +16,9 @@ package android.app.trust; +import android.Manifest; import android.annotation.IntDef; +import android.annotation.RequiresPermission; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -54,9 +56,12 @@ public class TrustManager { * Changes the lock status for the given user. This is only applicable to Managed Profiles, * other users should be handled by Keyguard. * + * Requires the {@link android.Manifest.permission#ACCESS_KEYGUARD_SECURE_STORAGE} permission. + * * @param userId The id for the user to be locked/unlocked. * @param locked The value for that user's locked state. */ + @RequiresPermission(Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE) public void setDeviceLockedForUser(int userId, boolean locked) { try { mService.setDeviceLockedForUser(userId, locked); |
