Merge "Keymaster should be developed in AOSP"
diff --git a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
index 6e91bcc..72b4d19 100644
--- a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
+++ b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc
@@ -6,9 +6,4 @@
capabilities BLOCK_SUSPEND
ioprio rt 4
writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
- # audioflinger restarts itself when it loses connection with the hal
- # and its .rc file has an "onrestart restart audio-hal" rule, thus
- # an additional auto-restart from the init process isn't needed.
- oneshot
- interface android.hardware.audio@4.0::IDevicesFactory default
- interface android.hardware.audio@2.0::IDevicesFactory default
+ onrestart restart audioserver
diff --git a/authsecret/1.0/default/android.hardware.authsecret@1.0-service.rc b/authsecret/1.0/default/android.hardware.authsecret@1.0-service.rc
index e82da7e..1a95cd0 100644
--- a/authsecret/1.0/default/android.hardware.authsecret@1.0-service.rc
+++ b/authsecret/1.0/default/android.hardware.authsecret@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.authsecret-1-0 /vendor/bin/hw/android.hardware.authsecret@1.0-service
+ interface android.hardware.authsecret@1.0::IAuthSecret default
class hal
user system
group system
diff --git a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
index b615227..9fa128d 100644
--- a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
+++ b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.bluetooth-1-0 /vendor/bin/hw/android.hardware.bluetooth@1.0-service
+ interface android.hardware.bluetooth@1.0::IBluetoothHci default
class hal
capabilities BLOCK_SUSPEND NET_ADMIN SYS_NICE
user bluetooth
diff --git a/boot/1.0/default/android.hardware.boot@1.0-service.rc b/boot/1.0/default/android.hardware.boot@1.0-service.rc
index 32f3a45..b8125e1 100644
--- a/boot/1.0/default/android.hardware.boot@1.0-service.rc
+++ b/boot/1.0/default/android.hardware.boot@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.boot-hal-1-0 /vendor/bin/hw/android.hardware.boot@1.0-service
+ interface android.hardware.boot@1.0::IBootControl default
class early_hal
user root
group root
diff --git a/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc b/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
index 7c57135..6fcbfa6 100644
--- a/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
+++ b/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
@@ -1,4 +1,6 @@
service broadcastradio-hal /vendor/bin/hw/android.hardware.broadcastradio@1.1-service
+ interface android.hardware.broadcastradio@1.0::IBroadcastRadioFactory default
+ interface android.hardware.broadcastradio@1.1::IBroadcastRadioFactory default
class hal
user audioserver
group audio
diff --git a/broadcastradio/2.0/default/android.hardware.broadcastradio@2.0-service.rc b/broadcastradio/2.0/default/android.hardware.broadcastradio@2.0-service.rc
index 7d68b6c..dd8c9c6 100644
--- a/broadcastradio/2.0/default/android.hardware.broadcastradio@2.0-service.rc
+++ b/broadcastradio/2.0/default/android.hardware.broadcastradio@2.0-service.rc
@@ -1,4 +1,5 @@
service broadcastradio-hal2 /vendor/bin/hw/android.hardware.broadcastradio@2.0-service
+ interface android.hardware.broadcastradio@2.0::IBroadcastRadio default
class hal
user audioserver
group audio
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 22b7382..2a464d5 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -671,6 +671,7 @@
HalStreamConfiguration *halStreamConfig /*out*/,
bool *supportsPartialResults /*out*/,
uint32_t *partialResultCount /*out*/);
+ bool isDepthOnly(camera_metadata_t* staticMeta);
static Status getAvailableOutputStreams(camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
const AvailableStream *threshold = nullptr);
@@ -682,6 +683,10 @@
std::unordered_set<std::string> *physicalIds/*out*/);
static Status getSupportedKeys(camera_metadata_t *staticMeta,
uint32_t tagId, std::unordered_set<int32_t> *requestIDs/*out*/);
+ static void fillOutputStreams(camera_metadata_ro_entry_t* entry,
+ std::vector<AvailableStream>& outputStreams,
+ const AvailableStream *threshold = nullptr,
+ const int32_t availableConfigOutputTag = 0u);
static void constructFilteredSettings(const sp<ICameraDeviceSession>& session,
const std::unordered_set<int32_t>& availableKeys, RequestTemplate reqTemplate,
android::hardware::camera::common::V1_0::helper::CameraMetadata* defaultSettings/*out*/,
@@ -2521,14 +2526,24 @@
int32_t streamId = 0;
for (auto& it : outputStreams) {
V3_2::Stream stream3_2;
- bool isJpeg = static_cast<PixelFormat>(it.format) == PixelFormat::BLOB;
+ V3_2::DataspaceFlags dataspaceFlag = 0;
+ switch (static_cast<PixelFormat>(it.format)) {
+ case PixelFormat::BLOB:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF);
+ break;
+ case PixelFormat::Y16:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+ break;
+ default:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+ }
stream3_2 = {streamId,
StreamType::OUTPUT,
static_cast<uint32_t>(it.width),
static_cast<uint32_t>(it.height),
static_cast<PixelFormat>(it.format),
GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
- (isJpeg) ? static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF) : 0,
+ dataspaceFlag,
StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
@@ -2962,6 +2977,14 @@
openEmptyDeviceSession(name, mProvider, &session /*out*/, &staticMeta /*out*/);
castSession(session, deviceVersion, &session3_3, &session3_4);
+ // Check if camera support depth only
+ if (isDepthOnly(staticMeta)) {
+ free_camera_metadata(staticMeta);
+ ret = session->close();
+ ASSERT_TRUE(ret.isOk());
+ continue;
+ }
+
outputBlobStreams.clear();
ASSERT_EQ(Status::OK,
getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -3230,6 +3253,14 @@
openEmptyDeviceSession(name, mProvider, &session /*out*/, &staticMeta /*out*/);
castSession(session, deviceVersion, &session3_3, &session3_4);
+ // Check if camera support depth only
+ if (isDepthOnly(staticMeta)) {
+ free_camera_metadata(staticMeta);
+ ret = session->close();
+ ASSERT_TRUE(ret.isOk());
+ continue;
+ }
+
outputBlobStreams.clear();
ASSERT_EQ(Status::OK,
getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -4135,38 +4166,56 @@
Status CameraHidlTest::getAvailableOutputStreams(camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
const AvailableStream *threshold) {
+ AvailableStream depthPreviewThreshold = {kMaxPreviewWidth, kMaxPreviewHeight,
+ static_cast<int32_t>(PixelFormat::Y16)};
if (nullptr == staticMeta) {
return Status::ILLEGAL_ARGUMENT;
}
- camera_metadata_ro_entry entry;
- int rc = find_camera_metadata_ro_entry(staticMeta,
- ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &entry);
- if ((0 != rc) || (0 != (entry.count % 4))) {
+ camera_metadata_ro_entry scalarEntry;
+ camera_metadata_ro_entry depthEntry;
+ int foundScalar = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &scalarEntry);
+ int foundDepth = find_camera_metadata_ro_entry(staticMeta,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+ if ((0 != foundScalar || (0 != (scalarEntry.count % 4))) &&
+ (0 != foundDepth || (0 != (depthEntry.count % 4)))) {
return Status::ILLEGAL_ARGUMENT;
}
- for (size_t i = 0; i < entry.count; i+=4) {
- if (ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT ==
- entry.data.i32[i + 3]) {
+ if(foundScalar == 0 && (0 == (scalarEntry.count % 4))) {
+ fillOutputStreams(&scalarEntry, outputStreams, threshold,
+ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+ }
+
+ if(foundDepth == 0 && (0 == (depthEntry.count % 4))) {
+ fillOutputStreams(&depthEntry, outputStreams, &depthPreviewThreshold,
+ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT);
+ }
+
+ return Status::OK;
+}
+
+void CameraHidlTest::fillOutputStreams(camera_metadata_ro_entry_t* entry,
+ std::vector<AvailableStream>& outputStreams, const AvailableStream* threshold,
+ const int32_t availableConfigOutputTag) {
+ for (size_t i = 0; i < entry->count; i+=4) {
+ if (availableConfigOutputTag == entry->data.i32[i + 3]) {
if(nullptr == threshold) {
- AvailableStream s = {entry.data.i32[i+1],
- entry.data.i32[i+2], entry.data.i32[i]};
+ AvailableStream s = {entry->data.i32[i+1],
+ entry->data.i32[i+2], entry->data.i32[i]};
outputStreams.push_back(s);
} else {
- if ((threshold->format == entry.data.i32[i]) &&
- (threshold->width >= entry.data.i32[i+1]) &&
- (threshold->height >= entry.data.i32[i+2])) {
- AvailableStream s = {entry.data.i32[i+1],
- entry.data.i32[i+2], threshold->format};
+ if ((threshold->format == entry->data.i32[i]) &&
+ (threshold->width >= entry->data.i32[i+1]) &&
+ (threshold->height >= entry->data.i32[i+2])) {
+ AvailableStream s = {entry->data.i32[i+1],
+ entry->data.i32[i+2], threshold->format};
outputStreams.push_back(s);
}
}
}
-
}
-
- return Status::OK;
}
// Get max jpeg buffer size in android.jpeg.maxSize
@@ -4563,6 +4612,37 @@
ASSERT_TRUE(ret.isOk());
}
+bool CameraHidlTest::isDepthOnly(camera_metadata_t* staticMeta) {
+ camera_metadata_ro_entry scalarEntry;
+ camera_metadata_ro_entry depthEntry;
+
+ int rc = find_camera_metadata_ro_entry(
+ staticMeta, ANDROID_REQUEST_AVAILABLE_CAPABILITIES, &scalarEntry);
+ if (rc == 0) {
+ for (uint32_t i = 0; i < scalarEntry.count; i++) {
+ if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE) {
+ return false;
+ }
+ }
+ }
+
+ for (uint32_t i = 0; i < scalarEntry.count; i++) {
+ if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT) {
+
+ rc = find_camera_metadata_ro_entry(
+ staticMeta, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+ size_t i = 0;
+ if (rc == 0 && depthEntry.data.i32[i] == static_cast<int32_t>(PixelFormat::Y16)) {
+ // only Depth16 format is supported now
+ return true;
+ }
+ break;
+ }
+ }
+
+ return false;
+}
+
// Open a device session and configure a preview stream.
void CameraHidlTest::configurePreviewStream(const std::string &name, int32_t deviceVersion,
sp<ICameraProvider> provider,
@@ -4638,11 +4718,20 @@
ASSERT_EQ(Status::OK, rc);
ASSERT_FALSE(outputPreviewStreams.empty());
+ V3_2::DataspaceFlags dataspaceFlag = 0;
+ switch (static_cast<PixelFormat>(outputPreviewStreams[0].format)) {
+ case PixelFormat::Y16:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+ break;
+ default:
+ dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+ }
+
V3_2::Stream stream3_2 = {0, StreamType::OUTPUT,
static_cast<uint32_t> (outputPreviewStreams[0].width),
static_cast<uint32_t> (outputPreviewStreams[0].height),
static_cast<PixelFormat> (outputPreviewStreams[0].format),
- GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0, StreamRotation::ROTATION_0};
+ GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, dataspaceFlag, StreamRotation::ROTATION_0};
::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
diff --git a/configstore/1.1/default/android.hardware.configstore@1.1-service.rc b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
index 105678a..d62c4a8 100644
--- a/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
+++ b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
@@ -1,4 +1,6 @@
service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service
+ interface android.hardware.configstore@1.0::ISurfaceFlingerConfigs default
+ interface android.hardware.configstore@1.1::ISurfaceFlingerConfigs default
class hal animation
user system
group system
diff --git a/confirmationui/1.0/default/android.hardware.confirmationui@1.0-service.rc b/confirmationui/1.0/default/android.hardware.confirmationui@1.0-service.rc
index c04e55e..adc7222 100644
--- a/confirmationui/1.0/default/android.hardware.confirmationui@1.0-service.rc
+++ b/confirmationui/1.0/default/android.hardware.confirmationui@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.confirmationui-1-0 /vendor/bin/hw/android.hardware.confirmationui@1.0-service
+ interface android.hardware.confirmationui@1.0::IConfirmationUI default
class hal
user nobody
group drmrpc
diff --git a/confirmationui/support/include/ConfirmationUITranslations.h b/confirmationui/support/include/ConfirmationUITranslations.h
new file mode 100644
index 0000000..a55dc08
--- /dev/null
+++ b/confirmationui/support/include/ConfirmationUITranslations.h
@@ -0,0 +1,27 @@
+/*
+**
+** Copyright 2019, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/* Generated by generate-translations.py - DO NOT EDIT */
+
+#ifndef ConfirmationUITranslations_H
+#define ConfirmationUITranslations_H
+
+const char* ConfirmationUITranslations_select_lang_id(const char* lang_id);
+
+const char* ConfirmationUITranslations_lookup(const char* translation_id);
+
+#endif // ConfirmationUITranslations_H
diff --git a/confirmationui/support/src/ConfirmationUITranslations.c b/confirmationui/support/src/ConfirmationUITranslations.c
new file mode 100644
index 0000000..4d616ae
--- /dev/null
+++ b/confirmationui/support/src/ConfirmationUITranslations.c
@@ -0,0 +1,1158 @@
+/*
+**
+** Copyright 2019, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/* Generated by generate-translations.py - DO NOT EDIT */
+
+#include "ConfirmationUITranslations.h"
+#include "string.h"
+
+static const char* ConfirmationUITranslations_language_ids[] = {
+ "en", /* untranslated */
+ "af",
+ "am",
+ "ar",
+ "ar-EG",
+ "ar-JO",
+ "ar-MA",
+ "ar-SA",
+ "ar-XB",
+ "as",
+ "az",
+ "be",
+ "bg",
+ "bn",
+ "bs",
+ "ca",
+ "cs",
+ "da",
+ "de",
+ "de-AT",
+ "de-CH",
+ "el",
+ "en-AU",
+ "en-CA",
+ "en-GB",
+ "en-IE",
+ "en-IN",
+ "en-SG",
+ "en-XA",
+ "en-XC",
+ "en-ZA",
+ "es",
+ "es-419",
+ "es-AR",
+ "es-BO",
+ "es-CL",
+ "es-CO",
+ "es-CR",
+ "es-DO",
+ "es-EC",
+ "es-GT",
+ "es-HN",
+ "es-MX",
+ "es-NI",
+ "es-PA",
+ "es-PE",
+ "es-PR",
+ "es-PY",
+ "es-SV",
+ "es-US",
+ "es-UY",
+ "es-VE",
+ "et",
+ "eu",
+ "fa",
+ "fi",
+ "fil",
+ "fr",
+ "fr-CA",
+ "fr-CH",
+ "gl",
+ "gsw",
+ "gu",
+ "he",
+ "hi",
+ "hr",
+ "hu",
+ "hy",
+ "id",
+ "in",
+ "is",
+ "it",
+ "iw",
+ "ja",
+ "ka",
+ "kk",
+ "km",
+ "kn",
+ "ko",
+ "ky",
+ "ln",
+ "lo",
+ "lt",
+ "lv",
+ "mk",
+ "ml",
+ "mn",
+ "mo",
+ "mr",
+ "ms",
+ "my",
+ "nb",
+ "ne",
+ "nl",
+ "no",
+ "or",
+ "pa",
+ "pl",
+ "pt",
+ "pt-BR",
+ "pt-PT",
+ "ro",
+ "ru",
+ "si",
+ "sk",
+ "sl",
+ "sq",
+ "sr",
+ "sr-Latn",
+ "sv",
+ "sw",
+ "ta",
+ "te",
+ "th",
+ "tl",
+ "tr",
+ "uk",
+ "ur",
+ "uz",
+ "vi",
+ "zh",
+ "zh-CN",
+ "zh-HK",
+ "zh-TW",
+ "zu",
+ NULL,
+};
+
+#define ARRAY_ELEMENTS(arr) \
+ (sizeof(arr)/sizeof(arr[0]))
+
+#define ConfirmationUITranslations_NUM_LANGUAGE_IDS \
+ (ARRAY_ELEMENTS(ConfirmationUITranslations_language_ids) - 1)
+
+static const struct {
+ const char* translation_id;
+ const char* translations[ConfirmationUITranslations_NUM_LANGUAGE_IDS];
+} ConfirmationUITranslations_translation_ids[] = {
+ {
+ "1424834532030812203",
+ {
+ "Double-press power to confirm", /* en (untranslated) */
+ "Dubbeldruk aan/af-skakelaar om te bevestig", /* af */
+ "ለማረጋገጥ ኃይልን ሁለቴ ይጫኑ", /* am */
+ "اضغط على زر التشغيل مرتين لتأكيد الإجراء.", /* ar */
+ "اضغط على زر التشغيل مرتين لتأكيد الإجراء.", /* ar-EG */
+ "اضغط على زر التشغيل مرتين لتأكيد الإجراء.", /* ar-JO */
+ "اضغط على زر التشغيل مرتين لتأكيد الإجراء.", /* ar-MA */
+ "اضغط على زر التشغيل مرتين لتأكيد الإجراء.", /* ar-SA */
+ "Double-press power to confirm", /* ar-XB */
+ "নিশ্চিত কৰিবলৈ পাৱাৰ বুটামটো দুবাৰ হেঁচক", /* as */
+ "Təsdiqləmək üçün iki dəfə yandırıb-söndürmək düyməsinə basın", /* az */
+ "Двойчы націсніце кнопку сілкавання, каб пацвердзіць", /* be */
+ "Натиснете два пъти бутона за захранване, за да потвърдите", /* bg */
+ "নিশ্চিত করতে পাওয়ার বোতাম দুবার টিপুন", /* bn */
+ "Dva puta pritisnite dugme za napajanje da potvrdite", /* bs */
+ "Prem dos cops el botó d'engegada per confirmar", /* ca */
+ "Potvrďte dvojitým stisknutím vypínače", /* cs */
+ "Tryk to gange på afbryderknappen for at bekræfte", /* da */
+ "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken", /* de */
+ "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken", /* de-AT */
+ "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken", /* de-CH */
+ "Πατήστε δύο φορές το κουμπί λειτουργίας για επιβεβαίωση", /* el */
+ "Double-press power to confirm", /* en-AU */
+ "Double-press power to confirm", /* en-CA */
+ "Double-press power to confirm", /* en-GB */
+ "Double-press power to confirm", /* en-IE */
+ "Double-press power to confirm", /* en-IN */
+ "Double-press power to confirm", /* en-SG */
+ "[Ðöûбļé-þŕéšš þöŵéŕ ţö çöñƒîŕm one two three four five six seven]", /* en-XA */
+ "Double-press power to confirm", /* en-XC */
+ "Double-press power to confirm", /* en-ZA */
+ "Pulsa dos veces el botón de encendido para confirmar", /* es */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-419 */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-AR */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-BO */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-CL */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-CO */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-CR */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-DO */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-EC */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-GT */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-HN */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-MX */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-NI */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-PA */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-PE */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-PR */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-PY */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-SV */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-US */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-UY */
+ "Presiona dos veces el botón de encendido para confirmar", /* es-VE */
+ "Kinnitamiseks topeltvajutage toitenuppu", /* et */
+ "Berresteko, sakatu birritan pizteko botoia", /* eu */
+ "برای تأیید، دکمه روشن/خاموش را دوبار فشار دهید", /* fa */
+ "Vahvista painamalla virtapainiketta kahdesti", /* fi */
+ "Pindutin nang dalawang beses ang power para kumpirmahin", /* fil */
+ "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération", /* fr */
+ "Appuyez deux fois sur l'interrupteur pour confirmer", /* fr-CA */
+ "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération", /* fr-CH */
+ "Preme o botón de acendido dúas veces para confirmar", /* gl */
+ "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken", /* gsw */
+ "કન્ફર્મ કરવા માટે પાવર પર બે વાર ટૅપ કરો", /* gu */
+ "יש ללחוץ פעמיים על לחצן ההפעלה כדי לאשר", /* he */
+ "पुष्टि करने के लिए पावर बटन दो बार दबाएं", /* hi */
+ "Dvaput pritisnite tipku za uključivanje/isključivanje da biste potvrdili", /* hr */
+ "A megerősítéshez nyomja meg duplán a bekapcsológombot", /* hu */
+ "Հաստատելու համար կրկնակի սեղմեք սնուցման կոճակը", /* hy */
+ "Tekan dua kali tombol power untuk mengonfirmasi", /* id */
+ "Tekan dua kali tombol power untuk mengonfirmasi", /* in */
+ "Ýttu tvisvar á aflrofann til að staðfesta", /* is */
+ "Premi due volte il tasto di accensione per confermare", /* it */
+ "יש ללחוץ פעמיים על לחצן ההפעלה כדי לאשר", /* iw */
+ "確認するには、電源を 2 回押します", /* ja */
+ "დასადასტურებლად ორმაგად დააჭირეთ ჩართვის ღილაკს", /* ka */
+ "Растау үшін қуат түймесін екі рет басыңыз", /* kk */
+ "ចុចប៊ូតុងថាមពលពីរដងដើម្បីបញ្ជាក់", /* km */
+ "ದೃಢೀಕರಿಸಲು ಪವರ್ ಬಟನ್ ಅನ್ನು ಎರಡು ಬಾರಿ ಒತ್ತಿರಿ", /* kn */
+ "확인하려면 전원 버튼을 두 번 누르세요.", /* ko */
+ "Ырастоо үчүн \"Кубат\" баскычын эки жолу басыңыз", /* ky */
+ "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération", /* ln */
+ "ກົດປຸ່ມປິດເປີດເຄື່ອງສອງຄັ້ງເພື່ອຢືນຢັນ", /* lo */
+ "Dukart paspauskite maitinimo mygtuką, kad patvirtintumėte", /* lt */
+ "Lai apstiprinātu, divreiz nospiediet barošanas pogu", /* lv */
+ "Притиснете на копчето за напојување двапати за да потврдите", /* mk */
+ "സ്ഥിരീകരിക്കാൻ പവർ രണ്ടുതവണ അമർത്തുക", /* ml */
+ "Баталгаажуулахын тулд унтраах/асаахыг хоёр удаа дарах", /* mn */
+ "Apăsați de două ori butonul de pornire pentru a confirma", /* mo */
+ "खात्री करण्यासाठी पॉवर बटण दोनदा दाबा", /* mr */
+ "Tekan dua kali butang kuasa untuk mengesahkan", /* ms */
+ "အတည်ပြုရန် ပါဝါခလုတ်ကို နှစ်ချက်နှိပ်ပါ", /* my */
+ "Dobbelttrykk på av/på-knappen for å bekrefte", /* nb */
+ "पुष्टि गर्न पावर बटनमा दुई पटक थिच्नुहोस्", /* ne */
+ "Druk twee keer op de aan/uit-knop om te bevestigen", /* nl */
+ "Dobbelttrykk på av/på-knappen for å bekrefte", /* no */
+ "ସୁନିଶ୍ଚିତ କରିବା ପାଇଁ ପାୱାର୍ ବଟନ୍କୁ ଦୁଇଥର ଦବାନ୍ତୁ", /* or */
+ "ਪੁਸ਼ਟੀ ਕਰਨ ਲਈ ਪਾਵਰ ਬਟਨ ਨੂੰ ਦੋ ਬਾਰ ਦੱਬੋ", /* pa */
+ "Kliknij dwukrotnie przycisk zasilania, by potwierdzić", /* pl */
+ "Pressione o botão liga/desliga duas vezes para confirmar", /* pt */
+ "Pressione o botão liga/desliga duas vezes para confirmar", /* pt-BR */
+ "Prima duas vezes ligar/desligar para confirmar.", /* pt-PT */
+ "Apăsați de două ori butonul de pornire pentru a confirma", /* ro */
+ "Для подтверждения дважды нажмите кнопку питания.", /* ru */
+ "තහවුරු කිරීමට බල බොත්තම දෙවරක් ඔබන්න", /* si */
+ "Potvrďte dvojitým stlačením vypínača", /* sk */
+ "Dvakrat pritisnite za potrditev", /* sl */
+ "Shtyp dy herë butonin e energjisë për të konfirmuar", /* sq */
+ "Двапут притисните дугме за напајање да бисте потврдили", /* sr */
+ "Dvaput pritisnite dugme za napajanje da biste potvrdili", /* sr-Latn */
+ "Bekräfta genom att trycka två gånger på avstängningsknappen", /* sv */
+ "Bonyeza kitufe cha kuwasha mara mbili ili uthibitishe", /* sw */
+ "உறுதிப்படுத்த, பவர் பட்டனை இருமுறை அழுத்தவும்", /* ta */
+ "నిర్ధారించడానికి పవర్ బటన్ని రెండు సార్లు నొక్కండి", /* te */
+ "กดปุ่มเปิด/ปิด 2 ครั้งเพื่อยืนยัน", /* th */
+ "Pindutin nang dalawang beses ang power para kumpirmahin", /* tl */
+ "Onaylamak için güç düğmesine iki kez basın", /* tr */
+ "Двічі натисніть кнопку живлення, щоб підтвердити", /* uk */
+ "تصدیق کرنے کے لئے پاور بٹن دوبار دبائیں", /* ur */
+ "Tasdiqlash uchun quvvat tugmasini ikki marta bosing", /* uz */
+ "Nhấn hai lần vào nút nguồn để xác nhận", /* vi */
+ "连按两次电源按钮即可确认", /* zh */
+ "连按两次电源按钮即可确认", /* zh-CN */
+ "按兩下電源按鈕即可確認", /* zh-HK */
+ "按兩下電源按鈕即可確認操作", /* zh-TW */
+ "Cindezela kabili ukuze uqinisekise", /* zu */
+ }
+ },
+ {
+ "1796282799666106567",
+ {
+ "Cancel", /* en (untranslated) */
+ "Kanselleer", /* af */
+ "ይቅር", /* am */
+ "إلغاء", /* ar */
+ "إلغاء", /* ar-EG */
+ "إلغاء", /* ar-JO */
+ "إلغاء", /* ar-MA */
+ "إلغاء", /* ar-SA */
+ "Cancel", /* ar-XB */
+ "বাতিল কৰক", /* as */
+ "Ləğv edin", /* az */
+ "Скасаваць", /* be */
+ "Отказ", /* bg */
+ "বাতিল করুন", /* bn */
+ "Otkaži", /* bs */
+ "Cancel·la", /* ca */
+ "Zrušit", /* cs */
+ "Annuller", /* da */
+ "Abbrechen", /* de */
+ "Abbrechen", /* de-AT */
+ "Abbrechen", /* de-CH */
+ "Ακύρωση", /* el */
+ "Cancel", /* en-AU */
+ "Cancel", /* en-CA */
+ "Cancel", /* en-GB */
+ "Cancel", /* en-IE */
+ "Cancel", /* en-IN */
+ "Cancel", /* en-SG */
+ "[Çåñçéļ one]", /* en-XA */
+ "Cancel", /* en-XC */
+ "Cancel", /* en-ZA */
+ "Cancelar", /* es */
+ "Cancelar", /* es-419 */
+ "Cancelar", /* es-AR */
+ "Cancelar", /* es-BO */
+ "Cancelar", /* es-CL */
+ "Cancelar", /* es-CO */
+ "Cancelar", /* es-CR */
+ "Cancelar", /* es-DO */
+ "Cancelar", /* es-EC */
+ "Cancelar", /* es-GT */
+ "Cancelar", /* es-HN */
+ "Cancelar", /* es-MX */
+ "Cancelar", /* es-NI */
+ "Cancelar", /* es-PA */
+ "Cancelar", /* es-PE */
+ "Cancelar", /* es-PR */
+ "Cancelar", /* es-PY */
+ "Cancelar", /* es-SV */
+ "Cancelar", /* es-US */
+ "Cancelar", /* es-UY */
+ "Cancelar", /* es-VE */
+ "Tühista", /* et */
+ "Utzi", /* eu */
+ "لغو", /* fa */
+ "Peruuta", /* fi */
+ "Kanselahin", /* fil */
+ "Annuler", /* fr */
+ "Annuler", /* fr-CA */
+ "Annuler", /* fr-CH */
+ "Cancelar", /* gl */
+ "Abbrechen", /* gsw */
+ "રદ કરો", /* gu */
+ "ביטול", /* he */
+ "रद्द करें", /* hi */
+ "Otkaži", /* hr */
+ "Mégse", /* hu */
+ "Չեղարկել", /* hy */
+ "Batal", /* id */
+ "Batal", /* in */
+ "Hætta við", /* is */
+ "Annulla", /* it */
+ "ביטול", /* iw */
+ "キャンセル", /* ja */
+ "გაუქმება", /* ka */
+ "Бас тарту", /* kk */
+ "បោះបង់", /* km */
+ "ರದ್ದು", /* kn */
+ "취소", /* ko */
+ "Жокко чыгаруу", /* ky */
+ "Annuler", /* ln */
+ "ຍົກເລີກ", /* lo */
+ "Atšaukti", /* lt */
+ "Atcelt", /* lv */
+ "Откажи", /* mk */
+ "റദ്ദാക്കുക", /* ml */
+ "Болих", /* mn */
+ "Anulați", /* mo */
+ "रद्द करा", /* mr */
+ "Batal", /* ms */
+ "မလုပ်တော့", /* my */
+ "Avbryt", /* nb */
+ "रद्द गर्नुहोस्", /* ne */
+ "Annuleren", /* nl */
+ "Avbryt", /* no */
+ "କ୍ୟାନ୍ସଲ୍ କରନ୍ତୁ", /* or */
+ "ਰੱਦ ਕਰੋ", /* pa */
+ "Anuluj", /* pl */
+ "Cancelar", /* pt */
+ "Cancelar", /* pt-BR */
+ "Cancelar", /* pt-PT */
+ "Anulați", /* ro */
+ "Отмена", /* ru */
+ "අවලංගු කරන්න", /* si */
+ "Zrušiť", /* sk */
+ "Prekliči", /* sl */
+ "Anulo", /* sq */
+ "Откажи", /* sr */
+ "Otkaži", /* sr-Latn */
+ "Avbryt", /* sv */
+ "Ghairi", /* sw */
+ "ரத்துசெய்", /* ta */
+ "రద్దు చేయండి", /* te */
+ "ยกเลิก", /* th */
+ "Kanselahin", /* tl */
+ "İptal", /* tr */
+ "Скасувати", /* uk */
+ "منسوخ کریں", /* ur */
+ "Bekor qilish", /* uz */
+ "Hủy", /* vi */
+ "取消", /* zh */
+ "取消", /* zh-CN */
+ "取消", /* zh-HK */
+ "取消", /* zh-TW */
+ "Khansela", /* zu */
+ }
+ },
+ {
+ "217688588483778177",
+ {
+ "This confirmation provides an extra layer of security for the action you're about to take.", /* en (untranslated) */
+ "Hierdie bevestiging verskaf 'n ekstra laag sekuriteit vir die handeling wat jy op die punt is om uit te voer.", /* af */
+ "ይህ ማረጋገጫ እርስዎ ለሚወስዱት እርምጃ ተጨማሪ ትርፍ ጥበቃን ይሰጣል።", /* am */
+ "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.", /* ar */
+ "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.", /* ar-EG */
+ "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.", /* ar-JO */
+ "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.", /* ar-MA */
+ "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.", /* ar-SA */
+ "This confirmation provides an extra layer of security for the action you're about to take.", /* ar-XB */
+ "এই প্ৰতিশ্ৰুতিয়ে আপুনি কৰিব বিচৰা কোনো কাৰ্যৰ বাবে অতিৰিক্ত সুৰক্ষা প্ৰদান কৰে।", /* as */
+ "Bu təsdiq etmək üzrə olduğunuz əməliyyat üçün əlavə təhlükəsizlik qatı təmin edir.", /* az */
+ "Гэта пацвярджэнне забяспечвае дадатковы ўзровень бяспекі для дзеянняў, якія вы збіраецеся выконваць.", /* be */
+ "Това потвърждение осигурява допълнителна защита за действието, което сте напът да предприемете.", /* bg */
+ "আপনি যে কাজটি করতে চলেছেন, এই কনফার্মেশনের ফলে সেটির জন্য অতিরিক্ত সুরক্ষার ব্যবস্থা করা হয়।", /* bn */
+ "Ova potvrda pruža dodatni sloj zaštite za radnju koju namjeravate preduzeti.", /* bs */
+ "Aquesta confirmació proporciona una capa de seguretat addicional per a l'acció que estàs a punt de dur a terme.", /* ca */
+ "Toto potvrzení tvoří dodatečnou úroveň zabezpečení akce, kterou se chystáte podniknout.", /* cs */
+ "Denne bekræftelse giver et ekstra beskyttelsesniveau for den handling, du er ved at foretage.", /* da */
+ "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.", /* de */
+ "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.", /* de-AT */
+ "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmassnahme angewandt.", /* de-CH */
+ "Αυτή η επιβεβαίωση παρέχει ένα επιπλέον επίπεδο ασφάλειας για την ενέργεια που πρόκειται να εκτελέσετε.", /* el */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-AU */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-CA */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-GB */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-IE */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-IN */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-SG */
+ "[Ţĥîš çöñƒîŕmåţîöñ þŕövîðéš åñ éxţŕå ļåýéŕ öƒ šéçûŕîţý ƒöŕ ţĥé åçţîöñ ýöû'ŕé åбöûţ ţö ţåķé. one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen]", /* en-XA */
+ "This confirmation provides an extra layer of security for the action you're about to take.", /* en-XC */
+ "This confirmation provides an extra layer of security for the action that you're about to take.", /* en-ZA */
+ "Esta confirmación proporciona una capa de seguridad adicional a la acción que vas a realizar.", /* es */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-419 */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-AR */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-BO */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-CL */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-CO */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-CR */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-DO */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-EC */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-GT */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-HN */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-MX */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-NI */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-PA */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-PE */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-PR */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-PY */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-SV */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-US */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-UY */
+ "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.", /* es-VE */
+ "See kinnitus annab veel ühe turvakihi toimingu puhul, mille nüüd teete.", /* et */
+ "Berrespen honek segurtasun handiagoa ematen dizu hurrengo ekintza gauzatzeko.", /* eu */
+ "این تأیید یک لایه امنیتی اضافی برای کنشی که میخواهید انجام دهید فراهم میکند.", /* fa */
+ "Tämä vahvistus tarkoittaa, että seuraava toimintosi on entistä paremmin suojattu.", /* fi */
+ "Ang pagkumpirmang ito ay nagbibigay ng karagdagang layer ng seguridad para sa pagkilos na gagawin mo.", /* fil */
+ "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.", /* fr */
+ "Cette confirmation fournit une couche supplémentaire de sécurité pour l'action que vous êtes sur le point d'effectuer.", /* fr-CA */
+ "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.", /* fr-CH */
+ "Esta confirmación proporciona unha capa adicional de seguranza para a acción que estás a piques de levar a cabo.", /* gl */
+ "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.", /* gsw */
+ "તમે જે ક્રિયા કરવાના છો તેના માટે આ કન્ફર્મેશન એક અતિરિક્ત સુરક્ષાનું સ્તર પ્રદાન કરે છે.", /* gu */
+ "אישור זה מספק שכבת אבטחה נוספת לפעולה שאתה עומד לבצע.", /* he */
+ "यह पुष्टि मिलने पर आप जो काम करने वाले हैं, उसके लिए सुरक्षा और बढ़ जाती है.", /* hi */
+ "Ta potvrda pruža dodatan sloj zaštite za radnju koju ćete izvršiti.", /* hr */
+ "Ez a megerősítés extra réteg biztonságot nyújt a végrehajtani kívánt művelet számára.", /* hu */
+ "Այս հաստատումն ապահովում է պաշտպանության լրացուցիչ մակարդակ՝ նախքան գործողություն կատարելը", /* hy */
+ "Konfirmasi ini memberikan lapisan keamanan tambahan untuk tindakan yang akan Anda ambil.", /* id */
+ "Konfirmasi ini memberikan lapisan keamanan tambahan untuk tindakan yang akan Anda ambil.", /* in */
+ "Þessi staðfesting veitir aukið öryggi fyrir aðgerðina sem þú ert að fara að framkvæma.", /* is */
+ "Questa conferma garantisce un ulteriore livello di sicurezza per l'azione che stai per compiere.", /* it */
+ "אישור זה מספק שכבת אבטחה נוספת לפעולה שאתה עומד לבצע.", /* iw */
+ "この確認により、これから行う操作のセキュリティが強化されます。", /* ja */
+ "დადასტურება უსაფრთხოების დამატებით შრეს უზრუნველყოფს იმ ქმედების განსახორციელებლად, რომელსაც აპირებთ.", /* ka */
+ "Бұл растау функциясы орындағалы тұрған әрекеттің қауіпсіздігін қосымша күшейтеді.", /* kk */
+ "ការបញ្ជាក់នេះផ្ដល់ស្រទាប់សុវត្ថិភាពបន្ថែមសម្រាប់សកម្មភាពដែលអ្នកហៀបនឹងធ្វើ។", /* km */
+ "ಈ ದೃಢೀಕರಣವು ನೀವು ನಿರ್ವಹಿಸಲು ಬಯಸುವ ಕ್ರಿಯೆಗೆ ಹೆಚ್ಚುವರಿ ಸುರಕ್ಷತೆಯನ್ನು ಒದಗಿಸುತ್ತದೆ.", /* kn */
+ "이 확인 단계를 사용하면 실행하려는 작업의 보안을 한층 강화할 수 있습니다.", /* ko */
+ "Бул ырастоо сиз аткара турган аракеттин коопсуздугун коргоонун дагы бир катмарын камсыздайт.", /* ky */
+ "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.", /* ln */
+ "ການຢືນຢັນນີ້ຈະເພີ່ມຄວາມປອດໄພເພີ່ມເຕີມອີກໜຶ່ງຊັ້ນໃຫ້ກັບຄຳສັ່ງທີ່ທ່ານກຳລັງຈະໃຊ້.", /* lo */
+ "Naudojant šį patvirtinimą, veiksmui, kurį ketinate atlikti, taikomas papildomas saugos lygmuo.", /* lt */
+ "Šis apstiprinājums sniedz papildu aizsardzību darbībai, kuru veiksiet.", /* lv */
+ "Оваа потврда обезбедува дополнителен слој на безбедност за дејството што ќе го преземете.", /* mk */
+ "നിങ്ങൾ സ്വീകരിക്കാൻ പോകുന്ന നടപടിക്കായി, ഈ സ്ഥിരീകരണം ഒരു അധിക സുരക്ഷാ പാളി നൽകുന്നു.", /* ml */
+ "Энэ баталгаажуулалт нь таны авах гэж буй арга хэмжээнд хамгаалалтын нэмэлт давхаргыг олгодог.", /* mn */
+ "Această confirmare oferă un nivel suplimentar de securitate pentru acțiunea pe care urmează să o faceți.", /* mo */
+ "हे निश्चित झाल्यावर, तुम्ही जे काम करणार आहात, त्यासाठी सुरक्षा आणखी वाढते.", /* mr */
+ "Pengesahan ini memberikan lapisan keselamatan tambahan untuk tindakan yang akan anda ambil.", /* ms */
+ "ဤအတည်ပြုချက်က သင်ပြုလုပ်တော့မည့် လုပ်ဆောင်ချက်အတွက် အပိုဆောင်းလုံခြုံရေးကို ပေးထားသည်။", /* my */
+ "Denne bekreftelsen gir et ekstra sikkerhetslag for handlingen du er i ferd med å utføre.", /* nb */
+ "यो पुष्टिले तपाईंले गर्न ऑंट्नुभएको कारबाहीका लागि सुरक्षाको अतिरिक्त तह प्रदान गर्छ।", /* ne */
+ "Deze bevestiging biedt een extra beveiligingslaag voor de actie die je wilt uitvoeren.", /* nl */
+ "Denne bekreftelsen gir et ekstra sikkerhetslag for handlingen du er i ferd med å utføre.", /* no */
+ "ଏହି ସୁନିଶ୍ଚିତତା, ଆପଣ କରିବାକୁ ଯାଉଥିବା କାର୍ଯ୍ୟ ପାଇଁ ଅତିରିକ୍ତ ସୁରକ୍ଷା ପରତ ପ୍ରଦାନ କରିଥାଏ।", /* or */
+ "ਇਹ ਪੁਸ਼ਟੀਕਰਨ ਤੁਹਾਡੇ ਵੱਲੋਂ ਕਾਰਵਾਈ ਨੂੰ ਕੀਤੇ ਜਾਣ ਲਈ ਸੁਰੱਖਿਆ ਦੇ ਇੱਕ ਵਾਧੂ ਪੱਧਰ ਮੁਹੱਈਆ ਕਰਦੀ ਹੈ।", /* pa */
+ "To potwierdzenie stanowi dodatkowe zabezpieczenie czynności, którą zamierzasz wykonać.", /* pl */
+ "Essa confirmação oferece uma camada adicional de segurança para a ação que você está prestes a realizar.", /* pt */
+ "Essa confirmação oferece uma camada adicional de segurança para a ação que você está prestes a realizar.", /* pt-BR */
+ "Esta confirmação oferece um nível extra de segurança para a ação que está prestes a realizar.", /* pt-PT */
+ "Această confirmare oferă un nivel suplimentar de securitate pentru acțiunea pe care urmează să o faceți.", /* ro */
+ "Дополнительный уровень защиты для действия, которое вы собираетесь выполнить.", /* ru */
+ "මෙම තහවුරු කිරිම ඔබ ගැනීමට යන ක්රියාමාර්ගය සඳහා ආරක්ෂාව පිළිබඳ අමතර ස්තරයක් සපයයි.", /* si */
+ "Toto potvrdenie zaistí dodatočnú úroveň zabezpečenia akcie, ktorú sa chystáte vykonať.", /* sk */
+ "Ta potrditev zagotavlja dodatno plast zaščite za dejanje, ki ga boste izvedli.", /* sl */
+ "Konfirmim ofron një shtresë sigurie shtesë për veprimin që je gati për të ndërmarrë.", /* sq */
+ "Ова потврда пружа додатни слој безбедности за радњу коју се спремате да извршите.", /* sr */
+ "Ova potvrda pruža dodatni sloj bezbednosti za radnju koju se spremate da izvršite.", /* sr-Latn */
+ "Bekräftelsen ger extra skydd för åtgärden du ska vidta.", /* sv */
+ "Uthibitishaji huu hutoa ulinzi zaidi wa usalama kwa hatua unayotaka kuchukua.", /* sw */
+ "நீங்கள் மேற்கொள்ளவிருக்கும் செயலுக்கு, கூடுதல் பாதுகாப்பை இந்த உறுதிப்படுத்தல் வழங்கும்.", /* ta */
+ "ఈ నిర్ధారణ మీరు తీసుకోబోయే చర్య కోసం అదనపు భద్రతా లేయర్ను అందిస్తుంది.", /* te */
+ "การยืนยันนี้จะช่วยเพิ่มความปลอดภัยอีกขั้นสำหรับสิ่งที่คุณกำลังจะดำเนินการ", /* th */
+ "Ang pagkumpirmang ito ay nagbibigay ng karagdagang layer ng seguridad para sa pagkilos na gagawin mo.", /* tl */
+ "Bu onay, yapmak üzere olduğunuz işlem için ek güvenlik katmanı sağlar.", /* tr */
+ "Це підтвердження є додатковим рівнем захисту, коли ви збираєтеся виконати дію.", /* uk */
+ "آپ جو کارروائی کرنے والے ہیں اس کے لئے یہ تصدیق ایک اضافی پرت فراہم کرتی ہے۔", /* ur */
+ "Tasdiqlangandan keyin bajarilayotgan amal uchun qo‘shimcha xavfsizlik qatlami taqdim etiladi.", /* uz */
+ "Xác nhận này cung cấp thêm một lớp bảo mật cho hành động bạn sắp thực hiện.", /* vi */
+ "这项确认可为您即将执行的操作增添一层额外的安全保障。", /* zh */
+ "这项确认可为您即将执行的操作增添一层额外的安全保障。", /* zh-CN */
+ "此確認可為你即將執行的操作提供額外安全保障。", /* zh-HK */
+ "這項確認作業可為你即將執行的動作提供多一層安全保障。", /* zh-TW */
+ "Lokhu kuqinisekiswa kunikeza isendlalelo esingeziwe sokuvikelwa sesenzo osuzosithatha.", /* zu */
+ }
+ },
+ {
+ "2181224373757710937",
+ {
+ "Press power to confirm", /* en (untranslated) */
+ "Druk aan/af-skakelaar om te bevestig", /* af */
+ "ለማረጋገጥ ኃይልን ይጫኑ", /* am */
+ "اضغط على زر التشغيل لتأكيد الإجراء.", /* ar */
+ "اضغط على زر التشغيل لتأكيد الإجراء.", /* ar-EG */
+ "اضغط على زر التشغيل لتأكيد الإجراء.", /* ar-JO */
+ "اضغط على زر التشغيل لتأكيد الإجراء.", /* ar-MA */
+ "اضغط على زر التشغيل لتأكيد الإجراء.", /* ar-SA */
+ "Press power to confirm", /* ar-XB */
+ "নিশ্চিত কৰিবলৈ পাৱাৰ বুটাম হেঁচক", /* as */
+ "Təsdiq etmək üçün yandırıb-söndürmə düyməsinə basın", /* az */
+ "Націсніце кнопку сілкавання, каб пацвердзіць", /* be */
+ "Натиснете бутона за захранване, за да потвърдите", /* bg */
+ "নিশ্চিত করতে পাওয়ার বোতাম টিপুন", /* bn */
+ "Pritisnite dugme za napajanje za potvrdu", /* bs */
+ "Prem el botó d'engegada per confirmar", /* ca */
+ "Potvrďte stisknutím vypínače", /* cs */
+ "Tryk på afbryderknappen for at bekræfte", /* da */
+ "Drücke zum Bestätigen die Ein-/Aus-Taste", /* de */
+ "Drücke zum Bestätigen die Ein-/Aus-Taste", /* de-AT */
+ "Drücke zum Bestätigen die Ein-/Aus-Taste", /* de-CH */
+ "Πατήστε το κουμπί λειτουργίας για επιβεβαίωση", /* el */
+ "Press power to confirm", /* en-AU */
+ "Press power to confirm", /* en-CA */
+ "Press power to confirm", /* en-GB */
+ "Press power to confirm", /* en-IE */
+ "Press power to confirm", /* en-IN */
+ "Press power to confirm", /* en-SG */
+ "[Þŕéšš þöŵéŕ ţö çöñƒîŕm one two three four five]", /* en-XA */
+ "Press power to confirm", /* en-XC */
+ "Press power to confirm", /* en-ZA */
+ "Pulsa el botón de encendido para confirmar", /* es */
+ "Presiona el botón de encendido para confirmar", /* es-419 */
+ "Presiona el botón de encendido para confirmar", /* es-AR */
+ "Presiona el botón de encendido para confirmar", /* es-BO */
+ "Presiona el botón de encendido para confirmar", /* es-CL */
+ "Presiona el botón de encendido para confirmar", /* es-CO */
+ "Presiona el botón de encendido para confirmar", /* es-CR */
+ "Presiona el botón de encendido para confirmar", /* es-DO */
+ "Presiona el botón de encendido para confirmar", /* es-EC */
+ "Presiona el botón de encendido para confirmar", /* es-GT */
+ "Presiona el botón de encendido para confirmar", /* es-HN */
+ "Presiona el botón de encendido para confirmar", /* es-MX */
+ "Presiona el botón de encendido para confirmar", /* es-NI */
+ "Presiona el botón de encendido para confirmar", /* es-PA */
+ "Presiona el botón de encendido para confirmar", /* es-PE */
+ "Presiona el botón de encendido para confirmar", /* es-PR */
+ "Presiona el botón de encendido para confirmar", /* es-PY */
+ "Presiona el botón de encendido para confirmar", /* es-SV */
+ "Presiona el botón de encendido para confirmar", /* es-US */
+ "Presiona el botón de encendido para confirmar", /* es-UY */
+ "Presiona el botón de encendido para confirmar", /* es-VE */
+ "Kinnitamiseks vajutage toitenuppu", /* et */
+ "Berresteko, sakatu etengailua", /* eu */
+ "برای تأیید، دکمه روشن/خاموش را فشار دهید", /* fa */
+ "Vahvista painamalla virtapainiketta", /* fi */
+ "Pindutin ang power para kumpirmahin", /* fil */
+ "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération", /* fr */
+ "Appuyez sur l'interrupteur pour confirmer", /* fr-CA */
+ "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération", /* fr-CH */
+ "Preme o botón de acendido para confirmar", /* gl */
+ "Drücke zum Bestätigen die Ein-/Aus-Taste", /* gsw */
+ "કન્ફર્મ કરવા માટે પાવર બટન દબાવો", /* gu */
+ "יש ללחוץ על לחצן ההפעלה כדי לאשר", /* he */
+ "पुष्टि करने के लिए पावर बटन दबाएं", /* hi */
+ "Pritisnite tipku za uključivanje/isključivanje da biste potvrdili", /* hr */
+ "Nyomja meg a bekapcsológombot a megerősítéshez", /* hu */
+ "Հաստատելու համար սեղմեք սնուցման կոճակը", /* hy */
+ "Tekan tombol power untuk mengonfirmasi", /* id */
+ "Tekan tombol power untuk mengonfirmasi", /* in */
+ "Ýttu á aflrofann til að staðfesta", /* is */
+ "Premi il tasto di accensione per confermare", /* it */
+ "יש ללחוץ על לחצן ההפעלה כדי לאשר", /* iw */
+ "確認するには、電源を押します", /* ja */
+ "დასადასტურებლად დააჭირეთ ჩართვის ღილაკს", /* ka */
+ "Растау үшін қуат түймесін басыңыз", /* kk */
+ "ចុចប៊ូតុងថាមពលដើម្បីបញ្ជាក់", /* km */
+ "ದೃಢೀಕರಿಸಲು ಪವರ್ ಬಟನ್ ಒತ್ತಿರಿ", /* kn */
+ "확인하려면 전원 버튼을 누르세요.", /* ko */
+ "Ырастоо үчүн \"Кубат\" баскычын басыңыз", /* ky */
+ "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération", /* ln */
+ "ກົດປຸ່ມເປີດປິດເພື່ອຢືນຢັນ", /* lo */
+ "Paspauskite maitinimo mygtuką, kad patvirtintumėte", /* lt */
+ "Lai apstiprinātu, nospiediet barošanas pogu", /* lv */
+ "Притиснете на копчето за напојување за да потврдите", /* mk */
+ "സ്ഥിരീകരിക്കാൻ പവർ അമർത്തുക", /* ml */
+ "Баталгаажуулахын тулд унтраах/асаахыг дарах", /* mn */
+ "Apăsați butonul de pornire pentru a confirma", /* mo */
+ "निश्चित करण्यासाठी पॉवर दाबा", /* mr */
+ "Tekan kuasa untuk mengesahkan", /* ms */
+ "အတည်ပြုရန် ပါဝါခလုတ်နှိပ်ပါ", /* my */
+ "Trykk på av/på-knappen for å bekrefte", /* nb */
+ "पुष्टि गर्न पावर बटनमा थिच्नुहोस्", /* ne */
+ "Druk op de aan/uit-knop om te bevestigen", /* nl */
+ "Trykk på av/på-knappen for å bekrefte", /* no */
+ "ସୁନିଶ୍ଚିତ କରିବା ପାଇଁ ପାୱର୍ ବଟନ୍କୁ ଦାବନ୍ତୁ", /* or */
+ "ਪੁਸ਼ਟੀ ਕਰਨ ਲਈ ਪਾਵਰ ਬਟਨ ਦਬਾਓ", /* pa */
+ "Naciśnij przycisk zasilania, aby potwierdzić", /* pl */
+ "Pressione o botão liga/desliga para confirmar", /* pt */
+ "Pressione o botão liga/desliga para confirmar", /* pt-BR */
+ "Prima ligar/desligar para confirmar.", /* pt-PT */
+ "Apăsați butonul de pornire pentru a confirma", /* ro */
+ "Для подтверждения нажмите кнопку питания.", /* ru */
+ "තහවුරු කිරීමට බල බොත්තම ඔබන්න", /* si */
+ "Potvrďte stlačením vypínača", /* sk */
+ "Za potrditev pritisnite gumb za vklop", /* sl */
+ "Shtyp butonin e energjisë për të konfirmuar", /* sq */
+ "Притисните дугме за напајање да бисте потврдили", /* sr */
+ "Pritisnite dugme za napajanje da biste potvrdili", /* sr-Latn */
+ "Bekräfta genom att trycka på strömbrytaren", /* sv */
+ "Bonyeza kitufe cha kuwasha ili uthibitishe", /* sw */
+ "உறுதிப்படுத்த, பவரை அழுத்தவும்", /* ta */
+ "నిర్ధారించడానికి పవర్ను నొక్కండి", /* te */
+ "กดปุ่มเปิด/ปิดเพื่อยืนยัน", /* th */
+ "Pindutin ang power para kumpirmahin", /* tl */
+ "Onaylamak için güç düğmesine basın", /* tr */
+ "Натисніть кнопку живлення, щоб підтвердити", /* uk */
+ "تصدیق کرنے کے لئے پاور بٹن دبائیں", /* ur */
+ "Tasdiqlash uchun quvvat tugmasini bosing", /* uz */
+ "Nhấn vào nút nguồn để xác nhận", /* vi */
+ "按电源按钮即可确认", /* zh */
+ "按电源按钮即可确认", /* zh-CN */
+ "按下電源按鈕即可確認", /* zh-HK */
+ "按下電源按鈕即可確認操作", /* zh-TW */
+ "Cindezela amandla ukuze uqinisekise", /* zu */
+ }
+ },
+ {
+ "2213954494039981979",
+ {
+ "Press any volume button to cancel", /* en (untranslated) */
+ "Druk enige volumeknoppie om te kanselleer", /* af */
+ "ለመሰረዝ ማናቸውንም የድምፅ አዝራር ይጫኑ", /* am */
+ "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.", /* ar */
+ "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.", /* ar-EG */
+ "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.", /* ar-JO */
+ "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.", /* ar-MA */
+ "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.", /* ar-SA */
+ "Press any volume button to cancel", /* ar-XB */
+ "বাতিল কৰিবলৈ যিকোনো ভলিউম বুটাম হেঁচক", /* as */
+ "Ləğv etmək üçün istənilən səs düyməsinə basın", /* az */
+ "Націсніце любую кнопку гучнасці, каб cкасаваць", /* be */
+ "Натиснете някой от бутоните за силата на звука, за да анулирате", /* bg */
+ "বাতিল করতে ভলিউমের যেকোনও বোতাম টিপুন", /* bn */
+ "Pritisnite bilo koje dugme za podešavanje jačine zvuka da otkažete", /* bs */
+ "Prem qualsevol botó de volum per cancel·lar", /* ca */
+ "Zrušte stisknutím tlačítka hlasitosti", /* cs */
+ "Tryk på en af lydstyrkeknapperne for at annullere", /* da */
+ "Zum Abbrechen eine beliebige Lautstärketaste drücken", /* de */
+ "Zum Abbrechen eine beliebige Lautstärketaste drücken", /* de-AT */
+ "Zum Abbrechen eine beliebige Lautstärketaste drücken", /* de-CH */
+ "Πατήστε οποιοδήποτε κουμπί έντασης ήχου για ακύρωση", /* el */
+ "Press any volume button to cancel", /* en-AU */
+ "Press any volume button to cancel", /* en-CA */
+ "Press any volume button to cancel", /* en-GB */
+ "Press any volume button to cancel", /* en-IE */
+ "Press any volume button to cancel", /* en-IN */
+ "Press any volume button to cancel", /* en-SG */
+ "[Þŕéšš åñý vöļûmé бûţţöñ ţö çåñçéļ one two three four five six seven]", /* en-XA */
+ "Press any volume button to cancel", /* en-XC */
+ "Press any volume button to cancel", /* en-ZA */
+ "Pulsa cualquier botón de volumen para cancelar", /* es */
+ "Presiona cualquier botón de volumen para cancelar", /* es-419 */
+ "Presiona cualquier botón de volumen para cancelar", /* es-AR */
+ "Presiona cualquier botón de volumen para cancelar", /* es-BO */
+ "Presiona cualquier botón de volumen para cancelar", /* es-CL */
+ "Presiona cualquier botón de volumen para cancelar", /* es-CO */
+ "Presiona cualquier botón de volumen para cancelar", /* es-CR */
+ "Presiona cualquier botón de volumen para cancelar", /* es-DO */
+ "Presiona cualquier botón de volumen para cancelar", /* es-EC */
+ "Presiona cualquier botón de volumen para cancelar", /* es-GT */
+ "Presiona cualquier botón de volumen para cancelar", /* es-HN */
+ "Presiona cualquier botón de volumen para cancelar", /* es-MX */
+ "Presiona cualquier botón de volumen para cancelar", /* es-NI */
+ "Presiona cualquier botón de volumen para cancelar", /* es-PA */
+ "Presiona cualquier botón de volumen para cancelar", /* es-PE */
+ "Presiona cualquier botón de volumen para cancelar", /* es-PR */
+ "Presiona cualquier botón de volumen para cancelar", /* es-PY */
+ "Presiona cualquier botón de volumen para cancelar", /* es-SV */
+ "Presiona cualquier botón de volumen para cancelar", /* es-US */
+ "Presiona cualquier botón de volumen para cancelar", /* es-UY */
+ "Presiona cualquier botón de volumen para cancelar", /* es-VE */
+ "Tühistamiseks vajutage mis tahes helitugevuse nuppu", /* et */
+ "Bertan behera uzteko, sakatu bolumen-tekla bat", /* eu */
+ "برای لغو، یکی از دکمههای میزان صدا را فشار دهید", /* fa */
+ "Peruuta painamalla äänenvoimakkuuspainiketta", /* fi */
+ "Pindutin ang anumang button ng volume para kanselahin", /* fil */
+ "Appuyez sur l'un des boutons de volume pour annuler l'opération", /* fr */
+ "Appuyez sur un bouton de volume pour annuler l'action", /* fr-CA */
+ "Appuyez sur l'un des boutons de volume pour annuler l'opération", /* fr-CH */
+ "Preme calquera botón de volume para cancelar", /* gl */
+ "Zum Abbrechen eine beliebige Lautstärketaste drücken", /* gsw */
+ "રદ કરવા માટે કોઈપણ વૉલ્યૂમનું બટન દબાવો", /* gu */
+ "יש ללחוץ על לחצן כלשהו של עוצמת הקול כדי לבטל", /* he */
+ "रद्द करने के लिए कोई भी वॉल्यूम बटन दबाएं", /* hi */
+ "Pritisnite bilo koju tipku za glasnoću da biste otkazali", /* hr */
+ "Nyomja meg valamelyik hangerőgombot az elvetéshez", /* hu */
+ "Չեղարկելու համար սեղմեք ձայնի կագավորման որևէ կոճակ", /* hy */
+ "Tekan tombol volume apa saja untuk membatalkan", /* id */
+ "Tekan tombol volume apa saja untuk membatalkan", /* in */
+ "Ýttu á hvaða hljóðstyrkshnapp sem er til að hætta við", /* is */
+ "Premi qualsiasi pulsante del volume per annullare", /* it */
+ "יש ללחוץ על לחצן כלשהו של עוצמת הקול כדי לבטל", /* iw */
+ "キャンセルするには、いずれかの音量ボタンを押します", /* ja */
+ "გასაუქმებლად დააჭირეთ ხმის რეგულირების ნებისმიერ ღილაკს", /* ka */
+ "Бас тарту үшін кез келген дыбыс деңгейі түймесін басыңыз", /* kk */
+ "ចុចប៊ូតុងកម្រិតសំឡេងណាមួយដើម្បីបោះបង់", /* km */
+ "ರದ್ದುಗೊಳಿಸಲು ಯಾವುದೇ ವಾಲ್ಯೂಮ್ ಬಟನ್ ಒತ್ತಿರಿ", /* kn */
+ "취소하려면 볼륨 버튼 중 하나를 누르세요.", /* ko */
+ "Жокко чыгаруу үчүн үн көлөмүнүн баскычтарынын бирин басыңыз", /* ky */
+ "Appuyez sur l'un des boutons de volume pour annuler l'opération", /* ln */
+ "ກົດປຸ່ມສຽງຂຶ້ນ ຫຼື ລົງເພື່ອຍົກເລີກ", /* lo */
+ "Paspauskite bet kurį garsumo mygtuką, kad atšauktumėte", /* lt */
+ "Lai atceltu, nospiediet jebkuru skaļuma pogu", /* lv */
+ "Притиснете на кое било копче за јачина на звук за да откажете", /* mk */
+ "റദ്ദാക്കാൻ എതെങ്കിലും വോളിയം ബട്ടൺ അമർത്തുക", /* ml */
+ "Болихын тулд дууны түвшний товчлуурын аль нэгийг нь дарах", /* mn */
+ "Apăsați orice buton de volum pentru a anula", /* mo */
+ "रद्द करण्यासाठी कोणतेही व्हॉल्यूम बटण दाबा", /* mr */
+ "Tekan sebarang butang kelantangan untuk membatalkan tindakan", /* ms */
+ "ပယ်ဖျက်ရန် အသံအတိုးအကျယ်ခလုတ် တစ်ခုခုကိုနှိပ်ပါ", /* my */
+ "Trykk på en volumknapp for å avbryte", /* nb */
+ "रद्द गर्नका लागि कुनै भोल्युम बटन थिच्नुहोस्", /* ne */
+ "Druk op een volumeknop om te annuleren", /* nl */
+ "Trykk på en volumknapp for å avbryte", /* no */
+ "କ୍ୟାନ୍ସଲ୍ କରିବା ପାଇଁ ଯେକୌଣସି ଭଲ୍ୟୁମ୍ ବଟନ୍କୁ ଦାବନ୍ତୁ", /* or */
+ "ਰੱਦ ਕਰਨ ਲਈ ਕਿਸੇ ਵੀ ਵੌਲਿਊਮ ਬਟਨ ਨੂੰ ਦਬਾਓ", /* pa */
+ "Naciśnij dowolny przycisk głośności, aby anulować", /* pl */
+ "Pressione um dos botões de volume para cancelar", /* pt */
+ "Pressione um dos botões de volume para cancelar", /* pt-BR */
+ "Prima qualquer botão de volume para cancelar.", /* pt-PT */
+ "Apăsați orice buton de volum pentru a anula", /* ro */
+ "Для отмены нажмите на любую кнопку регулировки громкости.", /* ru */
+ "අවලංගු කිරීමට ඕනෑම හඬ පරිමා බොත්තමක් ඔබන්න", /* si */
+ "Zrušte stlačením ľubovoľného tlačidla hlasitosti", /* sk */
+ "Za preklic pritisnite poljuben gumb za glasnost", /* sl */
+ "Shtyp çdo buton volumi për ta anuluar", /* sq */
+ "Притисните било које дугме за јачину звука да бисте отказали", /* sr */
+ "Pritisnite bilo koje dugme za jačinu zvuka da biste otkazali", /* sr-Latn */
+ "Avbryt genom att trycka på valfri volymknapp", /* sv */
+ "Bonyeza kitufe chochote cha sauti ili ughairi", /* sw */
+ "ரத்துசெய்ய, ஏதேனும் ஒலியளவு பட்டனை அழுத்தவும்", /* ta */
+ "రద్దు చేయడానికి ఏదైనా వాల్యూమ్ బటన్ను నొక్కండి", /* te */
+ "กดปุ่มปรับระดับเสียงเพื่อยกเลิก", /* th */
+ "Pindutin ang anumang button ng volume para kanselahin", /* tl */
+ "İptal etmek için herhangi bir ses düğmesine basın", /* tr */
+ "Натисніть будь-яку клавішу гучності, щоб скасувати", /* uk */
+ "منسوخ کرنے کے لئے کوئی بھی والیوم بٹن دبائیں", /* ur */
+ "Bekor qilish uchun istalgan tovush tugmasini bosing", /* uz */
+ "Nhấn vào nút âm lượng bất kỳ để hủy", /* vi */
+ "按任意音量按钮即可取消", /* zh */
+ "按任意音量按钮即可取消", /* zh-CN */
+ "按下任何音量按鈕即可取消", /* zh-HK */
+ "按下任一音量按鈕即可取消操作", /* zh-TW */
+ "Cindezela noma iyiphi inkinobho yevolumu ukuze ukhansele", /* zu */
+ }
+ },
+ {
+ "3999296476990449149",
+ {
+ "Cancel", /* en (untranslated) */
+ "Kanselleer", /* af */
+ "ይቅር", /* am */
+ "إلغاء", /* ar */
+ "إلغاء", /* ar-EG */
+ "إلغاء", /* ar-JO */
+ "إلغاء", /* ar-MA */
+ "إلغاء", /* ar-SA */
+ "Cancel", /* ar-XB */
+ "বাতিল কৰক", /* as */
+ "Ləğv edin", /* az */
+ "Скасаваць", /* be */
+ "Отказ", /* bg */
+ "বাতিল করুন", /* bn */
+ "Otkaži", /* bs */
+ "Cancel·la", /* ca */
+ "Zrušit", /* cs */
+ "Annuller", /* da */
+ "Abbrechen", /* de */
+ "Abbrechen", /* de-AT */
+ "Abbrechen", /* de-CH */
+ "Ακύρωση", /* el */
+ "Cancel", /* en-AU */
+ "Cancel", /* en-CA */
+ "Cancel", /* en-GB */
+ "Cancel", /* en-IE */
+ "Cancel", /* en-IN */
+ "Cancel", /* en-SG */
+ "[Çåñçéļ one]", /* en-XA */
+ "Cancel", /* en-XC */
+ "Cancel", /* en-ZA */
+ "Cancelar", /* es */
+ "Cancelar", /* es-419 */
+ "Cancelar", /* es-AR */
+ "Cancelar", /* es-BO */
+ "Cancelar", /* es-CL */
+ "Cancelar", /* es-CO */
+ "Cancelar", /* es-CR */
+ "Cancelar", /* es-DO */
+ "Cancelar", /* es-EC */
+ "Cancelar", /* es-GT */
+ "Cancelar", /* es-HN */
+ "Cancelar", /* es-MX */
+ "Cancelar", /* es-NI */
+ "Cancelar", /* es-PA */
+ "Cancelar", /* es-PE */
+ "Cancelar", /* es-PR */
+ "Cancelar", /* es-PY */
+ "Cancelar", /* es-SV */
+ "Cancelar", /* es-US */
+ "Cancelar", /* es-UY */
+ "Cancelar", /* es-VE */
+ "Tühista", /* et */
+ "Utzi", /* eu */
+ "لغو", /* fa */
+ "Peruuta", /* fi */
+ "Kanselahin", /* fil */
+ "Annuler", /* fr */
+ "Annuler", /* fr-CA */
+ "Annuler", /* fr-CH */
+ "Cancelar", /* gl */
+ "Abbrechen", /* gsw */
+ "રદ કરો", /* gu */
+ "ביטול", /* he */
+ "रद्द करें", /* hi */
+ "Otkaži", /* hr */
+ "Mégse", /* hu */
+ "Չեղարկել", /* hy */
+ "Batal", /* id */
+ "Batal", /* in */
+ "Hætta við", /* is */
+ "Annulla", /* it */
+ "ביטול", /* iw */
+ "キャンセル", /* ja */
+ "გაუქმება", /* ka */
+ "Бас тарту", /* kk */
+ "បោះបង់", /* km */
+ "ರದ್ದು", /* kn */
+ "취소", /* ko */
+ "Жокко чыгаруу", /* ky */
+ "Annuler", /* ln */
+ "ຍົກເລີກ", /* lo */
+ "Atšaukti", /* lt */
+ "Atcelt", /* lv */
+ "Откажи", /* mk */
+ "റദ്ദാക്കുക", /* ml */
+ "Болих", /* mn */
+ "Anulați", /* mo */
+ "रद्द करा", /* mr */
+ "Batal", /* ms */
+ "မလုပ်တော့", /* my */
+ "Avbryt", /* nb */
+ "रद्द गर्नुहोस्", /* ne */
+ "Annuleren", /* nl */
+ "Avbryt", /* no */
+ "କ୍ୟାନ୍ସଲ୍ କରନ୍ତୁ", /* or */
+ "ਰੱਦ ਕਰੋ", /* pa */
+ "Anuluj", /* pl */
+ "Cancelar", /* pt */
+ "Cancelar", /* pt-BR */
+ "Cancelar", /* pt-PT */
+ "Anulați", /* ro */
+ "Отмена", /* ru */
+ "අවලංගු කරන්න", /* si */
+ "Zrušiť", /* sk */
+ "Prekliči", /* sl */
+ "Anulo", /* sq */
+ "Откажи", /* sr */
+ "Otkaži", /* sr-Latn */
+ "Avbryt", /* sv */
+ "Ghairi", /* sw */
+ "ரத்துசெய்", /* ta */
+ "రద్దు చేయండి", /* te */
+ "ยกเลิก", /* th */
+ "Kanselahin", /* tl */
+ "İptal", /* tr */
+ "Скасувати", /* uk */
+ "منسوخ کریں", /* ur */
+ "Bekor qilish", /* uz */
+ "Hủy", /* vi */
+ "取消", /* zh */
+ "取消", /* zh-CN */
+ "取消", /* zh-HK */
+ "取消", /* zh-TW */
+ "Khansela", /* zu */
+ }
+ },
+ {
+ "6973195374358399966",
+ {
+ "Android Protected Confirmation", /* en (untranslated) */
+ "Android se Beskermde Bevestiging", /* af */
+ "በAndroid ጥበቃ የሚደረግለት ማረጋገጫ", /* am */
+ "تأكيد حماية Android", /* ar */
+ "تأكيد حماية Android", /* ar-EG */
+ "تأكيد حماية Android", /* ar-JO */
+ "تأكيد حماية Android", /* ar-MA */
+ "تأكيد حماية Android", /* ar-SA */
+ "Android Protected Confirmation", /* ar-XB */
+ "Androidৰ সুৰক্ষা সম্পৰ্কীয় প্ৰতিশ্ৰুতি", /* as */
+ "Qorunan Android Təsdiqi", /* az */
+ "Пацвярджэнне Android Protected", /* be */
+ "Защитно потвърждение за Android", /* bg */
+ "Android প্রোটেক্টেড কনফার্মেশন", /* bn */
+ "Potvrda zaštite na Androidu", /* bs */
+ "Confirmació de protecció d'Android", /* ca */
+ "Potvrzení ochrany Androidu", /* cs */
+ "Beskyttet bekræftelse i Android", /* da */
+ "Bestätigung für Android Protected", /* de */
+ "Bestätigung für Android Protected", /* de-AT */
+ "Bestätigung für Android Protected", /* de-CH */
+ "Επιβεβαίωση προστασίας Android", /* el */
+ "Android Protected Confirmation", /* en-AU */
+ "Android Protected Confirmation", /* en-CA */
+ "Android Protected Confirmation", /* en-GB */
+ "Android Protected Confirmation", /* en-IE */
+ "Android Protected Confirmation", /* en-IN */
+ "Android Protected Confirmation", /* en-SG */
+ "[Åñðŕöîð Þŕöţéçţéð Çöñƒîŕmåţîöñ one two three four]", /* en-XA */
+ "Android Protected Confirmation", /* en-XC */
+ "Android Protected Confirmation", /* en-ZA */
+ "Confirmación protegida por Android", /* es */
+ "Confirmación de protección de Android", /* es-419 */
+ "Confirmación de protección de Android", /* es-AR */
+ "Confirmación de protección de Android", /* es-BO */
+ "Confirmación de protección de Android", /* es-CL */
+ "Confirmación de protección de Android", /* es-CO */
+ "Confirmación de protección de Android", /* es-CR */
+ "Confirmación de protección de Android", /* es-DO */
+ "Confirmación de protección de Android", /* es-EC */
+ "Confirmación de protección de Android", /* es-GT */
+ "Confirmación de protección de Android", /* es-HN */
+ "Confirmación de protección de Android", /* es-MX */
+ "Confirmación de protección de Android", /* es-NI */
+ "Confirmación de protección de Android", /* es-PA */
+ "Confirmación de protección de Android", /* es-PE */
+ "Confirmación de protección de Android", /* es-PR */
+ "Confirmación de protección de Android", /* es-PY */
+ "Confirmación de protección de Android", /* es-SV */
+ "Confirmación de protección de Android", /* es-US */
+ "Confirmación de protección de Android", /* es-UY */
+ "Confirmación de protección de Android", /* es-VE */
+ "Androidi kaitstud kinnitus", /* et */
+ "Android-en babesa izatearen berrespena", /* eu */
+ "تأیید محافظتشده Android", /* fa */
+ "Vahvistus Android-suojauksesta", /* fi */
+ "Pagkumpirmang Pinoprotektahan ng Android", /* fil */
+ "Confirmation de protection Android", /* fr */
+ "Confirmation protégée Android", /* fr-CA */
+ "Confirmation de protection Android", /* fr-CH */
+ "Android Protected Confirmation", /* gl */
+ "Bestätigung für Android Protected", /* gsw */
+ "Android પ્રોટેક્ટેડ કન્ફર્મેશન", /* gu */
+ "Android Protected Confirmation", /* he */
+ "Android की ओर से सुरक्षा की पुष्टि", /* hi */
+ "Potvrda zaštite na Androidu", /* hr */
+ "Android – védett megerősítés", /* hu */
+ "Android Protected-ի հաստատում", /* hy */
+ "Konfirmasi yang Dilindungi Android", /* id */
+ "Konfirmasi yang Dilindungi Android", /* in */
+ "Varin staðfesting Android", /* is */
+ "Conferma Android Protected", /* it */
+ "Android Protected Confirmation", /* iw */
+ "Android Protected の確認", /* ja */
+ "Android-ის დაცული დადასტურება", /* ka */
+ "Android қорғалған растау", /* kk */
+ "ការបញ្ជាក់ដែលបានការពារ Android", /* km */
+ "Android ಸಂರಕ್ಷಿತ ದೃಢೀಕರಣ", /* kn */
+ "Android 보안 확인", /* ko */
+ "Android Protected ырастоосу", /* ky */
+ "Confirmation de protection Android", /* ln */
+ "ການຢືນຢັນ Android ທີ່ໄດ້ຮັບການປົກປ້ອງ", /* lo */
+ "„Android Protected“ patvirtinimas", /* lt */
+ "Android aizsargātā informācija", /* lv */
+ "Потврда за заштита на Android", /* mk */
+ "Android സംരക്ഷിത സ്ഥിരീകരണം", /* ml */
+ "Андройдоор хамгаалсан баталгаажуулалт", /* mn */
+ "Confirmare protecție pentru Android", /* mo */
+ "Android कडून सुरक्षा निश्चित करणे", /* mr */
+ "Pengesahan Dilindungi Android", /* ms */
+ "Android ကာကွယ်မှု အတည်ပြုချက်", /* my */
+ "Android-beskyttet bekreftelse", /* nb */
+ "Android द्वारा संरक्षण गरिएको पुष्टि", /* ne */
+ "Bevestiging van Android-beveiliging", /* nl */
+ "Android-beskyttet bekreftelse", /* no */
+ "Android ଦ୍ୱାରା ସୁରକ୍ଷିତ ହୋଇଥିବାର ସୁନିଶ୍ଚିତତା", /* or */
+ "Android ਵੱਲੋਂ ਸੁਰੱਖਿਆ ਦੀ ਪੁਸ਼ਟੀ", /* pa */
+ "Zabezpieczone potwierdzenie w Androidzie", /* pl */
+ "Confirmação protegida pelo Android", /* pt */
+ "Confirmação protegida pelo Android", /* pt-BR */
+ "Confirmação protegida do Android", /* pt-PT */
+ "Confirmare protecție pentru Android", /* ro */
+ "Подтверждение Android Protected", /* ru */
+ "Android ආරක්ෂිත තහවුරු කිරීම", /* si */
+ "Chránené potvrdenie Androidu", /* sk */
+ "Zaščitena potrditev v Androidu", /* sl */
+ "Android Protected Confirmation", /* sq */
+ "Потврда заштите на Android-у", /* sr */
+ "Potvrda zaštite na Android-u", /* sr-Latn */
+ "Bekräftelseskydd för Android", /* sv */
+ "Uthibitishaji Unaolindwa wa Android", /* sw */
+ "Android பாதுகாப்பு தொடர்பான உறுதிப்படுத்தல்", /* ta */
+ "Android సురక్షిత నిర్ధారణ", /* te */
+ "ยืนยันการป้องกัน Android", /* th */
+ "Pagkumpirmang Pinoprotektahan ng Android", /* tl */
+ "Android Korumalı Onayı", /* tr */
+ "Підтвердження Android Protected", /* uk */
+ "Android کی تحفظ یافتہ تصدیق", /* ur */
+ "Android Protected nomli tasdiq", /* uz */
+ "Xác nhận bảo vệ Android", /* vi */
+ "Android 保护确认", /* zh */
+ "Android 保护确认", /* zh-CN */
+ "Android 保護確認", /* zh-HK */
+ "Android Protected 確認", /* zh-TW */
+ "Ukuqinisekiswa okuvikelwe i-Android", /* zu */
+ }
+ },
+};
+
+#define ConfirmationUITranslations_NUM_TRANSLATION_IDS \
+ (ARRAY_ELEMENTS(ConfirmationUITranslations_translation_ids))
+
+static int ConfirmationUITranslations_selected_lang_id_index = 0;
+
+static int ConfirmationUITranslations_find_str(const char** haystack, const char* needle) {
+ for (int n = 0; haystack[n] != NULL; n++) {
+ if (strcmp(needle, haystack[n]) == 0) {
+ return n;
+ }
+ }
+ return -1;
+}
+
+#define MAX_LANG_ID_SIZE 256
+
+/* Non-static linkage to allow calling by the test. */
+int ConfirmationUITranslations_lang_id_match(const char** lang_ids, const char* lang_id) {
+ int ret;
+ char lang_id_buf[MAX_LANG_ID_SIZE + 1];
+ size_t n;
+
+ ret = ConfirmationUITranslations_find_str(lang_ids, lang_id);
+ if (ret >= 0) {
+ return ret;
+ }
+
+ /* strncpy.. */
+ for (n = 0; lang_id[n] != '\0' && n < MAX_LANG_ID_SIZE; n++) {
+ lang_id_buf[n] = lang_id[n];
+ }
+ lang_id_buf[n] = '\0';
+
+ while (n >= 1) {
+ /* Remove last component */
+ while (n >= 1 && lang_id_buf[n - 1] != '-') {
+ n--;
+ }
+ if (n < 1) {
+ return -1;
+ }
+ lang_id_buf[n - 1] = '\0';
+ n--;
+ ret = ConfirmationUITranslations_find_str(lang_ids, lang_id_buf);
+ if (ret >= 0) {
+ return ret;
+ }
+ }
+ return -1;
+}
+
+const char* ConfirmationUITranslations_select_lang_id(const char* lang_id) {
+ ConfirmationUITranslations_selected_lang_id_index = 0;
+ if (lang_id == NULL) {
+ return ConfirmationUITranslations_language_ids[0];
+ }
+
+ int ret = ConfirmationUITranslations_lang_id_match(ConfirmationUITranslations_language_ids, lang_id);
+ if (ret < 0) {
+ return ConfirmationUITranslations_language_ids[0];
+ }
+ ConfirmationUITranslations_selected_lang_id_index = ret;
+ return ConfirmationUITranslations_language_ids[ConfirmationUITranslations_selected_lang_id_index];
+}
+
+const char* ConfirmationUITranslations_lookup(const char* translation_id) {
+ for (size_t n = 0; n < ConfirmationUITranslations_NUM_TRANSLATION_IDS; n++) {
+ if (strcmp(translation_id, ConfirmationUITranslations_translation_ids[n].translation_id) == 0) {
+ const char* result;
+ if (ConfirmationUITranslations_selected_lang_id_index < 0 || ConfirmationUITranslations_selected_lang_id_index >= ConfirmationUITranslations_NUM_LANGUAGE_IDS) {
+ return ConfirmationUITranslations_translation_ids[n].translations[0];
+ }
+ result = ConfirmationUITranslations_translation_ids[n].translations[ConfirmationUITranslations_selected_lang_id_index];
+ if (result != NULL) {
+ return result;
+ }
+ return ConfirmationUITranslations_translation_ids[n].translations[0];
+ }
+ }
+ return NULL;
+}
+
+const char* const* ConfirmationUITranslations_get_languages(void) {
+ return (const char* const*) (ConfirmationUITranslations_language_ids);
+}
diff --git a/confirmationui/support/test/ConfirmationUITranslations-test.c b/confirmationui/support/test/ConfirmationUITranslations-test.c
new file mode 100644
index 0000000..a73a8af
--- /dev/null
+++ b/confirmationui/support/test/ConfirmationUITranslations-test.c
@@ -0,0 +1,1338 @@
+/*
+**
+** Copyright 2019, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+/* Generated by generate-translations.py - DO NOT EDIT */
+
+#include "ConfirmationUITranslations.h"
+#include "string.h"
+
+#include <stdio.h>
+
+#define ASSERT_STR(str1, str2) \
+ do { \
+ if (strcmp(str1, str2) != 0) { \
+ printf("%s:%d: Assertion failed: '%s' != '%s'\n", \
+ __FILE__, __LINE__, str1, str2); \
+ return 1; \
+ } \
+ } while (0)
+
+extern int ConfirmationUITranslations_lang_id_match(const char** lang_ids,
+ const char* lang_id);
+
+static const char* test_lang_id_match(const char* lang_ids[], const char* lang_id) {
+ int ret = ConfirmationUITranslations_lang_id_match(lang_ids, lang_id);
+ if (ret < 0) {
+ return "";
+ }
+ return lang_ids[ret];
+}
+
+int main(int argc, char* argv[]) {
+ /* Tests for untranslated languages */
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for languages without translation */
+ ConfirmationUITranslations_select_lang_id("nosuch-LA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for untranslated language (en) */
+ ConfirmationUITranslations_select_lang_id("en");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language af */
+ ConfirmationUITranslations_select_lang_id("af");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dubbeldruk aan/af-skakelaar om te bevestig");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Kanselleer");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Hierdie bevestiging verskaf 'n ekstra laag sekuriteit vir die handeling wat jy op die punt is om uit te voer.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Druk aan/af-skakelaar om te bevestig");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Druk enige volumeknoppie om te kanselleer");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Kanselleer");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android se Beskermde Bevestiging");
+
+ /* Tests for language am */
+ ConfirmationUITranslations_select_lang_id("am");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ለማረጋገጥ ኃይልን ሁለቴ ይጫኑ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ይቅር");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ይህ ማረጋገጫ እርስዎ ለሚወስዱት እርምጃ ተጨማሪ ትርፍ ጥበቃን ይሰጣል።");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ለማረጋገጥ ኃይልን ይጫኑ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ለመሰረዝ ማናቸውንም የድምፅ አዝራር ይጫኑ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ይቅር");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "በAndroid ጥበቃ የሚደረግለት ማረጋገጫ");
+
+ /* Tests for language ar */
+ ConfirmationUITranslations_select_lang_id("ar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "اضغط على زر التشغيل مرتين لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "اضغط على زر التشغيل لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأكيد حماية Android");
+
+ /* Tests for language ar-EG */
+ ConfirmationUITranslations_select_lang_id("ar-EG");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "اضغط على زر التشغيل مرتين لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "اضغط على زر التشغيل لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأكيد حماية Android");
+
+ /* Tests for language ar-JO */
+ ConfirmationUITranslations_select_lang_id("ar-JO");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "اضغط على زر التشغيل مرتين لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "اضغط على زر التشغيل لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأكيد حماية Android");
+
+ /* Tests for language ar-MA */
+ ConfirmationUITranslations_select_lang_id("ar-MA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "اضغط على زر التشغيل مرتين لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "اضغط على زر التشغيل لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأكيد حماية Android");
+
+ /* Tests for language ar-SA */
+ ConfirmationUITranslations_select_lang_id("ar-SA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "اضغط على زر التشغيل مرتين لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "يتيح هذا التأكيد تفعيل طبقة أمان إضافية للإجراء الذي توشك على اتخاذه.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "اضغط على زر التشغيل لتأكيد الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "اضغط على أي زر من أزرار مستوى الصوت لإلغاء الإجراء.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "إلغاء");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأكيد حماية Android");
+
+ /* Tests for language ar-XB */
+ ConfirmationUITranslations_select_lang_id("ar-XB");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language as */
+ ConfirmationUITranslations_select_lang_id("as");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "নিশ্চিত কৰিবলৈ পাৱাৰ বুটামটো দুবাৰ হেঁচক");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "বাতিল কৰক");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "এই প্ৰতিশ্ৰুতিয়ে আপুনি কৰিব বিচৰা কোনো কাৰ্যৰ বাবে অতিৰিক্ত সুৰক্ষা প্ৰদান কৰে।");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "নিশ্চিত কৰিবলৈ পাৱাৰ বুটাম হেঁচক");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "বাতিল কৰিবলৈ যিকোনো ভলিউম বুটাম হেঁচক");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "বাতিল কৰক");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Androidৰ সুৰক্ষা সম্পৰ্কীয় প্ৰতিশ্ৰুতি");
+
+ /* Tests for language az */
+ ConfirmationUITranslations_select_lang_id("az");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Təsdiqləmək üçün iki dəfə yandırıb-söndürmək düyməsinə basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Ləğv edin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Bu təsdiq etmək üzrə olduğunuz əməliyyat üçün əlavə təhlükəsizlik qatı təmin edir.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Təsdiq etmək üçün yandırıb-söndürmə düyməsinə basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Ləğv etmək üçün istənilən səs düyməsinə basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Ləğv edin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Qorunan Android Təsdiqi");
+
+ /* Tests for language be */
+ ConfirmationUITranslations_select_lang_id("be");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Двойчы націсніце кнопку сілкавання, каб пацвердзіць");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Скасаваць");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Гэта пацвярджэнне забяспечвае дадатковы ўзровень бяспекі для дзеянняў, якія вы збіраецеся выконваць.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Націсніце кнопку сілкавання, каб пацвердзіць");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Націсніце любую кнопку гучнасці, каб cкасаваць");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Скасаваць");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Пацвярджэнне Android Protected");
+
+ /* Tests for language bg */
+ ConfirmationUITranslations_select_lang_id("bg");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Натиснете два пъти бутона за захранване, за да потвърдите");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Отказ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Това потвърждение осигурява допълнителна защита за действието, което сте напът да предприемете.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Натиснете бутона за захранване, за да потвърдите");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Натиснете някой от бутоните за силата на звука, за да анулирате");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Отказ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Защитно потвърждение за Android");
+
+ /* Tests for language bn */
+ ConfirmationUITranslations_select_lang_id("bn");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "নিশ্চিত করতে পাওয়ার বোতাম দুবার টিপুন");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "বাতিল করুন");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "আপনি যে কাজটি করতে চলেছেন, এই কনফার্মেশনের ফলে সেটির জন্য অতিরিক্ত সুরক্ষার ব্যবস্থা করা হয়।");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "নিশ্চিত করতে পাওয়ার বোতাম টিপুন");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "বাতিল করতে ভলিউমের যেকোনও বোতাম টিপুন");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "বাতিল করুন");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android প্রোটেক্টেড কনফার্মেশন");
+
+ /* Tests for language bs */
+ ConfirmationUITranslations_select_lang_id("bs");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dva puta pritisnite dugme za napajanje da potvrdite");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ova potvrda pruža dodatni sloj zaštite za radnju koju namjeravate preduzeti.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pritisnite dugme za napajanje za potvrdu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pritisnite bilo koje dugme za podešavanje jačine zvuka da otkažete");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Potvrda zaštite na Androidu");
+
+ /* Tests for language ca */
+ ConfirmationUITranslations_select_lang_id("ca");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Prem dos cops el botó d'engegada per confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel·la");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Aquesta confirmació proporciona una capa de seguretat addicional per a l'acció que estàs a punt de dur a terme.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Prem el botó d'engegada per confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Prem qualsevol botó de volum per cancel·lar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel·la");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmació de protecció d'Android");
+
+ /* Tests for language cs */
+ ConfirmationUITranslations_select_lang_id("cs");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Potvrďte dvojitým stisknutím vypínače");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Zrušit");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Toto potvrzení tvoří dodatečnou úroveň zabezpečení akce, kterou se chystáte podniknout.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Potvrďte stisknutím vypínače");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zrušte stisknutím tlačítka hlasitosti");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Zrušit");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Potvrzení ochrany Androidu");
+
+ /* Tests for language da */
+ ConfirmationUITranslations_select_lang_id("da");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Tryk to gange på afbryderknappen for at bekræfte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuller");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Denne bekræftelse giver et ekstra beskyttelsesniveau for den handling, du er ved at foretage.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Tryk på afbryderknappen for at bekræfte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Tryk på en af lydstyrkeknapperne for at annullere");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuller");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Beskyttet bekræftelse i Android");
+
+ /* Tests for language de */
+ ConfirmationUITranslations_select_lang_id("de");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Drücke zum Bestätigen die Ein-/Aus-Taste");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zum Abbrechen eine beliebige Lautstärketaste drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bestätigung für Android Protected");
+
+ /* Tests for language de-AT */
+ ConfirmationUITranslations_select_lang_id("de-AT");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Drücke zum Bestätigen die Ein-/Aus-Taste");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zum Abbrechen eine beliebige Lautstärketaste drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bestätigung für Android Protected");
+
+ /* Tests for language de-CH */
+ ConfirmationUITranslations_select_lang_id("de-CH");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmassnahme angewandt.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Drücke zum Bestätigen die Ein-/Aus-Taste");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zum Abbrechen eine beliebige Lautstärketaste drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bestätigung für Android Protected");
+
+ /* Tests for language el */
+ ConfirmationUITranslations_select_lang_id("el");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Πατήστε δύο φορές το κουμπί λειτουργίας για επιβεβαίωση");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Ακύρωση");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Αυτή η επιβεβαίωση παρέχει ένα επιπλέον επίπεδο ασφάλειας για την ενέργεια που πρόκειται να εκτελέσετε.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Πατήστε το κουμπί λειτουργίας για επιβεβαίωση");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Πατήστε οποιοδήποτε κουμπί έντασης ήχου για ακύρωση");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Ακύρωση");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Επιβεβαίωση προστασίας Android");
+
+ /* Tests for language en-AU */
+ ConfirmationUITranslations_select_lang_id("en-AU");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-CA */
+ ConfirmationUITranslations_select_lang_id("en-CA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-GB */
+ ConfirmationUITranslations_select_lang_id("en-GB");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-IE */
+ ConfirmationUITranslations_select_lang_id("en-IE");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-IN */
+ ConfirmationUITranslations_select_lang_id("en-IN");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-SG */
+ ConfirmationUITranslations_select_lang_id("en-SG");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-XA */
+ ConfirmationUITranslations_select_lang_id("en-XA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "[Ðöûбļé-þŕéšš þöŵéŕ ţö çöñƒîŕm one two three four five six seven]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "[Çåñçéļ one]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "[Ţĥîš çöñƒîŕmåţîöñ þŕövîðéš åñ éxţŕå ļåýéŕ öƒ šéçûŕîţý ƒöŕ ţĥé åçţîöñ ýöû'ŕé åбöûţ ţö ţåķé. one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "[Þŕéšš þöŵéŕ ţö çöñƒîŕm one two three four five]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "[Þŕéšš åñý vöļûmé бûţţöñ ţö çåñçéļ one two three four five six seven]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "[Çåñçéļ one]");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "[Åñðŕöîð Þŕöţéçţéð Çöñƒîŕmåţîöñ one two three four]");
+
+ /* Tests for language en-XC */
+ ConfirmationUITranslations_select_lang_id("en-XC");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language en-ZA */
+ ConfirmationUITranslations_select_lang_id("en-ZA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Double-press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "This confirmation provides an extra layer of security for the action that you're about to take.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Press power to confirm");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Press any volume button to cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancel");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language es */
+ ConfirmationUITranslations_select_lang_id("es");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Pulsa dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona una capa de seguridad adicional a la acción que vas a realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pulsa el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pulsa cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación protegida por Android");
+
+ /* Tests for language es-419 */
+ ConfirmationUITranslations_select_lang_id("es-419");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-AR */
+ ConfirmationUITranslations_select_lang_id("es-AR");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-BO */
+ ConfirmationUITranslations_select_lang_id("es-BO");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-CL */
+ ConfirmationUITranslations_select_lang_id("es-CL");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-CO */
+ ConfirmationUITranslations_select_lang_id("es-CO");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-CR */
+ ConfirmationUITranslations_select_lang_id("es-CR");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-DO */
+ ConfirmationUITranslations_select_lang_id("es-DO");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-EC */
+ ConfirmationUITranslations_select_lang_id("es-EC");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-GT */
+ ConfirmationUITranslations_select_lang_id("es-GT");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-HN */
+ ConfirmationUITranslations_select_lang_id("es-HN");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-MX */
+ ConfirmationUITranslations_select_lang_id("es-MX");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-NI */
+ ConfirmationUITranslations_select_lang_id("es-NI");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-PA */
+ ConfirmationUITranslations_select_lang_id("es-PA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-PE */
+ ConfirmationUITranslations_select_lang_id("es-PE");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-PR */
+ ConfirmationUITranslations_select_lang_id("es-PR");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-PY */
+ ConfirmationUITranslations_select_lang_id("es-PY");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-SV */
+ ConfirmationUITranslations_select_lang_id("es-SV");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-US */
+ ConfirmationUITranslations_select_lang_id("es-US");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-UY */
+ ConfirmationUITranslations_select_lang_id("es-UY");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language es-VE */
+ ConfirmationUITranslations_select_lang_id("es-VE");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Presiona dos veces el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona un nivel de seguridad adicional para la acción que estás por realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Presiona el botón de encendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Presiona cualquier botón de volumen para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmación de protección de Android");
+
+ /* Tests for language et */
+ ConfirmationUITranslations_select_lang_id("et");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Kinnitamiseks topeltvajutage toitenuppu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Tühista");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "See kinnitus annab veel ühe turvakihi toimingu puhul, mille nüüd teete.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Kinnitamiseks vajutage toitenuppu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Tühistamiseks vajutage mis tahes helitugevuse nuppu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Tühista");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Androidi kaitstud kinnitus");
+
+ /* Tests for language eu */
+ ConfirmationUITranslations_select_lang_id("eu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Berresteko, sakatu birritan pizteko botoia");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Utzi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Berrespen honek segurtasun handiagoa ematen dizu hurrengo ekintza gauzatzeko.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Berresteko, sakatu etengailua");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Bertan behera uzteko, sakatu bolumen-tekla bat");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Utzi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android-en babesa izatearen berrespena");
+
+ /* Tests for language fa */
+ ConfirmationUITranslations_select_lang_id("fa");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "برای تأیید، دکمه روشن/خاموش را دوبار فشار دهید");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "لغو");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "این تأیید یک لایه امنیتی اضافی برای کنشی که میخواهید انجام دهید فراهم میکند.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "برای تأیید، دکمه روشن/خاموش را فشار دهید");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "برای لغو، یکی از دکمههای میزان صدا را فشار دهید");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "لغو");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "تأیید محافظتشده Android");
+
+ /* Tests for language fi */
+ ConfirmationUITranslations_select_lang_id("fi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Vahvista painamalla virtapainiketta kahdesti");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Peruuta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Tämä vahvistus tarkoittaa, että seuraava toimintosi on entistä paremmin suojattu.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Vahvista painamalla virtapainiketta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Peruuta painamalla äänenvoimakkuuspainiketta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Peruuta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Vahvistus Android-suojauksesta");
+
+ /* Tests for language fil */
+ ConfirmationUITranslations_select_lang_id("fil");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Pindutin nang dalawang beses ang power para kumpirmahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ang pagkumpirmang ito ay nagbibigay ng karagdagang layer ng seguridad para sa pagkilos na gagawin mo.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pindutin ang power para kumpirmahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pindutin ang anumang button ng volume para kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Pagkumpirmang Pinoprotektahan ng Android");
+
+ /* Tests for language fr */
+ ConfirmationUITranslations_select_lang_id("fr");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Appuyez sur l'un des boutons de volume pour annuler l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmation de protection Android");
+
+ /* Tests for language fr-CA */
+ ConfirmationUITranslations_select_lang_id("fr-CA");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Appuyez deux fois sur l'interrupteur pour confirmer");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Cette confirmation fournit une couche supplémentaire de sécurité pour l'action que vous êtes sur le point d'effectuer.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Appuyez sur l'interrupteur pour confirmer");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Appuyez sur un bouton de volume pour annuler l'action");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmation protégée Android");
+
+ /* Tests for language fr-CH */
+ ConfirmationUITranslations_select_lang_id("fr-CH");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Appuyez sur l'un des boutons de volume pour annuler l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmation de protection Android");
+
+ /* Tests for language gl */
+ ConfirmationUITranslations_select_lang_id("gl");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Preme o botón de acendido dúas veces para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmación proporciona unha capa adicional de seguranza para a acción que estás a piques de levar a cabo.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Preme o botón de acendido para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Preme calquera botón de volume para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language gsw */
+ ConfirmationUITranslations_select_lang_id("gsw");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Zum Bestätigen die Ein-/Aus-Taste zweimal drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Durch die Bestätigung wird bei der Aktion, die du durchführen möchtest, eine zusätzliche Sicherheitsmaßnahme angewandt.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Drücke zum Bestätigen die Ein-/Aus-Taste");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zum Abbrechen eine beliebige Lautstärketaste drücken");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Abbrechen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bestätigung für Android Protected");
+
+ /* Tests for language gu */
+ ConfirmationUITranslations_select_lang_id("gu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "કન્ફર્મ કરવા માટે પાવર પર બે વાર ટૅપ કરો");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "રદ કરો");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "તમે જે ક્રિયા કરવાના છો તેના માટે આ કન્ફર્મેશન એક અતિરિક્ત સુરક્ષાનું સ્તર પ્રદાન કરે છે.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "કન્ફર્મ કરવા માટે પાવર બટન દબાવો");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "રદ કરવા માટે કોઈપણ વૉલ્યૂમનું બટન દબાવો");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "રદ કરો");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android પ્રોટેક્ટેડ કન્ફર્મેશન");
+
+ /* Tests for language he */
+ ConfirmationUITranslations_select_lang_id("he");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "יש ללחוץ פעמיים על לחצן ההפעלה כדי לאשר");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ביטול");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "אישור זה מספק שכבת אבטחה נוספת לפעולה שאתה עומד לבצע.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "יש ללחוץ על לחצן ההפעלה כדי לאשר");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "יש ללחוץ על לחצן כלשהו של עוצמת הקול כדי לבטל");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ביטול");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language hi */
+ ConfirmationUITranslations_select_lang_id("hi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "पुष्टि करने के लिए पावर बटन दो बार दबाएं");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "रद्द करें");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "यह पुष्टि मिलने पर आप जो काम करने वाले हैं, उसके लिए सुरक्षा और बढ़ जाती है.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "पुष्टि करने के लिए पावर बटन दबाएं");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "रद्द करने के लिए कोई भी वॉल्यूम बटन दबाएं");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "रद्द करें");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android की ओर से सुरक्षा की पुष्टि");
+
+ /* Tests for language hr */
+ ConfirmationUITranslations_select_lang_id("hr");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dvaput pritisnite tipku za uključivanje/isključivanje da biste potvrdili");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ta potvrda pruža dodatan sloj zaštite za radnju koju ćete izvršiti.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pritisnite tipku za uključivanje/isključivanje da biste potvrdili");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pritisnite bilo koju tipku za glasnoću da biste otkazali");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Potvrda zaštite na Androidu");
+
+ /* Tests for language hu */
+ ConfirmationUITranslations_select_lang_id("hu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "A megerősítéshez nyomja meg duplán a bekapcsológombot");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Mégse");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ez a megerősítés extra réteg biztonságot nyújt a végrehajtani kívánt művelet számára.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Nyomja meg a bekapcsológombot a megerősítéshez");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Nyomja meg valamelyik hangerőgombot az elvetéshez");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Mégse");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android – védett megerősítés");
+
+ /* Tests for language hy */
+ ConfirmationUITranslations_select_lang_id("hy");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Հաստատելու համար կրկնակի սեղմեք սնուցման կոճակը");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Չեղարկել");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Այս հաստատումն ապահովում է պաշտպանության լրացուցիչ մակարդակ՝ նախքան գործողություն կատարելը");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Հաստատելու համար սեղմեք սնուցման կոճակը");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Չեղարկելու համար սեղմեք ձայնի կագավորման որևէ կոճակ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Չեղարկել");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected-ի հաստատում");
+
+ /* Tests for language id */
+ ConfirmationUITranslations_select_lang_id("id");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Tekan dua kali tombol power untuk mengonfirmasi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Konfirmasi ini memberikan lapisan keamanan tambahan untuk tindakan yang akan Anda ambil.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Tekan tombol power untuk mengonfirmasi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Tekan tombol volume apa saja untuk membatalkan");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Konfirmasi yang Dilindungi Android");
+
+ /* Tests for language in */
+ ConfirmationUITranslations_select_lang_id("in");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Tekan dua kali tombol power untuk mengonfirmasi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Konfirmasi ini memberikan lapisan keamanan tambahan untuk tindakan yang akan Anda ambil.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Tekan tombol power untuk mengonfirmasi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Tekan tombol volume apa saja untuk membatalkan");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Konfirmasi yang Dilindungi Android");
+
+ /* Tests for language is */
+ ConfirmationUITranslations_select_lang_id("is");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Ýttu tvisvar á aflrofann til að staðfesta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Hætta við");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Þessi staðfesting veitir aukið öryggi fyrir aðgerðina sem þú ert að fara að framkvæma.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Ýttu á aflrofann til að staðfesta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Ýttu á hvaða hljóðstyrkshnapp sem er til að hætta við");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Hætta við");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Varin staðfesting Android");
+
+ /* Tests for language it */
+ ConfirmationUITranslations_select_lang_id("it");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Premi due volte il tasto di accensione per confermare");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annulla");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Questa conferma garantisce un ulteriore livello di sicurezza per l'azione che stai per compiere.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Premi il tasto di accensione per confermare");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Premi qualsiasi pulsante del volume per annullare");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annulla");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Conferma Android Protected");
+
+ /* Tests for language iw */
+ ConfirmationUITranslations_select_lang_id("iw");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "יש ללחוץ פעמיים על לחצן ההפעלה כדי לאשר");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ביטול");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "אישור זה מספק שכבת אבטחה נוספת לפעולה שאתה עומד לבצע.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "יש ללחוץ על לחצן ההפעלה כדי לאשר");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "יש ללחוץ על לחצן כלשהו של עוצמת הקול כדי לבטל");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ביטול");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language ja */
+ ConfirmationUITranslations_select_lang_id("ja");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "確認するには、電源を 2 回押します");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "キャンセル");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "この確認により、これから行う操作のセキュリティが強化されます。");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "確認するには、電源を押します");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "キャンセルするには、いずれかの音量ボタンを押します");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "キャンセル");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected の確認");
+
+ /* Tests for language ka */
+ ConfirmationUITranslations_select_lang_id("ka");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "დასადასტურებლად ორმაგად დააჭირეთ ჩართვის ღილაკს");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "გაუქმება");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "დადასტურება უსაფრთხოების დამატებით შრეს უზრუნველყოფს იმ ქმედების განსახორციელებლად, რომელსაც აპირებთ.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "დასადასტურებლად დააჭირეთ ჩართვის ღილაკს");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "გასაუქმებლად დააჭირეთ ხმის რეგულირების ნებისმიერ ღილაკს");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "გაუქმება");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android-ის დაცული დადასტურება");
+
+ /* Tests for language kk */
+ ConfirmationUITranslations_select_lang_id("kk");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Растау үшін қуат түймесін екі рет басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Бас тарту");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Бұл растау функциясы орындағалы тұрған әрекеттің қауіпсіздігін қосымша күшейтеді.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Растау үшін қуат түймесін басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Бас тарту үшін кез келген дыбыс деңгейі түймесін басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Бас тарту");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android қорғалған растау");
+
+ /* Tests for language km */
+ ConfirmationUITranslations_select_lang_id("km");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ចុចប៊ូតុងថាមពលពីរដងដើម្បីបញ្ជាក់");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "បោះបង់");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ការបញ្ជាក់នេះផ្ដល់ស្រទាប់សុវត្ថិភាពបន្ថែមសម្រាប់សកម្មភាពដែលអ្នកហៀបនឹងធ្វើ។");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ចុចប៊ូតុងថាមពលដើម្បីបញ្ជាក់");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ចុចប៊ូតុងកម្រិតសំឡេងណាមួយដើម្បីបោះបង់");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "បោះបង់");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "ការបញ្ជាក់ដែលបានការពារ Android");
+
+ /* Tests for language kn */
+ ConfirmationUITranslations_select_lang_id("kn");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ದೃಢೀಕರಿಸಲು ಪವರ್ ಬಟನ್ ಅನ್ನು ಎರಡು ಬಾರಿ ಒತ್ತಿರಿ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ರದ್ದು");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ಈ ದೃಢೀಕರಣವು ನೀವು ನಿರ್ವಹಿಸಲು ಬಯಸುವ ಕ್ರಿಯೆಗೆ ಹೆಚ್ಚುವರಿ ಸುರಕ್ಷತೆಯನ್ನು ಒದಗಿಸುತ್ತದೆ.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ದೃಢೀಕರಿಸಲು ಪವರ್ ಬಟನ್ ಒತ್ತಿರಿ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ರದ್ದುಗೊಳಿಸಲು ಯಾವುದೇ ವಾಲ್ಯೂಮ್ ಬಟನ್ ಒತ್ತಿರಿ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ರದ್ದು");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android ಸಂರಕ್ಷಿತ ದೃಢೀಕರಣ");
+
+ /* Tests for language ko */
+ ConfirmationUITranslations_select_lang_id("ko");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "확인하려면 전원 버튼을 두 번 누르세요.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "취소");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "이 확인 단계를 사용하면 실행하려는 작업의 보안을 한층 강화할 수 있습니다.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "확인하려면 전원 버튼을 누르세요.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "취소하려면 볼륨 버튼 중 하나를 누르세요.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "취소");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android 보안 확인");
+
+ /* Tests for language ky */
+ ConfirmationUITranslations_select_lang_id("ky");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Ырастоо үчүн \"Кубат\" баскычын эки жолу басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Жокко чыгаруу");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Бул ырастоо сиз аткара турган аракеттин коопсуздугун коргоонун дагы бир катмарын камсыздайт.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Ырастоо үчүн \"Кубат\" баскычын басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Жокко чыгаруу үчүн үн көлөмүнүн баскычтарынын бирин басыңыз");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Жокко чыгаруу");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected ырастоосу");
+
+ /* Tests for language ln */
+ ConfirmationUITranslations_select_lang_id("ln");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Appuyez deux fois sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Cette confirmation ajoute un niveau de sécurité supplémentaire à l'action que vous êtes sur le point d'effectuer.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Appuyez sur le bouton Marche/Arrêt pour confirmer l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Appuyez sur l'un des boutons de volume pour annuler l'opération");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuler");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmation de protection Android");
+
+ /* Tests for language lo */
+ ConfirmationUITranslations_select_lang_id("lo");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ກົດປຸ່ມປິດເປີດເຄື່ອງສອງຄັ້ງເພື່ອຢືນຢັນ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ຍົກເລີກ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ການຢືນຢັນນີ້ຈະເພີ່ມຄວາມປອດໄພເພີ່ມເຕີມອີກໜຶ່ງຊັ້ນໃຫ້ກັບຄຳສັ່ງທີ່ທ່ານກຳລັງຈະໃຊ້.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ກົດປຸ່ມເປີດປິດເພື່ອຢືນຢັນ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ກົດປຸ່ມສຽງຂຶ້ນ ຫຼື ລົງເພື່ອຍົກເລີກ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ຍົກເລີກ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "ການຢືນຢັນ Android ທີ່ໄດ້ຮັບການປົກປ້ອງ");
+
+ /* Tests for language lt */
+ ConfirmationUITranslations_select_lang_id("lt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dukart paspauskite maitinimo mygtuką, kad patvirtintumėte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Atšaukti");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Naudojant šį patvirtinimą, veiksmui, kurį ketinate atlikti, taikomas papildomas saugos lygmuo.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Paspauskite maitinimo mygtuką, kad patvirtintumėte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Paspauskite bet kurį garsumo mygtuką, kad atšauktumėte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Atšaukti");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "„Android Protected“ patvirtinimas");
+
+ /* Tests for language lv */
+ ConfirmationUITranslations_select_lang_id("lv");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Lai apstiprinātu, divreiz nospiediet barošanas pogu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Atcelt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Šis apstiprinājums sniedz papildu aizsardzību darbībai, kuru veiksiet.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Lai apstiprinātu, nospiediet barošanas pogu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Lai atceltu, nospiediet jebkuru skaļuma pogu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Atcelt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android aizsargātā informācija");
+
+ /* Tests for language mk */
+ ConfirmationUITranslations_select_lang_id("mk");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Притиснете на копчето за напојување двапати за да потврдите");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Откажи");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Оваа потврда обезбедува дополнителен слој на безбедност за дејството што ќе го преземете.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Притиснете на копчето за напојување за да потврдите");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Притиснете на кое било копче за јачина на звук за да откажете");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Откажи");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Потврда за заштита на Android");
+
+ /* Tests for language ml */
+ ConfirmationUITranslations_select_lang_id("ml");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "സ്ഥിരീകരിക്കാൻ പവർ രണ്ടുതവണ അമർത്തുക");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "റദ്ദാക്കുക");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "നിങ്ങൾ സ്വീകരിക്കാൻ പോകുന്ന നടപടിക്കായി, ഈ സ്ഥിരീകരണം ഒരു അധിക സുരക്ഷാ പാളി നൽകുന്നു.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "സ്ഥിരീകരിക്കാൻ പവർ അമർത്തുക");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "റദ്ദാക്കാൻ എതെങ്കിലും വോളിയം ബട്ടൺ അമർത്തുക");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "റദ്ദാക്കുക");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android സംരക്ഷിത സ്ഥിരീകരണം");
+
+ /* Tests for language mn */
+ ConfirmationUITranslations_select_lang_id("mn");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Баталгаажуулахын тулд унтраах/асаахыг хоёр удаа дарах");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Болих");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Энэ баталгаажуулалт нь таны авах гэж буй арга хэмжээнд хамгаалалтын нэмэлт давхаргыг олгодог.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Баталгаажуулахын тулд унтраах/асаахыг дарах");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Болихын тулд дууны түвшний товчлуурын аль нэгийг нь дарах");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Болих");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Андройдоор хамгаалсан баталгаажуулалт");
+
+ /* Tests for language mo */
+ ConfirmationUITranslations_select_lang_id("mo");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Apăsați de două ori butonul de pornire pentru a confirma");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Anulați");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Această confirmare oferă un nivel suplimentar de securitate pentru acțiunea pe care urmează să o faceți.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Apăsați butonul de pornire pentru a confirma");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Apăsați orice buton de volum pentru a anula");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Anulați");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmare protecție pentru Android");
+
+ /* Tests for language mr */
+ ConfirmationUITranslations_select_lang_id("mr");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "खात्री करण्यासाठी पॉवर बटण दोनदा दाबा");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "रद्द करा");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "हे निश्चित झाल्यावर, तुम्ही जे काम करणार आहात, त्यासाठी सुरक्षा आणखी वाढते.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "निश्चित करण्यासाठी पॉवर दाबा");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "रद्द करण्यासाठी कोणतेही व्हॉल्यूम बटण दाबा");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "रद्द करा");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android कडून सुरक्षा निश्चित करणे");
+
+ /* Tests for language ms */
+ ConfirmationUITranslations_select_lang_id("ms");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Tekan dua kali butang kuasa untuk mengesahkan");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Pengesahan ini memberikan lapisan keselamatan tambahan untuk tindakan yang akan anda ambil.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Tekan kuasa untuk mengesahkan");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Tekan sebarang butang kelantangan untuk membatalkan tindakan");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Batal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Pengesahan Dilindungi Android");
+
+ /* Tests for language my */
+ ConfirmationUITranslations_select_lang_id("my");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "အတည်ပြုရန် ပါဝါခလုတ်ကို နှစ်ချက်နှိပ်ပါ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "မလုပ်တော့");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ဤအတည်ပြုချက်က သင်ပြုလုပ်တော့မည့် လုပ်ဆောင်ချက်အတွက် အပိုဆောင်းလုံခြုံရေးကို ပေးထားသည်။");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "အတည်ပြုရန် ပါဝါခလုတ်နှိပ်ပါ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ပယ်ဖျက်ရန် အသံအတိုးအကျယ်ခလုတ် တစ်ခုခုကိုနှိပ်ပါ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "မလုပ်တော့");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android ကာကွယ်မှု အတည်ပြုချက်");
+
+ /* Tests for language nb */
+ ConfirmationUITranslations_select_lang_id("nb");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dobbelttrykk på av/på-knappen for å bekrefte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Denne bekreftelsen gir et ekstra sikkerhetslag for handlingen du er i ferd med å utføre.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Trykk på av/på-knappen for å bekrefte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Trykk på en volumknapp for å avbryte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android-beskyttet bekreftelse");
+
+ /* Tests for language ne */
+ ConfirmationUITranslations_select_lang_id("ne");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "पुष्टि गर्न पावर बटनमा दुई पटक थिच्नुहोस्");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "रद्द गर्नुहोस्");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "यो पुष्टिले तपाईंले गर्न ऑंट्नुभएको कारबाहीका लागि सुरक्षाको अतिरिक्त तह प्रदान गर्छ।");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "पुष्टि गर्न पावर बटनमा थिच्नुहोस्");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "रद्द गर्नका लागि कुनै भोल्युम बटन थिच्नुहोस्");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "रद्द गर्नुहोस्");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android द्वारा संरक्षण गरिएको पुष्टि");
+
+ /* Tests for language nl */
+ ConfirmationUITranslations_select_lang_id("nl");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Druk twee keer op de aan/uit-knop om te bevestigen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Annuleren");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Deze bevestiging biedt een extra beveiligingslaag voor de actie die je wilt uitvoeren.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Druk op de aan/uit-knop om te bevestigen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Druk op een volumeknop om te annuleren");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Annuleren");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bevestiging van Android-beveiliging");
+
+ /* Tests for language no */
+ ConfirmationUITranslations_select_lang_id("no");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dobbelttrykk på av/på-knappen for å bekrefte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Denne bekreftelsen gir et ekstra sikkerhetslag for handlingen du er i ferd med å utføre.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Trykk på av/på-knappen for å bekrefte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Trykk på en volumknapp for å avbryte");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android-beskyttet bekreftelse");
+
+ /* Tests for language or */
+ ConfirmationUITranslations_select_lang_id("or");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ସୁନିଶ୍ଚିତ କରିବା ପାଇଁ ପାୱାର୍ ବଟନ୍କୁ ଦୁଇଥର ଦବାନ୍ତୁ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "କ୍ୟାନ୍ସଲ୍ କରନ୍ତୁ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ଏହି ସୁନିଶ୍ଚିତତା, ଆପଣ କରିବାକୁ ଯାଉଥିବା କାର୍ଯ୍ୟ ପାଇଁ ଅତିରିକ୍ତ ସୁରକ୍ଷା ପରତ ପ୍ରଦାନ କରିଥାଏ।");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ସୁନିଶ୍ଚିତ କରିବା ପାଇଁ ପାୱର୍ ବଟନ୍କୁ ଦାବନ୍ତୁ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "କ୍ୟାନ୍ସଲ୍ କରିବା ପାଇଁ ଯେକୌଣସି ଭଲ୍ୟୁମ୍ ବଟନ୍କୁ ଦାବନ୍ତୁ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "କ୍ୟାନ୍ସଲ୍ କରନ୍ତୁ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android ଦ୍ୱାରା ସୁରକ୍ଷିତ ହୋଇଥିବାର ସୁନିଶ୍ଚିତତା");
+
+ /* Tests for language pa */
+ ConfirmationUITranslations_select_lang_id("pa");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "ਪੁਸ਼ਟੀ ਕਰਨ ਲਈ ਪਾਵਰ ਬਟਨ ਨੂੰ ਦੋ ਬਾਰ ਦੱਬੋ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ਰੱਦ ਕਰੋ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ਇਹ ਪੁਸ਼ਟੀਕਰਨ ਤੁਹਾਡੇ ਵੱਲੋਂ ਕਾਰਵਾਈ ਨੂੰ ਕੀਤੇ ਜਾਣ ਲਈ ਸੁਰੱਖਿਆ ਦੇ ਇੱਕ ਵਾਧੂ ਪੱਧਰ ਮੁਹੱਈਆ ਕਰਦੀ ਹੈ।");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "ਪੁਸ਼ਟੀ ਕਰਨ ਲਈ ਪਾਵਰ ਬਟਨ ਦਬਾਓ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ਰੱਦ ਕਰਨ ਲਈ ਕਿਸੇ ਵੀ ਵੌਲਿਊਮ ਬਟਨ ਨੂੰ ਦਬਾਓ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ਰੱਦ ਕਰੋ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android ਵੱਲੋਂ ਸੁਰੱਖਿਆ ਦੀ ਪੁਸ਼ਟੀ");
+
+ /* Tests for language pl */
+ ConfirmationUITranslations_select_lang_id("pl");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Kliknij dwukrotnie przycisk zasilania, by potwierdzić");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Anuluj");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "To potwierdzenie stanowi dodatkowe zabezpieczenie czynności, którą zamierzasz wykonać.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Naciśnij przycisk zasilania, aby potwierdzić");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Naciśnij dowolny przycisk głośności, aby anulować");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Anuluj");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Zabezpieczone potwierdzenie w Androidzie");
+
+ /* Tests for language pt */
+ ConfirmationUITranslations_select_lang_id("pt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Pressione o botão liga/desliga duas vezes para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Essa confirmação oferece uma camada adicional de segurança para a ação que você está prestes a realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pressione o botão liga/desliga para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pressione um dos botões de volume para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmação protegida pelo Android");
+
+ /* Tests for language pt-BR */
+ ConfirmationUITranslations_select_lang_id("pt-BR");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Pressione o botão liga/desliga duas vezes para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Essa confirmação oferece uma camada adicional de segurança para a ação que você está prestes a realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pressione o botão liga/desliga para confirmar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pressione um dos botões de volume para cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmação protegida pelo Android");
+
+ /* Tests for language pt-PT */
+ ConfirmationUITranslations_select_lang_id("pt-PT");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Prima duas vezes ligar/desligar para confirmar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Esta confirmação oferece um nível extra de segurança para a ação que está prestes a realizar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Prima ligar/desligar para confirmar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Prima qualquer botão de volume para cancelar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Cancelar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmação protegida do Android");
+
+ /* Tests for language ro */
+ ConfirmationUITranslations_select_lang_id("ro");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Apăsați de două ori butonul de pornire pentru a confirma");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Anulați");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Această confirmare oferă un nivel suplimentar de securitate pentru acțiunea pe care urmează să o faceți.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Apăsați butonul de pornire pentru a confirma");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Apăsați orice buton de volum pentru a anula");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Anulați");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Confirmare protecție pentru Android");
+
+ /* Tests for language ru */
+ ConfirmationUITranslations_select_lang_id("ru");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Для подтверждения дважды нажмите кнопку питания.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Отмена");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Дополнительный уровень защиты для действия, которое вы собираетесь выполнить.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Для подтверждения нажмите кнопку питания.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Для отмены нажмите на любую кнопку регулировки громкости.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Отмена");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Подтверждение Android Protected");
+
+ /* Tests for language si */
+ ConfirmationUITranslations_select_lang_id("si");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "තහවුරු කිරීමට බල බොත්තම දෙවරක් ඔබන්න");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "අවලංගු කරන්න");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "මෙම තහවුරු කිරිම ඔබ ගැනීමට යන ක්රියාමාර්ගය සඳහා ආරක්ෂාව පිළිබඳ අමතර ස්තරයක් සපයයි.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "තහවුරු කිරීමට බල බොත්තම ඔබන්න");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "අවලංගු කිරීමට ඕනෑම හඬ පරිමා බොත්තමක් ඔබන්න");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "අවලංගු කරන්න");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android ආරක්ෂිත තහවුරු කිරීම");
+
+ /* Tests for language sk */
+ ConfirmationUITranslations_select_lang_id("sk");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Potvrďte dvojitým stlačením vypínača");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Zrušiť");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Toto potvrdenie zaistí dodatočnú úroveň zabezpečenia akcie, ktorú sa chystáte vykonať.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Potvrďte stlačením vypínača");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Zrušte stlačením ľubovoľného tlačidla hlasitosti");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Zrušiť");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Chránené potvrdenie Androidu");
+
+ /* Tests for language sl */
+ ConfirmationUITranslations_select_lang_id("sl");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dvakrat pritisnite za potrditev");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Prekliči");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ta potrditev zagotavlja dodatno plast zaščite za dejanje, ki ga boste izvedli.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Za potrditev pritisnite gumb za vklop");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Za preklic pritisnite poljuben gumb za glasnost");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Prekliči");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Zaščitena potrditev v Androidu");
+
+ /* Tests for language sq */
+ ConfirmationUITranslations_select_lang_id("sq");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Shtyp dy herë butonin e energjisë për të konfirmuar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Anulo");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Konfirmim ofron një shtresë sigurie shtesë për veprimin që je gati për të ndërmarrë.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Shtyp butonin e energjisë për të konfirmuar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Shtyp çdo buton volumi për ta anuluar");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Anulo");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected Confirmation");
+
+ /* Tests for language sr */
+ ConfirmationUITranslations_select_lang_id("sr");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Двапут притисните дугме за напајање да бисте потврдили");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Откажи");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ова потврда пружа додатни слој безбедности за радњу коју се спремате да извршите.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Притисните дугме за напајање да бисте потврдили");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Притисните било које дугме за јачину звука да бисте отказали");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Откажи");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Потврда заштите на Android-у");
+
+ /* Tests for language sr-Latn */
+ ConfirmationUITranslations_select_lang_id("sr-Latn");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Dvaput pritisnite dugme za napajanje da biste potvrdili");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ova potvrda pruža dodatni sloj bezbednosti za radnju koju se spremate da izvršite.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pritisnite dugme za napajanje da biste potvrdili");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pritisnite bilo koje dugme za jačinu zvuka da biste otkazali");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Otkaži");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Potvrda zaštite na Android-u");
+
+ /* Tests for language sv */
+ ConfirmationUITranslations_select_lang_id("sv");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Bekräfta genom att trycka två gånger på avstängningsknappen");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Bekräftelsen ger extra skydd för åtgärden du ska vidta.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Bekräfta genom att trycka på strömbrytaren");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Avbryt genom att trycka på valfri volymknapp");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Avbryt");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Bekräftelseskydd för Android");
+
+ /* Tests for language sw */
+ ConfirmationUITranslations_select_lang_id("sw");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Bonyeza kitufe cha kuwasha mara mbili ili uthibitishe");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Ghairi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Uthibitishaji huu hutoa ulinzi zaidi wa usalama kwa hatua unayotaka kuchukua.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Bonyeza kitufe cha kuwasha ili uthibitishe");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Bonyeza kitufe chochote cha sauti ili ughairi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Ghairi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Uthibitishaji Unaolindwa wa Android");
+
+ /* Tests for language ta */
+ ConfirmationUITranslations_select_lang_id("ta");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "உறுதிப்படுத்த, பவர் பட்டனை இருமுறை அழுத்தவும்");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ரத்துசெய்");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "நீங்கள் மேற்கொள்ளவிருக்கும் செயலுக்கு, கூடுதல் பாதுகாப்பை இந்த உறுதிப்படுத்தல் வழங்கும்.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "உறுதிப்படுத்த, பவரை அழுத்தவும்");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "ரத்துசெய்ய, ஏதேனும் ஒலியளவு பட்டனை அழுத்தவும்");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ரத்துசெய்");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android பாதுகாப்பு தொடர்பான உறுதிப்படுத்தல்");
+
+ /* Tests for language te */
+ ConfirmationUITranslations_select_lang_id("te");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "నిర్ధారించడానికి పవర్ బటన్ని రెండు సార్లు నొక్కండి");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "రద్దు చేయండి");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "ఈ నిర్ధారణ మీరు తీసుకోబోయే చర్య కోసం అదనపు భద్రతా లేయర్ను అందిస్తుంది.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "నిర్ధారించడానికి పవర్ను నొక్కండి");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "రద్దు చేయడానికి ఏదైనా వాల్యూమ్ బటన్ను నొక్కండి");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "రద్దు చేయండి");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android సురక్షిత నిర్ధారణ");
+
+ /* Tests for language th */
+ ConfirmationUITranslations_select_lang_id("th");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "กดปุ่มเปิด/ปิด 2 ครั้งเพื่อยืนยัน");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "ยกเลิก");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "การยืนยันนี้จะช่วยเพิ่มความปลอดภัยอีกขั้นสำหรับสิ่งที่คุณกำลังจะดำเนินการ");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "กดปุ่มเปิด/ปิดเพื่อยืนยัน");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "กดปุ่มปรับระดับเสียงเพื่อยกเลิก");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "ยกเลิก");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "ยืนยันการป้องกัน Android");
+
+ /* Tests for language tl */
+ ConfirmationUITranslations_select_lang_id("tl");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Pindutin nang dalawang beses ang power para kumpirmahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Ang pagkumpirmang ito ay nagbibigay ng karagdagang layer ng seguridad para sa pagkilos na gagawin mo.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Pindutin ang power para kumpirmahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Pindutin ang anumang button ng volume para kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Kanselahin");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Pagkumpirmang Pinoprotektahan ng Android");
+
+ /* Tests for language tr */
+ ConfirmationUITranslations_select_lang_id("tr");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Onaylamak için güç düğmesine iki kez basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "İptal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Bu onay, yapmak üzere olduğunuz işlem için ek güvenlik katmanı sağlar.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Onaylamak için güç düğmesine basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "İptal etmek için herhangi bir ses düğmesine basın");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "İptal");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Korumalı Onayı");
+
+ /* Tests for language uk */
+ ConfirmationUITranslations_select_lang_id("uk");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Двічі натисніть кнопку живлення, щоб підтвердити");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Скасувати");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Це підтвердження є додатковим рівнем захисту, коли ви збираєтеся виконати дію.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Натисніть кнопку живлення, щоб підтвердити");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Натисніть будь-яку клавішу гучності, щоб скасувати");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Скасувати");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Підтвердження Android Protected");
+
+ /* Tests for language ur */
+ ConfirmationUITranslations_select_lang_id("ur");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "تصدیق کرنے کے لئے پاور بٹن دوبار دبائیں");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "منسوخ کریں");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "آپ جو کارروائی کرنے والے ہیں اس کے لئے یہ تصدیق ایک اضافی پرت فراہم کرتی ہے۔");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "تصدیق کرنے کے لئے پاور بٹن دبائیں");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "منسوخ کرنے کے لئے کوئی بھی والیوم بٹن دبائیں");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "منسوخ کریں");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android کی تحفظ یافتہ تصدیق");
+
+ /* Tests for language uz */
+ ConfirmationUITranslations_select_lang_id("uz");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Tasdiqlash uchun quvvat tugmasini ikki marta bosing");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Bekor qilish");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Tasdiqlangandan keyin bajarilayotgan amal uchun qo‘shimcha xavfsizlik qatlami taqdim etiladi.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Tasdiqlash uchun quvvat tugmasini bosing");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Bekor qilish uchun istalgan tovush tugmasini bosing");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Bekor qilish");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected nomli tasdiq");
+
+ /* Tests for language vi */
+ ConfirmationUITranslations_select_lang_id("vi");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Nhấn hai lần vào nút nguồn để xác nhận");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Hủy");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Xác nhận này cung cấp thêm một lớp bảo mật cho hành động bạn sắp thực hiện.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Nhấn vào nút nguồn để xác nhận");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Nhấn vào nút âm lượng bất kỳ để hủy");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Hủy");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Xác nhận bảo vệ Android");
+
+ /* Tests for language zh */
+ ConfirmationUITranslations_select_lang_id("zh");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "连按两次电源按钮即可确认");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "这项确认可为您即将执行的操作增添一层额外的安全保障。");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "按电源按钮即可确认");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "按任意音量按钮即可取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android 保护确认");
+
+ /* Tests for language zh-CN */
+ ConfirmationUITranslations_select_lang_id("zh-CN");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "连按两次电源按钮即可确认");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "这项确认可为您即将执行的操作增添一层额外的安全保障。");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "按电源按钮即可确认");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "按任意音量按钮即可取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android 保护确认");
+
+ /* Tests for language zh-HK */
+ ConfirmationUITranslations_select_lang_id("zh-HK");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "按兩下電源按鈕即可確認");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "此確認可為你即將執行的操作提供額外安全保障。");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "按下電源按鈕即可確認");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "按下任何音量按鈕即可取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android 保護確認");
+
+ /* Tests for language zh-TW */
+ ConfirmationUITranslations_select_lang_id("zh-TW");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "按兩下電源按鈕即可確認操作");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "這項確認作業可為你即將執行的動作提供多一層安全保障。");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "按下電源按鈕即可確認操作");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "按下任一音量按鈕即可取消操作");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "取消");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Android Protected 確認");
+
+ /* Tests for language zu */
+ ConfirmationUITranslations_select_lang_id("zu");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1424834532030812203"), "Cindezela kabili ukuze uqinisekise");
+ ASSERT_STR(ConfirmationUITranslations_lookup("1796282799666106567"), "Khansela");
+ ASSERT_STR(ConfirmationUITranslations_lookup("217688588483778177"), "Lokhu kuqinisekiswa kunikeza isendlalelo esingeziwe sokuvikelwa sesenzo osuzosithatha.");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2181224373757710937"), "Cindezela amandla ukuze uqinisekise");
+ ASSERT_STR(ConfirmationUITranslations_lookup("2213954494039981979"), "Cindezela noma iyiphi inkinobho yevolumu ukuze ukhansele");
+ ASSERT_STR(ConfirmationUITranslations_lookup("3999296476990449149"), "Khansela");
+ ASSERT_STR(ConfirmationUITranslations_lookup("6973195374358399966"), "Ukuqinisekiswa okuvikelwe i-Android");
+
+ /* Check language tag fallback mechanism works
+ (chop off components until a match has been found) */
+ const char* lang_ids[] = {
+ "de",
+ "da",
+ "da-GL",
+ "es-419",
+ "es-AR",
+ NULL
+ };
+ ASSERT_STR(test_lang_id_match(lang_ids, "de"), "de");
+ ASSERT_STR(test_lang_id_match(lang_ids, "de-DE"), "de");
+ ASSERT_STR(test_lang_id_match(lang_ids, "de-CH-1901"), "de");
+ ASSERT_STR(test_lang_id_match(lang_ids, "de-AT"), "de");
+ ASSERT_STR(test_lang_id_match(lang_ids, "da-DK"), "da");
+ ASSERT_STR(test_lang_id_match(lang_ids, "da-GL"), "da-GL");
+ ASSERT_STR(test_lang_id_match(lang_ids, "zh"), "");
+ ASSERT_STR(test_lang_id_match(lang_ids, "es-419"), "es-419");
+ ASSERT_STR(test_lang_id_match(lang_ids, "es-AR"), "es-AR");
+ ASSERT_STR(test_lang_id_match(lang_ids, "es"), "");
+
+ printf("All unit tests passed.\n");
+ return 0;
+}
diff --git a/contexthub/1.0/default/android.hardware.contexthub@1.0-service.rc b/contexthub/1.0/default/android.hardware.contexthub@1.0-service.rc
index a8c9487..b659be8 100644
--- a/contexthub/1.0/default/android.hardware.contexthub@1.0-service.rc
+++ b/contexthub/1.0/default/android.hardware.contexthub@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.contexthub-hal-1-0 /vendor/bin/hw/android.hardware.contexthub@1.0-service
+ interface android.hardware.contexthub@1.0::IContexthub default
class hal
user system
group system
diff --git a/drm/1.0/default/android.hardware.drm@1.0-service.rc b/drm/1.0/default/android.hardware.drm@1.0-service.rc
index a3457b5..790eded 100644
--- a/drm/1.0/default/android.hardware.drm@1.0-service.rc
+++ b/drm/1.0/default/android.hardware.drm@1.0-service.rc
@@ -1,4 +1,6 @@
service vendor.drm-hal-1-0 /vendor/bin/hw/android.hardware.drm@1.0-service
+ interface android.hardware.drm@1.0::ICryptoFactory default
+ interface android.hardware.drm@1.0::IDrmFactory default
class hal
user media
group mediadrm drmrpc
diff --git a/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc b/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc
index da332c7..b13a9ba 100644
--- a/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc
+++ b/gatekeeper/1.0/default/android.hardware.gatekeeper@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.gatekeeper-1-0 /vendor/bin/hw/android.hardware.gatekeeper@1.0-service
+ interface android.hardware.gatekeeper@1.0::IGatekeeper default
class hal
user system
group system
diff --git a/gnss/1.0/default/android.hardware.gnss@1.0-service.rc b/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
index 1a44d34..1300d81 100644
--- a/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
+++ b/gnss/1.0/default/android.hardware.gnss@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.gnss_service /vendor/bin/hw/android.hardware.gnss@1.0-service
+ interface android.hardware.gnss@1.0::IGnss default
class hal
user gps
group system gps radio
diff --git a/gnss/1.1/default/android.hardware.gnss@1.1-service.rc b/gnss/1.1/default/android.hardware.gnss@1.1-service.rc
index 0cf7c49..73901bf 100644
--- a/gnss/1.1/default/android.hardware.gnss@1.1-service.rc
+++ b/gnss/1.1/default/android.hardware.gnss@1.1-service.rc
@@ -1,4 +1,6 @@
service gnss-1-1 /vendor/bin/hw/android.hardware.gnss@1.1-service
+ interface android.hardware.gnss@1.0::IGnss default
+ interface android.hardware.gnss@1.1::IGnss default
class hal
user system
group system
diff --git a/graphics/allocator/2.0/default/android.hardware.graphics.allocator@2.0-service.rc b/graphics/allocator/2.0/default/android.hardware.graphics.allocator@2.0-service.rc
index 6eee71f..ea64f97 100644
--- a/graphics/allocator/2.0/default/android.hardware.graphics.allocator@2.0-service.rc
+++ b/graphics/allocator/2.0/default/android.hardware.graphics.allocator@2.0-service.rc
@@ -1,4 +1,5 @@
service vendor.gralloc-2-0 /vendor/bin/hw/android.hardware.graphics.allocator@2.0-service
+ interface android.hardware.graphics.allocator@2.0::IAllocator default
class hal animation
user system
group graphics drmrpc
diff --git a/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc b/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc
index 5a5b51e..cbd589a 100644
--- a/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc
+++ b/graphics/composer/2.1/default/android.hardware.graphics.composer@2.1-service.rc
@@ -1,4 +1,5 @@
service vendor.hwcomposer-2-1 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service
+ interface android.hardware.graphics.composer@2.1::IComposer default
class hal animation
user system
group graphics drmrpc
diff --git a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
index efe6dad..0d7e86f 100644
--- a/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
+++ b/graphics/composer/2.2/default/android.hardware.graphics.composer@2.2-service.rc
@@ -1,4 +1,6 @@
service vendor.hwcomposer-2-2 /vendor/bin/hw/android.hardware.graphics.composer@2.2-service
+ interface android.hardware.graphics.composer@2.1::IComposer default
+ interface android.hardware.graphics.composer@2.2::IComposer default
class hal animation
user system
group graphics drmrpc
diff --git a/ir/1.0/default/android.hardware.ir@1.0-service.rc b/ir/1.0/default/android.hardware.ir@1.0-service.rc
index 0d06967..b2f1f7d 100644
--- a/ir/1.0/default/android.hardware.ir@1.0-service.rc
+++ b/ir/1.0/default/android.hardware.ir@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.ir-hal-1-0 /vendor/bin/hw/android.hardware.ir@1.0-service
+ interface android.hardware.ir@1.0::IConsumerIr default
class hal
user system
group system
diff --git a/keymaster/3.0/default/android.hardware.keymaster@3.0-service.rc b/keymaster/3.0/default/android.hardware.keymaster@3.0-service.rc
index ea8d490..dffaca5 100644
--- a/keymaster/3.0/default/android.hardware.keymaster@3.0-service.rc
+++ b/keymaster/3.0/default/android.hardware.keymaster@3.0-service.rc
@@ -1,4 +1,5 @@
service vendor.keymaster-3-0 /vendor/bin/hw/android.hardware.keymaster@3.0-service
+ interface android.hardware.keymaster@3.0::IKeymasterDevice default
class early_hal
user nobody
group drmrpc
diff --git a/keymaster/4.0/default/android.hardware.keymaster@4.0-service.rc b/keymaster/4.0/default/android.hardware.keymaster@4.0-service.rc
index 2ce439e..2adfd88 100644
--- a/keymaster/4.0/default/android.hardware.keymaster@4.0-service.rc
+++ b/keymaster/4.0/default/android.hardware.keymaster@4.0-service.rc
@@ -1,4 +1,5 @@
service vendor.keymaster-4-0 /vendor/bin/hw/android.hardware.keymaster@4.0-service
+ interface android.hardware.keymaster@4.0::IKeymasterDevice default
class early_hal
user system
group system drmrpc
diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
index 34a96a0..29be2a0 100644
--- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
+++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
@@ -387,17 +387,28 @@
OMX_StateIdle);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+ OMX_PARAM_PORTDEFINITIONTYPE portDefInput;
+ OMX_PARAM_PORTDEFINITIONTYPE portDefOutput;
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexInput, &portDefInput);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexOutput, &portDefOutput);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// Dont switch states until the ports are populated
- status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ if (portDefInput.nBufferCountActual || portDefOutput.nBufferCountActual) {
+ status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ }
// allocate buffers on input port
ASSERT_NO_FATAL_FAILURE(allocatePortBuffers(
omxNode, iBuffer, kPortIndexInput, pm[0], allocGrap));
// Dont switch states until the ports are populated
- status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ if (portDefOutput.nBufferCountActual) {
+ status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ }
// allocate buffers on output port
ASSERT_NO_FATAL_FAILURE(allocatePortBuffers(
@@ -430,9 +441,18 @@
OMX_StateLoaded);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
+ OMX_PARAM_PORTDEFINITIONTYPE portDefInput;
+ OMX_PARAM_PORTDEFINITIONTYPE portDefOutput;
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexInput, &portDefInput);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+ status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexOutput, &portDefOutput);
+ EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
// dont change state until all buffers are freed
- status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ if (portDefInput.nBufferCountActual || portDefOutput.nBufferCountActual) {
+ status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ }
for (size_t i = 0; i < iBuffer->size(); ++i) {
status = omxNode->freeBuffer(kPortIndexInput, (*iBuffer)[i].id);
@@ -440,8 +460,10 @@
}
// dont change state until all buffers are freed
- status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
- ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ if (portDefOutput.nBufferCountActual) {
+ status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+ ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+ }
for (size_t i = 0; i < oBuffer->size(); ++i) {
status = omxNode->freeBuffer(kPortIndexOutput, (*oBuffer)[i].id);
diff --git a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
index 7750a12..2223583 100644
--- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
+++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
@@ -115,6 +115,7 @@
}
if (compClass == unknown_class) disableTest = true;
isSecure = false;
+ mTunnel = false;
size_t suffixLen = strlen(".secure");
if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
isSecure =
@@ -122,6 +123,18 @@
strlen(gEnv->getComponent().c_str()) - suffixLen,
".secure");
}
+ if (compClass == video_decoder) {
+ omxNode->configureVideoTunnelMode(
+ 1, OMX_TRUE, 0,
+ [&](android::hardware::media::omx::V1_0::Status _s,
+ const ::android::hardware::hidl_handle& sidebandHandle) {
+ (void)sidebandHandle;
+ if (_s == android::hardware::media::omx::V1_0::Status::OK)
+ this->mTunnel = true;
+ });
+ }
+ // NOTES: secure components are not covered in these tests.
+ // we are disabling tests for them
if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
}
@@ -149,6 +162,7 @@
sp<CodecObserver> observer;
sp<IOmxNode> omxNode;
standardCompClass compClass;
+ bool mTunnel;
bool isSecure;
bool disableTest;
@@ -991,7 +1005,8 @@
ASSERT_NO_FATAL_FAILURE(
changeStateLoadedtoIdle(omxNode, observer, &pBuffer[0], &pBuffer[1],
kPortIndexInput, kPortIndexOutput, portMode));
- for (size_t i = portBase; i < portBase + 2; i++) {
+ int range = mTunnel ? 1 : 2;
+ for (size_t i = portBase; i < portBase + range; i++) {
status =
omxNode->sendCommand(toRawCommandType(OMX_CommandPortDisable), i);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
@@ -1104,7 +1119,8 @@
dispatchOutputBuffer(omxNode, &pBuffer[1], i, portMode[1]));
}
- for (size_t i = portBase; i < portBase + 2; i++) {
+ int range = mTunnel ? 1 : 2;
+ for (size_t i = portBase; i < portBase + range; i++) {
status =
omxNode->sendCommand(toRawCommandType(OMX_CommandPortDisable), i);
ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
index 1db9f75..df048c6 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
@@ -153,7 +153,17 @@
".secure");
}
if (isSecure) disableTest = true;
+ omxNode->configureVideoTunnelMode(
+ 1, OMX_TRUE, 0,
+ [&](android::hardware::media::omx::V1_0::Status _s,
+ const ::android::hardware::hidl_handle& sidebandHandle) {
+ (void)sidebandHandle;
+ if (_s == android::hardware::media::omx::V1_0::Status::OK)
+ this->disableTest = true;
+ });
if (disableTest) std::cout << "[ WARN ] Test Disabled \n";
+ // NOTES: secure and tunneled components are not covered in these tests.
+ // we are disabling tests for them
}
virtual void TearDown() override {
diff --git a/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc b/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc
index 4327a20..f5eee54 100644
--- a/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc
+++ b/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.memtrack-hal-1-0 /vendor/bin/hw/android.hardware.memtrack@1.0-service
+ interface android.hardware.memtrack@1.0::IMemtrack default
class hal
user system
group system
diff --git a/neuralnetworks/1.0/vts/functional/Android.bp b/neuralnetworks/1.0/vts/functional/Android.bp
index 0fb18f1..0d70816 100644
--- a/neuralnetworks/1.0/vts/functional/Android.bp
+++ b/neuralnetworks/1.0/vts/functional/Android.bp
@@ -15,21 +15,19 @@
//
cc_library_static {
- name: "VtsHalNeuralnetworksTest_utils",
+ name: "VtsHalNeuralNetworksV1_0_utils",
srcs: [
"Callbacks.cpp",
- "GeneratedTestHarness.cpp",
+ "Utils.cpp",
],
defaults: ["VtsHalTargetTestDefaults"],
- export_include_dirs: ["."],
+ export_include_dirs: ["include"],
shared_libs: [
"libfmq",
"libnativewindow",
],
static_libs: [
"android.hardware.neuralnetworks@1.0",
- "android.hardware.neuralnetworks@1.1",
- "android.hardware.neuralnetworks@1.2",
"android.hidl.allocator@1.0",
"android.hidl.memory@1.0",
"libgmock",
@@ -44,12 +42,13 @@
}
cc_defaults {
- name: "VtsHalNeuralNetworksTargetTestDefaults",
+ name: "VtsHalNeuralNetworksV1_0TargetTestDefaults",
defaults: ["VtsHalTargetTestDefaults"],
srcs: [
"ValidateModel.cpp",
"ValidateRequest.cpp",
"VtsHalNeuralnetworks.cpp",
+ "GeneratedTestHarness.cpp",
],
shared_libs: [
"libfmq",
@@ -57,14 +56,12 @@
],
static_libs: [
"android.hardware.neuralnetworks@1.0",
- "android.hardware.neuralnetworks@1.1",
- "android.hardware.neuralnetworks@1.2",
"android.hidl.allocator@1.0",
"android.hidl.memory@1.0",
"libgmock",
"libhidlmemory",
"libneuralnetworks_utils",
- "VtsHalNeuralnetworksTest_utils",
+ "VtsHalNeuralNetworksV1_0_utils",
],
header_libs: [
"libneuralnetworks_headers",
@@ -76,19 +73,19 @@
cc_test {
name: "VtsHalNeuralnetworksV1_0TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_0TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_0.cpp",
],
}
cc_test {
name: "PresubmitHalNeuralnetworksV1_0TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_0TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_0.cpp",
],
cflags: [
"-DPRESUBMIT_NOT_VTS",
diff --git a/neuralnetworks/1.0/vts/functional/Callbacks.cpp b/neuralnetworks/1.0/vts/functional/Callbacks.cpp
index c30702c..37afcf0 100644
--- a/neuralnetworks/1.0/vts/functional/Callbacks.cpp
+++ b/neuralnetworks/1.0/vts/functional/Callbacks.cpp
@@ -14,160 +14,78 @@
* limitations under the License.
*/
-#include "Callbacks.h"
+#define LOG_TAG "Callbacks"
+
+#include "1.0/Callbacks.h"
+
#include <android-base/logging.h>
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace implementation {
+namespace android::hardware::neuralnetworks::V1_0::implementation {
-CallbackBase::CallbackBase() : mNotified(false) {}
-
-CallbackBase::~CallbackBase() {
- // Note that we cannot call CallbackBase::join_thread from here:
- // CallbackBase is intended to be reference counted, and it is possible that
- // the reference count drops to zero in the bound thread, causing the
- // bound thread to call this destructor. If a thread tries to join
- // itself, it throws an exception, producing a message like the
- // following:
- //
- // terminating with uncaught exception of type std::__1::system_error:
- // thread::join failed: Resource deadlock would occur
-}
-
-void CallbackBase::wait() {
- std::unique_lock<std::mutex> lock(mMutex);
- mCondition.wait(lock, [this]{return mNotified;});
- join_thread_locked();
-}
-
-bool CallbackBase::on_finish(std::function<bool(void)> post_work) {
- std::lock_guard<std::mutex> lock(mMutex);
- if (mPostWork != nullptr) {
- LOG(ERROR) << "CallbackBase::on_finish -- a post-work function has already been bound to "
- "this callback object";
- return false;
- }
- if (post_work == nullptr) {
- LOG(ERROR) << "CallbackBase::on_finish -- the new post-work function is invalid";
- return false;
- }
- mPostWork = std::move(post_work);
- return true;
-}
-
-bool CallbackBase::bind_thread(std::thread&& asyncThread) {
- std::lock_guard<std::mutex> lock(mMutex);
- if (mThread.joinable()) {
- LOG(ERROR) << "CallbackBase::bind_thread -- a thread has already been bound to this "
- "callback object";
- return false;
- }
- if (!asyncThread.joinable()) {
- LOG(ERROR) << "CallbackBase::bind_thread -- the new thread is not joinable";
- return false;
- }
- mThread = std::move(asyncThread);
- return true;
-}
-
-void CallbackBase::join_thread() {
- std::lock_guard<std::mutex> lock(mMutex);
- join_thread_locked();
-}
-
-void CallbackBase::notify() {
- {
- std::lock_guard<std::mutex> lock(mMutex);
- mNotified = true;
- if (mPostWork != nullptr) {
- bool success = mPostWork();
- if (!success) {
- LOG(ERROR) << "CallbackBase::notify -- post work failed";
- }
- }
- }
- mCondition.notify_all();
-}
-
-void CallbackBase::join_thread_locked() {
- if (mThread.joinable()) {
- mThread.join();
- }
-}
-
-PreparedModelCallback::PreparedModelCallback() :
- mErrorStatus(ErrorStatus::GENERAL_FAILURE), mPreparedModel(nullptr) {}
-
-PreparedModelCallback::~PreparedModelCallback() {}
+// PreparedModelCallback methods begin here
Return<void> PreparedModelCallback::notify(ErrorStatus errorStatus,
- const sp<V1_0::IPreparedModel>& preparedModel) {
- mErrorStatus = errorStatus;
- mPreparedModel = preparedModel;
- CallbackBase::notify();
+ const sp<IPreparedModel>& preparedModel) {
+ {
+ std::lock_guard<std::mutex> hold(mMutex);
+
+ // quick-return if object has already been notified
+ if (mNotified) {
+ return Void();
+ }
+
+ // store results and mark as notified
+ mErrorStatus = errorStatus;
+ mPreparedModel = preparedModel;
+ mNotified = true;
+ }
+
+ mCondition.notify_all();
return Void();
}
-Return<void> PreparedModelCallback::notify_1_2(ErrorStatus errorStatus,
- const sp<V1_2::IPreparedModel>& preparedModel) {
- mErrorStatus = errorStatus;
- mPreparedModel = preparedModel;
- CallbackBase::notify();
- return Void();
+void PreparedModelCallback::wait() const {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCondition.wait(lock, [this] { return mNotified; });
}
-ErrorStatus PreparedModelCallback::getStatus() {
+ErrorStatus PreparedModelCallback::getStatus() const {
wait();
return mErrorStatus;
}
-sp<V1_0::IPreparedModel> PreparedModelCallback::getPreparedModel() {
+sp<IPreparedModel> PreparedModelCallback::getPreparedModel() const {
wait();
return mPreparedModel;
}
-ExecutionCallback::ExecutionCallback() : mErrorStatus(ErrorStatus::GENERAL_FAILURE) {}
-
-ExecutionCallback::~ExecutionCallback() {}
+// ExecutionCallback methods begin here
Return<void> ExecutionCallback::notify(ErrorStatus errorStatus) {
- mErrorStatus = errorStatus;
- mOutputShapes = {};
- mTiming = {.timeOnDevice = UINT64_MAX, .timeInDriver = UINT64_MAX};
- CallbackBase::notify();
+ {
+ std::lock_guard<std::mutex> hold(mMutex);
+
+ // quick-return if object has already been notified
+ if (mNotified) {
+ return Void();
+ }
+
+ mErrorStatus = errorStatus;
+ mNotified = true;
+ }
+ mCondition.notify_all();
+
return Void();
}
-Return<void> ExecutionCallback::notify_1_2(ErrorStatus errorStatus,
- const hidl_vec<OutputShape>& outputShapes,
- const Timing& timing) {
- mErrorStatus = errorStatus;
- mOutputShapes = outputShapes;
- mTiming = timing;
- CallbackBase::notify();
- return Void();
+void ExecutionCallback::wait() const {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCondition.wait(lock, [this] { return mNotified; });
}
-ErrorStatus ExecutionCallback::getStatus() {
+ErrorStatus ExecutionCallback::getStatus() const {
wait();
return mErrorStatus;
}
-const std::vector<OutputShape>& ExecutionCallback::getOutputShapes() {
- wait();
- return mOutputShapes;
-}
-
-Timing ExecutionCallback::getTiming() {
- wait();
- return mTiming;
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace neuralnetworks
-} // namespace hardware
-} // namespace android
+} // namespace android::hardware::neuralnetworks::V1_0::implementation
diff --git a/neuralnetworks/1.0/vts/functional/Callbacks.h b/neuralnetworks/1.0/vts/functional/Callbacks.h
deleted file mode 100644
index 4707d0a..0000000
--- a/neuralnetworks/1.0/vts/functional/Callbacks.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
-#define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
-
-#include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
-#include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
-#include <android/hardware/neuralnetworks/1.2/IExecutionCallback.h>
-#include <android/hardware/neuralnetworks/1.2/IPreparedModelCallback.h>
-#include <hidl/MQDescriptor.h>
-#include <hidl/Status.h>
-#include <chrono>
-#include <condition_variable>
-#include <functional>
-#include <mutex>
-#include <thread>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace implementation {
-
-using V1_0::ErrorStatus;
-
-/**
- * The CallbackBase class is used internally by the NeuralNetworks runtime to
- * synchronize between different threads. An asynchronous task is launched
- * paired with a callback object. When a client thread requires the output being
- * generated by the asynchronous task, the client thread can wait for the result
- * and be blocked until it has completed or a timeout condition has been
- * reached. Any wait* may safely be called concurrently, even on the same
- * callback object. When the asynchronous task has finished its workload, it
- * must immediately call "notify". If the asynchronous task has failed to launch,
- * the function that tried to launch the asynchronous task must immediately call
- * "notify". This "notify" call awakens any client threads waiting on the
- * callback object.
- *
- * The CallbackBase class implements some of the base synchronization common to
- * both PrepareModelCallback and ExecutionCallback. For consistency, any HIDL
- * callback class must inherit from CallbackBase as well as the HIDL callback
- * interface it implements.
- *
- * This class exists to enable synchronization across HIDL. When synchronization
- * is only required in the same process, consider using std::future, std::mutex,
- * std::condition_variable, or std::experimental::latch instead.
- */
-class CallbackBase {
- public:
- CallbackBase();
- ~CallbackBase();
-
- /**
- * CallbackBase::wait blocks until notify has been called on the callback
- * object.
- */
- void wait();
-
- /**
- * CallbackBase::wait_for blocks until notify has been called on the
- * callback object or the time duration from the time the wait_for function
- * was called has expired, whichever comes first.
- *
- * @return Status std::cv_status::no_timeout if the callback was notified
- * before the time duration expired, std::cv_status::timeout
- * otherwise.
- */
- template<class Rep, class Period>
- std::cv_status wait_for(const std::chrono::duration<Rep,Period>& timeout_duration);
-
- /**
- * CallbackBase::on_finish binds a function to the callback object. This
- * bound function will be executed when CallbackBase::notify is called,
- * before any calls to wait* return. (Note that CallbackBase::wait_for can
- * return std::cv_status::timeout before CallbackBase::notify is called for
- * the first time, and hence before the bound function is executed.)
- *
- * The bound function must not synchronize with or otherwise access the
- * callback object it is bound to, as this could cause a deadlock.
- *
- * CallbackBase::on_finish can be called at most once on a given callback
- * object, and the call to CallbackBase::on_finish must finish before
- * CallbackBase::notify is called.
- *
- * @param post_work Function to be invoked the first time
- * CallbackBase::notify is called. Must have a target --
- * i.e., must not compare equal to nullptr. post_work
- * returns true if it successfully completes, false if it
- * fails.
- * @return bool True if the function was successfully bound, false if
- * unsuccessful.
- *
- * TODO: Why does the return value of the callback matter?
- */
- bool on_finish(std::function<bool(void)> post_work);
-
- /**
- * CallbackBase::bind_thread binds a thread to the event for later use by
- * CallbackBase::join_thread.
- *
- * The thread must be passed using std::move.
- *
- * Once a thread is bound with CallbackBase::bind_thread, the client code
- * should ensure that one of the following occurs before the event is
- * destroyed:
- * - CallbackBase::join_thread has been called.
- * - CallbackBase::wait has been called.
- * - CallbackBase::wait_for has been called and returned other than
- * std::cv_status::no_timeout.
- *
- * The bound thread shall not call any CallbackBase method with the
- * exception of CallbackBase::notify, which it must call when the thread has
- * finished its computation.
- *
- * CallbackBase::bind_thread can be called at most once on a given callback
- * object.
- *
- * @param asyncThread Thread to be bound to the callback object. The thread
- * object must represent a thread of execution -- i.e.,
- * asyncThread.joinable() must be true.
- * @return bool True if successful, false if thread was not properly bound.
- */
- bool bind_thread(std::thread&& asyncThread);
-
- /**
- * CallbackBase::join_thread ensures that the thread (if any) bound to this
- * event with CallbackBase::bind_thread has fully finished and cleaned its
- * resources. It is legal to call this function multiple times, concurrently
- * or sequentially.
- */
- void join_thread();
-
- protected:
- /**
- * CallbackBase::notify enables all prior and future wait* calls on the
- * callback object to proceed. The call to CallbackBase::notify happens
- * before any wait* calls on this callback object return (except in the case
- * of wait_for timing out). The asynchronous call the callback object is
- * paired with must ensure that any update to state that should be visible
- * to the caller of wait* happens before the call to CallbackBase::notify.
- *
- * CallbackBase::notify must be called exactly once on a given callback
- * object.
- */
- void notify();
-
- private:
- // Same as CallbackBase::join_thread but assumes we already hold a lock on
- // mMutex.
- void join_thread_locked();
-
- bool mNotified;
- std::mutex mMutex;
- std::condition_variable mCondition;
- std::function<bool(void)> mPostWork;
- std::thread mThread;
-};
-
-/**
- * The PreparedModelCallback class is used to receive the error status of
- * preparing a model as well as the prepared model from a task executing
- * asynchronously with respect to the runtime. If a calling thread calls wait*
- * or get* on a PreparedModelCallback object and the corresponding asynchronous
- * task has not finished preparing the model, the calling thread will block
- * until the asynchronous task has either called notify or notify_1_2. For more
- * information on the synchronization behavior, refer to the CallbackBase class.
- *
- * This class inherits the basic blocking and signaling calls from
- * CallbackBase, and implements the HIDL notify and notify_1_2 calls from
- * IPreparedModelCallback. This callback object is passed as an argument to
- * IDevice::prepareModel.
- */
-class PreparedModelCallback : public CallbackBase, public IPreparedModelCallback {
- public:
- PreparedModelCallback();
- ~PreparedModelCallback() override;
-
- /**
- * IPreparedModelCallback::notify and IPreparedModelCallback::notify_1_2
- * mark the callback object with the return status of the asynchronous
- * model preparation along with the prepared model, and call
- * CallbackBase::notify, enabling all prior and future wait* calls on the
- * PreparedModelCallback object to proceed. For more information on the
- * synchronization behavior, refer to the CallbackBase class.
- *
- * Either IPreparedModelCallback::notify or IPreparedModelCallback::notify_1_2
- * must be called exactly once on a given PreparedModelCallback object.
- *
- * @param status Error status returned from asynchronously preparing the
- * model; will be:
- * - NONE if the asynchronous preparation was successful
- * - DEVICE_UNAVAILABLE if driver is offline or busy
- * - GENERAL_FAILURE if there is an unspecified error
- * - INVALID_ARGUMENT if the input model is invalid
- * @param preparedModel Returned model that has been prepared for execution,
- * nullptr if the model was unable to be prepared.
- */
- Return<void> notify(ErrorStatus status, const sp<V1_0::IPreparedModel>& preparedModel) override;
- Return<void> notify_1_2(ErrorStatus status,
- const sp<V1_2::IPreparedModel>& preparedModel) override;
-
- /**
- * Retrieves the error status returned from the asynchronous task launched
- * by IDevice::prepareModel. If IDevice::prepareModel has not finished
- * asynchronously preparing the model, this call will block until the
- * asynchronous task notifies the object.
- *
- * @return status Error status returned from asynchronously preparing the
- * model; will be:
- * - NONE if the asynchronous preparation was successful
- * - DEVICE_UNAVAILABLE if driver is offline or busy
- * - GENERAL_FAILURE if there is an unspecified error
- * - INVALID_ARGUMENT if the input model is invalid
- */
- ErrorStatus getStatus();
-
- /**
- * Retrieves the model that has been prepared for execution from the
- * asynchronous task launched by IDevice::prepareModel. If
- * IDevice::prepareModel has not finished asynchronously preparing the
- * model, this call will block until the asynchronous task notifies the
- * object.
- *
- * @return preparedModel Returned model that has been prepared for
- * execution, nullptr if the model was unable to be
- * prepared.
- */
- sp<V1_0::IPreparedModel> getPreparedModel();
-
- private:
- ErrorStatus mErrorStatus;
- sp<V1_0::IPreparedModel> mPreparedModel;
-};
-
-/**
- * The ExecutionCallback class is used to receive the error status of the
- * execution from a task executing asynchronously with respect to the runtime.
- * If a calling thread calls wait* or get* on a PreparedModelCallback object and
- * the corresponding asynchronous task has not finished the execution, the
- * calling thread will block until the asynchronous task has either called notify
- * or notify_1_2. For more information on the synchronization behavior, refer to
- * the CallbackBase class.
- *
- * This class inherits the basic blocking and signaling calls from
- * CallbackBase, and implements the HIDL notify and notify_1_2 calls from
- * IExecutionCallback. This callback object is passed as an argument to
- * IPreparedModel::execute.
- */
-class ExecutionCallback : public CallbackBase, public IExecutionCallback {
- public:
- ExecutionCallback();
- ~ExecutionCallback() override;
-
- /**
- * IExecutionCallback::notify and IExecutionCallback::notify_1_2 mark the
- * callback object with the return status of the asynchronous execution that
- * held this callback and enable all prior and future wait* calls on the
- * ExecutionCallback object to proceed. For more information on the
- * synchronization behavior, refer to the CallbackBase class.
- *
- * Either IExecutionCallback::notify or IExecutionCallback::notify_1_2 must
- * be called exactly once on a given ExecutionCallback object.
- *
- * @param status Error status returned from launching the asynchronous task
- * (if the launch fails) or from the asynchronous task itself
- * (if the launch succeeds). Must be:
- * - NONE if the asynchronous execution was successful
- * - DEVICE_UNAVAILABLE if driver is offline or busy
- * - GENERAL_FAILURE if there is an unspecified error
- * - OUTPUT_INSUFFICIENT_SIZE if provided output buffer is
- * not large enough to store the resultant values
- * - INVALID_ARGUMENT if the input request is invalid
- */
- Return<void> notify(ErrorStatus status) override;
-
- /**
- * Similar to IExecutionCallback::notify, but for V1_2::IPreparedModel to
- * also notify output shapes along with error status.
- *
- * @param status Error status returned from launching the asynchronous task
- * (if the launch fails) or from the asynchronous task itself
- * (if the launch succeeds). Must be:
- * - NONE if the asynchronous execution was successful
- * - DEVICE_UNAVAILABLE if driver is offline or busy
- * - GENERAL_FAILURE if the asynchronous task resulted in an
- * unspecified error
- * - OUTPUT_INSUFFICIENT_SIZE if at least one output
- * operand buffer is not large enough to store the
- * corresponding output
- * - INVALID_ARGUMENT if one of the input arguments to
- * prepareModel is invalid
- * @param outputShapes A list of shape information of model output operands.
- * The index into "outputShapes" corresponds to the index
- * of the output operand in the Request outputs vector.
- * outputShapes must be empty unless the status is either
- * NONE or OUTPUT_INSUFFICIENT_SIZE.
- * @return Timing Duration of execution. Unless MeasureTiming::YES was passed when
- * launching the execution and status is NONE, all times must
- * be reported as UINT64_MAX. A driver may choose to report
- * any time as UINT64_MAX, indicating that particular measurement is
- * not available.
- */
- Return<void> notify_1_2(ErrorStatus status, const hidl_vec<OutputShape>& outputShapes,
- const Timing& timing) override;
-
- // An overload of the latest notify interface to hide the version from ExecutionBuilder.
- Return<void> notify(ErrorStatus status, const hidl_vec<OutputShape>& outputShapes,
- const Timing& timing) {
- return notify_1_2(status, outputShapes, timing);
- }
-
- /**
- * Retrieves the error status returned from the asynchronous task launched
- * by either IPreparedModel::execute or IPreparedModel::execute_1_2. If
- * IPreparedModel::execute or IPreparedModel::execute_1_2 has not finished
- * asynchronously executing, this call will block until the asynchronous task
- * notifies the object.
- *
- * @return status Error status returned from launching the asynchronous task
- * (if the launch fails) or from the asynchronous task itself
- * (if the launch succeeds). Must be:
- * - NONE if the asynchronous execution was successful
- * - DEVICE_UNAVAILABLE if driver is offline or busy
- * - GENERAL_FAILURE if the asynchronous task resulted in an
- * unspecified error
- * - OUTPUT_INSUFFICIENT_SIZE if at least one output
- * operand buffer is not large enough to store the
- * corresponding output
- * - INVALID_ARGUMENT if one of the input arguments to
- * prepareModel is invalid
- */
- ErrorStatus getStatus();
-
- /**
- * Retrieves the output shapes returned from the asynchronous task launched
- * by IPreparedModel::execute_1_2. If IPreparedModel::execute_1_2 has not finished
- * asynchronously executing, this call will block until the asynchronous task
- * notifies the object.
- *
- * If the asynchronous task was launched by IPreparedModel::execute, an empty vector
- * will be returned.
- *
- * @return outputShapes A list of shape information of model output operands.
- * The index into "outputShapes" corresponds to the index
- * of the output operand in the Request outputs vector.
- * outputShapes must be empty unless the status is either
- * NONE or OUTPUT_INSUFFICIENT_SIZE.
- */
- const std::vector<OutputShape>& getOutputShapes();
-
- /**
- * Retrieves the duration of execution ofthe asynchronous task launched
- * by IPreparedModel::execute_1_2. If IPreparedModel::execute_1_2 has not finished
- * asynchronously executing, this call will block until the asynchronous task
- * notifies the object.
- *
- * If the asynchronous task was launched by IPreparedModel::execute, every time
- * must be UINT64_MAX.
- *
- * @return timing Duration of the execution. Every time must be UINT64_MAX unless
- * the status is NONE.
- */
- Timing getTiming();
-
- private:
- ErrorStatus mErrorStatus = ErrorStatus::GENERAL_FAILURE;
- std::vector<OutputShape> mOutputShapes = {};
- Timing mTiming = {};
-};
-
-
-// template function implementation(s) below this point
-
-template<class Rep, class Period>
-std::cv_status CallbackBase::wait_for(const std::chrono::duration<Rep,Period>& timeout_duration) {
- std::unique_lock<std::mutex> lock(mMutex);
- std::cv_status status = mCondition.wait_for(lock, timeout_duration, [this]{return mNotified;});
- if (status != std::cv_status::timeout) {
- join_thread_locked();
- }
- return status;
-}
-
-} // namespace implementation
-} // namespace V1_2
-} // namespace neuralnetworks
-} // namespace hardware
-} // namespace android
-
-#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
index c819b52..603054d 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
@@ -15,129 +15,47 @@
*/
#include "GeneratedTestHarness.h"
-#include "Callbacks.h"
-#include "ExecutionBurstController.h"
+#include "1.0/Callbacks.h"
+#include "1.0/Utils.h"
+#include "MemoryUtils.h"
#include "TestHarness.h"
-#include "Utils.h"
#include <android-base/logging.h>
#include <android/hardware/neuralnetworks/1.0/IDevice.h>
-#include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
#include <android/hardware/neuralnetworks/1.0/IPreparedModel.h>
-#include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
#include <android/hardware/neuralnetworks/1.0/types.h>
-#include <android/hardware/neuralnetworks/1.1/IDevice.h>
-#include <android/hardware/neuralnetworks/1.2/IDevice.h>
-#include <android/hardware/neuralnetworks/1.2/IExecutionCallback.h>
-#include <android/hardware/neuralnetworks/1.2/IPreparedModel.h>
-#include <android/hardware/neuralnetworks/1.2/IPreparedModelCallback.h>
#include <android/hidl/allocator/1.0/IAllocator.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+
#include <iostream>
namespace android {
namespace hardware {
namespace neuralnetworks {
-
namespace generated_tests {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
-using ::test_helper::bool8;
+
+using ::android::hardware::neuralnetworks::V1_0::ErrorStatus;
+using ::android::hardware::neuralnetworks::V1_0::IDevice;
+using ::android::hardware::neuralnetworks::V1_0::IPreparedModel;
+using ::android::hardware::neuralnetworks::V1_0::Model;
+using ::android::hardware::neuralnetworks::V1_0::Request;
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::test_helper::compare;
-using ::test_helper::expectMultinomialDistributionWithinTolerance;
using ::test_helper::filter;
using ::test_helper::for_all;
-using ::test_helper::for_each;
using ::test_helper::MixedTyped;
using ::test_helper::MixedTypedExample;
using ::test_helper::resize_accordingly;
-using HidlToken = hidl_array<uint8_t, static_cast<uint32_t>(Constant::BYTE_SIZE_OF_CACHE_TOKEN)>;
-
-template <typename T>
-void copy_back_(std::map<int, std::vector<T>>* dst, const std::vector<RequestArgument>& ra,
- char* src) {
- for_each<T>(*dst, [&ra, src](int index, std::vector<T>& m) {
- ASSERT_EQ(m.size(), ra[index].location.length / sizeof(T));
- char* begin = src + ra[index].location.offset;
- memcpy(m.data(), begin, ra[index].location.length);
- });
-}
-
-void copy_back(MixedTyped* dst, const std::vector<RequestArgument>& ra, char* src) {
- copy_back_(&dst->float32Operands, ra, src);
- copy_back_(&dst->int32Operands, ra, src);
- copy_back_(&dst->quant8AsymmOperands, ra, src);
- copy_back_(&dst->quant16SymmOperands, ra, src);
- copy_back_(&dst->float16Operands, ra, src);
- copy_back_(&dst->bool8Operands, ra, src);
- copy_back_(&dst->quant8ChannelOperands, ra, src);
- copy_back_(&dst->quant16AsymmOperands, ra, src);
- copy_back_(&dst->quant8SymmOperands, ra, src);
- static_assert(9 == MixedTyped::kNumTypes,
- "Number of types in MixedTyped changed, but copy_back function wasn't updated");
-}
-
-static bool isZeroSized(const MixedTyped& example, uint32_t index) {
- for (auto i : example.operandDimensions.at(index)) {
- if (i == 0) return true;
- }
- return false;
-}
// Top level driver for models and examples generated by test_generator.py
// Test driver for those generated from ml/nn/runtime/test/spec
-static Return<ErrorStatus> ExecutePreparedModel(sp<V1_0::IPreparedModel>& preparedModel,
- const Request& request, MeasureTiming,
- sp<ExecutionCallback>& callback) {
- return preparedModel->execute(request, callback);
-}
-static Return<ErrorStatus> ExecutePreparedModel(sp<V1_2::IPreparedModel>& preparedModel,
- const Request& request, MeasureTiming measure,
- sp<ExecutionCallback>& callback) {
- return preparedModel->execute_1_2(request, measure, callback);
-}
-static Return<ErrorStatus> ExecutePreparedModel(sp<V1_0::IPreparedModel>&, const Request&,
- MeasureTiming, hidl_vec<OutputShape>*, Timing*) {
- ADD_FAILURE() << "asking for synchronous execution at V1_0";
- return ErrorStatus::GENERAL_FAILURE;
-}
-static Return<ErrorStatus> ExecutePreparedModel(sp<V1_2::IPreparedModel>& preparedModel,
- const Request& request, MeasureTiming measure,
- hidl_vec<OutputShape>* outputShapes,
- Timing* timing) {
- ErrorStatus result;
- Return<void> ret = preparedModel->executeSynchronously(
- request, measure,
- [&result, outputShapes, timing](ErrorStatus error, const hidl_vec<OutputShape>& shapes,
- const Timing& time) {
- result = error;
- *outputShapes = shapes;
- *timing = time;
- });
- if (!ret.isOk()) {
- return ErrorStatus::GENERAL_FAILURE;
- }
- return result;
-}
-static std::unique_ptr<::android::nn::ExecutionBurstController> CreateBurst(
- const sp<V1_0::IPreparedModel>&) {
- ADD_FAILURE() << "asking for burst execution at V1_0";
- return nullptr;
-}
-static std::shared_ptr<::android::nn::ExecutionBurstController> CreateBurst(
- const sp<V1_2::IPreparedModel>& preparedModel) {
- return ::android::nn::ExecutionBurstController::create(preparedModel, /*blocking=*/true);
-}
-enum class Executor { ASYNC, SYNC, BURST };
-enum class OutputType { FULLY_SPECIFIED, UNSPECIFIED, INSUFFICIENT };
-const float kDefaultAtol = 1e-5f;
-const float kDefaultRtol = 1e-5f;
-template <typename T_IPreparedModel>
-void EvaluatePreparedModel(sp<T_IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
- const std::vector<MixedTypedExample>& examples,
- bool hasRelaxedFloat32Model, float fpAtol, float fpRtol,
- Executor executor, MeasureTiming measure, OutputType outputType) {
+void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples, float fpAtol,
+ float fpRtol) {
const uint32_t INPUT = 0;
const uint32_t OUTPUT = 1;
@@ -147,14 +65,7 @@
const MixedTyped& inputs = example.operands.first;
const MixedTyped& golden = example.operands.second;
- const bool hasFloat16Inputs = !inputs.float16Operands.empty();
- if (hasRelaxedFloat32Model || hasFloat16Inputs) {
- // TODO: Adjust the error limit based on testing.
- // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
- fpAtol = 5.0f * 0.0009765625f;
- // Set the relative tolerance to be 5ULP of the corresponding FP precision.
- fpRtol = 5.0f * 0.0009765625f;
- }
+ CHECK(inputs.float16Operands.empty()) << "float16 is not supported in 1.0";
std::vector<RequestArgument> inputs_info, outputs_info;
uint32_t inputSize = 0, outputSize = 0;
@@ -163,11 +74,13 @@
for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = INPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
RequestArgument arg_empty = {
- .hasNoValue = true,
+ .hasNoValue = true,
};
inputs_info[index] = s ? arg : arg_empty;
inputSize += s;
@@ -185,31 +98,17 @@
// Go through all outputs, initialize RequestArgument descriptors
resize_accordingly(golden, test);
- bool sizeLargerThanOne = true;
- for_all(golden, [&golden, &outputs_info, &outputSize, &outputType, &sizeLargerThanOne](
- int index, auto, auto s) {
+ for_all(golden, [&outputs_info, &outputSize](int index, auto, auto s) {
if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
- if (index == 0) {
- // On OutputType::INSUFFICIENT, set the output operand with index 0 with
- // buffer size one byte less than needed.
- if (outputType == OutputType::INSUFFICIENT) {
- if (s > 1 && !isZeroSized(golden, index)) {
- s -= 1;
- } else {
- sizeLargerThanOne = false;
- }
- }
- }
RequestArgument arg = {
- .location = {.poolIndex = OUTPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
outputs_info[index] = arg;
outputSize += s;
});
- // If output0 does not have size larger than one byte,
- // we can not provide an insufficient buffer
- if (!sizeLargerThanOne && outputType == OutputType::INSUFFICIENT) return;
// Compute offset for outputs 1 and so on
{
size_t offset = 0;
@@ -248,107 +147,17 @@
const Request request = {.inputs = inputs_info, .outputs = outputs_info, .pools = pools};
- ErrorStatus executionStatus;
- hidl_vec<OutputShape> outputShapes;
- Timing timing;
- switch (executor) {
- case Executor::ASYNC: {
- SCOPED_TRACE("asynchronous");
+ // launch execution
+ sp<ExecutionCallback> executionCallback = new ExecutionCallback();
+ ASSERT_NE(nullptr, executionCallback.get());
+ Return<ErrorStatus> executionLaunchStatus =
+ preparedModel->execute(request, executionCallback);
+ ASSERT_TRUE(executionLaunchStatus.isOk());
+ EXPECT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(executionLaunchStatus));
- // launch execution
- sp<ExecutionCallback> executionCallback = new ExecutionCallback();
- ASSERT_NE(nullptr, executionCallback.get());
- Return<ErrorStatus> executionLaunchStatus =
- ExecutePreparedModel(preparedModel, request, measure, executionCallback);
- ASSERT_TRUE(executionLaunchStatus.isOk());
- EXPECT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(executionLaunchStatus));
-
- // retrieve execution status
- executionCallback->wait();
- executionStatus = executionCallback->getStatus();
- outputShapes = executionCallback->getOutputShapes();
- timing = executionCallback->getTiming();
-
- break;
- }
- case Executor::SYNC: {
- SCOPED_TRACE("synchronous");
-
- // execute
- Return<ErrorStatus> executionReturnStatus = ExecutePreparedModel(
- preparedModel, request, measure, &outputShapes, &timing);
- ASSERT_TRUE(executionReturnStatus.isOk());
- executionStatus = static_cast<ErrorStatus>(executionReturnStatus);
-
- break;
- }
- case Executor::BURST: {
- SCOPED_TRACE("burst");
-
- // create burst
- const std::shared_ptr<::android::nn::ExecutionBurstController> controller =
- CreateBurst(preparedModel);
- ASSERT_NE(nullptr, controller.get());
-
- // create memory keys
- std::vector<intptr_t> keys(request.pools.size());
- for (size_t i = 0; i < keys.size(); ++i) {
- keys[i] = reinterpret_cast<intptr_t>(&request.pools[i]);
- }
-
- // execute burst
- std::tie(executionStatus, outputShapes, timing) =
- controller->compute(request, measure, keys);
-
- break;
- }
- }
-
- if (outputType != OutputType::FULLY_SPECIFIED &&
- executionStatus == ErrorStatus::GENERAL_FAILURE) {
- LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
- "execute model that it does not support.";
- std::cout << "[ ] Early termination of test because vendor service cannot "
- "execute model that it does not support."
- << std::endl;
- GTEST_SKIP();
- }
- if (measure == MeasureTiming::NO) {
- EXPECT_EQ(UINT64_MAX, timing.timeOnDevice);
- EXPECT_EQ(UINT64_MAX, timing.timeInDriver);
- } else {
- if (timing.timeOnDevice != UINT64_MAX && timing.timeInDriver != UINT64_MAX) {
- EXPECT_LE(timing.timeOnDevice, timing.timeInDriver);
- }
- }
-
- switch (outputType) {
- case OutputType::FULLY_SPECIFIED:
- // If the model output operands are fully specified, outputShapes must be either
- // either empty, or have the same number of elements as the number of outputs.
- ASSERT_EQ(ErrorStatus::NONE, executionStatus);
- ASSERT_TRUE(outputShapes.size() == 0 ||
- outputShapes.size() == test.operandDimensions.size());
- break;
- case OutputType::UNSPECIFIED:
- // If the model output operands are not fully specified, outputShapes must have
- // the same number of elements as the number of outputs.
- ASSERT_EQ(ErrorStatus::NONE, executionStatus);
- ASSERT_EQ(outputShapes.size(), test.operandDimensions.size());
- break;
- case OutputType::INSUFFICIENT:
- ASSERT_EQ(ErrorStatus::OUTPUT_INSUFFICIENT_SIZE, executionStatus);
- ASSERT_EQ(outputShapes.size(), test.operandDimensions.size());
- ASSERT_FALSE(outputShapes[0].isSufficient);
- return;
- }
- // Go through all outputs, overwrite output dimensions with returned output shapes
- if (outputShapes.size() > 0) {
- for_each<uint32_t>(test.operandDimensions,
- [&outputShapes](int idx, std::vector<uint32_t>& dim) {
- dim = outputShapes[idx].dimensions;
- });
- }
+ // retrieve execution status
+ executionCallback->wait();
+ ASSERT_EQ(ErrorStatus::NONE, executionCallback->getStatus());
// validate results
outputMemory->read();
@@ -360,89 +169,22 @@
// We want "close-enough" results for float
compare(filtered_golden, filtered_test, fpAtol, fpRtol);
-
- if (example.expectedMultinomialDistributionTolerance > 0) {
- expectMultinomialDistributionWithinTolerance(test, example);
- }
- }
-}
-template <typename T_IPreparedModel>
-void EvaluatePreparedModel(sp<T_IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
- const std::vector<MixedTypedExample>& examples,
- bool hasRelaxedFloat32Model, Executor executor, MeasureTiming measure,
- OutputType outputType) {
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model, kDefaultAtol,
- kDefaultRtol, executor, measure, outputType);
-}
-
-void EvaluatePreparedModel(sp<V1_2::IPreparedModel>& preparedModel,
- std::function<bool(int)> is_ignored,
- const std::vector<MixedTypedExample>& examples,
- bool hasRelaxedFloat32Model, bool testDynamicOutputShape) {
- if (testDynamicOutputShape) {
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::NO, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::NO, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::NO, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::YES, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::YES, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::YES, OutputType::UNSPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::NO, OutputType::INSUFFICIENT);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::NO, OutputType::INSUFFICIENT);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::NO, OutputType::INSUFFICIENT);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::YES, OutputType::INSUFFICIENT);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::YES, OutputType::INSUFFICIENT);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::YES, OutputType::INSUFFICIENT);
- } else {
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::ASYNC, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::SYNC, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
- EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
- Executor::BURST, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
}
}
-static void getPreparedModel(sp<PreparedModelCallback> callback,
- sp<V1_0::IPreparedModel>* preparedModel) {
- *preparedModel = callback->getPreparedModel();
-}
-static void getPreparedModel(sp<PreparedModelCallback> callback,
- sp<V1_2::IPreparedModel>* preparedModel) {
- sp<V1_0::IPreparedModel> preparedModelV1_0 = callback->getPreparedModel();
- *preparedModel = V1_2::IPreparedModel::castFrom(preparedModelV1_0).withDefault(nullptr);
-}
-
-void Execute(const sp<V1_0::IDevice>& device, std::function<V1_0::Model(void)> create_model,
+void Execute(const sp<IDevice>& device, std::function<Model(void)> create_model,
std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples) {
- V1_0::Model model = create_model();
+ Model model = create_model();
// see if service can handle model
bool fullySupportsModel = false;
Return<void> supportedCall = device->getSupportedOperations(
- model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
- ASSERT_EQ(ErrorStatus::NONE, status);
- ASSERT_NE(0ul, supported.size());
- fullySupportsModel =
- std::all_of(supported.begin(), supported.end(), [](bool valid) { return valid; });
- });
+ model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
+ ASSERT_EQ(ErrorStatus::NONE, status);
+ ASSERT_NE(0ul, supported.size());
+ fullySupportsModel = std::all_of(supported.begin(), supported.end(),
+ [](bool valid) { return valid; });
+ });
ASSERT_TRUE(supportedCall.isOk());
// launch prepare model
@@ -455,8 +197,7 @@
// retrieve prepared model
preparedModelCallback->wait();
ErrorStatus prepareReturnStatus = preparedModelCallback->getStatus();
- sp<V1_0::IPreparedModel> preparedModel;
- getPreparedModel(preparedModelCallback, &preparedModel);
+ sp<IPreparedModel> preparedModel = preparedModelCallback->getPreparedModel();
// early termination if vendor service cannot fully prepare model
if (!fullySupportsModel && prepareReturnStatus != ErrorStatus::NONE) {
@@ -472,115 +213,10 @@
ASSERT_NE(nullptr, preparedModel.get());
float fpAtol = 1e-5f, fpRtol = 5.0f * 1.1920928955078125e-7f;
- EvaluatePreparedModel(preparedModel, is_ignored, examples,
- /*hasRelaxedFloat32Model=*/false, fpAtol, fpRtol, Executor::ASYNC,
- MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
-}
-
-void Execute(const sp<V1_1::IDevice>& device, std::function<V1_1::Model(void)> create_model,
- std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples) {
- V1_1::Model model = create_model();
-
- // see if service can handle model
- bool fullySupportsModel = false;
- Return<void> supportedCall = device->getSupportedOperations_1_1(
- model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
- ASSERT_EQ(ErrorStatus::NONE, status);
- ASSERT_NE(0ul, supported.size());
- fullySupportsModel =
- std::all_of(supported.begin(), supported.end(), [](bool valid) { return valid; });
- });
- ASSERT_TRUE(supportedCall.isOk());
-
- // launch prepare model
- sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback();
- ASSERT_NE(nullptr, preparedModelCallback.get());
- Return<ErrorStatus> prepareLaunchStatus = device->prepareModel_1_1(
- model, ExecutionPreference::FAST_SINGLE_ANSWER, preparedModelCallback);
- ASSERT_TRUE(prepareLaunchStatus.isOk());
- ASSERT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(prepareLaunchStatus));
-
- // retrieve prepared model
- preparedModelCallback->wait();
- ErrorStatus prepareReturnStatus = preparedModelCallback->getStatus();
- sp<V1_0::IPreparedModel> preparedModel;
- getPreparedModel(preparedModelCallback, &preparedModel);
-
- // early termination if vendor service cannot fully prepare model
- if (!fullySupportsModel && prepareReturnStatus != ErrorStatus::NONE) {
- ASSERT_EQ(nullptr, preparedModel.get());
- LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
- "prepare model that it does not support.";
- std::cout << "[ ] Early termination of test because vendor service cannot "
- "prepare model that it does not support."
- << std::endl;
- GTEST_SKIP();
- }
- EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
- ASSERT_NE(nullptr, preparedModel.get());
-
- EvaluatePreparedModel(preparedModel, is_ignored, examples,
- model.relaxComputationFloat32toFloat16, 1e-5f, 1e-5f, Executor::ASYNC,
- MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
-}
-
-void PrepareModel(const sp<V1_2::IDevice>& device, const V1_2::Model& model,
- sp<V1_2::IPreparedModel>* preparedModel) {
- // see if service can handle model
- bool fullySupportsModel = false;
- Return<void> supportedCall = device->getSupportedOperations_1_2(
- model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
- ASSERT_EQ(ErrorStatus::NONE, status);
- ASSERT_NE(0ul, supported.size());
- fullySupportsModel =
- std::all_of(supported.begin(), supported.end(), [](bool valid) { return valid; });
- });
- ASSERT_TRUE(supportedCall.isOk());
-
- // launch prepare model
- sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback();
- ASSERT_NE(nullptr, preparedModelCallback.get());
- Return<ErrorStatus> prepareLaunchStatus = device->prepareModel_1_2(
- model, ExecutionPreference::FAST_SINGLE_ANSWER, hidl_vec<hidl_handle>(),
- hidl_vec<hidl_handle>(), HidlToken(), preparedModelCallback);
- ASSERT_TRUE(prepareLaunchStatus.isOk());
- ASSERT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(prepareLaunchStatus));
-
- // retrieve prepared model
- preparedModelCallback->wait();
- ErrorStatus prepareReturnStatus = preparedModelCallback->getStatus();
- getPreparedModel(preparedModelCallback, preparedModel);
-
- // early termination if vendor service cannot fully prepare model
- if (!fullySupportsModel && prepareReturnStatus != ErrorStatus::NONE) {
- ASSERT_EQ(nullptr, preparedModel->get());
- LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
- "prepare model that it does not support.";
- std::cout << "[ ] Early termination of test because vendor service cannot "
- "prepare model that it does not support."
- << std::endl;
- return;
- }
- EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
- ASSERT_NE(nullptr, preparedModel->get());
-}
-
-// TODO: Reduce code duplication.
-void Execute(const sp<V1_2::IDevice>& device, std::function<V1_2::Model(void)> create_model,
- std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples,
- bool testDynamicOutputShape) {
- V1_2::Model model = create_model();
- sp<V1_2::IPreparedModel> preparedModel = nullptr;
- PrepareModel(device, model, &preparedModel);
- if (preparedModel == nullptr) {
- GTEST_SKIP();
- }
- EvaluatePreparedModel(preparedModel, is_ignored, examples,
- model.relaxComputationFloat32toFloat16, testDynamicOutputShape);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, fpAtol, fpRtol);
}
} // namespace generated_tests
-
} // namespace neuralnetworks
} // namespace hardware
} // namespace android
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h
index c7d2399..11950d9 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.h
@@ -14,14 +14,11 @@
* limitations under the License.
*/
-#ifndef VTS_HAL_NEURALNETWORKS_GENERATED_TEST_HARNESS_H
-#define VTS_HAL_NEURALNETWORKS_GENERATED_TEST_HARNESS_H
-
-#include "TestHarness.h"
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_0_GENERATED_TEST_HARNESS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_GENERATED_TEST_HARNESS_H
#include <android/hardware/neuralnetworks/1.0/IDevice.h>
-#include <android/hardware/neuralnetworks/1.1/IDevice.h>
-#include <android/hardware/neuralnetworks/1.2/IDevice.h>
+#include "TestHarness.h"
namespace android {
namespace hardware {
@@ -30,28 +27,13 @@
namespace generated_tests {
using ::test_helper::MixedTypedExample;
-void PrepareModel(const sp<V1_2::IDevice>& device, const V1_2::Model& model,
- sp<V1_2::IPreparedModel>* preparedModel);
-
-void EvaluatePreparedModel(sp<V1_2::IPreparedModel>& preparedModel,
- std::function<bool(int)> is_ignored,
- const std::vector<MixedTypedExample>& examples,
- bool hasRelaxedFloat32Model, bool testDynamicOutputShape);
-
void Execute(const sp<V1_0::IDevice>& device, std::function<V1_0::Model(void)> create_model,
std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples);
-void Execute(const sp<V1_1::IDevice>& device, std::function<V1_1::Model(void)> create_model,
- std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples);
-
-void Execute(const sp<V1_2::IDevice>& device, std::function<V1_2::Model(void)> create_model,
- std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples,
- bool testDynamicOutputShape = false);
-
} // namespace generated_tests
} // namespace neuralnetworks
} // namespace hardware
} // namespace android
-#endif // VTS_HAL_NEURALNETWORKS_GENERATED_TEST_HARNESS_H
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_GENERATED_TEST_HARNESS_H
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
similarity index 83%
copy from neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
copy to neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
index d1c7de3..32e9a7f 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
@@ -16,17 +16,16 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,15 +33,16 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_0/all_generated_V1_0_vts_tests.cpp"
} // namespace functional
} // namespace vts
diff --git a/neuralnetworks/1.0/vts/functional/Utils.cpp b/neuralnetworks/1.0/vts/functional/Utils.cpp
new file mode 100644
index 0000000..521e524
--- /dev/null
+++ b/neuralnetworks/1.0/vts/functional/Utils.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GeneratedTestHarness.h"
+#include "TestHarness.h"
+
+#include <android/hardware/neuralnetworks/1.0/types.h>
+
+#include <cstring>
+#include <map>
+#include <vector>
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
+using ::test_helper::for_each;
+using ::test_helper::MixedTyped;
+
+template <typename T>
+void copy_back_(std::map<int, std::vector<T>>* dst, const std::vector<RequestArgument>& ra,
+ char* src) {
+ for_each<T>(*dst, [&ra, src](int index, std::vector<T>& m) {
+ ASSERT_EQ(m.size(), ra[index].location.length / sizeof(T));
+ char* begin = src + ra[index].location.offset;
+ memcpy(m.data(), begin, ra[index].location.length);
+ });
+}
+
+void copy_back(MixedTyped* dst, const std::vector<RequestArgument>& ra, char* src) {
+ copy_back_(&dst->float32Operands, ra, src);
+ copy_back_(&dst->int32Operands, ra, src);
+ copy_back_(&dst->quant8AsymmOperands, ra, src);
+ copy_back_(&dst->quant16SymmOperands, ra, src);
+ copy_back_(&dst->float16Operands, ra, src);
+ copy_back_(&dst->bool8Operands, ra, src);
+ copy_back_(&dst->quant8ChannelOperands, ra, src);
+ copy_back_(&dst->quant16AsymmOperands, ra, src);
+ copy_back_(&dst->quant8SymmOperands, ra, src);
+ static_assert(9 == MixedTyped::kNumTypes,
+ "Number of types in MixedTyped changed, but copy_back function wasn't updated");
+}
+
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
diff --git a/neuralnetworks/1.0/vts/functional/ValidateModel.cpp b/neuralnetworks/1.0/vts/functional/ValidateModel.cpp
index 5d24fb5..72c4a2b 100644
--- a/neuralnetworks/1.0/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.0/vts/functional/ValidateModel.cpp
@@ -18,7 +18,7 @@
#include "VtsHalNeuralnetworks.h"
-#include "Callbacks.h"
+#include "1.0/Callbacks.h"
namespace android {
namespace hardware {
@@ -27,8 +27,8 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
///////////////////////// UTILITY FUNCTIONS /////////////////////////
diff --git a/neuralnetworks/1.0/vts/functional/ValidateRequest.cpp b/neuralnetworks/1.0/vts/functional/ValidateRequest.cpp
index f0c93b7..058eb25 100644
--- a/neuralnetworks/1.0/vts/functional/ValidateRequest.cpp
+++ b/neuralnetworks/1.0/vts/functional/ValidateRequest.cpp
@@ -16,16 +16,15 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Callbacks.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -33,7 +32,7 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
using ::android::hidl::memory::V1_0::IMemory;
using test_helper::for_all;
using test_helper::MixedTyped;
@@ -121,11 +120,13 @@
for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = INPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
RequestArgument arg_empty = {
- .hasNoValue = true,
+ .hasNoValue = true,
};
inputs_info[index] = s ? arg : arg_empty;
inputSize += s;
@@ -143,8 +144,10 @@
for_all(outputs, [&outputs_info, &outputSize](int index, auto, auto s) {
if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = OUTPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
outputs_info[index] = arg;
outputSize += s;
diff --git a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.cpp b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.cpp
index aee2f85..95b7ad3 100644
--- a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.cpp
+++ b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.cpp
@@ -20,7 +20,7 @@
#include <android-base/logging.h>
-#include "Callbacks.h"
+#include "1.0/Callbacks.h"
namespace android {
namespace hardware {
@@ -29,7 +29,7 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
static void createPreparedModel(const sp<IDevice>& device, const V1_0::Model& model,
sp<IPreparedModel>* preparedModel) {
diff --git a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.h b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.h
index 22285be..c32a91d 100644
--- a/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.h
+++ b/neuralnetworks/1.0/vts/functional/VtsHalNeuralnetworks.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef VTS_HAL_NEURALNETWORKS_V1_0_TARGET_TESTS_H
-#define VTS_HAL_NEURALNETWORKS_V1_0_TARGET_TESTS_H
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_0_VTS_HAL_NEURALNETWORKS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_VTS_HAL_NEURALNETWORKS_H
#include <android/hardware/neuralnetworks/1.0/IDevice.h>
#include <android/hardware/neuralnetworks/1.0/types.h>
@@ -89,4 +89,4 @@
} // namespace android::hardware::neuralnetworks::V1_0
-#endif // VTS_HAL_NEURALNETWORKS_V1_0_TARGET_TESTS_H
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_VTS_HAL_NEURALNETWORKS_H
diff --git a/neuralnetworks/1.0/vts/functional/include/1.0/Callbacks.h b/neuralnetworks/1.0/vts/functional/include/1.0/Callbacks.h
new file mode 100644
index 0000000..820bb10
--- /dev/null
+++ b/neuralnetworks/1.0/vts/functional/include/1.0/Callbacks.h
@@ -0,0 +1,203 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
+
+#include <android-base/thread_annotations.h>
+#include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
+#include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
+#include <hidl/Status.h>
+#include <condition_variable>
+#include <mutex>
+
+/*
+ * The Callback classes are used internally by the NeuralNetworks runtime to
+ * synchronize between different threads. An asynchronous task is launched
+ * paired with a callback object. When a client thread requires the output being
+ * generated by the asynchronous task, the client thread can wait for the result
+ * and be blocked until it has completed. Any wait may safely be called
+ * concurrently, even on the same callback object. When the asynchronous task
+ * has finished its workload, it must immediately call "notify". If the
+ * asynchronous task has failed to launch, the function that tried to launch the
+ * asynchronous task must immediately call "notify". This "notify" call
+ * awakens any client threads waiting on the callback object.
+ *
+ * These classes exist to enable synchronization across HIDL. When
+ * synchronization is only required in the same process, consider using
+ * std::future, std::mutex, std::condition_variable, or std::experimental::latch
+ * instead.
+ */
+
+namespace android::hardware::neuralnetworks::V1_0::implementation {
+
+/**
+ * The PreparedModelCallback class is used to receive the error status of
+ * preparing a model as well as the prepared model from a task executing
+ * asynchronously with respect to the runtime. If a calling thread calls wait
+ * or get* on a PreparedModelCallback object and the corresponding asynchronous
+ * task has not finished preparing the model, the calling thread will block
+ * until the asynchronous task has called notify.
+ *
+ * If the callback object is notified more than once, only the results of the
+ * first call to notify are used, and the results from subsequent calls are
+ * discarded.
+ *
+ * This callback object is passed as an argument to IDevice::prepareModel*.
+ */
+class PreparedModelCallback : public IPreparedModelCallback {
+ public:
+ /**
+ * IPreparedModelCallback::notify marks the callback object with the return
+ * status of the asynchronous model preparation along with the prepared
+ * model, and allows all prior and future wait calls on the
+ * PreparedModelCallback object to proceed.
+ *
+ * IPreparedModelCallback::notify must be called on a given
+ * PreparedModelCallback object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from asynchronously preparing the
+ * model; will be:
+ * - NONE if the asynchronous preparation was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if the input model is invalid
+ * @param preparedModel Returned model that has been prepared for execution,
+ * nullptr if the model was unable to be prepared.
+ */
+ Return<void> notify(ErrorStatus status, const sp<IPreparedModel>& preparedModel) override;
+
+ /**
+ * PreparedModelCallback::wait blocks until notify has been called on the
+ * callback object.
+ */
+ void wait() const;
+
+ /**
+ * Retrieves the error status returned from the asynchronous task launched
+ * by IDevice::prepareModel*. If IDevice::prepareModel* has not finished
+ * asynchronously preparing the model, this call will block until the
+ * asynchronous task notifies the object.
+ *
+ * @return status Error status returned from asynchronously preparing the
+ * model; will be:
+ * - NONE if the asynchronous preparation was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if the input model is invalid
+ */
+ ErrorStatus getStatus() const;
+
+ /**
+ * Retrieves the model that has been prepared for execution from the
+ * asynchronous task launched by IDevice::prepareModel*. If
+ * IDevice::prepareModel* has not finished asynchronously preparing the
+ * model, this call will block until the asynchronous task notifies the
+ * object.
+ *
+ * @return preparedModel Returned model that has been prepared for
+ * execution, nullptr if the model was unable to be prepared.
+ */
+ sp<IPreparedModel> getPreparedModel() const;
+
+ private:
+ mutable std::mutex mMutex;
+ mutable std::condition_variable mCondition;
+ bool mNotified GUARDED_BY(mMutex) = false;
+ ErrorStatus mErrorStatus = ErrorStatus::GENERAL_FAILURE;
+ sp<IPreparedModel> mPreparedModel;
+};
+
+/**
+ * The ExecutionCallback class is used to receive the results of the execution
+ * from a task executing asynchronously with respect to the runtime. If a
+ * calling thread calls wait or get* on a ExecutionCallback object and the
+ * corresponding asynchronous task has not finished the execution, the calling
+ * thread will block until the asynchronous task has called notify.
+ *
+ * If the callback object is notified more than once, only the results of the
+ * first call to notify are used, and the results from subsequent calls are
+ * discarded.
+ *
+ * This callback object is passed as an argument to IPreparedModel::execute*.
+ */
+class ExecutionCallback : public IExecutionCallback {
+ public:
+ /**
+ * IExecutionCallback::notify marks the callback object with the return
+ * status of the asynchronous execution that held this callback and enables
+ * all prior and future wait calls on the ExecutionCallback object to
+ * proceed.
+ *
+ * IExecutionCallback::notify must be called on a given ExecutionCallback
+ * object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from launching the asynchronous task
+ * (if the launch fails) or from the asynchronous task itself (if the
+ * launch succeeds). Must be:
+ * - NONE if the asynchronous execution was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - OUTPUT_INSUFFICIENT_SIZE if provided output buffer is not large
+ * enough to store the resultant values
+ * - INVALID_ARGUMENT if the input request is invalid
+ */
+ Return<void> notify(ErrorStatus status) override;
+
+ /**
+ * ExecutionCallback::wait blocks until notify has been called on the
+ * callback object.
+ */
+ void wait() const;
+
+ /**
+ * Retrieves the error status returned from the asynchronous task launched
+ * by IPreparedModel::execute. If IPreparedModel::execute has not finished
+ * asynchronously executing, this call will block until the asynchronous
+ * task notifies the object.
+ *
+ * @return status Error status returned from launching the asynchronous task
+ * (if the launch fails) or from the asynchronous task itself (if the
+ * launch succeeds). Must be:
+ * - NONE if the asynchronous execution was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if the asynchronous task resulted in an unspecified
+ * error
+ * - OUTPUT_INSUFFICIENT_SIZE if at least one output operand buffer is
+ * not large enough to store the corresponding output
+ * - INVALID_ARGUMENT if one of the input arguments to prepareModel is
+ * invalid
+ */
+ ErrorStatus getStatus() const;
+
+ private:
+ mutable std::mutex mMutex;
+ mutable std::condition_variable mCondition;
+ bool mNotified GUARDED_BY(mMutex) = false;
+ ErrorStatus mErrorStatus = ErrorStatus::GENERAL_FAILURE;
+};
+
+} // namespace android::hardware::neuralnetworks::V1_0::implementation
+
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_CALLBACKS_H
diff --git a/neuralnetworks/1.0/vts/functional/include/1.0/Utils.h b/neuralnetworks/1.0/vts/functional/include/1.0/Utils.h
new file mode 100644
index 0000000..b270c20
--- /dev/null
+++ b/neuralnetworks/1.0/vts/functional/include/1.0/Utils.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_0_UTILS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_0_UTILS_H
+
+#include <android/hardware/neuralnetworks/1.0/types.h>
+#include <algorithm>
+#include <vector>
+#include "TestHarness.h"
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+
+void copy_back(::test_helper::MixedTyped* dst, const std::vector<V1_0::RequestArgument>& ra,
+ char* src);
+
+// Delete element from hidl_vec. hidl_vec doesn't support a "remove" operation,
+// so this is efficiently accomplished by moving the element to the end and
+// resizing the hidl_vec to one less.
+template <typename Type>
+inline void hidl_vec_removeAt(hidl_vec<Type>* vec, uint32_t index) {
+ if (vec) {
+ std::rotate(vec->begin() + index, vec->begin() + index + 1, vec->end());
+ vec->resize(vec->size() - 1);
+ }
+}
+
+template <typename Type>
+inline uint32_t hidl_vec_push_back(hidl_vec<Type>* vec, const Type& value) {
+ // assume vec is valid
+ const uint32_t index = vec->size();
+ vec->resize(index + 1);
+ (*vec)[index] = value;
+ return index;
+}
+
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_0_UTILS_H
diff --git a/neuralnetworks/1.1/vts/functional/Android.bp b/neuralnetworks/1.1/vts/functional/Android.bp
index 4fbeac9..ee90ec6 100644
--- a/neuralnetworks/1.1/vts/functional/Android.bp
+++ b/neuralnetworks/1.1/vts/functional/Android.bp
@@ -14,10 +14,41 @@
// limitations under the License.
//
+cc_defaults {
+ name: "VtsHalNeuralNetworksV1_1TargetTestDefaults",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: [
+ "ValidateModel.cpp",
+ "ValidateRequest.cpp",
+ "VtsHalNeuralnetworks.cpp",
+ "GeneratedTestHarness.cpp",
+ ],
+ shared_libs: [
+ "libfmq",
+ "libnativewindow",
+ ],
+ static_libs: [
+ "android.hardware.neuralnetworks@1.0",
+ "android.hardware.neuralnetworks@1.1",
+ "android.hidl.allocator@1.0",
+ "android.hidl.memory@1.0",
+ "libgmock",
+ "libhidlmemory",
+ "libneuralnetworks_utils",
+ "VtsHalNeuralNetworksV1_0_utils",
+ ],
+ header_libs: [
+ "libneuralnetworks_headers",
+ "libneuralnetworks_generated_test_harness_headers",
+ "libneuralnetworks_generated_tests",
+ ],
+ test_suites: ["general-tests"],
+}
+
// Tests for V1_0 models using the V1_1 HAL.
cc_test {
name: "VtsHalNeuralnetworksV1_1CompatV1_0TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_1TargetTestDefaults"],
srcs: [
"GeneratedTestsV1_0.cpp",
],
@@ -26,19 +57,19 @@
// Tests for V1_1 models.
cc_test {
name: "VtsHalNeuralnetworksV1_1TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_1TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_1.cpp",
],
}
cc_test {
name: "PresubmitHalNeuralnetworksV1_1TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_1TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_1.cpp",
],
cflags: [
"-DPRESUBMIT_NOT_VTS",
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.cpp
new file mode 100644
index 0000000..d9f64fd
--- /dev/null
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.cpp
@@ -0,0 +1,232 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GeneratedTestHarness.h"
+
+#include <android-base/logging.h>
+#include <android/hardware/neuralnetworks/1.0/IPreparedModel.h>
+#include <android/hardware/neuralnetworks/1.0/types.h>
+#include <android/hardware/neuralnetworks/1.1/IDevice.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
+#include <android/hidl/memory/1.0/IMemory.h>
+#include <hidlmemory/mapping.h>
+
+#include <iostream>
+
+#include "1.0/Callbacks.h"
+#include "1.0/Utils.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+namespace generated_tests {
+
+using ::android::hardware::neuralnetworks::V1_0::ErrorStatus;
+using ::android::hardware::neuralnetworks::V1_0::IPreparedModel;
+using ::android::hardware::neuralnetworks::V1_0::Request;
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_1::ExecutionPreference;
+using ::android::hardware::neuralnetworks::V1_1::IDevice;
+using ::android::hardware::neuralnetworks::V1_1::Model;
+using ::android::hidl::memory::V1_0::IMemory;
+using ::test_helper::compare;
+using ::test_helper::filter;
+using ::test_helper::for_all;
+using ::test_helper::MixedTyped;
+using ::test_helper::MixedTypedExample;
+using ::test_helper::resize_accordingly;
+
+// Top level driver for models and examples generated by test_generator.py
+// Test driver for those generated from ml/nn/runtime/test/spec
+void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples,
+ bool hasRelaxedFloat32Model, float fpAtol, float fpRtol) {
+ const uint32_t INPUT = 0;
+ const uint32_t OUTPUT = 1;
+
+ int example_no = 1;
+ for (auto& example : examples) {
+ SCOPED_TRACE(example_no++);
+ const MixedTyped& inputs = example.operands.first;
+ const MixedTyped& golden = example.operands.second;
+
+ const bool hasFloat16Inputs = !inputs.float16Operands.empty();
+ if (hasRelaxedFloat32Model || hasFloat16Inputs) {
+ // TODO: Adjust the error limit based on testing.
+ // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
+ fpAtol = 5.0f * 0.0009765625f;
+ // Set the relative tolerance to be 5ULP of the corresponding FP precision.
+ fpRtol = 5.0f * 0.0009765625f;
+ }
+
+ std::vector<RequestArgument> inputs_info, outputs_info;
+ uint32_t inputSize = 0, outputSize = 0;
+ // This function only partially specifies the metadata (vector of RequestArguments).
+ // The contents are copied over below.
+ for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
+ if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
+ RequestArgument arg = {
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
+ };
+ RequestArgument arg_empty = {
+ .hasNoValue = true,
+ };
+ inputs_info[index] = s ? arg : arg_empty;
+ inputSize += s;
+ });
+ // Compute offset for inputs 1 and so on
+ {
+ size_t offset = 0;
+ for (auto& i : inputs_info) {
+ if (!i.hasNoValue) i.location.offset = offset;
+ offset += i.location.length;
+ }
+ }
+
+ MixedTyped test; // holding test results
+
+ // Go through all outputs, initialize RequestArgument descriptors
+ resize_accordingly(golden, test);
+ for_all(golden, [&outputs_info, &outputSize](int index, auto, auto s) {
+ if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
+ RequestArgument arg = {
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
+ };
+ outputs_info[index] = arg;
+ outputSize += s;
+ });
+ // Compute offset for outputs 1 and so on
+ {
+ size_t offset = 0;
+ for (auto& i : outputs_info) {
+ i.location.offset = offset;
+ offset += i.location.length;
+ }
+ }
+ std::vector<hidl_memory> pools = {nn::allocateSharedMemory(inputSize),
+ nn::allocateSharedMemory(outputSize)};
+ ASSERT_NE(0ull, pools[INPUT].size());
+ ASSERT_NE(0ull, pools[OUTPUT].size());
+
+ // load data
+ sp<IMemory> inputMemory = mapMemory(pools[INPUT]);
+ sp<IMemory> outputMemory = mapMemory(pools[OUTPUT]);
+ ASSERT_NE(nullptr, inputMemory.get());
+ ASSERT_NE(nullptr, outputMemory.get());
+ char* inputPtr = reinterpret_cast<char*>(static_cast<void*>(inputMemory->getPointer()));
+ char* outputPtr = reinterpret_cast<char*>(static_cast<void*>(outputMemory->getPointer()));
+ ASSERT_NE(nullptr, inputPtr);
+ ASSERT_NE(nullptr, outputPtr);
+ inputMemory->update();
+ outputMemory->update();
+
+ // Go through all inputs, copy the values
+ for_all(inputs, [&inputs_info, inputPtr](int index, auto p, auto s) {
+ char* begin = (char*)p;
+ char* end = begin + s;
+ // TODO: handle more than one input
+ std::copy(begin, end, inputPtr + inputs_info[index].location.offset);
+ });
+
+ inputMemory->commit();
+ outputMemory->commit();
+
+ const Request request = {.inputs = inputs_info, .outputs = outputs_info, .pools = pools};
+
+ // launch execution
+ sp<ExecutionCallback> executionCallback = new ExecutionCallback();
+ ASSERT_NE(nullptr, executionCallback.get());
+ Return<ErrorStatus> executionLaunchStatus =
+ preparedModel->execute(request, executionCallback);
+ ASSERT_TRUE(executionLaunchStatus.isOk());
+ EXPECT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(executionLaunchStatus));
+
+ // retrieve execution status
+ executionCallback->wait();
+ ASSERT_EQ(ErrorStatus::NONE, executionCallback->getStatus());
+
+ // validate results
+ outputMemory->read();
+ copy_back(&test, outputs_info, outputPtr);
+ outputMemory->commit();
+ // Filter out don't cares
+ MixedTyped filtered_golden = filter(golden, is_ignored);
+ MixedTyped filtered_test = filter(test, is_ignored);
+
+ // We want "close-enough" results for float
+ compare(filtered_golden, filtered_test, fpAtol, fpRtol);
+ }
+}
+
+void Execute(const sp<IDevice>& device, std::function<Model(void)> create_model,
+ std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples) {
+ Model model = create_model();
+
+ // see if service can handle model
+ bool fullySupportsModel = false;
+ Return<void> supportedCall = device->getSupportedOperations_1_1(
+ model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
+ ASSERT_EQ(ErrorStatus::NONE, status);
+ ASSERT_NE(0ul, supported.size());
+ fullySupportsModel = std::all_of(supported.begin(), supported.end(),
+ [](bool valid) { return valid; });
+ });
+ ASSERT_TRUE(supportedCall.isOk());
+
+ // launch prepare model
+ sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback();
+ ASSERT_NE(nullptr, preparedModelCallback.get());
+ Return<ErrorStatus> prepareLaunchStatus = device->prepareModel_1_1(
+ model, ExecutionPreference::FAST_SINGLE_ANSWER, preparedModelCallback);
+ ASSERT_TRUE(prepareLaunchStatus.isOk());
+ ASSERT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(prepareLaunchStatus));
+
+ // retrieve prepared model
+ preparedModelCallback->wait();
+ ErrorStatus prepareReturnStatus = preparedModelCallback->getStatus();
+ sp<IPreparedModel> preparedModel = preparedModelCallback->getPreparedModel();
+
+ // early termination if vendor service cannot fully prepare model
+ if (!fullySupportsModel && prepareReturnStatus != ErrorStatus::NONE) {
+ ASSERT_EQ(nullptr, preparedModel.get());
+ LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
+ "prepare model that it does not support.";
+ std::cout << "[ ] Early termination of test because vendor service cannot "
+ "prepare model that it does not support."
+ << std::endl;
+ GTEST_SKIP();
+ }
+ EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
+ ASSERT_NE(nullptr, preparedModel.get());
+
+ EvaluatePreparedModel(preparedModel, is_ignored, examples,
+ model.relaxComputationFloat32toFloat16, 1e-5f, 1e-5f);
+}
+
+} // namespace generated_tests
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.h b/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.h
new file mode 100644
index 0000000..ab71b2b
--- /dev/null
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestHarness.h
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_1_GENERATED_TEST_HARNESS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_1_GENERATED_TEST_HARNESS_H
+
+#include <android/hardware/neuralnetworks/1.1/IDevice.h>
+#include <android/hardware/neuralnetworks/1.1/types.h>
+#include <functional>
+#include <vector>
+#include "TestHarness.h"
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+namespace generated_tests {
+
+void Execute(const sp<V1_1::IDevice>& device, std::function<V1_1::Model(void)> create_model,
+ std::function<bool(int)> is_ignored,
+ const std::vector<::test_helper::MixedTypedExample>& examples);
+
+} // namespace generated_tests
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_1_GENERATED_TEST_HARNESS_H
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
index e67ef8e..23e6534 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
@@ -16,17 +16,16 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,15 +33,17 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_1/all_generated_V1_0_vts_tests.cpp"
} // namespace functional
} // namespace vts
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
similarity index 80%
rename from neuralnetworks/1.1/vts/functional/GeneratedTests.cpp
rename to neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
index 4db1276..680b93a 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
@@ -16,17 +16,16 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,15 +33,17 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_1_vts_tests.cpp"
+#include "vts/V1_1/all_generated_V1_1_vts_tests.cpp"
} // namespace functional
} // namespace vts
diff --git a/neuralnetworks/1.1/vts/functional/ValidateModel.cpp b/neuralnetworks/1.1/vts/functional/ValidateModel.cpp
index b35a901..fb80d13 100644
--- a/neuralnetworks/1.1/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.1/vts/functional/ValidateModel.cpp
@@ -16,25 +16,22 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
+#include "1.0/Callbacks.h"
+#include "1.0/Utils.h"
#include "VtsHalNeuralnetworks.h"
-#include "Callbacks.h"
-
namespace android {
namespace hardware {
namespace neuralnetworks {
namespace V1_1 {
-
-using V1_0::IPreparedModel;
-using V1_0::Operand;
-using V1_0::OperandLifeTime;
-using V1_0::OperandType;
-
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::IPreparedModel;
+using ::android::hardware::neuralnetworks::V1_0::Operand;
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
+using ::android::hardware::neuralnetworks::V1_0::OperandType;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
///////////////////////// UTILITY FUNCTIONS /////////////////////////
@@ -42,10 +39,10 @@
const V1_1::Model& model) {
SCOPED_TRACE(message + " [getSupportedOperations_1_1]");
- Return<void> ret =
- device->getSupportedOperations_1_1(model, [&](ErrorStatus status, const hidl_vec<bool>&) {
- EXPECT_EQ(ErrorStatus::INVALID_ARGUMENT, status);
- });
+ Return<void> ret = device->getSupportedOperations_1_1(
+ model, [&](ErrorStatus status, const hidl_vec<bool>&) {
+ EXPECT_EQ(ErrorStatus::INVALID_ARGUMENT, status);
+ });
EXPECT_TRUE(ret.isOk());
}
@@ -56,7 +53,7 @@
sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback();
ASSERT_NE(nullptr, preparedModelCallback.get());
Return<ErrorStatus> prepareLaunchStatus =
- device->prepareModel_1_1(model, preference, preparedModelCallback);
+ device->prepareModel_1_1(model, preference, preparedModelCallback);
ASSERT_TRUE(prepareLaunchStatus.isOk());
ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, static_cast<ErrorStatus>(prepareLaunchStatus));
@@ -87,36 +84,16 @@
validatePrepareModel(device, message, model, preference);
}
-// Delete element from hidl_vec. hidl_vec doesn't support a "remove" operation,
-// so this is efficiently accomplished by moving the element to the end and
-// resizing the hidl_vec to one less.
-template <typename Type>
-static void hidl_vec_removeAt(hidl_vec<Type>* vec, uint32_t index) {
- if (vec) {
- std::rotate(vec->begin() + index, vec->begin() + index + 1, vec->end());
- vec->resize(vec->size() - 1);
- }
-}
-
-template <typename Type>
-static uint32_t hidl_vec_push_back(hidl_vec<Type>* vec, const Type& value) {
- // assume vec is valid
- const uint32_t index = vec->size();
- vec->resize(index + 1);
- (*vec)[index] = value;
- return index;
-}
-
static uint32_t addOperand(Model* model) {
return hidl_vec_push_back(&model->operands,
{
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 0,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_INPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 0,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
});
}
@@ -130,10 +107,10 @@
///////////////////////// VALIDATE MODEL OPERAND TYPE /////////////////////////
static const int32_t invalidOperandTypes[] = {
- static_cast<int32_t>(OperandType::FLOAT32) - 1, // lower bound fundamental
- static_cast<int32_t>(OperandType::TENSOR_QUANT8_ASYMM) + 1, // upper bound fundamental
- static_cast<int32_t>(OperandType::OEM) - 1, // lower bound OEM
- static_cast<int32_t>(OperandType::TENSOR_OEM_BYTE) + 1, // upper bound OEM
+ static_cast<int32_t>(OperandType::FLOAT32) - 1, // lower bound fundamental
+ static_cast<int32_t>(OperandType::TENSOR_QUANT8_ASYMM) + 1, // upper bound fundamental
+ static_cast<int32_t>(OperandType::OEM) - 1, // lower bound OEM
+ static_cast<int32_t>(OperandType::TENSOR_OEM_BYTE) + 1, // upper bound OEM
};
static void mutateOperandTypeTest(const sp<IDevice>& device, const V1_1::Model& model) {
@@ -226,7 +203,7 @@
static void mutateOperandZeroPointTest(const sp<IDevice>& device, const V1_1::Model& model) {
for (size_t operand = 0; operand < model.operands.size(); ++operand) {
const std::vector<int32_t> invalidZeroPoints =
- getInvalidZeroPoints(model.operands[operand].type);
+ getInvalidZeroPoints(model.operands[operand].type);
for (int32_t invalidZeroPoint : invalidZeroPoints) {
const std::string message = "mutateOperandZeroPointTest: operand " +
std::to_string(operand) + " has zero point of " +
@@ -258,18 +235,18 @@
break;
case OperandType::TENSOR_FLOAT32:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.scale = 0.0f;
newOperand.zeroPoint = 0;
break;
case OperandType::TENSOR_INT32:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.zeroPoint = 0;
break;
case OperandType::TENSOR_QUANT8_ASYMM:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f;
break;
case OperandType::OEM:
@@ -319,10 +296,10 @@
///////////////////////// VALIDATE MODEL OPERATION TYPE /////////////////////////
static const int32_t invalidOperationTypes[] = {
- static_cast<int32_t>(OperationType::ADD) - 1, // lower bound fundamental
- static_cast<int32_t>(OperationType::TRANSPOSE) + 1, // upper bound fundamental
- static_cast<int32_t>(OperationType::OEM_OPERATION) - 1, // lower bound OEM
- static_cast<int32_t>(OperationType::OEM_OPERATION) + 1, // upper bound OEM
+ static_cast<int32_t>(OperationType::ADD) - 1, // lower bound fundamental
+ static_cast<int32_t>(OperationType::TRANSPOSE) + 1, // upper bound fundamental
+ static_cast<int32_t>(OperationType::OEM_OPERATION) - 1, // lower bound OEM
+ static_cast<int32_t>(OperationType::OEM_OPERATION) + 1, // upper bound OEM
};
static void mutateOperationTypeTest(const sp<IDevice>& device, const V1_1::Model& model) {
@@ -333,7 +310,7 @@
std::to_string(invalidOperationType);
validate(device, message, model, [operation, invalidOperationType](Model* model) {
model->operations[operation].type =
- static_cast<OperationType>(invalidOperationType);
+ static_cast<OperationType>(invalidOperationType);
});
}
}
@@ -486,7 +463,7 @@
static void addOperationOutputTest(const sp<IDevice>& device, const V1_1::Model& model) {
for (size_t operation = 0; operation < model.operations.size(); ++operation) {
const std::string message =
- "addOperationOutputTest: operation " + std::to_string(operation);
+ "addOperationOutputTest: operation " + std::to_string(operation);
validate(device, message, model, [operation](Model* model) {
uint32_t index = addOperand(model, OperandLifeTime::MODEL_OUTPUT);
hidl_vec_push_back(&model->operations[operation].outputs, index);
@@ -498,14 +475,14 @@
///////////////////////// VALIDATE EXECUTION PREFERENCE /////////////////////////
static const int32_t invalidExecutionPreferences[] = {
- static_cast<int32_t>(ExecutionPreference::LOW_POWER) - 1, // lower bound
- static_cast<int32_t>(ExecutionPreference::SUSTAINED_SPEED) + 1, // upper bound
+ static_cast<int32_t>(ExecutionPreference::LOW_POWER) - 1, // lower bound
+ static_cast<int32_t>(ExecutionPreference::SUSTAINED_SPEED) + 1, // upper bound
};
static void mutateExecutionPreferenceTest(const sp<IDevice>& device, const V1_1::Model& model) {
for (int32_t preference : invalidExecutionPreferences) {
const std::string message =
- "mutateExecutionPreferenceTest: preference " + std::to_string(preference);
+ "mutateExecutionPreferenceTest: preference " + std::to_string(preference);
validate(device, message, model, [](Model*) {},
static_cast<ExecutionPreference>(preference));
}
diff --git a/neuralnetworks/1.1/vts/functional/ValidateRequest.cpp b/neuralnetworks/1.1/vts/functional/ValidateRequest.cpp
index f4adbab..c549728 100644
--- a/neuralnetworks/1.1/vts/functional/ValidateRequest.cpp
+++ b/neuralnetworks/1.1/vts/functional/ValidateRequest.cpp
@@ -16,16 +16,16 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Callbacks.h"
+#include "1.0/Utils.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -33,11 +33,15 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_0::ErrorStatus;
+using ::android::hardware::neuralnetworks::V1_0::Request;
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
+using ::android::hardware::neuralnetworks::V1_0::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_1::IPreparedModel;
using ::android::hidl::memory::V1_0::IMemory;
-using test_helper::for_all;
-using test_helper::MixedTyped;
-using test_helper::MixedTypedExample;
+using ::test_helper::for_all;
+using ::test_helper::MixedTyped;
+using ::test_helper::MixedTypedExample;
///////////////////////// UTILITY FUNCTIONS /////////////////////////
@@ -61,26 +65,6 @@
ASSERT_EQ(ErrorStatus::INVALID_ARGUMENT, executionReturnStatus);
}
-// Delete element from hidl_vec. hidl_vec doesn't support a "remove" operation,
-// so this is efficiently accomplished by moving the element to the end and
-// resizing the hidl_vec to one less.
-template <typename Type>
-static void hidl_vec_removeAt(hidl_vec<Type>* vec, uint32_t index) {
- if (vec) {
- std::rotate(vec->begin() + index, vec->begin() + index + 1, vec->end());
- vec->resize(vec->size() - 1);
- }
-}
-
-template <typename Type>
-static uint32_t hidl_vec_push_back(hidl_vec<Type>* vec, const Type& value) {
- // assume vec is valid
- const uint32_t index = vec->size();
- vec->resize(index + 1);
- (*vec)[index] = value;
- return index;
-}
-
///////////////////////// REMOVE INPUT ////////////////////////////////////
static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) {
@@ -121,11 +105,13 @@
for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = INPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
RequestArgument arg_empty = {
- .hasNoValue = true,
+ .hasNoValue = true,
};
inputs_info[index] = s ? arg : arg_empty;
inputSize += s;
@@ -143,8 +129,10 @@
for_all(outputs, [&outputs_info, &outputSize](int index, auto, auto s) {
if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = OUTPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
outputs_info[index] = arg;
outputSize += s;
diff --git a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.cpp b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.cpp
index 08069f2..12bdd3f 100644
--- a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.cpp
+++ b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.cpp
@@ -20,7 +20,7 @@
#include <android-base/logging.h>
-#include "Callbacks.h"
+#include "1.0/Callbacks.h"
namespace android {
namespace hardware {
@@ -29,7 +29,7 @@
namespace vts {
namespace functional {
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hardware::neuralnetworks::V1_0::implementation::PreparedModelCallback;
static void createPreparedModel(const sp<IDevice>& device, const V1_1::Model& model,
sp<IPreparedModel>* preparedModel) {
diff --git a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
index f3f587b..3156784 100644
--- a/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
+++ b/neuralnetworks/1.1/vts/functional/VtsHalNeuralnetworks.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef VTS_HAL_NEURALNETWORKS_V1_1_H
-#define VTS_HAL_NEURALNETWORKS_V1_1_H
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_1_VTS_HAL_NEURALNETWORKS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_1_VTS_HAL_NEURALNETWORKS_H
#include <android/hardware/neuralnetworks/1.0/types.h>
#include <android/hardware/neuralnetworks/1.1/IDevice.h>
@@ -98,4 +98,4 @@
} // namespace android::hardware::neuralnetworks::V1_0
-#endif // VTS_HAL_NEURALNETWORKS_V1_1_H
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_1_VTS_HAL_NEURALNETWORKS_H
diff --git a/neuralnetworks/1.2/vts/functional/Android.bp b/neuralnetworks/1.2/vts/functional/Android.bp
index 6c26820..31b8532 100644
--- a/neuralnetworks/1.2/vts/functional/Android.bp
+++ b/neuralnetworks/1.2/vts/functional/Android.bp
@@ -14,57 +14,81 @@
// limitations under the License.
//
+cc_defaults {
+ name: "VtsHalNeuralNetworksV1_2TargetTestDefaults",
+ defaults: ["VtsHalTargetTestDefaults"],
+ srcs: [
+ "ValidateModel.cpp",
+ "ValidateRequest.cpp",
+ "VtsHalNeuralnetworks.cpp",
+ "Callbacks.cpp",
+ "GeneratedTestHarness.cpp",
+ ],
+ local_include_dirs: ["include"],
+ shared_libs: [
+ "libfmq",
+ "libnativewindow",
+ ],
+ static_libs: [
+ "android.hardware.neuralnetworks@1.0",
+ "android.hardware.neuralnetworks@1.1",
+ "android.hardware.neuralnetworks@1.2",
+ "android.hidl.allocator@1.0",
+ "android.hidl.memory@1.0",
+ "libgmock",
+ "libhidlmemory",
+ "libneuralnetworks_utils",
+ "VtsHalNeuralNetworksV1_0_utils",
+ ],
+ header_libs: [
+ "libneuralnetworks_headers",
+ "libneuralnetworks_generated_test_harness_headers",
+ "libneuralnetworks_generated_tests",
+ ],
+ test_suites: ["general-tests"],
+}
+
// Tests for V1_0 models using the V1_2 HAL.
cc_test {
name: "VtsHalNeuralnetworksV1_2CompatV1_0TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_2TargetTestDefaults"],
srcs: [
"GeneratedTestsV1_0.cpp",
"ValidateBurst.cpp",
],
- cflags: [
- "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
- ],
}
// Tests for V1_1 models using the V1_2 HAL.
cc_test {
name: "VtsHalNeuralnetworksV1_2CompatV1_1TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_2TargetTestDefaults"],
srcs: [
"GeneratedTestsV1_1.cpp",
"ValidateBurst.cpp",
],
- cflags: [
- "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
- ],
}
// Tests for V1_2 models.
cc_test {
name: "VtsHalNeuralnetworksV1_2TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_2TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
"CompilationCachingTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_2.cpp",
"ValidateBurst.cpp",
],
- cflags: [
- "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
- ],
}
cc_test {
name: "PresubmitHalNeuralnetworksV1_2TargetTest",
- defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
+ defaults: ["VtsHalNeuralNetworksV1_2TargetTestDefaults"],
srcs: [
"BasicTests.cpp",
- "GeneratedTests.cpp",
+ "GeneratedTestsV1_2.cpp",
"ValidateBurst.cpp",
],
cflags: [
- "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE",
"-DPRESUBMIT_NOT_VTS",
],
}
diff --git a/neuralnetworks/1.2/vts/functional/Callbacks.cpp b/neuralnetworks/1.2/vts/functional/Callbacks.cpp
new file mode 100644
index 0000000..a607a08
--- /dev/null
+++ b/neuralnetworks/1.2/vts/functional/Callbacks.cpp
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "Callbacks"
+
+#include "1.2/Callbacks.h"
+
+#include <android-base/logging.h>
+
+#include <limits>
+
+namespace android::hardware::neuralnetworks::V1_2::implementation {
+
+constexpr Timing kNoTiming = {.timeOnDevice = std::numeric_limits<uint64_t>::max(),
+ .timeInDriver = std::numeric_limits<uint64_t>::max()};
+
+// PreparedModelCallback methods begin here
+
+Return<void> PreparedModelCallback::notify(ErrorStatus errorStatus,
+ const sp<V1_0::IPreparedModel>& preparedModel) {
+ {
+ std::lock_guard<std::mutex> hold(mMutex);
+
+ // quick-return if object has already been notified
+ if (mNotified) {
+ return Void();
+ }
+
+ // store results and mark as notified
+ mErrorStatus = errorStatus;
+ mPreparedModel = preparedModel;
+ mNotified = true;
+ }
+
+ mCondition.notify_all();
+ return Void();
+}
+
+Return<void> PreparedModelCallback::notify_1_2(ErrorStatus errorStatus,
+ const sp<V1_2::IPreparedModel>& preparedModel) {
+ return notify(errorStatus, preparedModel);
+}
+
+void PreparedModelCallback::wait() const {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCondition.wait(lock, [this] { return mNotified; });
+}
+
+ErrorStatus PreparedModelCallback::getStatus() const {
+ wait();
+ return mErrorStatus;
+}
+
+sp<V1_0::IPreparedModel> PreparedModelCallback::getPreparedModel() const {
+ wait();
+ return mPreparedModel;
+}
+
+// ExecutionCallback methods begin here
+
+Return<void> ExecutionCallback::notify(ErrorStatus errorStatus) {
+ notifyInternal(errorStatus, {}, kNoTiming);
+ return Void();
+}
+
+Return<void> ExecutionCallback::notify_1_2(ErrorStatus errorStatus,
+ const hidl_vec<OutputShape>& outputShapes,
+ const Timing& timing) {
+ if (errorStatus == ErrorStatus::OUTPUT_INSUFFICIENT_SIZE) {
+ // outputShapes must not be empty if OUTPUT_INSUFFICIENT_SIZE.
+ if (outputShapes.size() == 0) {
+ LOG(ERROR) << "Notified with empty output shape vector when OUTPUT_INSUFFICIENT_SIZE";
+ notifyInternal(ErrorStatus::GENERAL_FAILURE, {}, kNoTiming);
+ return Void();
+ }
+ } else if (errorStatus != ErrorStatus::NONE) {
+ // outputShapes must be empty if errorStatus is neither NONE nor OUTPUT_INSUFFICIENT_SIZE.
+ if (outputShapes.size() != 0) {
+ LOG(ERROR) << "Notified with non-empty output shape vector when error status is "
+ "neither NONE nor OUTPUT_INSUFFICIENT_SIZE";
+ notifyInternal(ErrorStatus::GENERAL_FAILURE, {}, kNoTiming);
+ return Void();
+ }
+ }
+ notifyInternal(errorStatus, outputShapes, timing);
+ return Void();
+}
+
+void ExecutionCallback::wait() const {
+ std::unique_lock<std::mutex> lock(mMutex);
+ mCondition.wait(lock, [this] { return mNotified; });
+}
+
+ErrorStatus ExecutionCallback::getStatus() const {
+ wait();
+ return mErrorStatus;
+}
+
+const std::vector<OutputShape>& ExecutionCallback::getOutputShapes() const {
+ wait();
+ return mOutputShapes;
+}
+
+Timing ExecutionCallback::getTiming() const {
+ wait();
+ return mTiming;
+}
+
+void ExecutionCallback::notifyInternal(ErrorStatus errorStatus,
+ const hidl_vec<OutputShape>& outputShapes,
+ const Timing& timing) {
+ {
+ std::lock_guard<std::mutex> hold(mMutex);
+
+ // quick-return if object has already been notified
+ if (mNotified) {
+ return;
+ }
+
+ mErrorStatus = errorStatus;
+ mOutputShapes = outputShapes;
+ mTiming = timing;
+ mNotified = true;
+ }
+ mCondition.notify_all();
+}
+
+} // namespace android::hardware::neuralnetworks::V1_2::implementation
diff --git a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
index 4411b90..8711f47 100644
--- a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
@@ -26,9 +26,11 @@
#include <cstdio>
#include <cstdlib>
#include <random>
+#include <thread>
-#include "Callbacks.h"
+#include "1.2/Callbacks.h"
#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
#include "TestHarness.h"
#include "Utils.h"
#include "VtsHalNeuralnetworks.h"
@@ -40,8 +42,11 @@
namespace vts {
namespace functional {
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
+using ::android::hardware::neuralnetworks::V1_1::ExecutionPreference;
using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
@@ -49,7 +54,7 @@
// In frameworks/ml/nn/runtime/test/generated/, creates a hidl model of float32 mobilenet.
#include "examples/mobilenet_224_gender_basic_fixed.example.cpp"
-#include "vts_models/mobilenet_224_gender_basic_fixed.model.cpp"
+#include "vts/V1_2/models/mobilenet_224_gender_basic_fixed.model.cpp"
// Prevent the compiler from complaining about an otherwise unused function.
[[maybe_unused]] auto dummy_createTestModel = createTestModel_dynamic_output_shape;
@@ -72,7 +77,7 @@
// In frameworks/ml/nn/runtime/test/generated/, creates a hidl model of quant8 mobilenet.
#include "examples/mobilenet_quantized.example.cpp"
-#include "vts_models/mobilenet_quantized.model.cpp"
+#include "vts/V1_2/models/mobilenet_quantized.model.cpp"
// Prevent the compiler from complaining about an otherwise unused function.
[[maybe_unused]] auto dummy_createTestModel = createTestModel_dynamic_output_shape;
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.cpp
new file mode 100644
index 0000000..495f3ec
--- /dev/null
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.cpp
@@ -0,0 +1,456 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "GeneratedTestHarness.h"
+
+#include <android-base/logging.h>
+#include <android/hardware/neuralnetworks/1.0/IDevice.h>
+#include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
+#include <android/hardware/neuralnetworks/1.0/IPreparedModel.h>
+#include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
+#include <android/hardware/neuralnetworks/1.0/types.h>
+#include <android/hardware/neuralnetworks/1.1/IDevice.h>
+#include <android/hardware/neuralnetworks/1.2/IDevice.h>
+#include <android/hardware/neuralnetworks/1.2/IExecutionCallback.h>
+#include <android/hardware/neuralnetworks/1.2/IPreparedModel.h>
+#include <android/hardware/neuralnetworks/1.2/IPreparedModelCallback.h>
+#include <android/hidl/allocator/1.0/IAllocator.h>
+#include <android/hidl/memory/1.0/IMemory.h>
+#include <hidlmemory/mapping.h>
+
+#include <iostream>
+
+#include "1.0/Utils.h"
+#include "1.2/Callbacks.h"
+#include "ExecutionBurstController.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "Utils.h"
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+namespace generated_tests {
+
+using ::android::hardware::neuralnetworks::V1_0::ErrorStatus;
+using ::android::hardware::neuralnetworks::V1_0::Request;
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
+using ::android::hardware::neuralnetworks::V1_1::ExecutionPreference;
+using ::android::hardware::neuralnetworks::V1_2::Constant;
+using ::android::hardware::neuralnetworks::V1_2::IDevice;
+using ::android::hardware::neuralnetworks::V1_2::IPreparedModel;
+using ::android::hardware::neuralnetworks::V1_2::MeasureTiming;
+using ::android::hardware::neuralnetworks::V1_2::Model;
+using ::android::hardware::neuralnetworks::V1_2::OutputShape;
+using ::android::hardware::neuralnetworks::V1_2::Timing;
+using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
+using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
+using ::test_helper::compare;
+using ::test_helper::expectMultinomialDistributionWithinTolerance;
+using ::test_helper::filter;
+using ::test_helper::for_all;
+using ::test_helper::for_each;
+using ::test_helper::MixedTyped;
+using ::test_helper::MixedTypedExample;
+using ::test_helper::resize_accordingly;
+using HidlToken = hidl_array<uint8_t, static_cast<uint32_t>(Constant::BYTE_SIZE_OF_CACHE_TOKEN)>;
+
+static bool isZeroSized(const MixedTyped& example, uint32_t index) {
+ for (auto i : example.operandDimensions.at(index)) {
+ if (i == 0) return true;
+ }
+ return false;
+}
+
+static Return<ErrorStatus> ExecutePreparedModel(sp<IPreparedModel>& preparedModel,
+ const Request& request, MeasureTiming measure,
+ sp<ExecutionCallback>& callback) {
+ return preparedModel->execute_1_2(request, measure, callback);
+}
+static Return<ErrorStatus> ExecutePreparedModel(sp<IPreparedModel>& preparedModel,
+ const Request& request, MeasureTiming measure,
+ hidl_vec<OutputShape>* outputShapes,
+ Timing* timing) {
+ ErrorStatus result;
+ Return<void> ret = preparedModel->executeSynchronously(
+ request, measure,
+ [&result, outputShapes, timing](ErrorStatus error, const hidl_vec<OutputShape>& shapes,
+ const Timing& time) {
+ result = error;
+ *outputShapes = shapes;
+ *timing = time;
+ });
+ if (!ret.isOk()) {
+ return ErrorStatus::GENERAL_FAILURE;
+ }
+ return result;
+}
+static std::shared_ptr<::android::nn::ExecutionBurstController> CreateBurst(
+ const sp<IPreparedModel>& preparedModel) {
+ return ::android::nn::ExecutionBurstController::create(preparedModel, /*blocking=*/true);
+}
+enum class Executor { ASYNC, SYNC, BURST };
+enum class OutputType { FULLY_SPECIFIED, UNSPECIFIED, INSUFFICIENT };
+const float kDefaultAtol = 1e-5f;
+const float kDefaultRtol = 1e-5f;
+void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples,
+ bool hasRelaxedFloat32Model, float fpAtol, float fpRtol,
+ Executor executor, MeasureTiming measure, OutputType outputType) {
+ const uint32_t INPUT = 0;
+ const uint32_t OUTPUT = 1;
+
+ int example_no = 1;
+ for (auto& example : examples) {
+ SCOPED_TRACE(example_no++);
+ const MixedTyped& inputs = example.operands.first;
+ const MixedTyped& golden = example.operands.second;
+
+ const bool hasFloat16Inputs = !inputs.float16Operands.empty();
+ if (hasRelaxedFloat32Model || hasFloat16Inputs) {
+ // TODO: Adjust the error limit based on testing.
+ // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
+ fpAtol = 5.0f * 0.0009765625f;
+ // Set the relative tolerance to be 5ULP of the corresponding FP precision.
+ fpRtol = 5.0f * 0.0009765625f;
+ }
+
+ std::vector<RequestArgument> inputs_info, outputs_info;
+ uint32_t inputSize = 0, outputSize = 0;
+ // This function only partially specifies the metadata (vector of RequestArguments).
+ // The contents are copied over below.
+ for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
+ if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
+ RequestArgument arg = {
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
+ };
+ RequestArgument arg_empty = {
+ .hasNoValue = true,
+ };
+ inputs_info[index] = s ? arg : arg_empty;
+ inputSize += s;
+ });
+ // Compute offset for inputs 1 and so on
+ {
+ size_t offset = 0;
+ for (auto& i : inputs_info) {
+ if (!i.hasNoValue) i.location.offset = offset;
+ offset += i.location.length;
+ }
+ }
+
+ MixedTyped test; // holding test results
+
+ // Go through all outputs, initialize RequestArgument descriptors
+ resize_accordingly(golden, test);
+ bool sizeLargerThanOne = true;
+ for_all(golden, [&golden, &outputs_info, &outputSize, &outputType, &sizeLargerThanOne](
+ int index, auto, auto s) {
+ if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
+ if (index == 0) {
+ // On OutputType::INSUFFICIENT, set the output operand with index 0 with
+ // buffer size one byte less than needed.
+ if (outputType == OutputType::INSUFFICIENT) {
+ if (s > 1 && !isZeroSized(golden, index)) {
+ s -= 1;
+ } else {
+ sizeLargerThanOne = false;
+ }
+ }
+ }
+ RequestArgument arg = {
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
+ };
+ outputs_info[index] = arg;
+ outputSize += s;
+ });
+ // If output0 does not have size larger than one byte,
+ // we can not provide an insufficient buffer
+ if (!sizeLargerThanOne && outputType == OutputType::INSUFFICIENT) return;
+ // Compute offset for outputs 1 and so on
+ {
+ size_t offset = 0;
+ for (auto& i : outputs_info) {
+ i.location.offset = offset;
+ offset += i.location.length;
+ }
+ }
+ std::vector<hidl_memory> pools = {nn::allocateSharedMemory(inputSize),
+ nn::allocateSharedMemory(outputSize)};
+ ASSERT_NE(0ull, pools[INPUT].size());
+ ASSERT_NE(0ull, pools[OUTPUT].size());
+
+ // load data
+ sp<IMemory> inputMemory = mapMemory(pools[INPUT]);
+ sp<IMemory> outputMemory = mapMemory(pools[OUTPUT]);
+ ASSERT_NE(nullptr, inputMemory.get());
+ ASSERT_NE(nullptr, outputMemory.get());
+ char* inputPtr = reinterpret_cast<char*>(static_cast<void*>(inputMemory->getPointer()));
+ char* outputPtr = reinterpret_cast<char*>(static_cast<void*>(outputMemory->getPointer()));
+ ASSERT_NE(nullptr, inputPtr);
+ ASSERT_NE(nullptr, outputPtr);
+ inputMemory->update();
+ outputMemory->update();
+
+ // Go through all inputs, copy the values
+ for_all(inputs, [&inputs_info, inputPtr](int index, auto p, auto s) {
+ char* begin = (char*)p;
+ char* end = begin + s;
+ // TODO: handle more than one input
+ std::copy(begin, end, inputPtr + inputs_info[index].location.offset);
+ });
+
+ inputMemory->commit();
+ outputMemory->commit();
+
+ const Request request = {.inputs = inputs_info, .outputs = outputs_info, .pools = pools};
+
+ ErrorStatus executionStatus;
+ hidl_vec<OutputShape> outputShapes;
+ Timing timing;
+ switch (executor) {
+ case Executor::ASYNC: {
+ SCOPED_TRACE("asynchronous");
+
+ // launch execution
+ sp<ExecutionCallback> executionCallback = new ExecutionCallback();
+ ASSERT_NE(nullptr, executionCallback.get());
+ Return<ErrorStatus> executionLaunchStatus =
+ ExecutePreparedModel(preparedModel, request, measure, executionCallback);
+ ASSERT_TRUE(executionLaunchStatus.isOk());
+ EXPECT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(executionLaunchStatus));
+
+ // retrieve execution status
+ executionCallback->wait();
+ executionStatus = executionCallback->getStatus();
+ outputShapes = executionCallback->getOutputShapes();
+ timing = executionCallback->getTiming();
+
+ break;
+ }
+ case Executor::SYNC: {
+ SCOPED_TRACE("synchronous");
+
+ // execute
+ Return<ErrorStatus> executionReturnStatus = ExecutePreparedModel(
+ preparedModel, request, measure, &outputShapes, &timing);
+ ASSERT_TRUE(executionReturnStatus.isOk());
+ executionStatus = static_cast<ErrorStatus>(executionReturnStatus);
+
+ break;
+ }
+ case Executor::BURST: {
+ SCOPED_TRACE("burst");
+
+ // create burst
+ const std::shared_ptr<::android::nn::ExecutionBurstController> controller =
+ CreateBurst(preparedModel);
+ ASSERT_NE(nullptr, controller.get());
+
+ // create memory keys
+ std::vector<intptr_t> keys(request.pools.size());
+ for (size_t i = 0; i < keys.size(); ++i) {
+ keys[i] = reinterpret_cast<intptr_t>(&request.pools[i]);
+ }
+
+ // execute burst
+ std::tie(executionStatus, outputShapes, timing) =
+ controller->compute(request, measure, keys);
+
+ break;
+ }
+ }
+
+ if (outputType != OutputType::FULLY_SPECIFIED &&
+ executionStatus == ErrorStatus::GENERAL_FAILURE) {
+ LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
+ "execute model that it does not support.";
+ std::cout << "[ ] Early termination of test because vendor service cannot "
+ "execute model that it does not support."
+ << std::endl;
+ GTEST_SKIP();
+ }
+ if (measure == MeasureTiming::NO) {
+ EXPECT_EQ(UINT64_MAX, timing.timeOnDevice);
+ EXPECT_EQ(UINT64_MAX, timing.timeInDriver);
+ } else {
+ if (timing.timeOnDevice != UINT64_MAX && timing.timeInDriver != UINT64_MAX) {
+ EXPECT_LE(timing.timeOnDevice, timing.timeInDriver);
+ }
+ }
+
+ switch (outputType) {
+ case OutputType::FULLY_SPECIFIED:
+ // If the model output operands are fully specified, outputShapes must be either
+ // either empty, or have the same number of elements as the number of outputs.
+ ASSERT_EQ(ErrorStatus::NONE, executionStatus);
+ ASSERT_TRUE(outputShapes.size() == 0 ||
+ outputShapes.size() == test.operandDimensions.size());
+ break;
+ case OutputType::UNSPECIFIED:
+ // If the model output operands are not fully specified, outputShapes must have
+ // the same number of elements as the number of outputs.
+ ASSERT_EQ(ErrorStatus::NONE, executionStatus);
+ ASSERT_EQ(outputShapes.size(), test.operandDimensions.size());
+ break;
+ case OutputType::INSUFFICIENT:
+ ASSERT_EQ(ErrorStatus::OUTPUT_INSUFFICIENT_SIZE, executionStatus);
+ ASSERT_EQ(outputShapes.size(), test.operandDimensions.size());
+ ASSERT_FALSE(outputShapes[0].isSufficient);
+ return;
+ }
+ // Go through all outputs, overwrite output dimensions with returned output shapes
+ if (outputShapes.size() > 0) {
+ for_each<uint32_t>(test.operandDimensions,
+ [&outputShapes](int idx, std::vector<uint32_t>& dim) {
+ dim = outputShapes[idx].dimensions;
+ });
+ }
+
+ // validate results
+ outputMemory->read();
+ copy_back(&test, outputs_info, outputPtr);
+ outputMemory->commit();
+ // Filter out don't cares
+ MixedTyped filtered_golden = filter(golden, is_ignored);
+ MixedTyped filtered_test = filter(test, is_ignored);
+
+ // We want "close-enough" results for float
+ compare(filtered_golden, filtered_test, fpAtol, fpRtol);
+
+ if (example.expectedMultinomialDistributionTolerance > 0) {
+ expectMultinomialDistributionWithinTolerance(test, example);
+ }
+ }
+}
+void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples,
+ bool hasRelaxedFloat32Model, Executor executor, MeasureTiming measure,
+ OutputType outputType) {
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model, kDefaultAtol,
+ kDefaultRtol, executor, measure, outputType);
+}
+
+void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples,
+ bool hasRelaxedFloat32Model, bool testDynamicOutputShape) {
+ if (testDynamicOutputShape) {
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::NO, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::NO, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::NO, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::YES, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::YES, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::YES, OutputType::UNSPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::NO, OutputType::INSUFFICIENT);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::NO, OutputType::INSUFFICIENT);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::NO, OutputType::INSUFFICIENT);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::YES, OutputType::INSUFFICIENT);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::YES, OutputType::INSUFFICIENT);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::YES, OutputType::INSUFFICIENT);
+ } else {
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::NO, OutputType::FULLY_SPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::ASYNC, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::SYNC, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
+ EvaluatePreparedModel(preparedModel, is_ignored, examples, hasRelaxedFloat32Model,
+ Executor::BURST, MeasureTiming::YES, OutputType::FULLY_SPECIFIED);
+ }
+}
+
+void PrepareModel(const sp<IDevice>& device, const Model& model,
+ sp<IPreparedModel>* preparedModel) {
+ // see if service can handle model
+ bool fullySupportsModel = false;
+ Return<void> supportedCall = device->getSupportedOperations_1_2(
+ model, [&fullySupportsModel](ErrorStatus status, const hidl_vec<bool>& supported) {
+ ASSERT_EQ(ErrorStatus::NONE, status);
+ ASSERT_NE(0ul, supported.size());
+ fullySupportsModel = std::all_of(supported.begin(), supported.end(),
+ [](bool valid) { return valid; });
+ });
+ ASSERT_TRUE(supportedCall.isOk());
+
+ // launch prepare model
+ sp<PreparedModelCallback> preparedModelCallback = new PreparedModelCallback();
+ ASSERT_NE(nullptr, preparedModelCallback.get());
+ Return<ErrorStatus> prepareLaunchStatus = device->prepareModel_1_2(
+ model, ExecutionPreference::FAST_SINGLE_ANSWER, hidl_vec<hidl_handle>(),
+ hidl_vec<hidl_handle>(), HidlToken(), preparedModelCallback);
+ ASSERT_TRUE(prepareLaunchStatus.isOk());
+ ASSERT_EQ(ErrorStatus::NONE, static_cast<ErrorStatus>(prepareLaunchStatus));
+
+ // retrieve prepared model
+ preparedModelCallback->wait();
+ ErrorStatus prepareReturnStatus = preparedModelCallback->getStatus();
+ sp<V1_0::IPreparedModel> preparedModelV1_0 = preparedModelCallback->getPreparedModel();
+ *preparedModel = IPreparedModel::castFrom(preparedModelV1_0).withDefault(nullptr);
+
+ // early termination if vendor service cannot fully prepare model
+ if (!fullySupportsModel && prepareReturnStatus != ErrorStatus::NONE) {
+ ASSERT_EQ(nullptr, preparedModel->get());
+ LOG(INFO) << "NN VTS: Early termination of test because vendor service cannot "
+ "prepare model that it does not support.";
+ std::cout << "[ ] Early termination of test because vendor service cannot "
+ "prepare model that it does not support."
+ << std::endl;
+ return;
+ }
+ EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
+ ASSERT_NE(nullptr, preparedModel->get());
+}
+
+void Execute(const sp<IDevice>& device, std::function<Model(void)> create_model,
+ std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples,
+ bool testDynamicOutputShape) {
+ Model model = create_model();
+ sp<IPreparedModel> preparedModel = nullptr;
+ PrepareModel(device, model, &preparedModel);
+ if (preparedModel == nullptr) {
+ GTEST_SKIP();
+ }
+ EvaluatePreparedModel(preparedModel, is_ignored, examples,
+ model.relaxComputationFloat32toFloat16, testDynamicOutputShape);
+}
+
+} // namespace generated_tests
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.h b/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.h
new file mode 100644
index 0000000..30e5578
--- /dev/null
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestHarness.h
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H
+
+#include <android/hardware/neuralnetworks/1.2/IDevice.h>
+#include <android/hardware/neuralnetworks/1.2/IPreparedModel.h>
+#include <android/hardware/neuralnetworks/1.2/types.h>
+#include <functional>
+#include <vector>
+#include "TestHarness.h"
+
+namespace android {
+namespace hardware {
+namespace neuralnetworks {
+namespace generated_tests {
+
+using ::test_helper::MixedTypedExample;
+
+void PrepareModel(const sp<V1_2::IDevice>& device, const V1_2::Model& model,
+ sp<V1_2::IPreparedModel>* preparedModel);
+
+void EvaluatePreparedModel(sp<V1_2::IPreparedModel>& preparedModel,
+ std::function<bool(int)> is_ignored,
+ const std::vector<MixedTypedExample>& examples,
+ bool hasRelaxedFloat32Model, bool testDynamicOutputShape);
+
+void Execute(const sp<V1_2::IDevice>& device, std::function<V1_2::Model(void)> create_model,
+ std::function<bool(int)> is_ignored, const std::vector<MixedTypedExample>& examples,
+ bool testDynamicOutputShape = false);
+
+} // namespace generated_tests
+} // namespace neuralnetworks
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_2_GENERATED_TEST_HARNESS_H
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp
deleted file mode 100644
index 5af3255..0000000
--- a/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
-#include <android-base/logging.h>
-#include <android/hidl/memory/1.0/IMemory.h>
-#include <hidlmemory/mapping.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
-using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
-using ::android::nn::allocateSharedMemory;
-using ::test_helper::MixedTypedExample;
-
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_2_vts_tests.cpp"
-
-// Generated from spec/strided_slice_invalid_output_dims.mod.py.
-// TODO(b/132155416): Make this part of all_generated_V1_2_vts_tests.cpp.
-namespace strided_slice_invalid_output_dims {
-#include "generated/strided_slice_invalid_output_dims.example.cpp"
-#include "generated/strided_slice_invalid_output_dims.model.cpp"
-} // namespace strided_slice_invalid_output_dims
-
-// TODO(b/132155416): Make this part of all_generated_V1_2_vts_tests.cpp.
-TEST_F(ValidationTest, strided_slice_invalid_output_dims) {
- const Model model = strided_slice_invalid_output_dims::createTestModel();
- const std::vector<Request> requests =
- createRequests(strided_slice_invalid_output_dims::get_examples());
- validateFailure(model, requests);
-}
-
-} // namespace functional
-} // namespace vts
-} // namespace V1_2
-} // namespace neuralnetworks
-} // namespace hardware
-} // namespace android
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
index 990cab9..6fbd1dc 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
@@ -16,17 +16,17 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.2/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "Utils.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,15 +34,17 @@
namespace vts {
namespace functional {
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_0_vts_tests.cpp"
} // namespace functional
} // namespace vts
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
index fa6d54d..d824e43 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
@@ -16,17 +16,17 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.2/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "Utils.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,15 +34,17 @@
namespace vts {
namespace functional {
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_1_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_1_vts_tests.cpp"
} // namespace functional
} // namespace vts
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
similarity index 85%
rename from neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
rename to neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
index d1c7de3..6e03534 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
@@ -16,37 +16,39 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "GeneratedTestHarness.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.2/Callbacks.h"
+#include "GeneratedTestHarness.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "Utils.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
-namespace V1_0 {
+namespace V1_2 {
namespace vts {
namespace functional {
+using ::android::hardware::neuralnetworks::V1_0::OperandLifeTime;
using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
using ::android::hardware::neuralnetworks::V1_2::implementation::PreparedModelCallback;
+using ::android::hidl::memory::V1_0::IMemory;
using ::android::nn::allocateSharedMemory;
using ::test_helper::MixedTypedExample;
std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
// in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_2_vts_tests.cpp"
} // namespace functional
} // namespace vts
-} // namespace V1_0
+} // namespace V1_2
} // namespace neuralnetworks
} // namespace hardware
} // namespace android
diff --git a/neuralnetworks/1.2/vts/functional/ValidateBurst.cpp b/neuralnetworks/1.2/vts/functional/ValidateBurst.cpp
index 43bd400..06103bc 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateBurst.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateBurst.cpp
@@ -18,7 +18,7 @@
#include "VtsHalNeuralnetworks.h"
-#include "Callbacks.h"
+#include "1.2/Callbacks.h"
#include "ExecutionBurstController.h"
#include "ExecutionBurstServer.h"
#include "TestHarness.h"
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index acf3cb6..ad992c5 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -16,10 +16,10 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
+#include "1.0/Utils.h"
+#include "1.2/Callbacks.h"
#include "VtsHalNeuralnetworks.h"
-#include "Callbacks.h"
-
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -41,10 +41,10 @@
const Model& model) {
SCOPED_TRACE(message + " [getSupportedOperations_1_2]");
- Return<void> ret =
- device->getSupportedOperations_1_2(model, [&](ErrorStatus status, const hidl_vec<bool>&) {
- EXPECT_EQ(ErrorStatus::INVALID_ARGUMENT, status);
- });
+ Return<void> ret = device->getSupportedOperations_1_2(
+ model, [&](ErrorStatus status, const hidl_vec<bool>&) {
+ EXPECT_EQ(ErrorStatus::INVALID_ARGUMENT, status);
+ });
EXPECT_TRUE(ret.isOk());
}
@@ -87,36 +87,16 @@
validatePrepareModel(device, message, model, preference);
}
-// Delete element from hidl_vec. hidl_vec doesn't support a "remove" operation,
-// so this is efficiently accomplished by moving the element to the end and
-// resizing the hidl_vec to one less.
-template <typename Type>
-static void hidl_vec_removeAt(hidl_vec<Type>* vec, uint32_t index) {
- if (vec) {
- std::rotate(vec->begin() + index, vec->begin() + index + 1, vec->end());
- vec->resize(vec->size() - 1);
- }
-}
-
-template <typename Type>
-static uint32_t hidl_vec_push_back(hidl_vec<Type>* vec, const Type& value) {
- // assume vec is valid
- const uint32_t index = vec->size();
- vec->resize(index + 1);
- (*vec)[index] = value;
- return index;
-}
-
static uint32_t addOperand(Model* model) {
return hidl_vec_push_back(&model->operands,
{
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 0,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_INPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
+ .type = OperandType::INT32,
+ .dimensions = {},
+ .numberOfConsumers = 0,
+ .scale = 0.0f,
+ .zeroPoint = 0,
+ .lifetime = OperandLifeTime::MODEL_INPUT,
+ .location = {.poolIndex = 0, .offset = 0, .length = 0},
});
}
@@ -256,7 +236,7 @@
static void mutateOperandZeroPointTest(const sp<IDevice>& device, const Model& model) {
for (size_t operand = 0; operand < model.operands.size(); ++operand) {
const std::vector<int32_t> invalidZeroPoints =
- getInvalidZeroPoints(model.operands[operand].type);
+ getInvalidZeroPoints(model.operands[operand].type);
for (int32_t invalidZeroPoint : invalidZeroPoints) {
const std::string message = "mutateOperandZeroPointTest: operand " +
std::to_string(operand) + " has zero point of " +
@@ -292,13 +272,13 @@
case OperandType::TENSOR_FLOAT16:
case OperandType::TENSOR_FLOAT32:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.scale = 0.0f;
newOperand.zeroPoint = 0;
break;
case OperandType::TENSOR_INT32:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.zeroPoint = 0;
break;
case OperandType::TENSOR_QUANT8_ASYMM:
@@ -306,19 +286,20 @@
case OperandType::TENSOR_QUANT16_ASYMM:
case OperandType::TENSOR_QUANT16_SYMM:
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.scale = operand->scale != 0.0f ? operand->scale : 1.0f;
break;
case OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL: {
newOperand.dimensions =
- operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
+ operand->dimensions.size() > 0 ? operand->dimensions : hidl_vec<uint32_t>({1});
newOperand.scale = 0.0f;
newOperand.zeroPoint = 0;
SymmPerChannelQuantParams channelQuant;
channelQuant.channelDim = 0;
channelQuant.scales = hidl_vec<float>(
- operand->dimensions.size() > 0 ? static_cast<size_t>(operand->dimensions[0]) : 0);
+ operand->dimensions.size() > 0 ? static_cast<size_t>(operand->dimensions[0])
+ : 0);
for (size_t i = 0; i < channelQuant.scales.size(); ++i) {
channelQuant.scales[i] = 1.0f;
}
@@ -435,7 +416,7 @@
std::to_string(invalidOperationType);
validate(device, message, model, [operation, invalidOperationType](Model* model) {
model->operations[operation].type =
- static_cast<OperationType>(invalidOperationType);
+ static_cast<OperationType>(invalidOperationType);
});
}
}
@@ -690,7 +671,7 @@
static void addOperationOutputTest(const sp<IDevice>& device, const Model& model) {
for (size_t operation = 0; operation < model.operations.size(); ++operation) {
const std::string message =
- "addOperationOutputTest: operation " + std::to_string(operation);
+ "addOperationOutputTest: operation " + std::to_string(operation);
validate(device, message, model, [operation](Model* model) {
uint32_t index = addOperand(model, OperandLifeTime::MODEL_OUTPUT);
hidl_vec_push_back(&model->operations[operation].outputs, index);
@@ -702,14 +683,14 @@
///////////////////////// VALIDATE EXECUTION PREFERENCE /////////////////////////
static const int32_t invalidExecutionPreferences[] = {
- static_cast<int32_t>(ExecutionPreference::LOW_POWER) - 1, // lower bound
- static_cast<int32_t>(ExecutionPreference::SUSTAINED_SPEED) + 1, // upper bound
+ static_cast<int32_t>(ExecutionPreference::LOW_POWER) - 1, // lower bound
+ static_cast<int32_t>(ExecutionPreference::SUSTAINED_SPEED) + 1, // upper bound
};
static void mutateExecutionPreferenceTest(const sp<IDevice>& device, const Model& model) {
for (int32_t preference : invalidExecutionPreferences) {
const std::string message =
- "mutateExecutionPreferenceTest: preference " + std::to_string(preference);
+ "mutateExecutionPreferenceTest: preference " + std::to_string(preference);
validate(device, message, model, [](Model*) {},
static_cast<ExecutionPreference>(preference));
}
diff --git a/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp b/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp
index e935aaa..cf5905f 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateRequest.cpp
@@ -16,17 +16,18 @@
#define LOG_TAG "neuralnetworks_hidl_hal_test"
-#include "VtsHalNeuralnetworks.h"
-
-#include "Callbacks.h"
-#include "ExecutionBurstController.h"
-#include "TestHarness.h"
-#include "Utils.h"
-
#include <android-base/logging.h>
#include <android/hidl/memory/1.0/IMemory.h>
#include <hidlmemory/mapping.h>
+#include "1.0/Utils.h"
+#include "1.2/Callbacks.h"
+#include "ExecutionBurstController.h"
+#include "MemoryUtils.h"
+#include "TestHarness.h"
+#include "Utils.h"
+#include "VtsHalNeuralnetworks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -34,6 +35,7 @@
namespace vts {
namespace functional {
+using ::android::hardware::neuralnetworks::V1_0::RequestArgument;
using ::android::hardware::neuralnetworks::V1_2::implementation::ExecutionCallback;
using ::android::hidl::memory::V1_0::IMemory;
using test_helper::for_all;
@@ -137,26 +139,6 @@
}
}
-// Delete element from hidl_vec. hidl_vec doesn't support a "remove" operation,
-// so this is efficiently accomplished by moving the element to the end and
-// resizing the hidl_vec to one less.
-template <typename Type>
-static void hidl_vec_removeAt(hidl_vec<Type>* vec, uint32_t index) {
- if (vec) {
- std::rotate(vec->begin() + index, vec->begin() + index + 1, vec->end());
- vec->resize(vec->size() - 1);
- }
-}
-
-template <typename Type>
-static uint32_t hidl_vec_push_back(hidl_vec<Type>* vec, const Type& value) {
- // assume vec is valid
- const uint32_t index = vec->size();
- vec->resize(index + 1);
- (*vec)[index] = value;
- return index;
-}
-
///////////////////////// REMOVE INPUT ////////////////////////////////////
static void removeInputTest(const sp<IPreparedModel>& preparedModel, const Request& request) {
@@ -197,11 +179,13 @@
for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
if (inputs_info.size() <= static_cast<size_t>(index)) inputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = INPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = INPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
RequestArgument arg_empty = {
- .hasNoValue = true,
+ .hasNoValue = true,
};
inputs_info[index] = s ? arg : arg_empty;
inputSize += s;
@@ -219,8 +203,10 @@
for_all(outputs, [&outputs_info, &outputSize](int index, auto, auto s) {
if (outputs_info.size() <= static_cast<size_t>(index)) outputs_info.resize(index + 1);
RequestArgument arg = {
- .location = {.poolIndex = OUTPUT, .offset = 0, .length = static_cast<uint32_t>(s)},
- .dimensions = {},
+ .location = {.poolIndex = OUTPUT,
+ .offset = 0,
+ .length = static_cast<uint32_t>(s)},
+ .dimensions = {},
};
outputs_info[index] = arg;
outputSize += s;
diff --git a/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.cpp b/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.cpp
index 666f9b5..bd24edc 100644
--- a/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.cpp
+++ b/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.cpp
@@ -20,7 +20,7 @@
#include <android-base/logging.h>
-#include "Callbacks.h"
+#include "1.2/Callbacks.h"
namespace android {
namespace hardware {
diff --git a/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.h b/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.h
index 80e810a..90dfe25 100644
--- a/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.h
+++ b/neuralnetworks/1.2/vts/functional/VtsHalNeuralnetworks.h
@@ -14,24 +14,23 @@
* limitations under the License.
*/
-#ifndef VTS_HAL_NEURALNETWORKS_V1_2_H
-#define VTS_HAL_NEURALNETWORKS_V1_2_H
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_2_VTS_HAL_NEURALNETWORKS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_2_VTS_HAL_NEURALNETWORKS_H
-#include "Callbacks.h"
-
+#include <VtsHalHidlTargetTestBase.h>
+#include <VtsHalHidlTargetTestEnvBase.h>
+#include <android-base/macros.h>
#include <android/hardware/neuralnetworks/1.0/types.h>
#include <android/hardware/neuralnetworks/1.1/types.h>
#include <android/hardware/neuralnetworks/1.2/IDevice.h>
#include <android/hardware/neuralnetworks/1.2/types.h>
-
-#include <VtsHalHidlTargetTestBase.h>
-#include <VtsHalHidlTargetTestEnvBase.h>
-
-#include <android-base/macros.h>
#include <gtest/gtest.h>
+
#include <iostream>
#include <vector>
+#include "1.2/Callbacks.h"
+
namespace android {
namespace hardware {
namespace neuralnetworks {
@@ -50,7 +49,7 @@
NeuralnetworksHidlEnvironment();
~NeuralnetworksHidlEnvironment() override;
- public:
+ public:
static NeuralnetworksHidlEnvironment* getInstance();
void registerTestServices() override;
};
@@ -59,30 +58,30 @@
class NeuralnetworksHidlTest : public ::testing::VtsHalHidlTargetTestBase {
DISALLOW_COPY_AND_ASSIGN(NeuralnetworksHidlTest);
- public:
+ public:
NeuralnetworksHidlTest();
~NeuralnetworksHidlTest() override;
void SetUp() override;
void TearDown() override;
- protected:
+ protected:
sp<IDevice> device;
};
// Tag for the validation tests
class ValidationTest : public NeuralnetworksHidlTest {
- protected:
- void validateEverything(const Model& model, const std::vector<Request>& requests);
- void validateFailure(const Model& model, const std::vector<Request>& requests);
+ protected:
+ void validateEverything(const Model& model, const std::vector<Request>& requests);
+ void validateFailure(const Model& model, const std::vector<Request>& requests);
- private:
- void validateModel(const Model& model);
- void validateRequests(const sp<IPreparedModel>& preparedModel,
- const std::vector<Request>& requests);
- void validateRequestFailure(const sp<IPreparedModel>& preparedModel,
- const std::vector<Request>& requests);
- void validateBurst(const sp<IPreparedModel>& preparedModel,
- const std::vector<Request>& requests);
+ private:
+ void validateModel(const Model& model);
+ void validateRequests(const sp<IPreparedModel>& preparedModel,
+ const std::vector<Request>& requests);
+ void validateRequestFailure(const sp<IPreparedModel>& preparedModel,
+ const std::vector<Request>& requests);
+ void validateBurst(const sp<IPreparedModel>& preparedModel,
+ const std::vector<Request>& requests);
};
// Tag for the generated tests
@@ -93,7 +92,7 @@
// Utility function to get PreparedModel from callback and downcast to V1_2.
sp<IPreparedModel> getPreparedModel_1_2(
- const sp<V1_2::implementation::PreparedModelCallback>& callback);
+ const sp<V1_2::implementation::PreparedModelCallback>& callback);
} // namespace functional
} // namespace vts
@@ -110,4 +109,4 @@
} // namespace android::hardware::neuralnetworks::V1_0
-#endif // VTS_HAL_NEURALNETWORKS_V1_2_H
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_2_VTS_HAL_NEURALNETWORKS_H
diff --git a/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.example.cpp b/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.example.cpp
deleted file mode 100644
index 0640833..0000000
--- a/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.example.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-// clang-format off
-// Generated file (from: strided_slice_invalid_output_dims.mod.py). Do not edit
-std::vector<MixedTypedExample>& get_examples() {
-static std::vector<MixedTypedExample> examples = {
-// Begin of an example
-{
-.operands = {
-//Input(s)
-{ // See tools/test_generator/include/TestHarness.h:MixedTyped
- // int -> Dimensions map
- .operandDimensions = {{0, {2, 3}}},
- // int -> FLOAT32 map
- .float32Operands = {{0, {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}}},
- // int -> INT32 map
- .int32Operands = {},
- // int -> QUANT8_ASYMM map
- .quant8AsymmOperands = {},
- // int -> QUANT16_SYMM map
- .quant16SymmOperands = {},
- // int -> FLOAT16 map
- .float16Operands = {},
- // int -> BOOL8 map
- .bool8Operands = {},
- // int -> QUANT8_SYMM_PER_CHANNEL map
- .quant8ChannelOperands = {},
- // int -> QUANT16_ASYMM map
- .quant16AsymmOperands = {},
- // int -> QUANT8_SYMM map
- .quant8SymmOperands = {},
-},
-//Output(s)
-{ // See tools/test_generator/include/TestHarness.h:MixedTyped
- // int -> Dimensions map
- .operandDimensions = {{0, {3}}},
- // int -> FLOAT32 map
- .float32Operands = {{0, {1.0f, 2.0f, 3.0f}}},
- // int -> INT32 map
- .int32Operands = {},
- // int -> QUANT8_ASYMM map
- .quant8AsymmOperands = {},
- // int -> QUANT16_SYMM map
- .quant16SymmOperands = {},
- // int -> FLOAT16 map
- .float16Operands = {},
- // int -> BOOL8 map
- .bool8Operands = {},
- // int -> QUANT8_SYMM_PER_CHANNEL map
- .quant8ChannelOperands = {},
- // int -> QUANT16_ASYMM map
- .quant16AsymmOperands = {},
- // int -> QUANT8_SYMM map
- .quant8SymmOperands = {},
-}
-},
-}, // End of an example
-};
-return examples;
-};
-
-std::vector<MixedTypedExample>& get_examples_dynamic_output_shape() {
-static std::vector<MixedTypedExample> examples_dynamic_output_shape = {
-// Begin of an example
-{
-.operands = {
-//Input(s)
-{ // See tools/test_generator/include/TestHarness.h:MixedTyped
- // int -> Dimensions map
- .operandDimensions = {{0, {2, 3}}},
- // int -> FLOAT32 map
- .float32Operands = {{0, {1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f}}},
- // int -> INT32 map
- .int32Operands = {},
- // int -> QUANT8_ASYMM map
- .quant8AsymmOperands = {},
- // int -> QUANT16_SYMM map
- .quant16SymmOperands = {},
- // int -> FLOAT16 map
- .float16Operands = {},
- // int -> BOOL8 map
- .bool8Operands = {},
- // int -> QUANT8_SYMM_PER_CHANNEL map
- .quant8ChannelOperands = {},
- // int -> QUANT16_ASYMM map
- .quant16AsymmOperands = {},
- // int -> QUANT8_SYMM map
- .quant8SymmOperands = {},
-},
-//Output(s)
-{ // See tools/test_generator/include/TestHarness.h:MixedTyped
- // int -> Dimensions map
- .operandDimensions = {{0, {3}}},
- // int -> FLOAT32 map
- .float32Operands = {{0, {1.0f, 2.0f, 3.0f}}},
- // int -> INT32 map
- .int32Operands = {},
- // int -> QUANT8_ASYMM map
- .quant8AsymmOperands = {},
- // int -> QUANT16_SYMM map
- .quant16SymmOperands = {},
- // int -> FLOAT16 map
- .float16Operands = {},
- // int -> BOOL8 map
- .bool8Operands = {},
- // int -> QUANT8_SYMM_PER_CHANNEL map
- .quant8ChannelOperands = {},
- // int -> QUANT16_ASYMM map
- .quant16AsymmOperands = {},
- // int -> QUANT8_SYMM map
- .quant8SymmOperands = {},
-}
-},
-}, // End of an example
-};
-return examples_dynamic_output_shape;
-};
-
diff --git a/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.model.cpp b/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.model.cpp
deleted file mode 100644
index 106655a..0000000
--- a/neuralnetworks/1.2/vts/functional/generated/strided_slice_invalid_output_dims.model.cpp
+++ /dev/null
@@ -1,216 +0,0 @@
-// clang-format off
-// Generated file (from: strided_slice_invalid_output_dims.mod.py). Do not edit
-// Create the model
-Model createTestModel() {
- const std::vector<Operand> operands = {
- {
- .type = OperandType::TENSOR_FLOAT32,
- .dimensions = {2, 3},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_INPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 0, .length = 8},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 8, .length = 8},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 16, .length = 8},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 24, .length = 4},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 28, .length = 4},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 32, .length = 4},
- },
- {
- .type = OperandType::TENSOR_FLOAT32,
- .dimensions = {3},
- .numberOfConsumers = 0,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_OUTPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
- }
- };
-
- const std::vector<Operation> operations = {
- {
- .type = OperationType::STRIDED_SLICE,
- .inputs = {0, 1, 2, 3, 4, 5, 6},
- .outputs = {7},
- }
- };
-
- const std::vector<uint32_t> inputIndexes = {0};
- const std::vector<uint32_t> outputIndexes = {7};
- std::vector<uint8_t> operandValues = {
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
- };
- const std::vector<hidl_memory> pools = {};
-
- return {
- .operands = operands,
- .operations = operations,
- .inputIndexes = inputIndexes,
- .outputIndexes = outputIndexes,
- .operandValues = operandValues,
- .pools = pools,
- };
-}
-
-inline bool is_ignored(int i) {
- static std::set<int> ignore = {};
- return ignore.find(i) != ignore.end();
-}
-
-// Create the model
-Model createTestModel_dynamic_output_shape() {
- const std::vector<Operand> operands = {
- {
- .type = OperandType::TENSOR_FLOAT32,
- .dimensions = {2, 3},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_INPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 0, .length = 8},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 8, .length = 8},
- },
- {
- .type = OperandType::TENSOR_INT32,
- .dimensions = {2},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 16, .length = 8},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 24, .length = 4},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 28, .length = 4},
- },
- {
- .type = OperandType::INT32,
- .dimensions = {},
- .numberOfConsumers = 1,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::CONSTANT_COPY,
- .location = {.poolIndex = 0, .offset = 32, .length = 4},
- },
- {
- .type = OperandType::TENSOR_FLOAT32,
- .dimensions = {0},
- .numberOfConsumers = 0,
- .scale = 0.0f,
- .zeroPoint = 0,
- .lifetime = OperandLifeTime::MODEL_OUTPUT,
- .location = {.poolIndex = 0, .offset = 0, .length = 0},
- }
- };
-
- const std::vector<Operation> operations = {
- {
- .type = OperationType::STRIDED_SLICE,
- .inputs = {0, 1, 2, 3, 4, 5, 6},
- .outputs = {7},
- }
- };
-
- const std::vector<uint32_t> inputIndexes = {0};
- const std::vector<uint32_t> outputIndexes = {7};
- std::vector<uint8_t> operandValues = {
- 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
- };
- const std::vector<hidl_memory> pools = {};
-
- return {
- .operands = operands,
- .operations = operations,
- .inputIndexes = inputIndexes,
- .outputIndexes = outputIndexes,
- .operandValues = operandValues,
- .pools = pools,
- };
-}
-
-inline bool is_ignored_dynamic_output_shape(int i) {
- static std::set<int> ignore = {};
- return ignore.find(i) != ignore.end();
-}
-
diff --git a/neuralnetworks/1.2/vts/functional/include/1.2/Callbacks.h b/neuralnetworks/1.2/vts/functional/include/1.2/Callbacks.h
new file mode 100644
index 0000000..2992c0c
--- /dev/null
+++ b/neuralnetworks/1.2/vts/functional/include/1.2/Callbacks.h
@@ -0,0 +1,326 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_NEURALNETWORKS_V1_2_CALLBACKS_H
+#define ANDROID_HARDWARE_NEURALNETWORKS_V1_2_CALLBACKS_H
+
+#include <android-base/thread_annotations.h>
+#include <android/hardware/neuralnetworks/1.0/IExecutionCallback.h>
+#include <android/hardware/neuralnetworks/1.0/IPreparedModelCallback.h>
+#include <android/hardware/neuralnetworks/1.2/IExecutionCallback.h>
+#include <android/hardware/neuralnetworks/1.2/IPreparedModelCallback.h>
+#include <hidl/Status.h>
+#include <condition_variable>
+#include <mutex>
+
+/*
+ * The Callback classes are used internally by the NeuralNetworks runtime to
+ * synchronize between different threads. An asynchronous task is launched
+ * paired with a callback object. When a client thread requires the output being
+ * generated by the asynchronous task, the client thread can wait for the result
+ * and be blocked until it has completed. Any wait may safely be called
+ * concurrently, even on the same callback object. When the asynchronous task
+ * has finished its workload, it must immediately call "notify*". If the
+ * asynchronous task has failed to launch, the function that tried to launch the
+ * asynchronous task must immediately call "notify*". This "notify*" call
+ * awakens any client threads waiting on the callback object.
+ *
+ * These classes exist to enable synchronization across HIDL. When
+ * synchronization is only required in the same process, consider using
+ * std::future, std::mutex, std::condition_variable, or std::experimental::latch
+ * instead.
+ */
+
+namespace android::hardware::neuralnetworks::V1_2::implementation {
+
+using V1_0::ErrorStatus;
+
+/**
+ * The PreparedModelCallback class is used to receive the error status of
+ * preparing a model as well as the prepared model from a task executing
+ * asynchronously with respect to the runtime. If a calling thread calls wait
+ * or get* on a PreparedModelCallback object and the corresponding asynchronous
+ * task has not finished preparing the model, the calling thread will block
+ * until the asynchronous task has either called notify or notify_1_2.
+ *
+ * If the callback object is notified more than once, only the results of the
+ * first call to notify* are used, and the results from subsequent calls are
+ * discarded.
+ *
+ * This callback object is passed as an argument to IDevice::prepareModel*.
+ */
+class PreparedModelCallback : public IPreparedModelCallback {
+ public:
+ /**
+ * IPreparedModelCallback::notify marks the callback object with the return
+ * status of the asynchronous model preparation along with the prepared
+ * model, and allows all prior and future wait calls on the
+ * PreparedModelCallback object to proceed.
+ *
+ * Either IPreparedModelCallback::notify or
+ * IPreparedModelCallback::notify_1_2 must be called on a given
+ * PreparedModelCallback object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify* are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from asynchronously preparing the
+ * model; will be:
+ * - NONE if the asynchronous preparation was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if the input model is invalid
+ * @param preparedModel Returned model that has been prepared for execution,
+ * nullptr if the model was unable to be prepared.
+ */
+ Return<void> notify(ErrorStatus status, const sp<V1_0::IPreparedModel>& preparedModel) override;
+
+ /**
+ * IPreparedModelCallback::notify_1_2 marks the callback object with the
+ * return status of the asynchronous model preparation along with the
+ * prepared model, and allows all prior and future wait calls on the
+ * PreparedModelCallback object to proceed.
+ *
+ * Either IPreparedModelCallback::notify or
+ * IPreparedModelCallback::notify_1_2 must be called on a given
+ * PreparedModelCallback object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify* are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from asynchronously preparing the
+ * model; will be:
+ * - NONE if the asynchronous preparation was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if the input model is invalid
+ * @param preparedModel Returned model that has been prepared for execution,
+ * nullptr if the model was unable to be prepared.
+ */
+ Return<void> notify_1_2(ErrorStatus status,
+ const sp<V1_2::IPreparedModel>& preparedModel) override;
+
+ /**
+ * PreparedModelCallback::wait blocks until notify* has been called on the
+ * callback object.
+ */
+ void wait() const;
+
+ /**
+ * Retrieves the error status returned from the asynchronous task launched
+ * by IDevice::prepareModel*. If IDevice::prepareModel* has not finished
+ * asynchronously preparing the model, this call will block until the
+ * asynchronous task notifies the object.
+ *
+ * @return status Error status returned from asynchronously preparing the
+ * model; will be:
+ * - NONE if the asynchronous preparation was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - INVALID_ARGUMENT if the input model is invalid
+ */
+ ErrorStatus getStatus() const;
+
+ /**
+ * Retrieves the model that has been prepared for execution from the
+ * asynchronous task launched by IDevice::prepareModel*. If
+ * IDevice::prepareModel* has not finished asynchronously preparing the
+ * model, this call will block until the asynchronous task notifies the
+ * object.
+ *
+ * @return preparedModel Returned model that has been prepared for
+ * execution, nullptr if the model was unable to be prepared.
+ */
+ sp<V1_0::IPreparedModel> getPreparedModel() const;
+
+ private:
+ mutable std::mutex mMutex;
+ mutable std::condition_variable mCondition;
+ bool mNotified GUARDED_BY(mMutex) = false;
+ ErrorStatus mErrorStatus = ErrorStatus::GENERAL_FAILURE;
+ sp<V1_0::IPreparedModel> mPreparedModel;
+};
+
+/**
+ * The ExecutionCallback class is used to receive the results of the execution
+ * from a task executing asynchronously with respect to the runtime. If a
+ * calling thread calls wait or get* on a ExecutionCallback object and the
+ * corresponding asynchronous task has not finished the execution, the calling
+ * thread will block until the asynchronous task has either called notify or
+ * notify_1_2.
+ *
+ * If the callback object is notified more than once, only the results of the
+ * first call to notify* are used, and the results from subsequent calls are
+ * discarded.
+ *
+ * This callback object is passed as an argument to IPreparedModel::execute*.
+ */
+class ExecutionCallback : public IExecutionCallback {
+ public:
+ /**
+ * IExecutionCallback::notify marks the callback object with the return
+ * status of the asynchronous execution that held this callback and enables
+ * all prior and future wait calls on the ExecutionCallback object to
+ * proceed.
+ *
+ * Either IExecutionCallback::notify or IExecutionCallback::notify_1_2 must
+ * be called on a given ExecutionCallback object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify* are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from launching the asynchronous task
+ * (if the launch fails) or from the asynchronous task itself (if the
+ * launch succeeds). Must be:
+ * - NONE if the asynchronous execution was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if there is an unspecified error
+ * - OUTPUT_INSUFFICIENT_SIZE if provided output buffer is not large
+ * enough to store the resultant values
+ * - INVALID_ARGUMENT if the input request is invalid
+ */
+ Return<void> notify(ErrorStatus status) override;
+
+ /**
+ * IExecutionCallback::notify_1_2 marks the callback object with the results
+ * (error status, dynamic output shapes, and timing information) of the
+ * asynchronous execution that held this callback and enables all prior and
+ * future wait calls on the ExecutionCallback object to proceed.
+ *
+ * Either IExecutionCallback::notify or IExecutionCallback::notify_1_2 must
+ * be called on a given ExecutionCallback object.
+ *
+ * If the callback object is notified more than once, only the results of
+ * the first call to notify* are used, and the results from subsequent calls
+ * are discarded.
+ *
+ * @param status Error status returned from launching the asynchronous task
+ * (if the launch fails) or from the asynchronous task itself (if the
+ * launch succeeds). Must be:
+ * - NONE if the asynchronous execution was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if the asynchronous task resulted in an unspecified
+ * error
+ * - OUTPUT_INSUFFICIENT_SIZE if at least one output operand buffer is
+ * not large enough to store the corresponding output
+ * - INVALID_ARGUMENT if one of the input arguments to prepareModel is
+ * invalid
+ * @param outputShapes A list of shape information of model output operands.
+ * The index into "outputShapes" corresponds to the index of the output
+ * operand in the Request outputs vector. outputShapes must be empty
+ * unless the status is either NONE or OUTPUT_INSUFFICIENT_SIZE.
+ * @param Timing Duration of execution. Unless MeasureTiming::YES was passed
+ * when launching the execution and status is NONE, all times must be
+ * reported as UINT64_MAX. A driver may choose to report any time as
+ * UINT64_MAX, indicating that particular measurement is not available.
+ */
+ Return<void> notify_1_2(ErrorStatus status, const hidl_vec<OutputShape>& outputShapes,
+ const Timing& timing) override;
+
+ // An overload of the latest notify interface to hide the version from ExecutionBuilder.
+ Return<void> notify(ErrorStatus status, const hidl_vec<OutputShape>& outputShapes,
+ const Timing& timing) {
+ return notify_1_2(status, outputShapes, timing);
+ }
+
+ /**
+ * ExecutionCallback::wait blocks until notify* has been called on the
+ * callback object.
+ */
+ void wait() const;
+
+ /**
+ * Retrieves the error status returned from the asynchronous task launched
+ * by either IPreparedModel::execute or IPreparedModel::execute_1_2. If
+ * IPreparedModel::execute or IPreparedModel::execute_1_2 has not finished
+ * asynchronously executing, this call will block until the asynchronous
+ * task notifies the object.
+ *
+ * @return status Error status returned from launching the asynchronous task
+ * (if the launch fails) or from the asynchronous task itself (if the
+ * launch succeeds). Must be:
+ * - NONE if the asynchronous execution was successful
+ * - DEVICE_UNAVAILABLE if driver is offline or busy
+ * - GENERAL_FAILURE if the asynchronous task resulted in an unspecified
+ * error
+ * - OUTPUT_INSUFFICIENT_SIZE if at least one output operand buffer is
+ * not large enough to store the corresponding output
+ * - INVALID_ARGUMENT if one of the input arguments to prepareModel is
+ * invalid
+ */
+ ErrorStatus getStatus() const;
+
+ /**
+ * Retrieves the output shapes returned from the asynchronous task launched
+ * by IPreparedModel::execute_1_2. If IPreparedModel::execute_1_2 has not
+ * finished asynchronously executing, this call will block until the
+ * asynchronous task notifies the object.
+ *
+ * If the asynchronous task was launched by IPreparedModel::execute, an
+ * empty vector will be returned.
+ *
+ * @return outputShapes A list of shape information of model output
+ * operands. The index into "outputShapes" corresponds to the index of
+ * the output operand in the Request outputs vector. outputShapes must
+ * be empty unless the status is either NONE or
+ * OUTPUT_INSUFFICIENT_SIZE. outputShaps may be empty if the status is
+ * NONE and all model output operands are fully-specified at execution
+ * time. outputShapes must have the same number of elements as the
+ * number of model output operands if the status is
+ * OUTPUT_INSUFFICIENT_SIZE, or if the status is NONE and the model has
+ * at least one output operand that is not fully-specified.
+ */
+ const std::vector<OutputShape>& getOutputShapes() const;
+
+ /**
+ * Retrieves the duration of execution of the asynchronous task launched by
+ * IPreparedModel::execute_1_2. If IPreparedModel::execute_1_2 has not
+ * finished asynchronously executing, this call will block until the
+ * asynchronous task notifies the object.
+ *
+ * If the asynchronous task was launched by IPreparedModel::execute, every
+ * time must be UINT64_MAX.
+ *
+ * @return timing Duration of the execution. Every time must be UINT64_MAX
+ * unless the status is NONE.
+ */
+ Timing getTiming() const;
+
+ private:
+ /*
+ * ExecutionCallback::notifyInternal stores the results of the execution
+ * (status, output shapes, and timing information) in the ExecutionCallback
+ * object before any call to wait or get* return. It then enables all prior
+ * and future wait calls on the ExecutionCallback object to proceed.
+ */
+ void notifyInternal(ErrorStatus errorStatus, const hidl_vec<OutputShape>& outputShapes,
+ const Timing& timing);
+
+ // members
+ mutable std::mutex mMutex;
+ mutable std::condition_variable mCondition;
+ bool mNotified GUARDED_BY(mMutex) = false;
+ ErrorStatus mErrorStatus = ErrorStatus::GENERAL_FAILURE;
+ std::vector<OutputShape> mOutputShapes = {};
+ Timing mTiming = {};
+};
+
+} // namespace android::hardware::neuralnetworks::V1_2::implementation
+
+#endif // ANDROID_HARDWARE_NEURALNETWORKS_V1_2_CALLBACKS_H
diff --git a/neuralnetworks/1.2/vts/functional/spec/strided_slice_invalid_output_dims.mod.py b/neuralnetworks/1.2/vts/functional/spec/strided_slice_invalid_output_dims.mod.py
deleted file mode 100644
index e8d30f3..0000000
--- a/neuralnetworks/1.2/vts/functional/spec/strided_slice_invalid_output_dims.mod.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# Copyright (C) 2019 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This test makes sure that executing STRIDED_SLICE results in a failure when
-# the output dimensions do not match shrinkAxisMask.
-#
-# The test generator does not support generating tests resulting in execution
-# failure, so the gTest part of this test has been written by hand.
-# TODO(b/132155416): Move this under frameworks/ml/nn/runtime/test/specs/V1_2.
-#
-# Based on strided_slice_float_11.mod.py.
-
-model = Model()
-i1 = Input("input", "TENSOR_FLOAT32", "{2, 3}")
-begins = Parameter("begins", "TENSOR_INT32", "{2}", [0, 0])
-# The value "2" below makes the test invalid. See http://b/79856511#comment2.
-ends = Parameter("ends", "TENSOR_INT32", "{2}", [2, 3])
-strides = Parameter("strides", "TENSOR_INT32", "{2}", [1, 1])
-beginMask = Int32Scalar("beginMask", 0)
-endMask = Int32Scalar("endMask", 0)
-shrinkAxisMask = Int32Scalar("shrinkAxisMask", 1)
-
-output = Output("output", "TENSOR_FLOAT32", "{3}")
-
-model = model.Operation("STRIDED_SLICE", i1, begins, ends, strides, beginMask, endMask, shrinkAxisMask).To(output)
-
-Example({
- i1: [1, 2, 3, 4, 5, 6],
- output: [1, 2, 3],
-})
diff --git a/nfc/1.0/default/android.hardware.nfc@1.0-service.rc b/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
index 3a5c776..27e35d2 100644
--- a/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
+++ b/nfc/1.0/default/android.hardware.nfc@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.0-service
+ interface android.hardware.nfc@1.0::INfc default
class hal
user nfc
group nfc
diff --git a/power/1.0/default/android.hardware.power@1.0-service.rc b/power/1.0/default/android.hardware.power@1.0-service.rc
index 657c733..f3fd303 100644
--- a/power/1.0/default/android.hardware.power@1.0-service.rc
+++ b/power/1.0/default/android.hardware.power@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.power-hal-1-0 /vendor/bin/hw/android.hardware.power@1.0-service
+ interface android.hardware.power@1.0::IPower default
class hal
user system
group system
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
index da78f41..1d79ff6 100644
--- a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
+++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
@@ -26,6 +26,10 @@
sap->connectReq(token, maxMsgSize);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(sapCb->sapResponseToken, token);
+
+ // Modem side need time for connect to finish. Adding a waiting time to prevent
+ // disconnect being requested right after connect request.
+ sleep(1);
}
/*
diff --git a/radio/1.2/default/android.hardware.radio@1.2-radio-service.rc b/radio/1.2/default/android.hardware.radio@1.2-radio-service.rc
index e126cd8..eab37ec 100644
--- a/radio/1.2/default/android.hardware.radio@1.2-radio-service.rc
+++ b/radio/1.2/default/android.hardware.radio@1.2-radio-service.rc
@@ -1,4 +1,13 @@
service vendor.radio-1-2 /vendor/bin/hw/android.hardware.radio@1.2-radio-service
+ interface android.hardware.radio@1.0::IRadio slot1
+ interface android.hardware.radio@1.0::IRadio slot2
+ interface android.hardware.radio@1.0::IRadio slot3
+ interface android.hardware.radio@1.1::IRadio slot1
+ interface android.hardware.radio@1.1::IRadio slot2
+ interface android.hardware.radio@1.1::IRadio slot3
+ interface android.hardware.radio@1.2::IRadio slot1
+ interface android.hardware.radio@1.2::IRadio slot2
+ interface android.hardware.radio@1.2::IRadio slot3
class hal
user system
group system
diff --git a/radio/1.2/default/android.hardware.radio@1.2-sap-service.rc b/radio/1.2/default/android.hardware.radio@1.2-sap-service.rc
index 845e6e5..9f163f6 100644
--- a/radio/1.2/default/android.hardware.radio@1.2-sap-service.rc
+++ b/radio/1.2/default/android.hardware.radio@1.2-sap-service.rc
@@ -1,4 +1,7 @@
service vendor.sap-1-2 /vendor/bin/hw/android.hardware.radio@1.2-sap-service
+ interface android.hardware.radio@1.0::ISap slot1
+ interface android.hardware.radio@1.1::ISap slot1
+ interface android.hardware.radio@1.2::ISap slot1
class hal
user system
group system
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
index 147f8fe..bd7017c 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
@@ -95,6 +95,12 @@
// Give some time for modem to disconnect the established call channel.
sleep(MODEM_EMERGENCY_CALL_DISCONNECT_TIME);
}
+
+ // Verify there are no more current calls.
+ serial = GetRandomSerialNumber();
+ radio_v1_4->getCurrentCalls(serial);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(0, radioRsp_v1_4->currentCalls.size());
}
void RadioHidlTest_v1_4::updateSimCardStatus() {
diff --git a/radio/config/1.0/default/android.hardware.radio.config@1.0-service.rc b/radio/config/1.0/default/android.hardware.radio.config@1.0-service.rc
index fad16b1..94d5edb 100644
--- a/radio/config/1.0/default/android.hardware.radio.config@1.0-service.rc
+++ b/radio/config/1.0/default/android.hardware.radio.config@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.radio-config-hal-1-0 /vendor/bin/hw/android.hardware.radio.config@1.0-service
+ interface android.hardware.radio.config@1.0::IRadioConfig default
class hal
user system
group system
diff --git a/sensors/1.0/default/android.hardware.sensors@1.0-service.rc b/sensors/1.0/default/android.hardware.sensors@1.0-service.rc
index b54842d..4faa562 100644
--- a/sensors/1.0/default/android.hardware.sensors@1.0-service.rc
+++ b/sensors/1.0/default/android.hardware.sensors@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.sensors-hal-1-0 /vendor/bin/hw/android.hardware.sensors@1.0-service
+ interface android.hardware.sensors@1.0::ISensors default
class hal
user system
group system wakelock
diff --git a/thermal/1.0/default/android.hardware.thermal@1.0-service.rc b/thermal/1.0/default/android.hardware.thermal@1.0-service.rc
index cf9bdee..ba3ce82 100644
--- a/thermal/1.0/default/android.hardware.thermal@1.0-service.rc
+++ b/thermal/1.0/default/android.hardware.thermal@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.thermal-hal-1-0 /vendor/bin/hw/android.hardware.thermal@1.0-service
+ interface android.hardware.thermal@1.0::IThermal default
class hal
user system
group system
diff --git a/tv/cec/1.0/default/Android.bp b/tv/cec/1.0/default/Android.bp
index 069f327..5fe731b 100644
--- a/tv/cec/1.0/default/Android.bp
+++ b/tv/cec/1.0/default/Android.bp
@@ -39,3 +39,26 @@
],
}
+
+cc_binary {
+ name: "android.hardware.tv.cec@1.0-service.mock",
+ vintf_fragments: ["android.hardware.tv.cec@1.0-service.mock.xml"],
+ relative_install_path: "hw",
+ vendor: true,
+ init_rc: ["android.hardware.tv.cec@1.0-service.mock.rc"],
+ srcs: [
+ "serviceMock.cpp",
+ "HdmiCecMock.cpp",
+ ],
+
+ shared_libs: [
+ "liblog",
+ "libcutils",
+ "libbase",
+ "libutils",
+ "libhardware",
+ "libhidlbase",
+ "libhidltransport",
+ "android.hardware.tv.cec@1.0",
+ ],
+}
diff --git a/tv/cec/1.0/default/HdmiCecMock.cpp b/tv/cec/1.0/default/HdmiCecMock.cpp
new file mode 100644
index 0000000..eba8f95
--- /dev/null
+++ b/tv/cec/1.0/default/HdmiCecMock.cpp
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "android.hardware.tv.cec@1.0-mock"
+#include <android-base/logging.h>
+#include <utils/Log.h>
+
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+#include "HdmiCecMock.h"
+
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V1_0 {
+namespace implementation {
+
+/*
+ * (*set_option)() passes flags controlling the way HDMI-CEC service works down
+ * to HAL implementation. Those flags will be used in case the feature needs
+ * update in HAL itself, firmware or microcontroller.
+ */
+void HdmiCecMock::cec_set_option(int flag, int value) {
+ // maintain options and set them accordingly
+ switch (flag) {
+ case HDMI_OPTION_WAKEUP:
+ mOptionWakeUp = value;
+ break;
+ case HDMI_OPTION_ENABLE_CEC:
+ mOptionEnableCec = value;
+ break;
+ case HDMI_OPTION_SYSTEM_CEC_CONTROL:
+ mOptionSystemCecControl = value;
+ break;
+ case HDMI_OPTION_SET_LANG:
+ mOptionLanguage = value;
+ }
+}
+
+// Methods from ::android::hardware::tv::cec::V1_0::IHdmiCec follow.
+Return<Result> HdmiCecMock::addLogicalAddress(CecLogicalAddress addr) {
+ // have a list to maintain logical addresses
+ int size = mLogicalAddresses.size();
+ mLogicalAddresses.resize(size + 1);
+ mLogicalAddresses[size + 1] = addr;
+ return Result::SUCCESS;
+}
+
+Return<void> HdmiCecMock::clearLogicalAddress() {
+ // remove logical address from the list
+ mLogicalAddresses = {};
+ return Void();
+}
+
+Return<void> HdmiCecMock::getPhysicalAddress(getPhysicalAddress_cb _hidl_cb) {
+ // maintain a physical address and return it
+ // default 0xFFFF, update on hotplug event
+ _hidl_cb(Result::SUCCESS, mPhysicalAddress);
+ return Void();
+}
+
+Return<SendMessageResult> HdmiCecMock::sendMessage(const CecMessage& message) {
+ if (message.body.size() == 0) {
+ return SendMessageResult::NACK;
+ }
+ return SendMessageResult::SUCCESS;
+}
+
+Return<void> HdmiCecMock::setCallback(const sp<IHdmiCecCallback>& callback) {
+ if (mCallback != nullptr) {
+ mCallback = nullptr;
+ }
+
+ if (callback != nullptr) {
+ mCallback = callback;
+ mCallback->linkToDeath(this, 0 /*cookie*/);
+ }
+ return Void();
+}
+
+Return<int32_t> HdmiCecMock::getCecVersion() {
+ // maintain a cec version and return it
+ return mCecVersion;
+}
+
+Return<uint32_t> HdmiCecMock::getVendorId() {
+ return mCecVendorId;
+}
+
+Return<void> HdmiCecMock::getPortInfo(getPortInfo_cb _hidl_cb) {
+ vector<HdmiPortInfo> portInfos;
+ // TODO ready port info from device specific config
+ portInfos.resize(mTotalPorts);
+ for (int i = 0; i < mTotalPorts; ++i) {
+ portInfos[i] = {.type = HdmiPortType::INPUT,
+ .portId = static_cast<uint32_t>(i),
+ .cecSupported = true,
+ .arcSupported = (i == 0),
+ .physicalAddress = static_cast<uint16_t>(i << 12)};
+ }
+ _hidl_cb(portInfos);
+ return Void();
+}
+
+Return<void> HdmiCecMock::setOption(OptionKey key, bool value) {
+ cec_set_option(static_cast<int>(key), value ? 1 : 0);
+ return Void();
+}
+
+Return<void> HdmiCecMock::setLanguage(const hidl_string& language) {
+ if (language.size() != 3) {
+ LOG(ERROR) << "Wrong language code: expected 3 letters, but it was " << language.size()
+ << ".";
+ return Void();
+ }
+ // TODO validate if language is a valid language code
+ const char* languageStr = language.c_str();
+ int convertedLanguage = ((languageStr[0] & 0xFF) << 16) | ((languageStr[1] & 0xFF) << 8) |
+ (languageStr[2] & 0xFF);
+ cec_set_option(HDMI_OPTION_SET_LANG, convertedLanguage);
+ return Void();
+}
+
+Return<void> HdmiCecMock::enableAudioReturnChannel(int32_t portId __unused, bool enable __unused) {
+ // Maintain ARC status
+ return Void();
+}
+
+Return<bool> HdmiCecMock::isConnected(int32_t portId __unused) {
+ // maintain port connection status and update on hotplug event
+ return false;
+}
+
+HdmiCecMock::HdmiCecMock() {
+ ALOGE("Opening a virtual HAL for testing and virtual machine.");
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace cec
+} // namespace tv
+} // namespace hardware
+} // namespace android
diff --git a/tv/cec/1.0/default/HdmiCecMock.h b/tv/cec/1.0/default/HdmiCecMock.h
new file mode 100644
index 0000000..b2f1113
--- /dev/null
+++ b/tv/cec/1.0/default/HdmiCecMock.h
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
+#define ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
+
+#include <android/hardware/tv/cec/1.0/IHdmiCec.h>
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+#include <algorithm>
+#include <vector>
+
+using namespace std;
+
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::sp;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
+using ::android::hardware::tv::cec::V1_0::CecMessage;
+using ::android::hardware::tv::cec::V1_0::HdmiPortInfo;
+using ::android::hardware::tv::cec::V1_0::IHdmiCec;
+using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback;
+using ::android::hardware::tv::cec::V1_0::MaxLength;
+using ::android::hardware::tv::cec::V1_0::OptionKey;
+using ::android::hardware::tv::cec::V1_0::Result;
+using ::android::hardware::tv::cec::V1_0::SendMessageResult;
+
+struct HdmiCecMock : public IHdmiCec, public hidl_death_recipient {
+ HdmiCecMock();
+ // Methods from ::android::hardware::tv::cec::V1_0::IHdmiCec follow.
+ Return<Result> addLogicalAddress(CecLogicalAddress addr) override;
+ Return<void> clearLogicalAddress() override;
+ Return<void> getPhysicalAddress(getPhysicalAddress_cb _hidl_cb) override;
+ Return<SendMessageResult> sendMessage(const CecMessage& message) override;
+ Return<void> setCallback(const sp<IHdmiCecCallback>& callback) override;
+ Return<int32_t> getCecVersion() override;
+ Return<uint32_t> getVendorId() override;
+ Return<void> getPortInfo(getPortInfo_cb _hidl_cb) override;
+ Return<void> setOption(OptionKey key, bool value) override;
+ Return<void> setLanguage(const hidl_string& language) override;
+ Return<void> enableAudioReturnChannel(int32_t portId, bool enable) override;
+ Return<bool> isConnected(int32_t portId) override;
+
+ virtual void serviceDied(uint64_t /*cookie*/,
+ const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ setCallback(nullptr);
+ }
+
+ void cec_set_option(int flag, int value);
+
+ private:
+ sp<IHdmiCecCallback> mCallback;
+ // Variables for the virtual cec hal impl
+ uint16_t mPhysicalAddress = 0xFFFF;
+ vector<CecLogicalAddress> mLogicalAddresses;
+ int32_t mCecVersion = 0;
+ uint32_t mCecVendorId = 0;
+ // Port configuration
+ int mTotalPorts = 4;
+ // CEC Option value
+ int mOptionWakeUp = 0;
+ int mOptionEnableCec = 0;
+ int mOptionSystemCecControl = 0;
+ int mOptionLanguage = 0;
+};
+} // namespace implementation
+} // namespace V1_0
+} // namespace cec
+} // namespace tv
+} // namespace hardware
+} // namespace android
+
+#endif // ANDROID_HARDWARE_TV_CEC_V1_0_HDMICEC_H
diff --git a/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.rc b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.rc
new file mode 100644
index 0000000..170b485
--- /dev/null
+++ b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.rc
@@ -0,0 +1,5 @@
+service vendor.cec-hal-1-0-mock /vendor/bin/hw/android.hardware.tv.cec@1.0-service.mock
+ interface android.hardware.tv.cec@1.0::IHdmiCec default
+ class hal
+ user system
+ group system
diff --git a/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.xml b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.xml
new file mode 100644
index 0000000..5afa59d
--- /dev/null
+++ b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.mock.xml
@@ -0,0 +1,11 @@
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.tv.cec</name>
+ <transport>hwbinder</transport>
+ <version>1.0</version>
+ <interface>
+ <name>IHdmiCec</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest>
diff --git a/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc
index 8595099..6d25229 100644
--- a/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc
+++ b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.cec-hal-1-0 /vendor/bin/hw/android.hardware.tv.cec@1.0-service
+ interface android.hardware.tv.cec@1.0::IHdmiCec default
class hal
user system
group system
diff --git a/tv/cec/1.0/default/serviceMock.cpp b/tv/cec/1.0/default/serviceMock.cpp
new file mode 100644
index 0000000..c0af22f
--- /dev/null
+++ b/tv/cec/1.0/default/serviceMock.cpp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "android.hardware.tv.cec@1.0-service-shim"
+
+#include <android/hardware/tv/cec/1.0/IHdmiCec.h>
+#include <hidl/LegacySupport.h>
+#include "HdmiCecMock.h"
+
+using android::hardware::configureRpcThreadpool;
+using android::hardware::joinRpcThreadpool;
+using android::hardware::tv::cec::V1_0::IHdmiCec;
+using android::hardware::tv::cec::V1_0::implementation::HdmiCecMock;
+
+int main() {
+ configureRpcThreadpool(8, true /* callerWillJoin */);
+
+ // Setup hwbinder service
+ android::sp<IHdmiCec> service = new HdmiCecMock();
+ android::status_t status;
+ status = service->registerAsService();
+ LOG_ALWAYS_FATAL_IF(status != android::OK, "Error while registering mock cec service: %d",
+ status);
+
+ joinRpcThreadpool();
+ return 0;
+}
diff --git a/tv/input/1.0/default/android.hardware.tv.input@1.0-service.rc b/tv/input/1.0/default/android.hardware.tv.input@1.0-service.rc
index 972c654..6cb9a43 100644
--- a/tv/input/1.0/default/android.hardware.tv.input@1.0-service.rc
+++ b/tv/input/1.0/default/android.hardware.tv.input@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.tv-input-1-0 /vendor/bin/hw/android.hardware.tv.input@1.0-service
+ interface android.hardware.tv.input@1.0::ITvInput default
class hal
user system
group system
diff --git a/usb/1.0/default/android.hardware.usb@1.0-service.rc b/usb/1.0/default/android.hardware.usb@1.0-service.rc
index b7a0c63..3c44d21 100644
--- a/usb/1.0/default/android.hardware.usb@1.0-service.rc
+++ b/usb/1.0/default/android.hardware.usb@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.usb-hal-1-0 /vendor/bin/hw/android.hardware.usb@1.0-service
+ interface android.hardware.usb@1.0::IUsb default
class hal
user system
group system
diff --git a/vibrator/1.0/default/android.hardware.vibrator@1.0-service.rc b/vibrator/1.0/default/android.hardware.vibrator@1.0-service.rc
index 1123eab..1bd5c10 100644
--- a/vibrator/1.0/default/android.hardware.vibrator@1.0-service.rc
+++ b/vibrator/1.0/default/android.hardware.vibrator@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.vibrator-1-0 /vendor/bin/hw/android.hardware.vibrator@1.0-service
+ interface android.hardware.vibrator@1.0::IVibrator default
class hal
user system
group system
diff --git a/vr/1.0/default/android.hardware.vr@1.0-service.rc b/vr/1.0/default/android.hardware.vr@1.0-service.rc
index fc4934c..5486674 100644
--- a/vr/1.0/default/android.hardware.vr@1.0-service.rc
+++ b/vr/1.0/default/android.hardware.vr@1.0-service.rc
@@ -1,4 +1,5 @@
service vendor.vr-1-0 /vendor/bin/hw/android.hardware.vr@1.0-service
+ interface android.hardware.vr@1.0::IVr default
class hal
user system
group system
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index d16f1e7..14d5927 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -348,8 +348,8 @@
/*
* CreateApIface
- * Configures the chip in AP mode and ensures that only 1 iface creation
- * succeeds. The 2nd iface creation should be rejected.
+ * Configures the chip in AP mode and ensures that at least 1 iface creation
+ * succeeds.
*/
TEST_F(WifiChipHidlTest, CreateApIface) {
configureChipForIfaceType(IfaceType::AP, true);
@@ -357,8 +357,6 @@
sp<IWifiApIface> iface;
EXPECT_EQ(WifiStatusCode::SUCCESS, createApIface(&iface));
EXPECT_NE(nullptr, iface.get());
-
- EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createApIface(&iface));
}
/*
@@ -443,8 +441,8 @@
/*
* CreateNanIface
- * Configures the chip in NAN mode and ensures that only 1 iface creation
- * succeeds. The 2nd iface creation should be rejected.
+ * Configures the chip in NAN mode and ensures that at least 1 iface creation
+ * succeeds.
*/
TEST_F(WifiChipHidlTest, CreateNanIface) {
if (!gEnv->isNanOn) return;
@@ -453,8 +451,6 @@
sp<IWifiNanIface> iface;
ASSERT_EQ(WifiStatusCode::SUCCESS, createNanIface(&iface));
EXPECT_NE(nullptr, iface.get());
-
- EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createNanIface(&iface));
}
/*
@@ -543,8 +539,8 @@
/*
* CreateP2pIface
- * Configures the chip in P2P mode and ensures that only 1 iface creation
- * succeeds. The 2nd iface creation should be rejected.
+ * Configures the chip in P2P mode and ensures that at least 1 iface creation
+ * succeeds.
*/
TEST_F(WifiChipHidlTest, CreateP2pIface) {
configureChipForIfaceType(IfaceType::P2P, true);
@@ -552,8 +548,6 @@
sp<IWifiP2pIface> iface;
EXPECT_EQ(WifiStatusCode::SUCCESS, createP2pIface(&iface));
EXPECT_NE(nullptr, iface.get());
-
- EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createP2pIface(&iface));
}
/*
@@ -638,8 +632,8 @@
/*
* CreateStaIface
- * Configures the chip in STA mode and ensures that only 1 iface creation
- * succeeds. The 2nd iface creation should be rejected.
+ * Configures the chip in STA mode and ensures that at least 1 iface creation
+ * succeeds.
*/
TEST_F(WifiChipHidlTest, CreateStaIface) {
configureChipForIfaceType(IfaceType::STA, true);
@@ -647,8 +641,6 @@
sp<IWifiStaIface> iface;
EXPECT_EQ(WifiStatusCode::SUCCESS, createStaIface(&iface));
EXPECT_NE(nullptr, iface.get());
-
- EXPECT_EQ(WifiStatusCode::ERROR_NOT_AVAILABLE, createStaIface(&iface));
}
/*
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index a341028..3ced328 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -249,6 +249,11 @@
* code.
*/
TEST_F(WifiStaIfaceHidlTest, SetScanningMacOui) {
+ if (!isCapabilitySupported(
+ IWifiStaIface::StaIfaceCapabilityMask::SCAN_RAND)) {
+ // No-op if SetScanningMacOui is not supported.
+ return;
+ }
const android::hardware::hidl_array<uint8_t, 3> kOui{
std::array<uint8_t, 3>{{0x10, 0x22, 0x33}}};
EXPECT_EQ(WifiStatusCode::SUCCESS,
diff --git a/wifi/1.2/default/android.hardware.wifi@1.0-service.rc b/wifi/1.2/default/android.hardware.wifi@1.0-service.rc
index cf849d0..2317bac 100644
--- a/wifi/1.2/default/android.hardware.wifi@1.0-service.rc
+++ b/wifi/1.2/default/android.hardware.wifi@1.0-service.rc
@@ -1,4 +1,7 @@
service vendor.wifi_hal_legacy /vendor/bin/hw/android.hardware.wifi@1.0-service
+ interface android.hardware.wifi@1.0::IWifi default
+ interface android.hardware.wifi@1.1::IWifi default
+ interface android.hardware.wifi@1.2::IWifi default
class hal
capabilities NET_ADMIN NET_RAW SYS_MODULE
user wifi