diff options
author | Parménides GV <parmegv@sdf.org> | 2014-04-03 20:11:01 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2014-04-03 20:11:01 +0200 |
commit | b799ea39c1ef8750ac21390e93fdc935a1ebc693 (patch) | |
tree | 3c54a975dd7853695b018d6aa3ea5f2e86dad754 /src/se/leap/bitmaskclient/Dashboard.java | |
parent | cf286c03a4a263f9cebff7a1a81d4b4f5239d05b (diff) | |
parent | f6447292f733df5085c7de138c1e9f05f4428a07 (diff) |
Merge branch 'bug/disable-anonymous-connection-when-Service-doesn't-provide-it-#5317' into develop
Diffstat (limited to 'src/se/leap/bitmaskclient/Dashboard.java')
-rw-r--r-- | src/se/leap/bitmaskclient/Dashboard.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java index aa3cd4d9..b388b84a 100644 --- a/src/se/leap/bitmaskclient/Dashboard.java +++ b/src/se/leap/bitmaskclient/Dashboard.java @@ -55,7 +55,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf protected static final int CONFIGURE_LEAP = 0; protected static final int SWITCH_PROVIDER = 1; - private static final String TAG_EIP_FRAGMENT = "EIP_DASHBOARD_FRAGMENT"; final public static String SHARED_PREFERENCES = "LEAPPreferences"; final public static String ACTION_QUIT = "quit"; public static final String REQUEST_CODE = "request_code"; @@ -168,7 +167,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf FragmentManager fragMan = getFragmentManager(); if ( provider.hasEIP()){ EipServiceFragment eipFragment = new EipServiceFragment(); - fragMan.beginTransaction().replace(R.id.servicesCollection, eipFragment, TAG_EIP_FRAGMENT).commit(); + fragMan.beginTransaction().replace(R.id.servicesCollection, eipFragment, EipServiceFragment.TAG).commit(); } } @@ -264,6 +263,11 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf //mProgressBar.setMax(4); startService(provider_API_command); } + + public void cancelAuthedEipOn() { + EipServiceFragment eipFragment = (EipServiceFragment) getFragmentManager().findFragmentByTag(EipServiceFragment.TAG); + eipFragment.checkEipSwitch(false); + } /** * Asks ProviderAPI to log out. @@ -375,6 +379,8 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf setResult(RESULT_OK); changeStatusMessage(resultCode); mProgressBar.setVisibility(ProgressBar.GONE); + if(EipServiceFragment.isEipSwitchChecked()) + eipStart(); } else if(resultCode == ProviderAPI.INCORRECTLY_DOWNLOADED_CERTIFICATE) { setResult(RESULT_CANCELED); changeStatusMessage(resultCode); @@ -462,4 +468,12 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf startService(eip_intent); } + + private void eipStart(){ + Intent eip_intent = new Intent(this, EIP.class); + eip_intent.setAction(EIP.ACTION_START_EIP); + eip_intent.putExtra(EIP.RECEIVER_TAG, EipServiceFragment.getReceiver()); + startService(eip_intent); + + } } |