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

Unverified Commit a3984ba2 authored by Willy Gardiol's avatar Willy Gardiol Committed by Michael Bestas
Browse files

settings: display actual device peak refresh rate in summary

The hardcoded value of 90Hz might be incorrect for some devices.

Squashed with:
Author: Michael W <baddaemon87@gmail.com>
Date:   Thu Oct 14 19:22:29 2021 +0200

    Fixup "settings: display actual device peak refresh rate in summary"

    This partially reverts commit 892841cc.

    * peak_refresh_rate_summary ->
      peak_refresh_rate_summary_custom

    Change-Id: I11140715990215329a0813a232651bfbd230828d

Change-Id: I6074f081855f20f8c4b973e893175d9b0f79b3ab
parent 42af100b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -69,4 +69,7 @@

    <!-- Title for connected TWS device group [CHAR LIMIT=none]-->
    <string name="connected_tws_device_saved_title">Saved Earbuds</string>

    <!-- Display settings screen, peak refresh rate settings summary [CHAR LIMIT=NONE] -->
    <string name="peak_refresh_rate_summary_custom">Automatically raises the refresh rate from 60 to %1$d Hz for some content. Increases battery usage.</string>
</resources>
+0 −1
Original line number Diff line number Diff line
@@ -128,7 +128,6 @@
        <SwitchPreference
            android:key="peak_refresh_rate"
            android:title="@string/peak_refresh_rate_title"
            android:summary="@string/peak_refresh_rate_summary"
            settings:controller="com.android.settings.display.PeakRefreshRatePreferenceController"/>

        <SwitchPreference
+4 −0
Original line number Diff line number Diff line
@@ -89,6 +89,10 @@ public class PeakRefreshRatePreferenceController extends TogglePreferenceControl
        super.displayPreference(screen);

        mPreference = screen.findPreference(getPreferenceKey());

        final String summary = mContext.getString(R.string.peak_refresh_rate_summary_custom,
                (int)mPeakRefreshRate);
        mPreference.setSummary(summary);
    }

    @Override