mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-03 13:54:09 +00:00
Speed notification is a pro feature
This commit is contained in:
parent
ede7219684
commit
ca4fbbcda3
1 changed files with 5 additions and 1 deletions
|
@ -21,6 +21,7 @@ package eu.faircode.netguard;
|
|||
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
|
@ -64,7 +65,10 @@ public class ServiceTileGraph extends TileService implements SharedPreferences.O
|
|||
// Check state
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
boolean stats = !prefs.getBoolean("show_stats", false);
|
||||
prefs.edit().putBoolean("show_stats", stats).apply();
|
||||
if (stats && !IAB.isPurchased(ActivityPro.SKU_SPEED, this))
|
||||
startActivity(new Intent(this, ActivityPro.class));
|
||||
else
|
||||
prefs.edit().putBoolean("show_stats", stats).apply();
|
||||
ServiceSinkhole.reloadStats("tile", this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue