diff options
author | Dan Albert <danalbert@google.com> | 2018-01-05 11:11:27 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-01-05 11:13:05 -0800 |
commit | e1bbccd5af911ffcbc6c7144d07b454f13eb102f (patch) | |
tree | a3afc9f16d6a429b9183e6aaeeb81cd11fe988c2 | |
parent | 2debff8626ffea5420e2077f6106cce789aa91f5 (diff) | |
download | TV-e1bbccd5af911ffcbc6c7144d07b454f13eb102f.tar.gz |
Move from stlport to libc++.android-wear-8.0.0_r1
The code change is due to this change automatically moving this to
-std=c++11, which make this sort of narrowing illegal.
Test: make checkbuild
Bug: None
Change-Id: Ia37e854b1de8e3a078875bb7bac407668d574af9
-rw-r--r-- | jni/Android.mk | 2 | ||||
-rw-r--r-- | jni/DvbManager.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/jni/Android.mk b/jni/Android.mk index a9c06b34..cfc8623e 100644 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -23,7 +23,7 @@ LOCAL_MODULE := libtunertvinput_jni LOCAL_SRC_FILES += tunertvinput_jni.cpp DvbManager.cpp LOCAL_CFLAGS := -Wall -Werror LOCAL_SDK_VERSION := 23 -LOCAL_NDK_STL_VARIANT := stlport_static +LOCAL_NDK_STL_VARIANT := c++_static LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) diff --git a/jni/DvbManager.cpp b/jni/DvbManager.cpp index d4d35e42..b344f803 100644 --- a/jni/DvbManager.cpp +++ b/jni/DvbManager.cpp @@ -94,6 +94,11 @@ int DvbManager::tune(JNIEnv *env, jobject thiz, if (openDvbFe(env, thiz) != 0) { return -1; } + + if (frequency < 0) { + return -1; + } + if (mDvbApiVersion == DVB_API_VERSION_UNDEFINED) { struct dtv_property testProps[1] = { { .cmd = DTV_DELIVERY_SYSTEM } @@ -116,7 +121,7 @@ int DvbManager::tune(JNIEnv *env, jobject thiz, .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_ATSC }; struct dtv_property frequencyProperty = { - .cmd = DTV_FREQUENCY, .u.data = frequency + .cmd = DTV_FREQUENCY, .u.data = static_cast<__u32>(frequency) }; struct dtv_property modulationProperty = { .cmd = DTV_MODULATION }; if (strncmp(modulationStr, "QAM", 3) == 0) { |