Merge "Remove default value for AP_POWER_STATE_REQ."
diff --git a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
index d2b69af..6ecac70 100644
--- a/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
+++ b/automotive/vehicle/aidl/impl/default_config/include/DefaultConfig.h
@@ -754,8 +754,7 @@
         {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                     .access = VehiclePropertyAccess::READ,
                     .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
-                    .configArray = {3}},
-         .initialValue = {.int32Values = {toInt(VehicleApPowerStateReq::ON), 0}}},
+                    .configArray = {3}}},
 
         {.config = {.prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
                     .access = VehiclePropertyAccess::READ_WRITE,
diff --git a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index 0812c2a..3dae9fc 100644
--- a/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -58,7 +58,6 @@
 using ::testing::ContainerEq;
 using ::testing::ContainsRegex;
 using ::testing::Eq;
-using ::testing::IsSubsetOf;
 using ::testing::WhenSortedBy;
 
 constexpr int INVALID_PROP_ID = 0;
@@ -635,16 +634,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::DEEP_SLEEP_EXIT)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values = {toInt(VehicleApPowerStateReq::ON),
                                                                   0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::DEEP_SLEEP_EXIT)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -660,16 +659,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::HIBERNATION_EXIT)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values = {toInt(VehicleApPowerStateReq::ON),
                                                                   0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::HIBERNATION_EXIT)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -685,16 +684,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::SHUTDOWN_CANCELLED)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values = {toInt(VehicleApPowerStateReq::ON),
                                                                   0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::SHUTDOWN_CANCELLED)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -710,16 +709,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::WAIT_FOR_VHAL)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values = {toInt(VehicleApPowerStateReq::ON),
                                                                   0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::WAIT_FOR_VHAL)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -735,16 +734,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values =
                                                     {toInt(VehicleApPowerStateReq::FINISHED), 0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::DEEP_SLEEP_ENTRY)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -760,16 +759,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::HIBERNATION_ENTRY)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values =
                                                     {toInt(VehicleApPowerStateReq::FINISHED), 0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::HIBERNATION_ENTRY)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -785,16 +784,16 @@
                     .expectedValuesToGet =
                             {
                                     VehiclePropValue{
-                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
-                                            .value.int32Values = {toInt(
-                                                    VehicleApPowerStateReport::SHUTDOWN_START)},
-                                    },
-                                    VehiclePropValue{
                                             .prop = toInt(VehicleProperty::AP_POWER_STATE_REQ),
                                             .status = VehiclePropertyStatus::AVAILABLE,
                                             .value.int32Values =
                                                     {toInt(VehicleApPowerStateReq::FINISHED), 0},
                                     },
+                                    VehiclePropValue{
+                                            .prop = toInt(VehicleProperty::AP_POWER_STATE_REPORT),
+                                            .value.int32Values = {toInt(
+                                                    VehicleApPowerStateReport::SHUTDOWN_START)},
+                                    },
                             },
             },
             SetSpecialValueTestCase{
@@ -915,7 +914,7 @@
     // Some of the updated properties might be the same as default config, thus not causing
     // a property change event. So the changed properties should be a subset of all the updated
     // properties.
-    ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, IsSubsetOf(gotValues)));
+    ASSERT_THAT(getChangedProperties(), WhenSortedBy(mPropValueCmp, Eq(gotValues)));
 }
 
 INSTANTIATE_TEST_SUITE_P(