Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 123017cc authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Wipe the application cache selectively" into jb-dev

parents 7707e045 eb696d28
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@ public class DictionaryPackInstallBroadcastReceiver extends BroadcastReceiver {
            if (null == packageUri) return; // No package name : we can't do anything
            final String packageName = packageUri.getSchemeSpecificPart();
            if (null == packageName) return;
            // TODO: do this in a more appropriate place
            TargetApplicationGetter.removeApplicationInfoCache(packageName);
            final PackageInfo packageInfo;
            try {
                packageInfo = manager.getPackageInfo(packageName, PackageManager.GET_PROVIDERS);
+3 −1
Original line number Diff line number Diff line
@@ -31,7 +31,9 @@ public class TargetApplicationGetter extends AsyncTask<String, Void, Application
    public static ApplicationInfo getCachedApplicationInfo(final String packageName) {
        return sCache.get(packageName);
    }
    // TODO: Wipe the cache when new packages are installed.
    public static void removeApplicationInfoCache(final String packageName) {
        sCache.remove(packageName);
    }

    public interface OnTargetApplicationKnownListener {
        public void onTargetApplicationKnown(final ApplicationInfo info);