Updated stuff.
Change-Id: I8af00df7431d7bc9be13111023785102ce35289f
diff --git a/jni_android.go b/jni_android.go
index b34f7c0..a6e269d 100644
--- a/jni_android.go
+++ b/jni_android.go
@@ -9,7 +9,8 @@
jutil "v.io/x/jni/util"
"v.io/x/jni/libs/discovery"
- "v.io/x/ref/runtime/factories/android"
+ _ "v.io/x/ref/runtime/factories/android"
+ "v.io/x/ref/lib/discovery/factory"
)
// #include "jni.h"
@@ -33,7 +34,7 @@
return
}
- android.SetBleCreator(discovery.NewBleCreator(env, androidCtx))
+ factory.SetAndroidBleCreator(discovery.NewBleCreator(env, androidCtx))
setupV23(env)
}
diff --git a/libs/discovery/jni.go b/libs/discovery/jni.go
index 808af88..e25e2d6 100644
--- a/libs/discovery/jni.go
+++ b/libs/discovery/jni.go
@@ -48,7 +48,7 @@
}
//export Java_io_android_libs_discovery_ble_NativeScanHandler_nativeHandleUpdate
-func Java_io_android_libs_discovery_ble_NativeScanHandler_nativevHandleUpdate(jenv *C.JNIEnv, _ C.jobject, jAdv C.jobject, goPtr C.jlong) {
+func Java_io_android_libs_discovery_ble_NativeScanHandler_nativeHandleUpdate(jenv *C.JNIEnv, _ C.jobject, jAdv C.jobject, goPtr C.jlong) {
env := jutil.Env(uintptr(unsafe.Pointer(jenv)))
c, ok := (*(*chan <- discovery.Advertisement)(jutil.NativePtr(goPtr)))
diff --git a/libs/discovery/plugin.go b/libs/discovery/plugin.go
index e05a23b..e7e2df7 100644
--- a/libs/discovery/plugin.go
+++ b/libs/discovery/plugin.go
@@ -7,6 +7,7 @@
package discovery
import (
"bytes"
+ "runtime"
"unsafe"
"v.io/v23/context"
@@ -17,7 +18,6 @@
jcontext "v.io/x/jni/v23/context"
jutil "v.io/x/jni/util"
- "third_party/go/tool/android_arm/src/runtime"
)
// #include "jni.h"
@@ -134,7 +134,7 @@
}
-func convertToJavaUUID(env, jutil.Env, uuid discovery.Uuid) (C.jobject, error) {
+func convertToJavaUUID(env jutil.Env, uuid discovery.Uuid) (C.jobject, error) {
buf := bytes.NewBuffer(uuid)
var high, low int64
binary.Read(buf, binary.BigEndian, &high)