OSDN Git Service

Only onboard when launched through front door.
authorJeff Sharkey <jsharkey@android.com>
Wed, 21 Jun 2017 17:38:03 +0000 (17:38 +0000)
committerandroid-build-merger <android-build-merger@google.com>
Wed, 21 Jun 2017 17:38:03 +0000 (17:38 +0000)
am: 2d6d4d23a9

Change-Id: I3ca9470af9a3814980c059e7785466f2330011e5

jni/Android.mk [changed mode: 0755->0644]
jni/jpegutil.cpp
jni/jpegutil.h
jni/jpegutilnative.cpp
jni/tinyplanet.cc
res/values-da/strings.xml
res/values-th/strings.xml

old mode 100755 (executable)
new mode 100644 (file)
index 80c827a..d8c66a2
@@ -9,7 +9,8 @@ LOCAL_SDK_VERSION := 17
 LOCAL_MODULE    := libjni_tinyplanet
 LOCAL_SRC_FILES := tinyplanet.cc
 
-LOCAL_CFLAGS    += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -Wall -Wextra -Werror
 LOCAL_ARM_MODE := arm
 
 include $(BUILD_SHARED_LIBRARY)
@@ -17,7 +18,6 @@ include $(BUILD_SHARED_LIBRARY)
 # JpegUtil
 include $(CLEAR_VARS)
 
-LOCAL_CFLAGS := -std=c++11
 LOCAL_NDK_STL_VARIANT := c++_static
 LOCAL_LDFLAGS   := -llog -ldl -ljnigraphics
 LOCAL_SDK_VERSION := 17
@@ -26,7 +26,9 @@ LOCAL_SRC_FILES := jpegutil.cpp jpegutilnative.cpp
 
 LOCAL_STATIC_LIBRARIES := libjpeg_static_ndk
 
-LOCAL_CFLAGS    += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -Wall -Wextra -Werror
 LOCAL_ARM_MODE := arm
 
 include $(BUILD_SHARED_LIBRARY)
index 02705be..8029869 100644 (file)
@@ -230,7 +230,7 @@ int jpegutil::Compress(int img_width, int img_height,
     return true;
   };
 
