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

Commit aef5e7f1 authored by Brandon Maxwell's avatar Brandon Maxwell Committed by android-build-merger
Browse files

Fixing display option for KO, JA, ZH am: 151b3ae6

am: 11bdbcae

Change-Id: I283d7c1c371143bcf59b7746d01cfa95a83668c9
parents f6593a4e 11bdbcae
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
@@ -61,10 +61,12 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity {

    @Override
    public void onBuildHeaders(List<Header> target) {
        if (showDisplayOptions()) {
            Header displayOptionsHeader = new Header();
            displayOptionsHeader.titleRes = R.string.display_options_title;
            displayOptionsHeader.fragment = DisplayOptionsSettingsFragment.class.getName();
            target.add(displayOptionsHeader);
        }

        Header soundSettingsHeader = new Header();
        soundSettingsHeader.titleRes = R.string.sounds_and_vibration_title;
@@ -127,6 +129,18 @@ public class DialerSettingsActivity extends AppCompatPreferenceActivity {
        }
    }

    /**
    * Returns {@code true} or {@code false} based on whether the display options setting should be
    * shown. For languages such as Chinese, Japanese, or Korean, display options aren't useful
    * since contacts are sorted and displayed family name first by default.
    *
    * @return {@code true} if the display options should be shown, {@code false} otherwise.
    */
    private boolean showDisplayOptions() {
        return getResources().getBoolean(R.bool.config_display_order_user_changeable)
                && getResources().getBoolean(R.bool.config_sort_order_user_changeable);
    }

    @Override
    public void onHeaderClick(Header header, int position) {
        if (header.id == R.id.settings_header_sounds_and_vibration) {