Browse Source

1.修复热启动无法拉起授权的问题

tags/0.0.4
“yanghuaxuan” 3 years ago
parent
commit
9786cccfb4
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcHandle.java

+ 3
- 4
android/src/main/java/com/wxwx/flutter_alibc/FlutterAlibcHandle.java View File

@@ -48,16 +48,15 @@ import java.util.Map;
public class FlutterAlibcHandle { public class FlutterAlibcHandle {


private static FlutterAlibcHandle handle; private static FlutterAlibcHandle handle;
private Registrar register;
private static Registrar register;


//第一次调用getInstance register不能为空 //第一次调用getInstance register不能为空
public static FlutterAlibcHandle getInstance(Registrar register) { public static FlutterAlibcHandle getInstance(Registrar register) {
if (handle == null) {
synchronized (FlutterAlibcHandle.class) { synchronized (FlutterAlibcHandle.class) {
handle = new FlutterAlibcHandle(); handle = new FlutterAlibcHandle();
handle.register = register;
FlutterAlibcHandle.register = register;
} }
}
return handle; return handle;
} }




Loading…
Cancel
Save