|
|
@@ -1,7 +1,6 @@
|
|
|
package com.xzjmyk.pm.activity.volley;
|
|
|
|
|
|
import android.content.Context;
|
|
|
-import android.os.Looper;
|
|
|
import android.text.TextUtils;
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
@@ -134,13 +133,15 @@ public class Result {
|
|
|
}
|
|
|
|
|
|
private static void showResultToast(Context context, Result result) {
|
|
|
- Looper.prepare();
|
|
|
- if (TextUtils.isEmpty(result.resultMsg)) {
|
|
|
- Toast.makeText(context, context.getString(R.string.data_exception), Toast.LENGTH_SHORT).show();
|
|
|
- } else {
|
|
|
- Toast.makeText(context, result.resultMsg, Toast.LENGTH_SHORT).show();
|
|
|
+ try {
|
|
|
+ if (TextUtils.isEmpty(result.resultMsg)) {
|
|
|
+ Toast.makeText(context, context.getString(R.string.data_exception), Toast.LENGTH_SHORT).show();
|
|
|
+ } else {
|
|
|
+ Toast.makeText(context, result.resultMsg, Toast.LENGTH_SHORT).show();
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+
|
|
|
}
|
|
|
- Looper.loop();
|
|
|
}
|
|
|
|
|
|
public int getResultCode() {
|