Remove the handler for the logging function as is unneeded
This commit is contained in:
parent
11cc6e6ccf
commit
985297183a
|
@ -235,33 +235,21 @@ public class GenerateLogs extends AsyncTask<String, Integer, String> {
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(final String response) {
|
protected void onPostExecute(final String response) {
|
||||||
if (response != null && !response.equals(null)) {
|
if (response != null && !response.equals(null)) {
|
||||||
Handler handler = new Handler();
|
|
||||||
if (isNetworkAvailable(false)) {
|
if (isNetworkAvailable(false)) {
|
||||||
handler.post(new Runnable() {
|
Toast.makeText(mContext, mContext.getString(R.string.platform),
|
||||||
public void run() {
|
|
||||||
Toast.makeText(mContext,
|
|
||||||
mContext.getString(R.string.platform),
|
|
||||||
Toast.LENGTH_SHORT).show();
|
Toast.LENGTH_SHORT).show();
|
||||||
UploadLogs mUploadLogs = new UploadLogs(mContext,
|
UploadLogs mUploadLogs = new UploadLogs(mContext, currentTime);
|
||||||
currentTime);
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||||
mUploadLogs.executeOnExecutor(
|
mUploadLogs.executeOnExecutor(
|
||||||
AsyncTask.THREAD_POOL_EXECUTOR, response);
|
AsyncTask.THREAD_POOL_EXECUTOR, response);
|
||||||
} else {
|
} else {
|
||||||
mUploadLogs.execute(response);
|
mUploadLogs.execute(response);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
handler.post(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
mContext,
|
mContext,
|
||||||
mContext.getString(R.string.log_saved,
|
mContext.getString(R.string.log_saved, debug_directory),
|
||||||
debug_directory), Toast.LENGTH_SHORT)
|
Toast.LENGTH_SHORT).show();
|
||||||
.show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue