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();
|
||||
|
||||
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);
|
||||
if (!prefs.getBoolean("qap", false)) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.app_qap)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
prefs.edit().putBoolean("qap", true).apply();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
if (!prefs.getBoolean("qap", false))
|
||||
if (Util.isPlayStoreInstall(this)) {
|
||||
new AlertDialog.Builder(this)
|
||||
.setMessage(R.string.app_qap)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
prefs.edit().putBoolean("qap", true).apply();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
} else
|
||||
prefs.edit().putBoolean("qap", true).apply();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue