diff --git a/android/BOINC/res/layout/tasks_layout_listitem.xml b/android/BOINC/res/layout/tasks_layout_listitem.xml
index 471714baa6..9c3fb9d4c2 100644
--- a/android/BOINC/res/layout/tasks_layout_listitem.xml
+++ b/android/BOINC/res/layout/tasks_layout_listitem.xml
@@ -21,25 +21,18 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- android:clickable="false" >
+ android:clickable="true" >
+
-
-
-
+ android:layout_height="match_parent">
-
-
-
-
-
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_below="@+id/progressBar"
+ android:layout_alignLeft="@+id/progressBar" />
+
+
+
-
-
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:layout_below="@+id/progressBar"
+ android:layout_alignRight="@+id/progressBar" />
+
+
-
-
+
+
+
+
+
diff --git a/android/BOINC/res/values/configuration.xml b/android/BOINC/res/values/configuration.xml
index aef5a4e649..a1f6d06eff 100644
--- a/android/BOINC/res/values/configuration.xml
+++ b/android/BOINC/res/values/configuration.xml
@@ -21,7 +21,7 @@
arm-android-linux-gnu
- 5000
+ 1000
5000
5
460
@@ -32,4 +32,6 @@
true
true
true
+
+ 10
diff --git a/android/BOINC/res/values/strings.xml b/android/BOINC/res/values/strings.xml
index 3335855f24..a88e3a704e 100644
--- a/android/BOINC/res/values/strings.xml
+++ b/android/BOINC/res/values/strings.xml
@@ -124,7 +124,7 @@
Nothing to do
Waiting for tasks…
Stopped
- …until you allow me to continue!
+ Allow computation to continue!
Starting…
Add a project!
Closing…
@@ -183,6 +183,13 @@
Reading tasks…
+ ID:
+ Name:
+ Project:
+ Deadline:
+ resume task
+ pause task
+ abort task
new
waiting for download
download complete
@@ -191,7 +198,6 @@
upload complete
aborted
upload failed
-
ready
running
paused
@@ -236,21 +242,21 @@
Computation paused.
No BOINC tasks ready for computation.
- Not connected to charger.
+ Connect your device to a charger!
User is active.
Out of computation time-frame.
- BOINC is benchmarking your device.
+ BOINC is benchmarking your device…
Out of disk space.
Your device is busy.
No recent tasks available.
Initialisation delay.
An exclusive app is running.
- Your device is busy.
+ Your device is busy with a different application.
BOINC reached network transfer limit.
Stopped by Android.
Can\'t fetch work, no WiFi connection!
- Your device\'s battery is charging.
- Your device\'s battery needs to cool down.
+ Battery needs to charge prior to computation.
+ Battery needs to cool down.
Restarting computation…
diff --git a/android/BOINC/src/edu/berkeley/boinc/PrefsActivity.java b/android/BOINC/src/edu/berkeley/boinc/PrefsActivity.java
index 32bcb14be7..1be9ddb8e0 100644
--- a/android/BOINC/src/edu/berkeley/boinc/PrefsActivity.java
+++ b/android/BOINC/src/edu/berkeley/boinc/PrefsActivity.java
@@ -315,7 +315,8 @@ public class PrefsActivity extends FragmentActivity {
@Override
protected Boolean doInBackground(GlobalPreferences... params) {
- return monitor.setGlobalPreferences(params[0]);
+ if(mIsBound) return monitor.setGlobalPreferences(params[0]);
+ else return false;
}
@Override
diff --git a/android/BOINC/src/edu/berkeley/boinc/StatusActivity.java b/android/BOINC/src/edu/berkeley/boinc/StatusActivity.java
index 0ee6951598..6ce537e404 100644
--- a/android/BOINC/src/edu/berkeley/boinc/StatusActivity.java
+++ b/android/BOINC/src/edu/berkeley/boinc/StatusActivity.java
@@ -86,8 +86,7 @@ public class StatusActivity extends Activity {
private BroadcastReceiver mClientStatusChangeRec = new BroadcastReceiver() {
@Override
public void onReceive(Context context,Intent intent) {
- String action = intent.getAction();
- Log.d(TAG+"-localClientStatusRecNoisy","received action " + action);
+ //Log.d(TAG+"-localClientStatusRecNoisy","received action " + intent.getAction());
loadLayout(); // load layout, function distincts whether there is something to do
}
};
diff --git a/android/BOINC/src/edu/berkeley/boinc/TasksActivity.java b/android/BOINC/src/edu/berkeley/boinc/TasksActivity.java
index 4c73d330c4..52a2b001f6 100644
--- a/android/BOINC/src/edu/berkeley/boinc/TasksActivity.java
+++ b/android/BOINC/src/edu/berkeley/boinc/TasksActivity.java
@@ -24,6 +24,7 @@ import edu.berkeley.boinc.adapter.TasksListAdapter;
import edu.berkeley.boinc.client.ClientStatus;
import edu.berkeley.boinc.client.Monitor;
import edu.berkeley.boinc.rpc.Result;
+import edu.berkeley.boinc.rpc.RpcClient;
import edu.berkeley.boinc.utils.BOINCDefs;
import android.app.Service;
import android.content.BroadcastReceiver;
@@ -33,6 +34,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.ServiceConnection;
+import android.os.AsyncTask;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.app.FragmentActivity;
@@ -46,7 +48,7 @@ public class TasksActivity extends FragmentActivity {
private final String TAG = "BOINC TasksActivity";
private Monitor monitor;
- private Boolean mIsBound;
+ private Boolean mIsBound = false;
private ClientStatus status; //client status, new information gets parsed by monitor, changes notified by "clientstatus" broadcast. read Result from here, to get information about tasks.
@@ -72,10 +74,10 @@ public class TasksActivity extends FragmentActivity {
private BroadcastReceiver mClientStatusChangeRec = new BroadcastReceiver() {
- private final String TAG = "TasksActivity-Receiver";
+ //private final String TAG = "TasksActivity-Receiver";
@Override
public void onReceive(Context context,Intent intent) {
- Log.d(TAG,"onReceive");
+ //Log.d(TAG,"onReceive");
loadData();
}
};
@@ -94,8 +96,6 @@ public class TasksActivity extends FragmentActivity {
//load data model
loadData();
-
- Log.d(TAG, "onCreate");
}
public void onResume() {
@@ -141,69 +141,68 @@ public class TasksActivity extends FragmentActivity {
setup = true;
}
- Log.d(TAG,"loadData: array contains " + data.size() + " results.");
+ Log.d(TAG,"loadData: data set contains " + data.size() + " results.");
listAdapter.notifyDataSetChanged(); //force list adapter to refresh
} else {
- Log.d(TAG, "loadData array is null");
+ Log.w(TAG, "loadData: array is null, rpc failed");
}
}
-
+
private void updateData(ArrayList newData) {
- // Create a new task data list based on new data
- ArrayList tdl = new ArrayList();
- for (Result r : newData) {
- tdl.add(new TaskData(r));
- }
- // search for the same id in the old tasks
- // maybe tasks were rearranged or updated
- for (int i = 0; i < tdl.size(); i++) {
- int j;
- for (j = 0; j < data.size(); j++) {
- if (tdl.get(i).id.equals(data.get(j).id)) {
- // this task is old.
- // retrieve expansion state
- tdl.get(i).expanded = data.get(j).expanded;
- break;
+ //loop through all received Result items
+ for(Result rpcResult: newData) {
+
+ //check whether this Result is new
+ Integer index = null;
+ for(int x = 0; x < data.size(); x++) {
+ if(rpcResult.name.equals(data.get(x).id)) {
+ index = x;
+ continue;
}
}
- if (j == data.size()) {
- // this is a new task, so add it
- data.add(tdl.get(i));
+ if(index == null) { // result is new, add
+ Log.d(TAG,"new result found, id: " + rpcResult.name);
+ data.add(new TaskData(rpcResult));
+ } else { // result was present before, update its data
+ data.get(index).updateResultData(rpcResult);
}
}
- // save new task data list
- data.clear();
-
- for (TaskData td: tdl) {
- data.add(td);
- }
}
public class TaskData {
- public static final int TASK_STATE_UNKNOWN = 0;
- public static final int TASK_STATE_PAUSED = 1;
- public static final int TASK_STATE_RUNNING = 2;
-
- public static final int TASK_STATE_ACTIVE = 10;
- public static final int TASK_STATE_ABORTED = 11;
-
public Result result = null;
public boolean expanded = false;
public String id = "";
- public int nextRunState = TASK_STATE_UNKNOWN;
- public int currentRunState = TASK_STATE_UNKNOWN;
- public int nextAbortState = TASK_STATE_UNKNOWN;
- public int currentAbortState = TASK_STATE_UNKNOWN;
+ public int nextState = -1;
+ public int loopCounter = 0;
+ public int transistionTimeout = 10; // amount of refresh, until transition times out
public TaskData(Result data) {
this.result = data;
this.expanded = false;
this.id = data.name;
- this.currentRunState = determineRunningState();
- this.nextRunState = this.currentRunState;
- this.currentAbortState = determineAbortState();
- this.nextAbortState = this.currentAbortState;
+ this.transistionTimeout = getResources().getInteger(R.integer.tasks_transistion_timeout_number_monitor_loops);
+ }
+
+ public void updateResultData(Result data) {
+ this.result = data;
+ Integer currentState = determineState();
+ if (nextState == -1) return;
+ if(currentState == nextState || (nextState == BOINCDefs.PROCESS_SUSPENDED && currentState == BOINCDefs.PROCESS_UNINITIALIZED)) {
+ Log.d(TAG,"nextState met! " + nextState);
+ nextState = -1;
+ loopCounter = 0;
+ } else {
+ if(loopCounter {
- public int determineAbortState() {
- if(!result.active_task) {
- switch (result.state) {
- case 6:
- return TASK_STATE_ABORTED;
- }
- }
- return TASK_STATE_ACTIVE;
+ private final String TAG = "SuspendResultAsync";
+
+ @Override
+ protected Boolean doInBackground(String... params) {
+ try{
+ String url = params[0];
+ String name = params[1];
+ Integer operation = Integer.parseInt(params[2]);
+ Log.d(TAG,"url: " + url + " Name: " + name + " operation: " + operation);
+
+ if(mIsBound) return monitor.resultOperation(url, name, operation);
+ else return false;
+ } catch(Exception e) {Log.w(TAG,"error in do in background",e);}
+ return false;
+ }
+
+ @Override
+ protected void onPostExecute(Boolean success) {
+ if(success) monitor.forceRefresh();
+ else Log.w(TAG,"failed.");
}
}
}
diff --git a/android/BOINC/src/edu/berkeley/boinc/adapter/TasksListAdapter.java b/android/BOINC/src/edu/berkeley/boinc/adapter/TasksListAdapter.java
index e9d04c3f96..b8e2b69f1a 100644
--- a/android/BOINC/src/edu/berkeley/boinc/adapter/TasksListAdapter.java
+++ b/android/BOINC/src/edu/berkeley/boinc/adapter/TasksListAdapter.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
import edu.berkeley.boinc.R;
import edu.berkeley.boinc.TasksActivity.TaskData;
+import edu.berkeley.boinc.rpc.RpcClient;
import edu.berkeley.boinc.utils.BOINCDefs;
import android.app.Activity;
@@ -33,6 +34,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
@@ -58,7 +60,7 @@ public class TasksListAdapter extends ArrayAdapter{
v.setOnClickListener(entries.get(position).taskClickListener);
ProgressBar pb = (ProgressBar) v.findViewById(R.id.progressBar);
- TextView header = (TextView) v.findViewById(R.id.taskName);
+ TextView header = (TextView) v.findViewById(R.id.taskHeader);
TextView status = (TextView) v.findViewById(R.id.taskStatus);
TextView time = (TextView) v.findViewById(R.id.taskTime);
TextView progress = (TextView) v.findViewById(R.id.taskProgress);
@@ -69,7 +71,7 @@ public class TasksListAdapter extends ArrayAdapter{
pb.setProgressDrawable(this.activity.getResources().getDrawable((determineProgressBarLayout(listItem))));
//v.setTag(listItem.name);
- String headerT = "Name: " + listItem.result.name;
+ String headerT = getContext().getString(R.string.tasks_header_friendly_name) + " " + listItem.result.app.getName();
header.setText(headerT);
Float fraction = listItem.result.fraction_done;
@@ -90,63 +92,46 @@ public class TasksListAdapter extends ArrayAdapter{
if (listItem.expanded) {
ll.setVisibility(View.VISIBLE);
// update resume/suspend state (button state)
- listItem.currentRunState = listItem.determineRunningState();
- // update abort state (button state)
- listItem.currentAbortState = listItem.determineAbortState();
// set deadline
String deadline = (String) DateFormat.format("E d MMM yyyy hh:mm:ss aa", new Date(listItem.result.report_deadline*1000));
- ((TextView) v.findViewById(R.id.deadline)).setText("Deadline: " + deadline);
+ ((TextView) v.findViewById(R.id.deadline)).setText(getContext().getString(R.string.tasks_header_deadline) + " " + deadline);
// set project name
String tempProjectName = listItem.result.project_url;
if(listItem.result.project != null) {
tempProjectName = listItem.result.project.getName();
}
- ((TextView) v.findViewById(R.id.projectName)).setText("Project name: " + tempProjectName);
+ ((TextView) v.findViewById(R.id.projectName)).setText(getContext().getString(R.string.tasks_header_project_name) + " " + tempProjectName);
// set application friendly name
if(listItem.result.app != null) {
- ((TextView) v.findViewById(R.id.friendlyAppName)).setText("App Name: " + listItem.result.app.getName());
+ ((TextView) v.findViewById(R.id.taskName)).setText(getContext().getString(R.string.tasks_header_name) + " " + listItem.result.name);
}
+
+ if(listItem.determineState() == BOINCDefs.PROCESS_ABORTED) { //dont show buttons for aborted task
+ ((LinearLayout)v.findViewById(R.id.requestPendingWrapper)).setVisibility(View.GONE);
+ ((LinearLayout)v.findViewById(R.id.taskButtons)).setVisibility(View.GONE);
+ } else {
+
+ ImageView suspendResume = (ImageView) v.findViewById(R.id.suspendResumeTask);
+ suspendResume.setOnClickListener(listItem.iconClickListener);
- ImageView suspendResume = (ImageView) v.findViewById(R.id.suspendResumeTask);
- if (listItem.currentRunState == listItem.nextRunState) {
- // current button state is same as expected
- suspendResume.setEnabled(true);
- suspendResume.setClickable(true);
- if (listItem.currentRunState == TaskData.TASK_STATE_RUNNING) {
- suspendResume.setOnClickListener(listItem.suspendClickListener);
- suspendResume.setImageResource(R.drawable.pausew24);
+ ImageView abortButton = (ImageView) v.findViewById(R.id.abortTask);
+ abortButton.setOnClickListener(listItem.iconClickListener);
+ abortButton.setTag(RpcClient.RESULT_ABORT); // tag on button specified operation triggered in iconClickListener
+
+ if (listItem.nextState == -1) { // not waiting for new state
+ ((LinearLayout)v.findViewById(R.id.requestPendingWrapper)).setVisibility(View.GONE);
+ ((LinearLayout)v.findViewById(R.id.taskButtons)).setVisibility(View.VISIBLE);
+ if (listItem.determineState() == BOINCDefs.PROCESS_EXECUTING) {
+ suspendResume.setImageResource(R.drawable.pausew24);
+ suspendResume.setTag(RpcClient.RESULT_SUSPEND); // tag on button specified operation triggered in iconClickListener
+ } else {
+ suspendResume.setImageResource(R.drawable.playw24);
+ suspendResume.setTag(RpcClient.RESULT_RESUME); // tag on button specified operation triggered in iconClickListener
+ }
} else {
- suspendResume.setOnClickListener(listItem.resumeClickListener);
- suspendResume.setImageResource(R.drawable.playw24);
+ ((LinearLayout)v.findViewById(R.id.taskButtons)).setVisibility(View.GONE);
+ ((LinearLayout)v.findViewById(R.id.requestPendingWrapper)).setVisibility(View.VISIBLE);
}
- } else {
- // waiting for transient state to be as expected
- // button needs to be disabled (no action should be taken while waiting)
- suspendResume.setEnabled(false);
- suspendResume.setClickable(false);
- suspendResume.setOnClickListener(null);
- if (listItem.currentRunState == TaskData.TASK_STATE_RUNNING) {
- suspendResume.setImageResource(R.drawable.pausew24);
- } else {
- suspendResume.setImageResource(R.drawable.playw24);
- }
- }
- if (listItem.currentAbortState == listItem.nextAbortState) {
- // current button state is same as expected
- if (listItem.currentAbortState == TaskData.TASK_STATE_ABORTED) {
- suspendResume.setEnabled(false);
- suspendResume.setClickable(false);
- } else {
- suspendResume.setEnabled(true);
- suspendResume.setClickable(true);
- ((ImageView) v.findViewById(R.id.abortTask)).setOnClickListener(listItem.abortClickListener);
- }
- } else {
- // waiting for transient state to be as expected
- // button needs to be disabled (no action should be taken while waiting)
- suspendResume.setEnabled(false);
- suspendResume.setClickable(false);
- suspendResume.setOnClickListener(null);
}
} else {
ll.setVisibility(View.GONE);
@@ -159,46 +144,46 @@ public class TasksListAdapter extends ArrayAdapter{
String text = "";
if(tmp.result.active_task) {
switch (tmp.result.active_task_state) {
- case 0:
+ case BOINCDefs.PROCESS_UNINITIALIZED:
text = activity.getString(R.string.tasks_active_uninitialized);
break;
- case 1:
+ case BOINCDefs.PROCESS_EXECUTING:
text = activity.getString(R.string.tasks_active_executing);
break;
- case 5:
+ case BOINCDefs.PROCESS_ABORT_PENDING:
text = activity.getString(R.string.tasks_active_abort_pending);
break;
- case 8:
+ case BOINCDefs.PROCESS_QUIT_PENDING:
text = activity.getString(R.string.tasks_active_quit_pending);
break;
- case 9:
+ case BOINCDefs.PROCESS_SUSPENDED:
text = activity.getString(R.string.tasks_active_suspended);
break;
}
} else {
switch (tmp.result.state) {
- case 0:
+ case BOINCDefs.RESULT_NEW:
text = activity.getString(R.string.tasks_result_new);
break;
- case 1:
+ case BOINCDefs.RESULT_FILES_DOWNLOADING:
text = activity.getString(R.string.tasks_result_files_downloading);
break;
- case 2:
+ case BOINCDefs.RESULT_FILES_DOWNLOADED:
text = activity.getString(R.string.tasks_result_files_downloaded);
break;
- case 3:
+ case BOINCDefs.RESULT_COMPUTE_ERROR:
text = activity.getString(R.string.tasks_result_compute_error);
break;
- case 4:
+ case BOINCDefs.RESULT_FILES_UPLOADING:
text = activity.getString(R.string.tasks_result_files_uploading);
break;
- case 5:
+ case BOINCDefs.RESULT_FILES_UPLOADED:
text = activity.getString(R.string.tasks_result_files_uploaded);
break;
- case 6:
+ case BOINCDefs.RESULT_ABORTED:
text = activity.getString(R.string.tasks_result_aborted);
break;
- case 7:
+ case BOINCDefs.RESULT_UPLOAD_FAILED:
text = activity.getString(R.string.tasks_result_upload_failed);
break;
}
diff --git a/android/BOINC/src/edu/berkeley/boinc/client/ClientNotification.java b/android/BOINC/src/edu/berkeley/boinc/client/ClientNotification.java
index ae9677b42f..a5b266dd9d 100644
--- a/android/BOINC/src/edu/berkeley/boinc/client/ClientNotification.java
+++ b/android/BOINC/src/edu/berkeley/boinc/client/ClientNotification.java
@@ -15,6 +15,7 @@ public class ClientNotification {
private boolean mIsEnabled = true;
private int mOldComputingStatus = -1;
+ private int mOldSuspendReason = -1;
/**
* Returns a reference to a singleton ClientNotification object.
@@ -35,10 +36,12 @@ public class ClientNotification {
*/
public synchronized void update(Context context, ClientStatus updatedStatus) {
if (clientNotification.mOldComputingStatus == -1
- || updatedStatus.computingStatus.intValue() != clientNotification.mOldComputingStatus) {
+ || updatedStatus.computingStatus.intValue() != clientNotification.mOldComputingStatus
+ || (updatedStatus.computingStatus == ClientStatus.COMPUTING_STATUS_SUSPENDED && updatedStatus.computingSuspendReason != clientNotification.mOldSuspendReason)) {
if (clientNotification.mIsEnabled)
updateNotification(context, updatedStatus.computingStatus);
clientNotification.mOldComputingStatus = updatedStatus.computingStatus;
+ clientNotification.mOldSuspendReason = updatedStatus.computingSuspendReason;
}
}
diff --git a/android/BOINC/src/edu/berkeley/boinc/client/ClientStatus.java b/android/BOINC/src/edu/berkeley/boinc/client/ClientStatus.java
index 718f24407a..9c0944b5b6 100644
--- a/android/BOINC/src/edu/berkeley/boinc/client/ClientStatus.java
+++ b/android/BOINC/src/edu/berkeley/boinc/client/ClientStatus.java
@@ -139,7 +139,7 @@ public class ClientStatus {
this.projects = projects;
this.transfers = transfers;
parseClientStatus();
- Log.d(TAG,"parsing results: computing: " + computingParseError + computingStatus + computingSuspendReason + " - network: " + networkParseError + networkStatus + networkSuspendReason);
+ Log.d(TAG,"setClientStatus: #results:" + results.size() + " #projects:" + projects.size() + " #transfers:" + transfers.size() + " // computing: " + computingParseError + computingStatus + computingSuspendReason + " - network: " + networkParseError + networkStatus + networkSuspendReason);
if(!computingParseError && !networkParseError && !setupStatusParseError) {
fire(); // broadcast that status has changed
} else {
diff --git a/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java b/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
index 5974d2b1fd..480c2ed578 100644
--- a/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
+++ b/android/BOINC/src/edu/berkeley/boinc/client/Monitor.java
@@ -815,40 +815,10 @@ public class Monitor extends Service {
(new TransferRetryAsync()).execute(param);
}
- public Boolean suspendResult(String url, String name){
- return rpc.resultOp(RpcClient.RESULT_SUSPEND, url, name);
- }
-
- public void suspendResultAsync(String url, String name){
- Log.d(TAG, "suspendResultAsync");
- String[] param = new String[2];
- param[0] = url;
- param[1] = name;
- (new SuspendResultAsync()).execute(param);
- }
-
- public Boolean resumeResult(String url, String name){
- return rpc.resultOp(RpcClient.RESULT_RESUME, url, name);
- }
-
- public void resumeResultAsync(String url, String name){
- Log.d(TAG, "resumeResultAsync");
- String[] param = new String[2];
- param[0] = url;
- param[1] = name;
- (new ResumeResultAsync()).execute(param);
- }
-
- public Boolean abortResult(String url, String name){
- return rpc.resultOp(RpcClient.RESULT_RESUME, url, name);
- }
-
- public void abortResultAsync(String url, String name){
- Log.d(TAG, "abortResultAsync");
- String[] param = new String[2];
- param[0] = url;
- param[1] = name;
- (new AbortResultAsync()).execute(param);
+ // executes specified operation on result
+ // e.g. RpcClient.RESULT_SUSPEND, RpcClient.RESULT_RESUME, RpcClient.RESULT_ABORT
+ public Boolean resultOperation(String url, String name, int operation) {
+ return rpc.resultOp(operation, url, name);
}
public AccountOut createAccount(String url, String email, String userName, String pwd, String teamName) {
@@ -1103,98 +1073,6 @@ public class Monitor extends Service {
}
}
- private final class SuspendResultAsync extends AsyncTask {
-
- private final String TAG = "SuspendResultAsync";
-
- private String url;
- private String name;
-
- @Override
- protected Boolean doInBackground(String... params) {
- this.url = params[0];
- this.name = params[1];
- publishProgress("doInBackground() - SuspendResultAsync url: " + url + " Name: " + name);
-
- Boolean retry = rpc.resultOp(RpcClient.RESULT_SUSPEND, url, name);
- if(retry) {
- publishProgress("successful.");
- }
- return retry;
- }
-
- @Override
- protected void onPostExecute(Boolean success) {
- forceRefresh();
- }
-
- @Override
- protected void onProgressUpdate(String... arg0) {
- Log.d(TAG, "onProgressUpdate - " + arg0[0]);
- }
- }
-
- private final class ResumeResultAsync extends AsyncTask {
-
- private final String TAG = "ResumeResultAsync";
-
- private String url;
- private String name;
-
- @Override
- protected Boolean doInBackground(String... params) {
- this.url = params[0];
- this.name = params[1];
- publishProgress("doInBackground() - ResumeResultAsync url: " + url + " Name: " + name);
- Boolean retry = rpc.resultOp(RpcClient.RESULT_RESUME, url, name);
- if(retry) {
- publishProgress("successful.");
- }
- return retry;
- }
-
- @Override
- protected void onPostExecute(Boolean success) {
- forceRefresh();
- }
-
- @Override
- protected void onProgressUpdate(String... arg0) {
- Log.d(TAG, "onProgressUpdate - " + arg0[0]);
- }
- }
-
- private final class AbortResultAsync extends AsyncTask {
-
- private final String TAG = "AbortResultAsync";
-
- private String url;
- private String name;
-
- @Override
- protected Boolean doInBackground(String... params) {
- this.url = params[0];
- this.name = params[1];
- publishProgress("doInBackground() - AbortResultAsync url: " + url + " Name: " + name);
-
- Boolean retry = rpc.resultOp(RpcClient.RESULT_ABORT, url, name);
- if(retry) {
- publishProgress("successful.");
- }
- return retry;
- }
-
- @Override
- protected void onPostExecute(Boolean success) {
- forceRefresh();
- }
-
- @Override
- protected void onProgressUpdate(String... arg0) {
- Log.d(TAG, "onProgressUpdate - " + arg0[0]);
- }
- }
-
private final class WriteClientRunModeAsync extends AsyncTask {
private final String TAG = "WriteClientRunModeAsync";