diff --git a/res/layout/locale_order_list.xml b/res/layout/locale_order_list.xml
index acde14575e9..5c1db15dbd2 100644
--- a/res/layout/locale_order_list.xml
+++ b/res/layout/locale_order_list.xml
@@ -14,11 +14,11 @@
limitations under the License.
-->
-
+
-
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index dea4320fc22..5a5bc27b3ec 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -871,9 +871,9 @@
Using face or fingerprint
OK
-
+
Can\u2019t set up fingerprint
-
+
Exit split screen to set up Fingerprint Unlock
OK
@@ -11524,9 +11524,12 @@
Helps identify the relative position of nearby devices that have UWB
-
+
Turn off airplane mode to use UWB
+
+ UWB is unavailable in the current location
+
Camera access
diff --git a/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java b/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
index 6270eb3f8a1..ec1a4be0fae 100644
--- a/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
+++ b/src/com/android/settings/fuelgauge/batteryusage/DataProcessor.java
@@ -1446,31 +1446,39 @@ public final class DataProcessor {
final int workProfileUserId =
userHandle != null ? userHandle.getIdentifier() : Integer.MIN_VALUE;
// Each time slot usage diff data =
- // Math.abs(timestamp[i+2] data - timestamp[i+1] data) +
- // Math.abs(timestamp[i+1] data - timestamp[i] data);
- // since we want to aggregate every two hours data into a single time slot.
+ // sum(Math.abs(timestamp[i+1] data - timestamp[i] data));
+ // since we want to aggregate every hour usage diff data into a single time slot.
for (int dailyIndex = 0; dailyIndex < hourlyBatteryLevelsPerDay.size(); dailyIndex++) {
final Map dailyDiffMap = new ArrayMap<>();
resultMap.put(dailyIndex, dailyDiffMap);
if (hourlyBatteryLevelsPerDay.get(dailyIndex) == null) {
continue;
}
- final List timestamps = hourlyBatteryLevelsPerDay.get(dailyIndex).getTimestamps();
- for (int hourlyIndex = 0; hourlyIndex < timestamps.size() - 1; hourlyIndex++) {
+ final List hourlyTimestamps =
+ hourlyBatteryLevelsPerDay.get(dailyIndex).getTimestamps();
+ for (int hourlyIndex = 0; hourlyIndex < hourlyTimestamps.size() - 1; hourlyIndex++) {
+ final Long startTimestamp = hourlyTimestamps.get(hourlyIndex);
+ final Long endTimestamp = hourlyTimestamps.get(hourlyIndex + 1);
+ final long slotDuration = endTimestamp - startTimestamp;
+ List