diff options
author | d34d <clark@cyngn.com> | 2016-04-26 12:52:58 -0700 |
---|---|---|
committer | d34d <clark@cyngn.com> | 2016-04-26 12:52:58 -0700 |
commit | da8c19f383fb01dfc853907b4543cfe8b644a15d (patch) | |
tree | b3c4a6320d882d27e5b9c7691d82dc1fe5fdf85d | |
parent | 4563e392838a2c72ad336c6d51e7cedfdc7d7732 (diff) | |
download | packages_apps_ThemeChooser-da8c19f383fb01dfc853907b4543cfe8b644a15d.tar.gz packages_apps_ThemeChooser-da8c19f383fb01dfc853907b4543cfe8b644a15d.tar.bz2 packages_apps_ThemeChooser-da8c19f383fb01dfc853907b4543cfe8b644a15d.zip |
Fix applying themes from third party apps (ThemeStore)
The permission check was using a string constant in the source file
rather than import the cmsdk Manifest and use the permission
constants defined there.
Change-Id: Id8017dfb9dc77fe8df7e3b0f87009bae8c050108
TICKET: CYNGNOS-2596
-rw-r--r-- | src/com/cyngn/theme/chooser/ChooserActivity.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/cyngn/theme/chooser/ChooserActivity.java b/src/com/cyngn/theme/chooser/ChooserActivity.java index be0ed84..a08652b 100644 --- a/src/com/cyngn/theme/chooser/ChooserActivity.java +++ b/src/com/cyngn/theme/chooser/ChooserActivity.java @@ -57,6 +57,7 @@ import com.cyngn.theme.util.PreferenceUtils; import com.cyngn.theme.util.TypefaceHelperCache; import com.cyngn.theme.util.Utils; +import cyanogenmod.platform.Manifest; import cyanogenmod.providers.ThemesContract; import cyanogenmod.providers.ThemesContract.ThemesColumns; @@ -87,7 +88,6 @@ public class ChooserActivity extends FragmentActivity private static final String THEME_STORE_ACTIVITY = THEME_STORE_PACKAGE + ".ui.StoreActivity"; private static final String ACTION_APPLY_THEME = "android.intent.action.APPLY_THEME"; - private static final String PERMISSION_WRITE_THEME = "android.permission.WRITE_THEMES"; private static final String TYPE_IMAGE = "image/*"; @@ -396,7 +396,7 @@ public class ChooserActivity extends FragmentActivity getCallingPackage() != null && PackageManager.PERMISSION_GRANTED == getPackageManager() - .checkPermission(PERMISSION_WRITE_THEME, + .checkPermission(Manifest.permission.WRITE_THEMES, getCallingPackage())) { mThemeToApply = intent.getStringExtra(EXTRA_PKGNAME); } |