From 10da08aa5e6982dcdbdb099c1bc27c3a3ac67e3f Mon Sep 17 00:00:00 2001 From: d34d Date: Mon, 25 Jan 2016 09:44:14 -0800 Subject: [PATCH] cmsdk: correct naming of THIRD_PARTY_KEYGUARD perm Change-Id: If2d062a90db340f8415d12897b16667fc834a848 TICKET: CYNGNOS-1705 --- api/cm_current.txt | 2 +- .../platform/internal/LiveLockScreenServiceBroker.java | 5 +++++ cm/res/AndroidManifest.xml | 2 +- .../externalviews/keyguardviewprovider/AndroidManifest.xml | 2 +- system-api/cm_system-current.txt | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/api/cm_current.txt b/api/cm_current.txt index f3b5536..423eefb 100644 --- a/api/cm_current.txt +++ b/api/cm_current.txt @@ -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"; diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/LiveLockScreenServiceBroker.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/LiveLockScreenServiceBroker.java index c7c6bd2..8581162 100644 --- a/cm/lib/main/java/org/cyanogenmod/platform/internal/LiveLockScreenServiceBroker.java +++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/LiveLockScreenServiceBroker.java @@ -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() + diff --git a/cm/res/AndroidManifest.xml b/cm/res/AndroidManifest.xml index c8fc50a..c2be8dc 100644 --- a/cm/res/AndroidManifest.xml +++ b/cm/res/AndroidManifest.xml @@ -139,7 +139,7 @@ android:protectionLevel="signature|privileged" /> - diff --git a/samples/externalviews/keyguardviewprovider/AndroidManifest.xml b/samples/externalviews/keyguardviewprovider/AndroidManifest.xml index 293c6b8..75a80bd 100644 --- a/samples/externalviews/keyguardviewprovider/AndroidManifest.xml +++ b/samples/externalviews/keyguardviewprovider/AndroidManifest.xml @@ -22,7 +22,7 @@ - +