summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-11-20 12:55:22 +0100
committerParménides GV <parmegv@sdf.org>2014-11-26 13:06:59 +0100
commit2681e877c6c2e871247cf5e42269d1b867422f1f (patch)
treeae2f78b624dff0f5599a04f0a307f0aad8ded074
parentf314ade4e20b3c801ece7f0ad4328af38a264b03 (diff)
OnViewStateRestore is available just from api 17.
We support from api 14.
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
index 3650079a..0cdc8c75 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipServiceFragment.java
@@ -69,21 +69,17 @@ public class EipServiceFragment extends Fragment implements Observer, CompoundBu
if(getArguments() != null && getArguments().containsKey(START_ON_BOOT) && getArguments().getBoolean(START_ON_BOOT))
startEipFromScratch();
+ if (savedInstanceState != null) {
+ setStatusMessage(savedInstanceState.getString(STATUS_MESSAGE));
+ if(savedInstanceState.getBoolean(IS_PENDING))
+ eip_status.setConnecting();
+ else if(savedInstanceState.getBoolean(IS_CONNECTED)) {
+ eip_status.setConnectedOrDisconnected();
+ }
+ }
return eipFragment;
}
- public void onViewStateRestored (Bundle savedInstanceState) {
- super.onViewStateRestored(savedInstanceState);
- if (savedInstanceState != null) {
- setStatusMessage(savedInstanceState.getString(STATUS_MESSAGE));
- if(savedInstanceState.getBoolean(IS_PENDING))
- eip_status.setConnecting();
- else if(savedInstanceState.getBoolean(IS_CONNECTED)) {
- eip_status.setConnectedOrDisconnected();
- }
- }
- }
-
@Override
public void onResume() {
super.onResume();