summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2015-03-06 16:06:57 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-03-11 16:54:02 +0000
commitcc0e0e1f3d19109cfe2a6ff2e2b616d5b97e90f6 (patch)
tree12ee9c112e607b1833bf6384ac21769f6e615931 /src
parent4938b49e080438be59fe8d4dcd7ff10a7ba279ed (diff)
downloadandroid_packages_providers_ThemesProvider-cc0e0e1f3d19109cfe2a6ff2e2b616d5b97e90f6.zip
android_packages_providers_ThemesProvider-cc0e0e1f3d19109cfe2a6ff2e2b616d5b97e90f6.tar.gz
android_packages_providers_ThemesProvider-cc0e0e1f3d19109cfe2a6ff2e2b616d5b97e90f6.tar.bz2
Return InstallState.UNKOWN if context or pkgName null
Change-Id: I7e8f40335c4b5a202d457eba7f3bd337b9342908
Diffstat (limited to 'src')
-rw-r--r--src/org/cyanogenmod/themes/provider/util/ProviderUtils.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/themes/provider/util/ProviderUtils.java b/src/org/cyanogenmod/themes/provider/util/ProviderUtils.java
index 2feeb07..c2aeecf 100644
--- a/src/org/cyanogenmod/themes/provider/util/ProviderUtils.java
+++ b/src/org/cyanogenmod/themes/provider/util/ProviderUtils.java
@@ -68,6 +68,8 @@ public class ProviderUtils {
* @return
*/
public static int getInstallStateForTheme(Context context, String pkgName) {
+ if (context == null || pkgName == null) return ThemesColumns.InstallState.UNKNOWN;
+
String[] projection = new String[] { ThemesColumns.INSTALL_STATE };
String selection = ThemesColumns.PKG_NAME + "=?";
String[] selectionArgs = new String[] { pkgName };