应用程序的 AlertDialog.Builder(context)
中有下面的代码。问题是在哪个线程中运行呢?
final Thread myPrettyOperation = new Thread() {
@Override
public void run() {
//Do some really long operation.
}
};
class MyPrettyTask extends
AsyncTask<Void, Integer, Boolean> {
protected Boolean doInBackground(
Void... voids) {
myPrettyOperation.start();
return true;
}
protected void onProgressUpdate(
Integer... progress) {
}
protected void onPostExecute(Boolean result) {
}
}
new MyPrettyTask().execute();