-  dest.term_destination = [](j_compress_ptr cinfo) {
+  dest.term_destination = [](j_compress_ptr cinfo __unused) {
     // do nothing to terminate the output buffer
   };
 
@@ -339,7 +339,7 @@ int jpegutil::Compress(
   const Plane cbP = {width / 2, height / 2, cbBuf, cbPStride, cbRStride};
   const Plane crP = {width / 2, height / 2, crBuf, crPStride, crRStride};
 
-  auto flush = [](size_t numBytes) {
+  auto flush = [](size_t numBytes __unused) {
     // do nothing
   };
 
index 720b9de..a8066ed 100644 (file)
@@ -181,7 +181,7 @@ template <unsigned int ROWS>
 const std::array<unsigned char*, ROWS> jpegutil::RowIterator<ROWS>::LoadAt(
     int y_base) {
   std::array<unsigned char*, ROWS> buf_ptrs;
-  for (int i = 0; i < ROWS; i++) {
+  for (unsigned int i = 0; i < ROWS; i++) {
     buf_ptrs[i] = &buf_[padded_row_length_ * i];
   }
 
@@ -189,7 +189,7 @@ const std::array<unsigned char*, ROWS> jpegutil::RowIterator<ROWS>::LoadAt(
     return buf_ptrs;
   }
 
-  for (int i = 0; i < ROWS; i++) {
+  for (unsigned int i = 0; i < ROWS; i++) {
     int y = i + y_base;
     y = min(y, transform_.output_height() - 1);
 
index b2afd94..ad29b87 100644 (file)
@@ -67,7 +67,7 @@ using namespace jpegutil;
  */
 extern "C" JNIEXPORT jint JNICALL
 Java_com_android_camera_util_JpegUtilNative_compressJpegFromYUV420pNative(
-    JNIEnv* env, jclass clazz,
+    JNIEnv* env, jclass clazz __unused,
     /** Input image dimensions */
     jint width, jint height,
     /** Y Plane */
@@ -116,7 +116,7 @@ Java_com_android_camera_util_JpegUtilNative_compressJpegFromYUV420pNative(
  */
 extern "C" JNIEXPORT void JNICALL
 Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap(
-    JNIEnv* env, jclass clazz, jint width, jint height, jobject planeBuf,
+    JNIEnv* env, jclass clazz __unused, jint width, jint height, jobject planeBuf,
     jint pStride, jint rStride, jobject outBitmap, jint rot90) {
   jbyte* src = (jbyte*)env->GetDirectBufferAddress(planeBuf);
 
index dfb31d7..de63ac9 100644 (file)
@@ -130,7 +130,9 @@ void StereographicProjection(float scale, float angle, unsigned char* input_imag
 }
 
 
-JNIEXPORT void JNICALL Java_com_android_camera_tinyplanet_TinyPlanetNative_process(JNIEnv* env, jobject obj, jobject bitmap_in, jint width, jint height, jobject bitmap_out, jint output_size, jfloat scale, jfloat angle)
+JNIEXPORT void JNICALL Java_com_android_camera_tinyplanet_TinyPlanetNative_process(JNIEnv* env,
+        jobject obj __unused, jobject bitmap_in, jint width, jint height, jobject bitmap_out,
+        jint output_size, jfloat scale, jfloat angle)
 {
     char* source = 0;
     char* destination = 0;
index b913402..61abc59 100644 (file)
@@ -68,7 +68,7 @@
     <string name="error_cannot_connect_camera" msgid="2713059773224193128">"Der kan ikke oprettes forbindelse til kameraet."</string>
     <string name="error_camera_disabled" msgid="5582398275657419692">"Kameraet er deaktiveret på grund af sikkerhedspolitikker."</string>
     <string name="error_media_storage_failure" msgid="7711687330673245629">"Dit billede eller din video kunne ikke gemmes."</string>
-    <string name="error_permissions" msgid="3454167403425651254">"Appen mangler kritiske tilladelser for at kunne køre. Kontrollér dine indstillinger for tilladelser."</string>
+    <string name="error_permissions" msgid="3454167403425651254">"Appen mangler kritiske tilladelser for at kunne køre. Tjek dine indstillinger for tilladelser."</string>
     <string name="reason_storage_failure" msgid="6818898304774654969">"Billedet blev ikke gemt."</string>
     <string name="wait" msgid="765601745709933047">"Vent…"</string>
     <string name="no_storage" product="default" msgid="5922012950780548098">"Indsæt et SD-kort, før kameraet tages i brug."</string>
index 9f9d880..3987528 100644 (file)
     <string name="time_lapse_hours" msgid="5294001144133261436">"ชั่วโมง"</string>
     <string name="time_lapse_interval_set" msgid="2418594453248958440">"เสร็จสิ้น"</string>
     <string name="set_time_interval" msgid="2531393962847535331">"ตั้งค่าช่วงเวลา"</string>
-    <string name="set_time_interval_help" msgid="64145154088021389">"à¸\84ุà¸\93ลัà¸\81ษà¸\93ะà¸\8aà¹\88วà¸\87à¹\80วลาà¸\9bิà¸\94อยูà¹\88 à¹\80à¸\9bิà¸\94à¸\84ุà¸\93ลัà¸\81ษà¸\93ะนี้เพื่อตั้งค่าช่วงเวลา"</string>
+    <string name="set_time_interval_help" msgid="64145154088021389">"à¸\9fีà¹\80à¸\88อรà¹\8cà¸\8aà¹\88วà¸\87à¹\80วลาà¸\9bิà¸\94อยูà¹\88 à¹\80à¸\9bิà¸\94à¸\9fีà¹\80à¸\88อรà¹\8cนี้เพื่อตั้งค่าช่วงเวลา"</string>
     <string name="set_duration" msgid="1638453882581604341">"ตั้งระยะเวลาเป็นวินาที"</string>
     <string name="count_down_title_text" msgid="7586031110595513050">"นับถอยหลังเพื่อถ่ายภาพ"</string>
     <string name="remember_location_title" msgid="3045040613094030429">"จดจำตำแหน่งภาพไหม"</string>
     <string name="cling_text_for_refocus_editor_button" msgid="4785017397116829802">"แตะที่นี่ เพื่อปรับโฟกัส"</string>
     <string name="pref_category_advanced" msgid="5921085080077574872">"ขั้นสูง"</string>
     <string name="pref_camera_exposure_compensation" msgid="4143245817259719147">"การรับแสงแบบปรับเอง"</string>
-    <string name="settings_cling_text" msgid="5368054627268181292">"à¹\83à¸\99 \"à¸\81ารà¸\95ัà¹\89à¸\87à¸\84à¹\88า\" à¹\83หà¹\89à¹\80à¸\9bลีà¹\88ยà¸\99à¸\84วามละà¹\80อียà¸\94à¹\81ละà¸\84ุà¸\93ภาà¸\9e à¸«à¸£à¸·à¸­à¸¥à¸­à¸\87à¹\83à¸\8aà¹\89à¸\84ุà¸\93ลัà¸\81ษà¸\93ะขั้นสูง"</string>
+    <string name="settings_cling_text" msgid="5368054627268181292">"à¹\83à¸\99 \"à¸\81ารà¸\95ัà¹\89à¸\87à¸\84à¹\88า\" à¹\83หà¹\89à¹\80à¸\9bลีà¹\88ยà¸\99à¸\84วามละà¹\80อียà¸\94à¹\81ละà¸\84ุà¸\93ภาà¸\9e à¸«à¸£à¸·à¸­à¸¥à¸­à¸\87à¹\83à¸\8aà¹\89à¸\9fีà¹\80à¸\88อรà¹\8cขั้นสูง"</string>
     <string name="photo_size_selection_title" msgid="2789753590719172645">"เลือกขนาดรูปภาพ"</string>
     <string name="photo_aspect_ratio_selection_content" msgid="6668224437962196229">"คุณสามารถเปลี่ยนค่านี้ได้ภายหลัง ใน \"การตั้งค่า\""</string>
     <string name="share_to" msgid="5144911209144798122">"แชร์ไปยัง"</string>