You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello
I extend photostream class called UserTask. If I call cancel(true) on my
class he don't call my overrided end() (but my task is cancel).
private class Tick extends UserTask<Integer, Integer, Integer> {
private int mTarget = 0;
@Override
public void begin() {
}
public Integer doInBackground(Integer... params) {
//int target = Integer.parseInt(params[0].trim());
mTarget = params[0];
int end = params[1];
int i = 0;
while (i <= end && !isCancelled()) {
publishProgress(i);
try {
java.lang.Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
i++;
}
return i;
}
public void processProgress(Integer... progress) {
if(!isCancelled())
{
mSwitcher.setText(Integer.toString(progress[0]));
}
}
@Override
public void end(Integer result) {
if(result == mTarget)
{
android.util.Log.d(NoName.LOG_TAG, "WIN");
}
else
{
android.util.Log.w(NoName.LOG_TAG, "LOSE");
}
mTick = null;
}
}
Original issue reported on code.google.com by barbapapaz@gmail.com on 9 Sep 2008 at 12:19
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
barbapapaz@gmail.com
on 9 Sep 2008 at 12:19The text was updated successfully, but these errors were encountered: