Revert "Revert "power hal: Use power HAL API 1.1""
This reverts commit 48b908bd77abe10880747ebc10659027adc772f4.
and brings back commit 0a4e11480b277108234f4dcab980d7c7bd6e49f5
This commit directs framework to use Power HAL 1.1
The commit has been tested not to cause application startup time
regression which was the reason of reverting the original commit
Bug: 62040325
Test: Performance Tests along with other tests
Change-Id: I84fdff3136c85e62223e2ae2f66b5bcad4e491b8
Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index 31064ac..517c326 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -169,6 +169,7 @@
public interface PlatformIdleStateCallback {
public String getPlatformLowPowerStats();
+ public String getSubsystemLowPowerStats();
}
private final PlatformIdleStateCallback mPlatformIdleStateCallback;
@@ -2882,6 +2883,12 @@
mPlatformIdleStateCallback.getPlatformLowPowerStats();
if (DEBUG) Slog.i(TAG, "WRITE PlatformIdleState:" +
mCurHistoryStepDetails.statPlatformIdleState);
+
+ mCurHistoryStepDetails.statSubsystemPowerState =
+ mPlatformIdleStateCallback.getSubsystemLowPowerStats();
+ if (DEBUG) Slog.i(TAG, "WRITE SubsystemPowerState:" +
+ mCurHistoryStepDetails.statSubsystemPowerState);
+
}
computeHistoryStepDetails(mCurHistoryStepDetails, mLastHistoryStepDetails);
if (includeStepDetails != 0) {