github.com/mixinnetwork/mobile@v0.0.0-20231204065441-5f786fcd11c7/bind/java/context_android.go (about)

     1  // Copyright 2016 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package java // import "github.com/mixinnetwork/mobile/bind/java"
     6  
     7  // #cgo LDFLAGS: -llog
     8  //
     9  //#include <jni.h>
    10  import "C"
    11  
    12  import (
    13  	"unsafe"
    14  
    15  	"github.com/mixinnetwork/mobile/internal/mobileinit"
    16  )
    17  
    18  //export setContext
    19  func setContext(vm *C.JavaVM, ctx C.jobject) {
    20  	mobileinit.SetCurrentContext(unsafe.Pointer(vm), uintptr(ctx))
    21  }