|
|
|
@ -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);
|
|
|
|
|