Merge "Add StatementService to car.mk" into rvc-dev am: d0aa3ae4de am: 5e896c1f9a am: eaec8cb254

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Car/+/11887388

Change-Id: I3139cc3680817f0b1f5fb3b73d2a992f065f6204
diff --git a/car_product/build/car.mk b/car_product/build/car.mk
index 9dd63e1..57b94b3 100644
--- a/car_product/build/car.mk
+++ b/car_product/build/car.mk
@@ -31,7 +31,6 @@
 
 PRODUCT_PACKAGES += \
     clatd \
-    clatd.conf \
     pppd \
     screenrecord
 
@@ -106,6 +105,10 @@
 # System Server components
 # Order is important: if X depends on Y, then Y should precede X on the list.
 PRODUCT_SYSTEM_SERVER_JARS += car-frameworks-service
+# TODO: make the order optimal by appending 'car-frameworks-service' at the end
+# after its dependency 'services'. Currently the order is violated because this
+# makefile is included before AOSP makefile.
+PRODUCT_BROKEN_SUBOPTIMAL_ORDER_OF_SYSTEM_SERVER_JARS := true
 
 # Boot animation
 PRODUCT_COPY_FILES += \
diff --git a/computepipe/runner/client_interface/AidlClientImpl.cpp b/computepipe/runner/client_interface/AidlClientImpl.cpp
index f8157dc..e410fb5 100644
--- a/computepipe/runner/client_interface/AidlClientImpl.cpp
+++ b/computepipe/runner/client_interface/AidlClientImpl.cpp
@@ -95,8 +95,9 @@
     if (status != SUCCESS) {
         return status;
     }
-    desc.data = std::vector(reinterpret_cast<const signed char*>(packetHandle->getData()),
-        reinterpret_cast<const signed char*>(packetHandle->getData() + packetHandle->getSize()));
+    desc.data = std::vector(reinterpret_cast<const uint8_t*>(packetHandle->getData()),
+                            reinterpret_cast<const uint8_t*>(packetHandle->getData() +
+                                                             packetHandle->getSize()));
     desc.size = packetHandle->getSize();
     if (static_cast<int32_t>(desc.data.size()) != desc.size) {
         LOG(ERROR) << "mismatch in char data size and reported size";
diff --git a/tests/CarDeveloperOptions/MODULE_LICENSE_APACHE2 b/tests/CarDeveloperOptions/MODULE_LICENSE_APACHE2
deleted file mode 100644
index e69de29..0000000
--- a/tests/CarDeveloperOptions/MODULE_LICENSE_APACHE2
+++ /dev/null
diff --git a/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datetime/timezone/TimeZoneInfo.java b/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datetime/timezone/TimeZoneInfo.java
index 7f2b3fe..42101b0 100644
--- a/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datetime/timezone/TimeZoneInfo.java
+++ b/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datetime/timezone/TimeZoneInfo.java
@@ -149,22 +149,31 @@
          * @return TimeZoneInfo containing time zone names, exemplar locations and GMT offset
          */
         public TimeZoneInfo format(TimeZone timeZone) {
-            final String id = timeZone.getID();
+            final String canonicalZoneId = getCanonicalZoneId(timeZone);
             final TimeZoneNames timeZoneNames = mTimeZoneFormat.getTimeZoneNames();
-            final java.util.TimeZone javaTimeZone = java.util.TimeZone.getTimeZone(id);
+            final java.util.TimeZone javaTimeZone = java.util.TimeZone.getTimeZone(canonicalZoneId);
             final CharSequence gmtOffset = ZoneGetter.getGmtOffsetText(mTimeZoneFormat, mLocale,
                 javaTimeZone, mNow);
             return new TimeZoneInfo.Builder(timeZone)
-                    .setGenericName(timeZoneNames.getDisplayName(id,
+                    .setGenericName(timeZoneNames.getDisplayName(canonicalZoneId,
                             TimeZoneNames.NameType.LONG_GENERIC, mNow.getTime()))
-                    .setStandardName(timeZoneNames.getDisplayName(id,
+                    .setStandardName(timeZoneNames.getDisplayName(canonicalZoneId,
                             TimeZoneNames.NameType.LONG_STANDARD, mNow.getTime()))
-                    .setDaylightName(timeZoneNames.getDisplayName(id,
+                    .setDaylightName(timeZoneNames.getDisplayName(canonicalZoneId,
                             TimeZoneNames.NameType.LONG_DAYLIGHT, mNow.getTime()))
-                    .setExemplarLocation(timeZoneNames.getExemplarLocationName(id))
+                    .setExemplarLocation(timeZoneNames.getExemplarLocationName(canonicalZoneId))
                     .setGmtOffset(gmtOffset)
                     .build();
         }
+
+        private static String getCanonicalZoneId(TimeZone timeZone) {
+            final String id = timeZone.getID();
+            final String canonicalId = TimeZone.getCanonicalID(id);
+            if (canonicalId != null) {
+                return canonicalId;
+            }
+            return id;
+        }
     }
 
 }