升级Opencv版本到3.4.3

This commit is contained in:
hyb1996
2018-12-16 14:54:55 +08:00
parent f31e3e567e
commit ce00205871
11 changed files with 35 additions and 103 deletions

View File

@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":454,"versionName":"4.1.0 Alpha4","enabled":true,"outputFile":"commonRelease-4.1.0 Alpha4.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.1.0 Alpha4.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":455,"versionName":"4.1.0 Alpha5","enabled":true,"outputFile":"commonRelease-4.1.0 Alpha5.apk","fullName":"commonRelease","baseName":"common-release"},"path":"commonRelease-4.1.0 Alpha5.apk","properties":{}}]

View File

@@ -5,6 +5,7 @@ import android.app.Dialog;
import android.content.Context;
import android.content.ContextWrapper;
import android.os.Build;
import android.os.Looper;
import android.view.Window;
import android.view.WindowManager;
@@ -14,7 +15,7 @@ import android.view.WindowManager;
public class DialogUtils {
public static <T extends Dialog> T showDialog(T dialog) {
public static <T extends Dialog> T showDialog(final T dialog) {
Context context = dialog.getContext();
if (!isActivityContext(context)) {
@@ -28,7 +29,16 @@ public class DialogUtils {
if (window != null)
window.setType(type);
}
dialog.show();
if (Looper.getMainLooper() == Looper.myLooper()) {
dialog.show();
} else {
GlobalAppContext.post(new Runnable() {
@Override
public void run() {
dialog.show();
}
});
}
return dialog;
}