IStats HAL: Stable AIDL interface update
Added VendorAtomValue boolean type support
Bug: 183753160
Test: build, flash & run aidl_stats_client
Change-Id: I56542f5dac99121fd0368d6c97167673a3cf597f
Merged-In: I56542f5dac99121fd0368d6c97167673a3cf597f
diff --git a/stats/aidl/Android.bp b/stats/aidl/Android.bp
index a8eec49..efb9d31 100644
--- a/stats/aidl/Android.bp
+++ b/stats/aidl/Android.bp
@@ -34,5 +34,10 @@
enabled: true,
},
},
- versions: ["1"],
+ versions_with_info: [
+ {
+ version: "1",
+ imports: [],
+ },
+ ],
}
diff --git a/stats/aidl/aidl_api/android.frameworks.stats/current/android/frameworks/stats/VendorAtomValue.aidl b/stats/aidl/aidl_api/android.frameworks.stats/current/android/frameworks/stats/VendorAtomValue.aidl
index 31f26f7..0133721 100644
--- a/stats/aidl/aidl_api/android.frameworks.stats/current/android/frameworks/stats/VendorAtomValue.aidl
+++ b/stats/aidl/aidl_api/android.frameworks.stats/current/android/frameworks/stats/VendorAtomValue.aidl
@@ -38,4 +38,5 @@
long longValue;
float floatValue;
String stringValue;
+ boolean boolValue;
}
diff --git a/stats/aidl/android/frameworks/stats/VendorAtomValue.aidl b/stats/aidl/android/frameworks/stats/VendorAtomValue.aidl
index 9ae0372..7b63123 100644
--- a/stats/aidl/android/frameworks/stats/VendorAtomValue.aidl
+++ b/stats/aidl/android/frameworks/stats/VendorAtomValue.aidl
@@ -24,4 +24,5 @@
long longValue;
float floatValue;
String stringValue;
+ boolean boolValue;
}
diff --git a/stats/aidl/test_client/AidlStatsClient.cpp b/stats/aidl/test_client/AidlStatsClient.cpp
index f6782e6..4e6c9f5 100644
--- a/stats/aidl/test_client/AidlStatsClient.cpp
+++ b/stats/aidl/test_client/AidlStatsClient.cpp
@@ -79,8 +79,11 @@
values.push_back(tmp);
tmp.set<VendorAtomValue::intValue>(3);
values.push_back(tmp);
- VendorAtom atom = {
- .reverseDomainName = "", .atomId = 100001, .values = values};
+ tmp.set<VendorAtomValue::boolValue>(true);
+ values.push_back(tmp);
+ tmp.set<VendorAtomValue::boolValue>(false);
+ values.push_back(tmp);
+ VendorAtom atom = {.reverseDomainName = "", .atomId = 104999, .values = values};
const ndk::ScopedAStatus ret = service->reportVendorAtom(atom);
if (!ret.isOk()) {
std::cout << "reportVendorAtom failed: " << ret.getServiceSpecificError()
diff --git a/stats/aidl/test_client/Android.bp b/stats/aidl/test_client/Android.bp
index 8a8c895..5698619 100644
--- a/stats/aidl/test_client/Android.bp
+++ b/stats/aidl/test_client/Android.bp
@@ -31,7 +31,7 @@
"AidlStatsClient.cpp",
],
shared_libs: [
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
"libbase",
"libbinder_ndk",
"libutils",
diff --git a/stats/aidl/vts/functional/Android.bp b/stats/aidl/vts/functional/Android.bp
index 3a63bb0..d96cf97 100644
--- a/stats/aidl/vts/functional/Android.bp
+++ b/stats/aidl/vts/functional/Android.bp
@@ -25,17 +25,17 @@
"use_libaidlvintf_gtest_helper_static",
],
srcs: [
- "VtsHalStatsTargetTest.cpp"
+ "VtsHalStatsTargetTest.cpp",
],
shared_libs: [
"libbinder_ndk",
"libvndksupport",
],
static_libs: [
- "android.frameworks.stats-V1-ndk",
+ "android.frameworks.stats-V2-ndk",
],
test_suites: [
"general-tests",
- "vts"
+ "vts",
],
}
diff --git a/stats/aidl/vts/functional/VtsHalStatsTargetTest.cpp b/stats/aidl/vts/functional/VtsHalStatsTargetTest.cpp
index 576fa04..ae44b9a 100644
--- a/stats/aidl/vts/functional/VtsHalStatsTargetTest.cpp
+++ b/stats/aidl/vts/functional/VtsHalStatsTargetTest.cpp
@@ -54,7 +54,11 @@
values.push_back(tmp);
tmp.set<VendorAtomValue::intValue>(3);
values.push_back(tmp);
- VendorAtom atom = {.reverseDomainName = "", .atomId = 100001, .values = values};
+ tmp.set<VendorAtomValue::boolValue>(true);
+ values.push_back(tmp);
+ tmp.set<VendorAtomValue::boolValue>(false);
+ values.push_back(tmp);
+ VendorAtom atom = {.reverseDomainName = "", .atomId = 104999, .values = values};
const ndk::ScopedAStatus ret = client->reportVendorAtom(atom);
ASSERT_TRUE(ret.isOk());