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

Commit cb406595 authored by Brandon Dayauon's avatar Brandon Dayauon Committed by Automerger Merge Worker
Browse files

Merge "Fix issue when preference screen title won't change depending on the...

Merge "Fix issue when preference screen title won't change depending on the device.." into tm-dev am: 1460a6a0

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18235011



Change-Id: I6593b1611c9a982664f7672f5e936f1995f7ecc0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 64be3ba8 1460a6a0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -438,6 +438,10 @@
    <!-- A hint shown in launcher settings develop options filter box -->
    <string name="developer_options_filter_hint">Filter</string>

    <!-- Title for preference screen show in Home Settings related to smart search preferences. [CHAR LIMIT=50]-->
    <string name="search_pref_screen_title">Search your phone</string>
    <!-- Title for preference screen show in Home Settings related to smart search preferences. [CHAR LIMIT=50]-->
    <string name="search_pref_screen_title_tablet">Search your tablet</string>
    <!-- Failed action error message: e.g. Failed: Pause -->
    <string name="remote_action_failed">Failed: <xliff:g id="what" example="Pause">%1$s</xliff:g></string>
</resources>
+8 −0
Original line number Diff line number Diff line
@@ -213,6 +213,14 @@ public class SettingsActivity extends FragmentActivity
            }

            if (getActivity() != null && !TextUtils.isEmpty(getPreferenceScreen().getTitle())) {
                if (getPreferenceScreen().getTitle().equals(
                        getResources().getString(R.string.search_pref_screen_title))){
                    DeviceProfile mDeviceProfile = InvariantDeviceProfile.INSTANCE.get(
                            getContext()).getDeviceProfile(getContext());
                    getPreferenceScreen().setTitle(mDeviceProfile.isTablet ?
                            R.string.search_pref_screen_title_tablet
                            : R.string.search_pref_screen_title);
                }
                getActivity().setTitle(getPreferenceScreen().getTitle());
            }
        }