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

Commit 057e987e authored by Tony Huang's avatar Tony Huang
Browse files

Refactor some codes for unbundle

1. Move some @hide codes to DocumentsUI itself utils files.
2. Refactor some @hide api call to normal api call
   for same function
3. Remove unnecessary @hide api call.

Bug: 118794189
Bug: 118271458
Test: atest DocumentsUITests
Change-Id: I319ee2149d7594e20287638037739cc5ee4b0554
parent 402ad099
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -395,4 +395,10 @@

    <!-- Button for continuing a file operation in background, eg. copying, moving or extracting. [CHAR LIMIT=48] -->
    <string name="continue_in_background">Continue in background</string>

    <!-- Label describing the number of selected items [CHAR LIMIT=48] -->
    <plurals name="selected_count">
        <item quantity="one"><xliff:g id="count" example="1">%1$d</xliff:g> selected</item>
        <item quantity="other"><xliff:g id="count" example="3">%1$d</xliff:g> selected</item>
    </plurals>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -128,6 +128,7 @@ public class ActionModeController extends SelectionObserver<String>
        int size = mSelectionMgr.getSelection().size();
        mode.getMenuInflater().inflate(R.menu.action_mode_menu, menu);
        mode.setTitle(TextUtils.formatSelectedCount(size));
        mode.setTitle(mActivity.getResources().getQuantityString(R.plurals.selected_count, size));

        if (size > 0) {

+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ public final class ShortcutsUpdater {
    }

    private int getNumDynSlots(ShortcutManager mgr, int numDevices) {
        int slots = mgr.getMaxShortcutCountForActivity() - mgr.getManifestShortcuts().size();
        int slots = mgr.getMaxShortcutCountPerActivity() - mgr.getManifestShortcuts().size();
        return numDevices >= slots ? slots : numDevices;
    }

+0 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ public final class HeaderView extends RelativeLayout implements HeaderDisplay {
     */
    private void showImage(DocumentInfo info, @Nullable Bitmap thumbnail) {
        if (thumbnail != null) {
            mThumbnail.resetPaddingToInitialValues();
            mThumbnail.setScaleType(ScaleType.CENTER_CROP);
            mThumbnail.setImageBitmap(thumbnail);
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class TableView extends LinearLayout implements TableDisplay {
    }

    void setTitle(@StringRes int title, boolean showDivider) {
        putTitle(mContext.getResources().getString(title), showDivider);
        putTitle(mRes.getString(title), showDivider);
    }

    // A naughty title method (that takes strings, not message ids), mostly for DebugView.
Loading