cmsdk: correct naming of THIRD_PARTY_KEYGUARD perm

Change-Id: If2d062a90db340f8415d12897b16667fc834a848
TICKET: CYNGNOS-1705
This commit is contained in:
d34d 2016-01-25 09:44:14 -08:00 committed by Gerrit Code Review
parent ad0d8c53a0
commit 10da08aa5e
5 changed files with 9 additions and 4 deletions

View File

@ -674,7 +674,7 @@ package cyanogenmod.platform {
field public static final java.lang.String READ_MSIM_PHONE_STATE = "cyanogenmod.permission.READ_MSIM_PHONE_STATE";
field public static final java.lang.String READ_THEMES = "cyanogenmod.permission.READ_THEMES";
field public static final java.lang.String READ_WEATHER = "cyanogenmod.permission.READ_WEATHER";
field public static final java.lang.String THIRD_PARTY_KEYGUARD = "android.permission.THIRD_PARTY_KEYGUARD";
field public static final java.lang.String THIRD_PARTY_KEYGUARD = "cyanogenmod.permission.THIRD_PARTY_KEYGUARD";
field public static final java.lang.String WRITE_ALARMS = "cyanogenmod.permission.WRITE_ALARMS";
field public static final java.lang.String WRITE_DATAUSAGE = "cyanogenmod.permission.WRITE_DATAUSAGE";
field public static final java.lang.String WRITE_SECURE_SETTINGS = "cyanogenmod.permission.WRITE_SECURE_SETTINGS";

View File

@ -60,6 +60,9 @@ public class LiveLockScreenServiceBroker extends SystemService {
private static final long SERVICE_CONNECTION_WAIT_TIME_MS = 4 * 1000L; // 4 seconds
private static final String DEPRECATED_THIRD_PARTY_KEYGUARD_PERMISSION =
"android.permission.THIRD_PARTY_KEYGUARD";
private Context mContext;
// The actual LLS service to invoke
private ILiveLockScreenManagerProvider mService;
@ -382,6 +385,8 @@ public class LiveLockScreenServiceBroker extends SystemService {
final PackageManager pm = mContext.getPackageManager();
final boolean hasThirdPartyKeyguardPermission = pm.checkPermission(
Manifest.permission.THIRD_PARTY_KEYGUARD,
llsInfo.component.getPackageName()) == PackageManager.PERMISSION_GRANTED
|| pm.checkPermission(DEPRECATED_THIRD_PARTY_KEYGUARD_PERMISSION,
llsInfo.component.getPackageName()) == PackageManager.PERMISSION_GRANTED;
if (!hasThirdPartyKeyguardPermission) {
Slog.e(TAG, "Package " + llsInfo.component.getPackageName() +

View File

@ -139,7 +139,7 @@
android:protectionLevel="signature|privileged" />
<!-- Allows an application to be used as a third party keyguard -->
<permission android:name="android.permission.THIRD_PARTY_KEYGUARD"
<permission android:name="cyanogenmod.permission.THIRD_PARTY_KEYGUARD"
android:label="@string/permlab_thirdPartyKeyguard"
android:description="@string/permdesc_thirdPartyKeyguard"
android:protectionLevel="normal" />

View File

@ -22,7 +22,7 @@
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />
<!-- Required permission for third party keyguard components -->
<uses-permission android:name="android.permission.THIRD_PARTY_KEYGUARD" />
<uses-permission android:name="cyanogenmod.permission.THIRD_PARTY_KEYGUARD" />
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<service android:name=".SampleKeyguardProviderService"

View File

@ -674,7 +674,7 @@ package cyanogenmod.platform {
field public static final java.lang.String READ_MSIM_PHONE_STATE = "cyanogenmod.permission.READ_MSIM_PHONE_STATE";
field public static final java.lang.String READ_THEMES = "cyanogenmod.permission.READ_THEMES";
field public static final java.lang.String READ_WEATHER = "cyanogenmod.permission.READ_WEATHER";
field public static final java.lang.String THIRD_PARTY_KEYGUARD = "android.permission.THIRD_PARTY_KEYGUARD";
field public static final java.lang.String THIRD_PARTY_KEYGUARD = "cyanogenmod.permission.THIRD_PARTY_KEYGUARD";
field public static final java.lang.String WRITE_ALARMS = "cyanogenmod.permission.WRITE_ALARMS";
field public static final java.lang.String WRITE_DATAUSAGE = "cyanogenmod.permission.WRITE_DATAUSAGE";
field public static final java.lang.String WRITE_SECURE_SETTINGS = "cyanogenmod.permission.WRITE_SECURE_SETTINGS";