Clear cache on application update

This commit is contained in:
M66B 2016-03-17 21:46:23 +01:00
parent 7ccfea4d76
commit ab66ed889c
1 changed files with 3 additions and 4 deletions

View File

@ -46,9 +46,9 @@ public class Receiver extends BroadcastReceiver {
if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
// Application added
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
Rule.clearCache(context);
Rule.clearCache(context);
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
// Show notification
if (IAB.isPurchased(ActivityPro.SKU_NOTIFY, context)) {
int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
@ -58,8 +58,7 @@ public class Receiver extends BroadcastReceiver {
} else if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
// Application removed
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false))
Rule.clearCache(context);
Rule.clearCache(context);
if (intent.getBooleanExtra(Intent.EXTRA_DATA_REMOVED, false)) {
// Remove settings