mirror of https://github.com/M66B/NetGuard.git
Clear cache on application update
This commit is contained in:
parent
7ccfea4d76
commit
ab66ed889c
|
@ -46,9 +46,9 @@ public class Receiver extends BroadcastReceiver {
|
||||||
|
|
||||||
if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
|
if (Intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
|
||||||
// Application added
|
// Application added
|
||||||
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
|
|
||||||
Rule.clearCache(context);
|
Rule.clearCache(context);
|
||||||
|
|
||||||
|
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
|
||||||
// Show notification
|
// Show notification
|
||||||
if (IAB.isPurchased(ActivityPro.SKU_NOTIFY, context)) {
|
if (IAB.isPurchased(ActivityPro.SKU_NOTIFY, context)) {
|
||||||
int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
|
int uid = intent.getIntExtra(Intent.EXTRA_UID, -1);
|
||||||
|
@ -58,7 +58,6 @@ public class Receiver extends BroadcastReceiver {
|
||||||
|
|
||||||
} else if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
|
} else if (Intent.ACTION_PACKAGE_REMOVED.equals(intent.getAction())) {
|
||||||
// Application removed
|
// Application removed
|
||||||
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false))
|
|
||||||
Rule.clearCache(context);
|
Rule.clearCache(context);
|
||||||
|
|
||||||
if (intent.getBooleanExtra(Intent.EXTRA_DATA_REMOVED, false)) {
|
if (intent.getBooleanExtra(Intent.EXTRA_DATA_REMOVED, false)) {
|
||||||
|
|
Loading…
Reference in New Issue