mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
Prevent crash
This commit is contained in:
parent
5a629dc17b
commit
ba59223ae9
1 changed files with 2 additions and 6 deletions
|
@ -406,14 +406,10 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||||
};
|
};
|
||||||
|
|
||||||
private void showConnectionType() {
|
private void showConnectionType() {
|
||||||
final Context context = getContext();
|
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
|
||||||
if (context == null) {
|
|
||||||
tvNetworkMetered.setVisibility(View.GONE);
|
|
||||||
tvNetworkRoaming.setVisibility(View.GONE);
|
|
||||||
cardDebug.setVisibility(View.GONE);
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
|
final Context context = getContext();
|
||||||
final ConnectionHelper.NetworkState networkState = ConnectionHelper.getNetworkState(context);
|
final ConnectionHelper.NetworkState networkState = ConnectionHelper.getNetworkState(context);
|
||||||
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
Loading…
Reference in a new issue