diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java b/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
index 282c07f9c4..1b7c8e2f72 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsConnection.java
@@ -20,6 +20,7 @@ package eu.faircode.email;
*/
import android.content.Context;
+import android.content.Intent;
import android.content.SharedPreferences;
import android.net.ConnectivityManager;
import android.net.Network;
@@ -33,6 +34,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
+import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.Spinner;
import android.widget.TextView;
@@ -49,6 +51,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
private Spinner spDownload;
private SwitchCompat swRoaming;
private SwitchCompat swRlah;
+ private Button btnManage;
private TextView tvConnectionType;
private TextView tvConnectionRoaming;
@@ -70,6 +73,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
spDownload = view.findViewById(R.id.spDownload);
swRoaming = view.findViewById(R.id.swRoaming);
swRlah = view.findViewById(R.id.swRlah);
+ btnManage = view.findViewById(R.id.btnManage);
tvConnectionType = view.findViewById(R.id.tvConnectionType);
tvConnectionRoaming = view.findViewById(R.id.tvConnectionRoaming);
@@ -117,6 +121,15 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
}
});
+ final Intent manage = ConnectionHelper.getSettingsIntent(getContext());
+ btnManage.setVisibility(manage == null ? View.GONE : View.VISIBLE);
+ btnManage.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ startActivity(manage);
+ }
+ });
+
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
tvConnectionType.setVisibility(View.GONE);
diff --git a/app/src/main/res/layout/fragment_options_connection.xml b/app/src/main/res/layout/fragment_options_connection.xml
index b902ab5d57..768831339d 100644
--- a/app/src/main/res/layout/fragment_options_connection.xml
+++ b/app/src/main/res/layout/fragment_options_connection.xml
@@ -119,18 +119,30 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swRlah" />
+
+
+ app:layout_constraintTop_toBottomOf="@id/btnManage" />
Use metered connections
Automatically download messages and attachments on a metered connection up to
- Roam like at home
Download messages and attachments while roaming
+ Roam like at home
+ Manage connectivity
+
Browse messages on the server
Show on start screen