mirror of
https://github.com/M66B/NetGuard.git
synced 2025-01-02 21:34:12 +00:00
Refactoring
This commit is contained in:
parent
5f89592126
commit
035196e7cc
1 changed files with 14 additions and 12 deletions
|
@ -528,19 +528,21 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R && Util.isPlayStoreInstall(this)) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||||
if (!prefs.getBoolean("qap", false)) {
|
if (!prefs.getBoolean("qap", false))
|
||||||
new AlertDialog.Builder(this)
|
if (Util.isPlayStoreInstall(this)) {
|
||||||
.setMessage(R.string.app_qap)
|
new AlertDialog.Builder(this)
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setMessage(R.string.app_qap)
|
||||||
@Override
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
@Override
|
||||||
prefs.edit().putBoolean("qap", true).apply();
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
}
|
prefs.edit().putBoolean("qap", true).apply();
|
||||||
})
|
}
|
||||||
.show();
|
})
|
||||||
}
|
.show();
|
||||||
|
} else
|
||||||
|
prefs.edit().putBoolean("qap", true).apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue