Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88b1165d authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Merge cherrypicks of [3710515, 3711068, 3711069, 3710188, 3710755, 3710602,...

Merge cherrypicks of [3710515, 3711068, 3711069, 3710188, 3710755, 3710602, 3710424, 3710603, 3710516] into pi-release

Change-Id: Iff05a9f5801c7b1345c451ee9ec4881bb3fb314a
parents 37792cdb 99871a42
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -57,15 +57,15 @@

    <!-- When the lock screen is showing and the phone plugged in, and the battery
         is not fully charged, say that it's charging.  -->
    <string name="keyguard_plugged_in"><xliff:g id="percentage">%s</xliff:g>Charging</string>
    <string name="keyguard_plugged_in">Charging</string>

    <!-- When the lock screen is showing and the phone plugged in, and the battery
         is not fully charged, and it's plugged into a fast charger, say that it's charging fast.  -->
    <string name="keyguard_plugged_in_charging_fast"><xliff:g id="percentage">%s</xliff:g>Charging rapidly</string>
    <string name="keyguard_plugged_in_charging_fast">Charging rapidly</string>

    <!-- When the lock screen is showing and the phone plugged in, and the battery
         is not fully charged, and it's plugged into a slow charger, say that it's charging slowly.  -->
    <string name="keyguard_plugged_in_charging_slowly"><xliff:g id="percentage">%s</xliff:g>Charging slowly</string>
    <string name="keyguard_plugged_in_charging_slowly">Charging slowly</string>

    <!-- When the lock screen is showing and the battery is low, warn user to plug
         in the phone soon. -->
+6 −6
Original line number Diff line number Diff line
@@ -946,14 +946,14 @@
    <!-- Interruption level: Alarms only.  Optimized for narrow two-line display. [CHAR LIMIT=40] -->
    <string name="interruption_level_alarms_twoline">Alarms\nonly</string>

    <!-- Indication on the keyguard that is shown when the device is charging. [CHAR LIMIT=50]-->
    <string name="keyguard_indication_charging_time"><xliff:g id="percentage">%2$s</xliff:g>Charging (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>
    <!-- Indication on the keyguard that is shown when the device is charging. [CHAR LIMIT=40]-->
    <string name="keyguard_indication_charging_time">Charging (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>

    <!-- Indication on the keyguard that is shown when the device is charging rapidly. Should match keyguard_plugged_in_charging_fast [CHAR LIMIT=50]-->
    <string name="keyguard_indication_charging_time_fast"><xliff:g id="percentage">%2$s</xliff:g>Charging rapidly (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>
    <!-- Indication on the keyguard that is shown when the device is charging rapidly. Should match keyguard_plugged_in_charging_fast [CHAR LIMIT=40]-->
    <string name="keyguard_indication_charging_time_fast">Charging rapidly (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>

    <!-- Indication on the keyguard that is shown when the device is charging slowly. Should match keyguard_plugged_in_charging_slowly [CHAR LIMIT=50]-->
    <string name="keyguard_indication_charging_time_slowly"><xliff:g id="percentage">%2$s</xliff:g>Charging slowly (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>
    <!-- Indication on the keyguard that is shown when the device is charging slowly. Should match keyguard_plugged_in_charging_slowly [CHAR LIMIT=40]-->
    <string name="keyguard_indication_charging_time_slowly">Charging slowly (<xliff:g id="charging_time_left" example="4 hours and 2 minutes">%s</xliff:g> until full)</string>

    <!-- Related to user switcher --><skip/>

+2 −4
Original line number Diff line number Diff line
@@ -411,14 +411,12 @@ public class KeyguardIndicationController {
                break;
        }

        String percentage = NumberFormat.getPercentInstance()
                .format(mBatteryLevel / 100f);
        if (hasChargingTime) {
            String chargingTimeFormatted = Formatter.formatShortElapsedTimeRoundingUpToMinutes(
                    mContext, chargingTimeRemaining);
            return mContext.getResources().getString(chargingId, chargingTimeFormatted, percentage);
            return mContext.getResources().getString(chargingId, chargingTimeFormatted);
        } else {
            return mContext.getResources().getString(chargingId, percentage);
            return mContext.getResources().getString(chargingId);
        }
    }

+5 −1
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ import java.nio.charset.StandardCharsets;
import java.util.ArrayDeque;
import java.util.ArrayList;

import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
@@ -657,7 +658,10 @@ public class BrightnessTracker {
    }

    public ParceledListSlice<AmbientBrightnessDayStats> getAmbientBrightnessStats(int userId) {
        return new ParceledListSlice<>(mAmbientBrightnessStatsTracker.getUserStats(userId));
        ArrayList<AmbientBrightnessDayStats> stats = mAmbientBrightnessStatsTracker.getUserStats(
                userId);
        return (stats != null) ? new ParceledListSlice<>(stats) : new ParceledListSlice<>(
                Collections.EMPTY_LIST);
    }

    // Not allowed to keep the SensorEvent so used to copy the data we care about.