summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-01-02 23:07:31 +0100
committercyberta <cyberta@riseup.net>2020-01-24 10:36:03 -0600
commitb844133a3a9f7cdfc255772aae852b0a73788446 (patch)
tree7e0eae5f7f5e59ce6c7b5dac23ee54ea205e959c /app/src/main/java
parent921ee995ef0f0e7f2076ac3538fed289bcb82ba9 (diff)
rename battery flag in navigation drawer
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
index 85c982df..de24802a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
@@ -118,7 +118,7 @@ public class NavigationDrawerFragment extends Fragment implements SharedPreferen
private SharedPreferences preferences;
private final static String KEY_SHOW_SAVE_BATTERY_ALERT = "KEY_SHOW_SAVE_BATTERY_ALERT";
- private boolean showEnableExperimentalFeature = false;
+ private volatile boolean showSaveBattery = false;
AlertDialog alertDialog;
@Override
@@ -430,8 +430,9 @@ public class NavigationDrawerFragment extends Fragment implements SharedPreferen
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
- if (showEnableExperimentalFeature) {
+ if (showSaveBattery) {
outState.putBoolean(KEY_SHOW_SAVE_BATTERY_ALERT, true);
+ alertDialog.dismiss();
}
}
@@ -449,7 +450,7 @@ public class NavigationDrawerFragment extends Fragment implements SharedPreferen
try {
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(getActivity());
- showEnableExperimentalFeature = true;
+ showSaveBattery = true;
alertDialog = alertBuilder
.setTitle(activity.getString(R.string.save_battery))
.setMessage(activity.getString(R.string.save_battery_message))