Merge "Suppress implicit fallthrough warnings."
diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h
index c1f5ddc..a9af77e 100644
--- a/camera/ndk/include/camera/NdkCameraMetadataTags.h
+++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h
@@ -6327,7 +6327,7 @@
/**
* <p>Optimized for dim settings where the main light source
- * is a flame.</p>
+ * is a candle.</p>
*/
ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT = 15,
diff --git a/media/libaudioclient/IAudioFlinger.cpp b/media/libaudioclient/IAudioFlinger.cpp
index 00af7e8..9f3b742 100644
--- a/media/libaudioclient/IAudioFlinger.cpp
+++ b/media/libaudioclient/IAudioFlinger.cpp
@@ -951,7 +951,9 @@
break;
}
- TimeCheck check("IAudioFlinger");
+ char timeCheckString[64];
+ snprintf(timeCheckString, sizeof(timeCheckString), "IAudioFlinger: %d", code);
+ TimeCheck check(timeCheckString);
switch (code) {
case CREATE_TRACK: {
diff --git a/media/libaudioclient/IAudioPolicyService.cpp b/media/libaudioclient/IAudioPolicyService.cpp
index a1236e7..8cd4a85 100644
--- a/media/libaudioclient/IAudioPolicyService.cpp
+++ b/media/libaudioclient/IAudioPolicyService.cpp
@@ -948,7 +948,9 @@
break;
}
- TimeCheck check("IAudioPolicyService");
+ char timeCheckString[64];
+ snprintf(timeCheckString, sizeof(timeCheckString), "IAudioPolicyService: %d", code);
+ TimeCheck check(timeCheckString);
switch (code) {
case SET_DEVICE_CONNECTION_STATE: {
diff --git a/media/libaudioprocessing/tests/Android.mk b/media/libaudioprocessing/tests/Android.mk
index 8e081a3..31ffbdc 100644
--- a/media/libaudioprocessing/tests/Android.mk
+++ b/media/libaudioprocessing/tests/Android.mk
@@ -20,6 +20,8 @@
LOCAL_SRC_FILES := \
resampler_tests.cpp
+LOCAL_HEADER_LIBRARIES := libbase_headers
+
LOCAL_MODULE := resampler_tests
LOCAL_MODULE_TAGS := tests
@@ -49,6 +51,8 @@
liblog \
libutils \
+LOCAL_HEADER_LIBRARIES := libbase_headers
+
LOCAL_MODULE := test-mixer
LOCAL_MODULE_TAGS := optional
diff --git a/media/libaudioprocessing/tests/test_utils.h b/media/libaudioprocessing/tests/test_utils.h
index b61a929..21f5862 100644
--- a/media/libaudioprocessing/tests/test_utils.h
+++ b/media/libaudioprocessing/tests/test_utils.h
@@ -23,6 +23,7 @@
#include <log/log.h>
+#include <android-base/macros.h>
#include <audio_utils/sndfile.h>
#ifndef ARRAY_SIZE
@@ -77,14 +78,14 @@
}
return numValues;
}
- // fall through
+ FALLTHROUGH_INTENDED;
case ',':
if (hadDigit) {
hadDigit = false;
numValues++;
break;
}
- // fall through
+ FALLTHROUGH_INTENDED;
default:
return -1;
}
diff --git a/services/camera/libcameraservice/api1/Camera2Client.cpp b/services/camera/libcameraservice/api1/Camera2Client.cpp
index 2ce3372..30c0bab 100644
--- a/services/camera/libcameraservice/api1/Camera2Client.cpp
+++ b/services/camera/libcameraservice/api1/Camera2Client.cpp
@@ -37,6 +37,10 @@
#define ALOG1(...) ALOGD_IF(gLogLevel >= 1, __VA_ARGS__);
#define ALOG2(...) ALOGD_IF(gLogLevel >= 2, __VA_ARGS__);
+#ifndef FALLTHROUGH_INTENDED
+#define FALLTHROUGH_INTENDED [[fallthrough]]
+#endif
+
namespace android {
using namespace camera2;
@@ -958,7 +962,7 @@
case Parameters::VIDEO_SNAPSHOT:
case Parameters::STILL_CAPTURE:
mCaptureSequencer->waitUntilIdle(kStopCaptureTimeout);
- // no break
+ FALLTHROUGH_INTENDED;
case Parameters::RECORD:
case Parameters::PREVIEW:
syncWithDevice();
@@ -988,7 +992,7 @@
"stop preview: %s (%d)",
__FUNCTION__, mCameraId, strerror(-res), res);
}
- // no break
+ FALLTHROUGH_INTENDED;
case Parameters::WAITING_FOR_PREVIEW_WINDOW: {
SharedParameters::Lock l(mParameters);
l.mParameters.state = Parameters::STOPPED;
@@ -1834,7 +1838,7 @@
switch (newState) {
case ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED:
success = true;
- // no break
+ FALLTHROUGH_INTENDED;
case ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED:
sendCompletedMessage = true;
l.mParameters.currentAfTriggerId = -1;
@@ -1858,7 +1862,7 @@
switch (newState) {
case ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED:
success = true;
- // no break
+ FALLTHROUGH_INTENDED;
case ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED:
// Don't send notifications upstream if they're not for
// the current AF trigger. For example, if cancel was
@@ -1886,7 +1890,7 @@
case ANDROID_CONTROL_AF_STATE_PASSIVE_SCAN:
// Start passive scan, inform upstream
afInMotion = true;
- // no break
+ FALLTHROUGH_INTENDED;
case ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED:
case ANDROID_CONTROL_AF_STATE_PASSIVE_UNFOCUSED:
// Stop passive scan, inform upstream