power.stats: Add more informative default implementation
The original default implementation for power.stats HAL did not have a
good example implementation of the power statistics related APIs. Adding
a new default implementation that gives a more informative example
Bug: 122267057
Test: run vts -m VtsHalPowerStatsV1_0Target
Test: adb shell "lshal debug android.hardware.power.stats@1.0::IPowerStats/default"
Observed the following output
========== PowerStats HAL 1.0 state residencies ==========
Entity State Total time Total entries Last entry timestamp
DefaultEntity Active 1 ms 2 3 ms
DefaultEntity Sleep 4 ms 5 6 ms
========== End of PowerStats HAL 1.0 state residencies ==========
Change-Id: Ida0951c267f609b16bb6406da150ed2e504ced9a
diff --git a/power/stats/1.0/default/Android.bp b/power/stats/1.0/default/Android.bp
index 04270c1..b57466d 100644
--- a/power/stats/1.0/default/Android.bp
+++ b/power/stats/1.0/default/Android.bp
@@ -11,7 +11,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
-cc_library_shared {
+cc_binary {
name: "android.hardware.power.stats@1.0-service",
relative_install_path: "hw",
init_rc: ["android.hardware.power.stats@1.0-service.rc"],