Merge "wifi: use PLOG rather than LOG strerror."
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 57179df..69b7628 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -2215,7 +2215,7 @@
     ERROR = 4,
 };
 
-enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ {
+enum VehicleApPowerStateConfigFlag : int32_t {
     /**
      * AP can enter deep sleep state. If not set, AP will always shutdown from
      * VehicleApPowerState#SHUTDOWN_PREPARE power state.
diff --git a/current.txt b/current.txt
index b0e6896..e1b3356 100644
--- a/current.txt
+++ b/current.txt
@@ -449,7 +449,7 @@
 92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
 83885d366f22ada42c00d8854f0b7e7ba4cf73ddf80bb0d8e168ce132cec57ea android.hardware.neuralnetworks@1.2::IPreparedModel
 e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-c752cff336d86762c26dc82e7e037f4962b815b1a068d2319d40a3d068e26f68 android.hardware.neuralnetworks@1.2::types
+896d1827541d620996720a79c6476edb902a58d515bf908f67a5bdef4d2c318c android.hardware.neuralnetworks@1.2::types
 cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc
 abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types
 4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats
diff --git a/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp b/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
index 4af8a5d..74fe4fb 100644
--- a/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
+++ b/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
@@ -17,6 +17,8 @@
 #define LOG_TAG "health_hidl_hal_test"
 
 #include <mutex>
+#include <set>
+#include <string>
 
 #include <VtsHalHidlTargetTestBase.h>
 #include <android-base/logging.h>
@@ -32,6 +34,39 @@
 
 DEFINE_bool(force, false, "Force test healthd even when the default instance is present.");
 
+// If GTEST_SKIP is not implemented, use our own skipping mechanism
+#ifndef GTEST_SKIP
+static std::mutex gSkippedTestsMutex;
+static std::set<std::string> gSkippedTests;
+static std::string GetCurrentTestName() {
+    const auto& info = ::testing::UnitTest::GetInstance()->current_test_info();
+#ifdef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
+    std::string test_suite = info->test_suite_name();
+#else
+    std::string test_suite = info->test_case_name();
+#endif
+    return test_suite + "." + info->name();
+}
+
+#define GTEST_SKIP()                                           \
+    do {                                                       \
+        std::unique_lock<std::mutex> lock(gSkippedTestsMutex); \
+        gSkippedTests.insert(GetCurrentTestName());            \
+        return;                                                \
+    } while (0)
+
+#define SKIP_IF_SKIPPED()                                                      \
+    do {                                                                       \
+        std::unique_lock<std::mutex> lock(gSkippedTestsMutex);                 \
+        if (gSkippedTests.find(GetCurrentTestName()) != gSkippedTests.end()) { \
+            std::cerr << "[  SKIPPED ] " << GetCurrentTestName() << std::endl; \
+            return;                                                            \
+        }                                                                      \
+    } while (0)
+#else
+#define SKIP_IF_SKIPPED()
+#endif
+
 namespace android {
 namespace hardware {
 namespace health {
@@ -122,6 +157,7 @@
  * unregisterCallback, and update.
  */
 TEST_F(HealthHidlTest, Callbacks) {
+    SKIP_IF_SKIPPED();
     using namespace std::chrono_literals;
     sp<Callback> firstCallback = new Callback();
     sp<Callback> secondCallback = new Callback();
@@ -158,6 +194,7 @@
 }
 
 TEST_F(HealthHidlTest, UnregisterNonExistentCallback) {
+    SKIP_IF_SKIPPED();
     sp<Callback> callback = new Callback();
     auto ret = mHealth->unregisterCallback(callback);
     ASSERT_OK(ret);
@@ -236,6 +273,7 @@
  * Tests the values returned by getChargeCounter() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getChargeCounter) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getChargeCounter([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value > 0);
     }));
@@ -245,6 +283,7 @@
  * Tests the values returned by getCurrentNow() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCurrentNow) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCurrentNow([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT32_MIN);
     }));
@@ -254,6 +293,7 @@
  * Tests the values returned by getCurrentAverage() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCurrentAverage) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCurrentAverage([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT32_MIN);
     }));
@@ -263,6 +303,7 @@
  * Tests the values returned by getCapacity() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCapacity) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCapacity([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), 0 <= value && value <= 100);
     }));
@@ -272,6 +313,7 @@
  * Tests the values returned by getEnergyCounter() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getEnergyCounter) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getEnergyCounter([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT64_MIN);
     }));
@@ -281,6 +323,7 @@
  * Tests the values returned by getChargeStatus() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getChargeStatus) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getChargeStatus([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(
             result, toString(value),
@@ -292,6 +335,7 @@
  * Tests the values returned by getStorageInfo() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getStorageInfo) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getStorageInfo([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), verifyStorageInfo(value));
     }));
@@ -301,6 +345,7 @@
  * Tests the values returned by getDiskStats() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getDiskStats) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getDiskStats([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), true);
     }));
@@ -310,6 +355,7 @@
  * Tests the values returned by getHealthInfo() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getHealthInfo) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getHealthInfo([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), verifyHealthInfo(value));
     }));
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index 4a8664f..bb14dec 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -4223,7 +4223,7 @@
     TOPK_V2 = 90,
 
     /**
-     * Performs the tranpose of 2-D convolution operation.
+     * Performs the transpose of 2-D convolution operation.
      *
      * This operation is sometimes called "deconvolution" after Deconvolutional
      * Networks, but is actually the transpose (gradient) of
@@ -4844,7 +4844,7 @@
         /**
          * The extension name.
          *
-         * See {@link Extension::name}.
+         * See {@link Extension::name} for the format specification.
          */
         string name;
 
@@ -5128,7 +5128,11 @@
     /**
      * The extension name.
      *
+     * The name must consist of lowercase latin letters, numbers, periods, and
+     * underscore signs. The name must contain at least one period.
+     *
      * The name must start with the reverse domain name of the vendor.
+     *
      * Example: com.google.test_extension
      */
     string name;
diff --git a/neuralnetworks/1.2/vts/functional/BasicTests.cpp b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
index 2b88edd..365a750 100644
--- a/neuralnetworks/1.2/vts/functional/BasicTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
@@ -64,7 +64,12 @@
                 for (auto& extension : extensions) {
                     std::string extensionName = extension.name;
                     EXPECT_FALSE(extensionName.empty());
-                    EXPECT_NE(extensionName.find("."), std::string::npos)
+                    for (char c : extensionName) {
+                        EXPECT_TRUE(('a' <= c && c <= 'z') || ('0' <= c && c <= '9') || c == '_' ||
+                                    c == '.')
+                                << "Extension name contains an illegal character: " << c;
+                    }
+                    EXPECT_NE(extensionName.find('.'), std::string::npos)
                             << "Extension name must start with the reverse domain name of the "
                                "vendor";
                 }