summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2015-06-23 04:00:04 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-23 04:00:06 +0000
commit2b5bec9356de159a216e5aec8d553e6da7078b72 (patch)
treeb104f806a49e39c810ad88a227043b01a7123d13 /services
parentd66932127600522b7e520cc0286578ec293ed0bf (diff)
parenta2991da0d671adf511ccb884cf25bf1241303f92 (diff)
downloadframeworks_base-2b5bec9356de159a216e5aec8d553e6da7078b72.zip
frameworks_base-2b5bec9356de159a216e5aec8d553e6da7078b72.tar.gz
frameworks_base-2b5bec9356de159a216e5aec8d553e6da7078b72.tar.bz2
Merge "Remove not needed contacts related perissions." into mnc-dev
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/LockSettingsService.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index 5436ce0..c5ea8bc 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -27,11 +27,10 @@ import android.content.pm.PackageManager;
import android.content.pm.UserInfo;
import static android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE;
import static android.content.Context.USER_SERVICE;
-import static android.Manifest.permission.READ_PROFILE;
+import static android.Manifest.permission.READ_CONTACTS;
import android.database.sqlite.SQLiteDatabase;
import android.os.Binder;
import android.os.IBinder;
-import android.os.Process;
import android.os.RemoteException;
import android.os.storage.IMountService;
import android.os.ServiceManager;
@@ -264,12 +263,12 @@ public class LockSettingsService extends ILockSettings.Stub {
private final void checkReadPermission(String requestedKey, int userId) {
final int callingUid = Binder.getCallingUid();
- for (int i = 0; i < READ_PROFILE_PROTECTED_SETTINGS.length; i++) {
- String key = READ_PROFILE_PROTECTED_SETTINGS[i];
- if (key.equals(requestedKey) && mContext.checkCallingOrSelfPermission(READ_PROFILE)
+ for (int i = 0; i < READ_CONTACTS_PROTECTED_SETTINGS.length; i++) {
+ String key = READ_CONTACTS_PROTECTED_SETTINGS[i];
+ if (key.equals(requestedKey) && mContext.checkCallingOrSelfPermission(READ_CONTACTS)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("uid=" + callingUid
- + " needs permission " + READ_PROFILE + " to read "
+ + " needs permission " + READ_CONTACTS + " to read "
+ requestedKey + " for user " + userId);
}
}
@@ -722,8 +721,8 @@ public class LockSettingsService extends ILockSettings.Stub {
Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED
};
- // Reading these settings needs the profile permission
- private static final String[] READ_PROFILE_PROTECTED_SETTINGS = new String[] {
+ // Reading these settings needs the contacts permission
+ private static final String[] READ_CONTACTS_PROTECTED_SETTINGS = new String[] {
Secure.LOCK_SCREEN_OWNER_INFO_ENABLED,
Secure.LOCK_SCREEN_OWNER_INFO
};