IStats HAL: Updated AIDL to version 2
Added support for bool type
Bug: 183753160
Test: build, flash & run aidl_stats_client
Change-Id: Ic1e33abbde56535931a5b33305f11c178df91bcc
Merged-In: Ic1e33abbde56535931a5b33305f11c178df91bcc
diff --git a/services/stats/Android.bp b/services/stats/Android.bp
index 7fea616..7d358e1 100644
--- a/services/stats/Android.bp
+++ b/services/stats/Android.bp
@@ -13,10 +13,13 @@
"StatsAidl.cpp",
"StatsHal.cpp",
],
- cflags: ["-Wall", "-Werror"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
shared_libs: [
"android.frameworks.stats@1.0",
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
"libbinder_ndk",
"libhidlbase",
"liblog",
@@ -29,10 +32,12 @@
],
export_shared_lib_headers: [
"android.frameworks.stats@1.0",
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
],
local_include_dirs: [
"include/stats",
],
- vintf_fragments: ["android.frameworks.stats@1.0-service.xml"]
+ vintf_fragments: [
+ "android.frameworks.stats-service.xml",
+ ],
}
diff --git a/services/stats/StatsAidl.cpp b/services/stats/StatsAidl.cpp
index 0f1a0d4..d4b9a88 100644
--- a/services/stats/StatsAidl.cpp
+++ b/services/stats/StatsAidl.cpp
@@ -62,6 +62,10 @@
AStatsEvent_writeString(event,
atomValue.get<VendorAtomValue::stringValue>().c_str());
break;
+ case VendorAtomValue::boolValue:
+ AStatsEvent_writeBool(event,
+ atomValue.get<VendorAtomValue::boolValue>());
+ break;
}
}
AStatsEvent_build(event);
diff --git a/services/stats/android.frameworks.stats@1.0-service.xml b/services/stats/android.frameworks.stats-service.xml
similarity index 93%
rename from services/stats/android.frameworks.stats@1.0-service.xml
rename to services/stats/android.frameworks.stats-service.xml
index c564b7b..7e2635e 100644
--- a/services/stats/android.frameworks.stats@1.0-service.xml
+++ b/services/stats/android.frameworks.stats-service.xml
@@ -11,7 +11,7 @@
<hal format="aidl">
<name>android.frameworks.stats</name>
- <version>1</version>
+ <version>2</version>
<fqname>IStats/default</fqname>
</hal>
</manifest>