summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2018-02-23 02:34:55 +0100
committercyBerta <cyberta@riseup.net>2018-02-23 02:34:55 +0100
commitad086ab192b9094278b27f94120566a7ca21dccc (patch)
treeef8422f3e2f0c0779c0b773693d69c4f249c7d51 /app/src/main
parent06eb4014837704e04d6ea8e9d7a69475a58c3c65 (diff)
#8754 fix dialog cancellation handling and change dialog title
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java12
-rw-r--r--app/src/main/res/values/strings.xml3
2 files changed, 10 insertions, 5 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 ebe5783a..25ef9161 100644
--- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
@@ -290,8 +290,8 @@ public class NavigationDrawerFragment extends Fragment {
AlertDialog.Builder alertBuilder = new AlertDialog.Builder(getActivity());
showEnableExperimentalFeature = true;
- alertDialog = alertBuilder.setTitle(activity.getString(R.string.experimental_feature_title))
- .setMessage(activity.getString(R.string.experimental_feature_message))
+ alertDialog = alertBuilder.setTitle(activity.getString(R.string.save_battery))
+ .setMessage(activity.getString(R.string.save_battery_message))
.setPositiveButton((android.R.string.yes), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
@@ -311,7 +311,13 @@ public class NavigationDrawerFragment extends Fragment {
public void onDismiss(DialogInterface dialog) {
showEnableExperimentalFeature = false;
}
- }).show();
+ }).setOnCancelListener(new DialogInterface.OnCancelListener() {
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ disableSwitch(BATTERY_SAVER);
+ }
+ })
+ .show();
}
@Override
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a69c2420..a0ca00c9 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -108,6 +108,5 @@
<string name="vpn_certificate_is_invalid">VPN certificate is invalid. Try to download a new one.</string>
<string name="vpn_certificate_user_message">The VPN certificate is invalid. Please log in to download a new one.</string>
<string name="save_battery">Save battery</string>
- <string name="experimental_feature_title">Save Battery Warning</string>
- <string name="experimental_feature_message">Background data connections will hibernate when your phone is inactive. This feature is still experimental.</string>
+ <string name="save_battery_message">Background data connections will hibernate when your phone is inactive. This feature is still experimental.</string>
</resources>