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

Commit 9a17df5d authored by Tony Huang's avatar Tony Huang
Browse files

Fix sub header string

We should use "Files in ..." only on Downloads root and others
like device storage root should still use "Files on ...".

Fix: 141232035
Test: manual
Test: atest DocumentsUIGoogleTests
Change-Id: Id36bef620917bbd7820868a8aabd634eb76d8ef1
parent 679e5c0d
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -408,8 +408,10 @@
    <string name="root_info_header_global_search">Files on phone</string>
    <!-- Header title for list of documents in media type root. [CHAR_LIMIT=60] -->
    <string name="root_info_header_media"><xliff:g id="label" example="images">%1$s</xliff:g> on phone</string>
    <!-- Header title for list of documents in downloads root. [CHAR_LIMIT=60] -->
    <string name="root_info_header_downloads">Files in Downloads</string>
    <!-- Header title for list of documents in storage type root. [CHAR_LIMIT=60] -->
    <string name="root_info_header_storage">Files in <xliff:g id="device" example="Pixel">%1$s</xliff:g></string>
    <string name="root_info_header_storage">Files on <xliff:g id="device" example="Pixel">%1$s</xliff:g></string>
    <!-- Header title for list of documents 3rd party provider root eg. Drive, Box. [CHAR_LIMIT=60] -->
    <string name="root_info_header_app">Files from <xliff:g id="label" example="Drive">%1$s</xliff:g></string>
    <!-- Header title for list of documents 3rd party provider root eg. Drive, Box. with root summary. The summary is usually present by email account[CHAR_LIMIT=60] -->
@@ -418,8 +420,10 @@
    <string name="root_info_header_image_recent">Recent images on phone</string>
    <!-- On photo picking state, the header title for list of documents in global searching. [CHAR_LIMIT=60] -->
    <string name="root_info_header_image_global_search">Images on phone</string>
    <!-- On photo picking state, the header title for list of documents in downloads root. [CHAR_LIMIT=60] -->
    <string name="root_info_header_image_downloads">Images in Downloads</string>
    <!-- On photo picking state, the header title for list of documents in storage type root. [CHAR_LIMIT=60] -->
    <string name="root_info_header_image_storage">Images in <xliff:g id="device" example="Pixel">%1$s</xliff:g></string>
    <string name="root_info_header_image_storage">Images on <xliff:g id="device" example="Pixel">%1$s</xliff:g></string>
    <!-- On photo picking state, the header title for list of documents 3rd party provider root eg. Drive, Box. [CHAR_LIMIT=60] -->
    <string name="root_info_header_image_app">Images from <xliff:g id="label" example="Drive">%1$s</xliff:g></string>
    <!-- On photo picking state, the header title for list of documents 3rd party provider root eg. Drive, Box. with root summary. The summary is usually present by email account[CHAR_LIMIT=60] -->
+7 −0
Original line number Diff line number Diff line
@@ -678,6 +678,8 @@ public abstract class BaseActivity
                result = getString(R.string.root_info_header_media, rootTitle);
                break;
            case RootInfo.TYPE_DOWNLOADS:
                result = getHeaderDownloadsTitle();
                break;
            case RootInfo.TYPE_LOCAL:
            case RootInfo.TYPE_MTP:
            case RootInfo.TYPE_SD:
@@ -711,6 +713,11 @@ public abstract class BaseActivity
        }
    }

    private String getHeaderDownloadsTitle() {
        return getString(mState.isPhotoPicking()
            ? R.string.root_info_header_image_downloads : R.string.root_info_header_downloads);
    }

    private String getHeaderStorageTitle(String rootTitle) {
        final int resId = mState.isPhotoPicking()
                ? R.string.root_info_header_image_storage : R.string.root_info_header_storage;