2
0
mirror of synced 2025-02-22 06:28:04 +00:00

9 Commits

Author SHA1 Message Date
David Crawshaw
eadadb8667 internal/mobileinit: standardize JNIEnv* access
Replace the direct access to JavaVM* and the global android Context
instance with a function responsible for running attached correctly
to the JVM. This saves having to replicate the logic for attaching an
OS thread to the JVM. While here, check for any unhandled Java
exceptions.

This supersedes cl/11812.

Change-Id: Ic9291fe64083d2bd983c4f8e309941b9c47d60c2
Reviewed-on: https://go-review.googlesource.com/14162
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-09-14 17:30:52 +00:00
Hana Kim
49a82fefe3 all: support go get golang.org/x/mobile/... on Windows
Fixes golang/go#12212
Workaround for golang/go#12261 until golang/go#9306 is fixed.

Change-Id: I51c1bcfc92c1553fe2132586a0234b1c1af6aeb1
Reviewed-on: https://go-review.googlesource.com/13745
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-24 21:09:04 +00:00
Hyang-Ah (Hana) Kim
9e2563f3e7 asset: warn asset.Open must not be called from init.
Currently there is no easy way to fix golang/go#12077
so we document it.

Fixes golang/go#12077

Change-Id: I6b37ae375673c055152dad5b93e180d9831aef76
Reviewed-on: https://go-review.googlesource.com/13430
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-08-10 19:12:52 +00:00
Hyang-Ah (Hana) Kim
68f31e14ae mobile: limit build to linux/darwin.
Change-Id: I99f3841742e8f2ea098cfb08e8f5575c84f7cf75
Reviewed-on: https://go-review.googlesource.com/12850
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-29 20:28:35 +00:00
Hyang-Ah (Hana) Kim
136fa9bbbb bind/java: reenable asset access.
This is done by moving app.Context to internal/mobileinit,
introducing mobileinit.SetCurrentContext and,
making bind/java depend on it.

TODO: check gomobile bind's proguard rule - context lookup
was implemented through reflection on android.app.AppGlobals class.

Change-Id: Ieb6ad503eeef8c2c1c5836a21c667938c5a701a2
Reviewed-on: https://go-review.googlesource.com/12279
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-16 21:15:37 +00:00
Nigel Tao
c2c03d3a71 asset: add missing copyright header, fix typo.
Change-Id: I86feab77d053d384af74219df371b31a7f5d82f0
Reviewed-on: https://go-review.googlesource.com/11823
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-07-01 00:10:52 +00:00
David Crawshaw
e7a7f32e55 asset: wrong package name
Not part of, but mentioned on golang/go#11424.

Change-Id: I9d9289a67592aa43bcd55e073d8f3b29daa93056
Reviewed-on: https://go-review.googlesource.com/11735
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-06-30 23:51:02 +00:00
Burcu Dogan
3522bcc2e0 asset: add missing license header
Change-Id: Ife81591606a2fadcc216eae0ea17d772b3757cf7
Reviewed-on: https://go-review.googlesource.com/11736
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-06-30 17:31:44 +00:00
David Crawshaw
8bb4ca139b asset: move app.Open to its own package
This does not break the dependency on the app package's AndroidContext
for loading assets on android. A potential answer for gobind-based
apps: add a SetAndroidContext method to app.Context. But I'll explore
that separately after the long weekend.

Change-Id: I812f899740e288c379eee7900f42d9d53926d4ce
Reviewed-on: https://go-review.googlesource.com/11675
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-06-29 21:49:28 +00:00