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

Commit 70d3de14 authored by shaoweishen's avatar shaoweishen
Browse files

[Physical Keyboard] Add seconds text for custom value

Bug:414972643
Flag: EXEMPT bugfix
Test: atest
packages/apps/Settings/tests/robotests/src/com/android/settings/inputmethod/

Change-Id: Ia833f0cc125dd6c0304e28370137274ca552e99c
parent 6ec49d9d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4889,6 +4889,8 @@
    <string name="input_setting_keys_dialog_option_400">0.4 seconds</string>
    <!-- Option title for the input setting keys threshold dialog for 600 millisecond. [CHAR LIMIT=35] -->
    <string name="input_setting_keys_dialog_option_600">0.6 seconds</string>
    <!-- Option title for the input setting keys threshold dialog for custom option. [CHAR LIMIT=35] -->
    <string name="input_setting_keys_dialog_option_custom"><xliff:g id="threshold" example="0.7">%.1f</xliff:g> seconds</string>
    <!-- Option title for the input setting keys threshold dialog for custom value. [CHAR LIMIT=35] -->
    <string name="input_setting_keys_custom_title">Custom</string>
    <!-- Option subtitle for the input setting keys threshold dialog for custom value. [CHAR LIMIT=35] -->
+1 −4
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import com.google.android.material.slider.Slider;

import org.jspecify.annotations.Nullable;

import java.util.Locale;
import java.util.concurrent.TimeUnit;

public abstract class KeyboardAccessibilityKeysDialogFragment extends DialogFragment {
@@ -182,9 +181,7 @@ public abstract class KeyboardAccessibilityKeysDialogFragment extends DialogFrag
    }

    private String progressToThresholdInSecond(float progress) {
        return String.format(Locale.getDefault(), "%.1f %s", progress,
                TimeUnit.SECONDS.name().toLowerCase(
                        Locale.getDefault()));
        return getString(R.string.input_setting_keys_dialog_option_custom, progress);
    }

    private void initStateBasedOnThreshold(RadioGroup cannedValueRadioGroup,