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

Commit e70934c2 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/33320898']...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/33320898'] into sparse-13425744-L97400030011689433.
SPARSE_CHANGE: Iead9c06835a227ae870ba71d70a9e9461ef64be9

Change-Id: I49b425dc1c7d50cd7ef1e0dbea4b880633dd021c
parents 1253aadb 81d22c9e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1851,5 +1851,5 @@
    <string name="system_update_settings_list_item_title">System Updates</string>

    <!-- The exclamation symbol defined for the battery meter. [CHAR LIMIT=NONE]-->
    <string name="config_batterymeterExclamationPath" translatable="false">M7 12.5h.5V12 6 5.5H7 5 4.5V6v6 .5H5 7ZM4.9064 16.0629l.0147.016.016.0147c.2966.2719.6605.4064 1.0629.4064.4024 0 .7673-.1352 1.0536-.4214.294-.294.4464-.6629.4464-1.0786 0-.4092-.1485-.7731-.4462-1.0538C6.7731 13.6485 6.4092 13.5 6 13.5c-.4157 0-.7846.1525-1.0785.4464L5.275 14.3l-.3536-.3536C4.6352 14.2327 4.5 14.5976 4.5 15c0 .4023.1345.7663.4064 1.0629Z</string>
    <string name="config_batteryMeterExclamationPath" translatable="false">M7 12.5h.5V12 6 5.5H7 5 4.5V6v6 .5H5 7ZM4.9064 16.0629l.0147.016.016.0147c.2966.2719.6605.4064 1.0629.4064.4024 0 .7673-.1352 1.0536-.4214.294-.294.4464-.6629.4464-1.0786 0-.4092-.1485-.7731-.4462-1.0538C6.7731 13.6485 6.4092 13.5 6 13.5c-.4157 0-.7846.1525-1.0785.4464L5.275 14.3l-.3536-.3536C4.6352 14.2327 4.5 14.5976 4.5 15c0 .4023.1345.7663.4064 1.0629Z</string>
</resources>
+5 −6
Original line number Diff line number Diff line
@@ -261,11 +261,10 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int)
            }
        } else if (alertEnabled) {
            c.clipOutPath(scaledExclamation)
            if (invertFillIcon) {
                c.drawPath(scaledExclamation, fillColorStrokePaint)
            } else {
                c.drawPath(scaledExclamation, fillColorStrokeProtection)
            }
            c.drawPath(
                scaledExclamation,
                if (invertFillIcon) fillColorStrokePaint else fillColorStrokeProtection
            )
        } else if (powerSaveEnabled) {
            // If power save is enabled draw the level path with colorError
            c.drawPath(levelPath, errorPaint)
@@ -433,7 +432,7 @@ open class ThemedBatteryDrawable(private val context: Context, frameColor: Int)
        plusPath.set(PathParser.createPathFromPathData(plusPathString))

        val exclamationPathString = context.resources.getString(
            R.string.config_batterymeterExclamationPath)
            R.string.config_batteryMeterExclamationPath)
        exclamationPath.set(PathParser.createPathFromPathData(exclamationPathString))

        dualTone = context.resources.getBoolean(
+5 −5
Original line number Diff line number Diff line
@@ -111,17 +111,17 @@ public class BatteryMeterViewController extends ViewController<BatteryMeterView>
                    }
                }

                @Override
                public void onBatteryAlertStateChanged(boolean isAlert) {
                    mView.onBatteryAlertStateChanged(isAlert);
                }

                @Override
                public void dump(@NonNull PrintWriter pw, @NonNull String[] args) {
                    pw.print(super.toString());
                    pw.println(" location=" + mLocation);
                    mView.dump(pw, args);
                }

                @Override
                public void onBatteryAlertStateChanged(boolean isAlert) {
                    mView.onBatteryAlertStateChanged(isAlert);
                }
            };

    private final UserTracker.Callback mUserChangedCallback =
+1 −6
Original line number Diff line number Diff line
@@ -526,12 +526,7 @@ public class BatteryControllerImpl extends BroadcastReceiver implements BatteryC
    }

    private void fireBatteryAlertStateChanged() {
        synchronized (mChangeCallbacks) {
            final int n = mChangeCallbacks.size();
            for (int i = 0; i < n; i++) {
                mChangeCallbacks.get(i).onBatteryAlertStateChanged(mStateAlert);
            }
        }
        dispatchSafeChange((callback) -> callback.onBatteryAlertStateChanged(mStateAlert));
    }

    @Override