You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/05/07 07:53:20 UTC
[47/52] [abbrv] incubator-weex git commit: *[Core] fix
ContentBoxMeasurement getWidth & Height value error when release.
*[Core] fix ContentBoxMeasurement getWidth & Height value error when release.
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/46ce1c5d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/46ce1c5d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/46ce1c5d
Branch: refs/heads/master
Commit: 46ce1c5d75b95982c3cef6f7c3d674c990c46d1c
Parents: b2d22b9
Author: 驱影 <ji...@alibaba-inc.com>
Authored: Thu May 3 16:00:13 2018 +0800
Committer: YorkShen <sh...@gmail.com>
Committed: Mon May 7 15:52:09 2018 +0800
----------------------------------------------------------------------
.../impl/content_box_measurement_impl_android.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/46ce1c5d/weex_core/Source/android/bridge/impl/content_box_measurement_impl_android.cpp
----------------------------------------------------------------------
diff --git a/weex_core/Source/android/bridge/impl/content_box_measurement_impl_android.cpp b/weex_core/Source/android/bridge/impl/content_box_measurement_impl_android.cpp
index 376d85a..d9c8f53 100644
--- a/weex_core/Source/android/bridge/impl/content_box_measurement_impl_android.cpp
+++ b/weex_core/Source/android/bridge/impl/content_box_measurement_impl_android.cpp
@@ -23,7 +23,7 @@
namespace WeexCore {
bool RegisterJNIContentBoxMeasurement(JNIEnv *env) {
- RegisterNativesImpl(env);
+ return RegisterNativesImpl(env);
}
void cumsmeasure_Imple_Android(JNIEnv *env, jobject measureFunc_Impl_Android,
@@ -43,12 +43,16 @@ namespace WeexCore {
}
float GetLayoutWidth(JNIEnv *env, jobject measureFunc_impl_android) {
- if (measureFunc_impl_android != nullptr)
- Java_ContentBoxMeasurement_getWidth(env, measureFunc_impl_android);
+ if (measureFunc_impl_android != nullptr) {
+ return Java_ContentBoxMeasurement_getWidth(env, measureFunc_impl_android);
+ }
+ return 0.0;
}
float GetLayoutHeight(JNIEnv *env, jobject measureFunc_impl_android) {
- if (measureFunc_impl_android != nullptr)
- Java_ContentBoxMeasurement_getHeight(env, measureFunc_impl_android);
+ if (measureFunc_impl_android != nullptr) {
+ return Java_ContentBoxMeasurement_getHeight(env, measureFunc_impl_android);
+ }
+ return 0.0;
}
}