summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/api/system-current.txt2
-rw-r--r--core/java/android/bluetooth/BluetoothActivityEnergyInfo.java5
-rw-r--r--services/core/java/com/android/server/stats/pull/StatsPullAtomService.java2
3 files changed, 5 insertions, 4 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 9c6939e5aae5..db3cedd27a9b 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -1941,7 +1941,7 @@ package android.bluetooth {
method public long getControllerIdleTimeMillis();
method public long getControllerRxTimeMillis();
method public long getControllerTxTimeMillis();
- method public long getTimeStamp();
+ method public long getTimestampMillis();
method @NonNull public java.util.List<android.bluetooth.UidTraffic> getUidTraffic();
method public boolean isValid();
field public static final int BT_STACK_STATE_INVALID = 0; // 0x0
diff --git a/core/java/android/bluetooth/BluetoothActivityEnergyInfo.java b/core/java/android/bluetooth/BluetoothActivityEnergyInfo.java
index f371c6d78221..c17a7b4b3dfd 100644
--- a/core/java/android/bluetooth/BluetoothActivityEnergyInfo.java
+++ b/core/java/android/bluetooth/BluetoothActivityEnergyInfo.java
@@ -16,6 +16,7 @@
package android.bluetooth;
+import android.annotation.ElapsedRealtimeLong;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
@@ -167,7 +168,7 @@ public final class BluetoothActivityEnergyInfo implements Parcelable {
/**
* @return timestamp (real time elapsed in milliseconds since boot) of record creation
*/
- public long getTimeStamp() {
+ public @ElapsedRealtimeLong long getTimestampMillis() {
return mTimestamp;
}
@@ -189,7 +190,7 @@ public final class BluetoothActivityEnergyInfo implements Parcelable {
}
/**
- * @return true if the record is valid
+ * @return true if the record Tx time, Rx time, and Idle time are more than 0.
*/
public boolean isValid() {
return ((mControllerTxTimeMs >= 0) && (mControllerRxTimeMs >= 0)
diff --git a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
index 566028a587a7..68b760a1be34 100644
--- a/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
+++ b/services/core/java/com/android/server/stats/pull/StatsPullAtomService.java
@@ -2061,7 +2061,7 @@ public class StatsPullAtomService extends SystemService {
if (info == null) {
return StatsManager.PULL_SKIP;
}
- pulledData.add(FrameworkStatsLog.buildStatsEvent(atomTag, info.getTimeStamp(),
+ pulledData.add(FrameworkStatsLog.buildStatsEvent(atomTag, info.getTimestampMillis(),
info.getBluetoothStackState(), info.getControllerTxTimeMillis(),
info.getControllerRxTimeMillis(), info.getControllerIdleTimeMillis(),
info.getControllerEnergyUsed()));