summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Rettschlag <dirk.rettschlag@gmail.com>2014-05-16 19:06:19 +0200
committerBrint E. Kriebel <bekit@cyngn.com>2014-05-27 05:30:40 +0000
commit047b5bdb7884c9ed73833a229d6cfbd2af47306c (patch)
treef872618ac94143cfa837b2c6531a83d76112da86
parent1e42506fc096f60b93de1a78b200b8e1c87d8d17 (diff)
downloadandroid_packages_providers_ThemesProvider-047b5bdb7884c9ed73833a229d6cfbd2af47306c.tar.gz
android_packages_providers_ThemesProvider-047b5bdb7884c9ed73833a229d6cfbd2af47306c.tar.bz2
android_packages_providers_ThemesProvider-047b5bdb7884c9ed73833a229d6cfbd2af47306c.zip
If a theme is uninstalled and timing is perfect, it can happen that the CopyImageService is trying to get the PackageContext of a not existing package. Return from the function if a NameNotFoundException is catched. Change-Id: I8f4e33d527f78228f9681ac518292364e9269a0c Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com> (cherry picked from commit d43dc8d6f5b80c1001d98bfe301309c0da9031f3)
-rw-r--r--src/org/cyanogenmod/themes/provider/CopyImageService.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/cyanogenmod/themes/provider/CopyImageService.java b/src/org/cyanogenmod/themes/provider/CopyImageService.java
index e98fa03..8a0362a 100644
--- a/src/org/cyanogenmod/themes/provider/CopyImageService.java
+++ b/src/org/cyanogenmod/themes/provider/CopyImageService.java
@@ -107,7 +107,8 @@ public class CopyImageService extends IntentService {
themeContext = context.createPackageContext(pkgName,
Context.CONTEXT_IGNORE_SECURITY);
} catch (NameNotFoundException e) {
- e.printStackTrace();
+ Log.e(TAG, "Error getting themeContext", e);
+ return;
}
// This is for testing only. We copy some assets from APK and put into