diff options
author | Parménides GV <parmegv@sdf.org> | 2013-10-14 17:05:06 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-12-09 19:27:57 +0100 |
commit | b61c632cb90b87cc7b069f42f2b08928ee15a5d5 (patch) | |
tree | 237ef2d89b0c4f9196db864e3f9e55436f56f259 /src/se/leap/bitmaskclient/Dashboard.java | |
parent | 9a33e4ccff4cf148a1a3ac3bbf20fcaf0238f24b (diff) |
ProviderAPI broadcasts progress to CW.
Setting up a provider makes the progressbar move according to the number of files downloaded (1/3, 2/3, 3/3).
Next step: recover from download errors individually. That means that if a download fails but the others went OK, the user will be prompted to retry that individual failing download.
Diffstat (limited to 'src/se/leap/bitmaskclient/Dashboard.java')
-rw-r--r-- | src/se/leap/bitmaskclient/Dashboard.java | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/se/leap/bitmaskclient/Dashboard.java b/src/se/leap/bitmaskclient/Dashboard.java index 0ae7085a..8c7c495d 100644 --- a/src/se/leap/bitmaskclient/Dashboard.java +++ b/src/se/leap/bitmaskclient/Dashboard.java @@ -16,8 +16,6 @@ */ package se.leap.bitmaskclient; -import org.apache.http.cookie.Cookie; -import org.apache.http.impl.cookie.BasicClientCookie; import org.json.JSONException; import org.json.JSONObject; @@ -30,12 +28,9 @@ import android.app.DialogFragment; import android.app.Fragment; import android.app.FragmentManager; import android.app.FragmentTransaction; -import android.app.ProgressDialog; -import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; @@ -45,11 +40,7 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.view.ViewStub; -import android.widget.CompoundButton; import android.widget.ProgressBar; -import android.widget.RelativeLayout; -import android.widget.Switch; import android.widget.TextView; import android.widget.Toast; @@ -76,7 +67,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf private ProgressBar mProgressBar; private TextView eipStatus; - private ProviderAPIBroadcastReceiver_Update providerAPI_broadcast_receiver_update; private static Context app; private static SharedPreferences preferences; private static Provider provider; @@ -98,10 +88,7 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf // mProgressBar = (ProgressBar) findViewById(R.id.eipProgress); // eipStatus = (TextView) findViewById(R.id.eipStatus); - providerAPI_broadcast_receiver_update = new ProviderAPIBroadcastReceiver_Update(); - IntentFilter update_intent_filter = new IntentFilter(ProviderAPI.UPDATE_ACTION); - update_intent_filter.addCategory(Intent.CATEGORY_DEFAULT); - registerReceiver(providerAPI_broadcast_receiver_update, update_intent_filter); + mProgressBar = (ProgressBar) findViewById(R.id.eipProgress); ConfigHelper.setSharedPreferences(getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE)); preferences = ConfigHelper.shared_preferences; @@ -116,7 +103,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf @Override protected void onDestroy() { super.onDestroy(); - unregisterReceiver(providerAPI_broadcast_receiver_update); } @Override @@ -176,11 +162,6 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf provider.init( this ); setContentView(R.layout.client_dashboard); - - providerAPI_broadcast_receiver_update = new ProviderAPIBroadcastReceiver_Update(); - IntentFilter update_intent_filter = new IntentFilter(ProviderAPI.UPDATE_ACTION); - update_intent_filter.addCategory(Intent.CATEGORY_DEFAULT); - registerReceiver(providerAPI_broadcast_receiver_update, update_intent_filter); providerNameTV = (TextView) findViewById(R.id.providerName); providerNameTV.setText(provider.getDomain()); |