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

Commit 301113ea authored by Fredrik Ryden's avatar Fredrik Ryden Committed by Harshad Dhabu
Browse files

Make showing percentage texts configurable on shutdown dialog

Bug: 315235777
Test: Made a patch so the shutdown to update dialog screen would show up on each reboot, and stay there for some time.
(cherry picked from https://partner-android-review.googlesource.com/q/commit:f6fa76c6e6ec825e4da9508f8a018fc1408558ca)
Merged-In: I8a60596748fa3d1a4fbea7c115d52fba3a740c75
Change-Id: I8a60596748fa3d1a4fbea7c115d52fba3a740c75
parent 5756cacd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6890,4 +6890,8 @@
    <!-- Defines suitability of the built-in speaker route.
         Refer to {@link MediaRoute2Info} to see supported values.  -->
    <integer name="config_mediaRouter_builtInSpeakerSuitability">0</integer>

    <!-- Whether to show a percentage text next to the progressbar while preparing to update the
         device -->
    <bool name="config_showPercentageTextDuringRebootToUpdate">true</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -5311,4 +5311,7 @@

  <!-- Android MediaRouter framework configs. -->
  <java-symbol type="integer" name="config_mediaRouter_builtInSpeakerSuitability" />

  <!-- Shutdown thread config flags -->
  <java-symbol type="bool" name="config_showPercentageTextDuringRebootToUpdate" />
</resources>
+6 −1
Original line number Diff line number Diff line
@@ -319,6 +319,11 @@ public final class ShutdownThread extends Thread {
                pd.setMax(100);
                pd.setProgress(0);
                pd.setIndeterminate(false);
                boolean showPercent = context.getResources().getBoolean(
                    com.android.internal.R.bool.config_showPercentageTextDuringRebootToUpdate);
                if (!showPercent) {
                    pd.setProgressPercentFormat(null);
                }
                pd.setProgressNumberFormat(null);
                pd.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
                pd.setMessage(context.getText(