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
|
||||
protected void onPostExecute(final String response) {
|
||||
if (response != null && !response.equals(null)) {
|
||||
Handler handler = new Handler();
|
||||
if (isNetworkAvailable(false)) {
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
Toast.makeText(mContext,
|
||||
mContext.getString(R.string.platform),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
UploadLogs mUploadLogs = new UploadLogs(mContext,
|
||||
currentTime);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
mUploadLogs.executeOnExecutor(
|
||||
AsyncTask.THREAD_POOL_EXECUTOR, response);
|
||||
} else {
|
||||
mUploadLogs.execute(response);
|
||||
}
|
||||
}
|
||||
});
|
||||
Toast.makeText(mContext, mContext.getString(R.string.platform),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
UploadLogs mUploadLogs = new UploadLogs(mContext, currentTime);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
mUploadLogs.executeOnExecutor(
|
||||
AsyncTask.THREAD_POOL_EXECUTOR, response);
|
||||
} else {
|
||||
mUploadLogs.execute(response);
|
||||
}
|
||||
} else {
|
||||
handler.post(new Runnable() {
|
||||
public void run() {
|
||||
Toast.makeText(
|
||||
mContext,
|
||||
mContext.getString(R.string.log_saved,
|
||||
debug_directory), Toast.LENGTH_SHORT)
|
||||
.show();
|
||||
}
|
||||
});
|
||||
Toast.makeText(
|
||||
mContext,
|
||||
mContext.getString(R.string.log_saved, debug_directory),
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue