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

Commit fcf45169 authored by Steve McKay's avatar Steve McKay
Browse files

Always show file size.

Change-Id: I5ef42a01613c712a15c81157075accee096a7351
parent 57c6a7cd
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -57,10 +57,6 @@
            android:alphabeticShortcut="e"
            android:showAsAction="never"
            android:visible="false" />
        <item
            android:id="@+id/menu_file_size"
            android:showAsAction="never"
            android:visible="false" />
        <item
            android:id="@+id/menu_advanced"
            android:showAsAction="never"
+0 −5
Original line number Diff line number Diff line
@@ -70,11 +70,6 @@
    <!-- Menu item that hides internal storage built into the device [CHAR LIMIT=30] -->
    <string name="menu_advanced_hide">Hide internal storage</string>

    <!-- Menu item that reveals the sizes of displayed files [CHAR LIMIT=24] -->
    <string name="menu_file_size_show">Show file size</string>
    <!-- Menu item that hides the sizes of displayed files [CHAR LIMIT=24] -->
    <string name="menu_file_size_hide">Hide file size</string>

    <!-- Button label that select the current directory [CHAR LIMIT=24] -->
    <string name="button_select">Select</string>
    <!-- Button label that copies files to the current directory [CHAR LIMIT=24] -->
+0 −22
Original line number Diff line number Diff line
@@ -231,8 +231,6 @@ public abstract class BaseActivity extends Activity

        state.sortModel = SortModel.createModel();
        state.localOnly = intent.getBooleanExtra(Intent.EXTRA_LOCAL_ONLY, false);
        state.forceSize = intent.getBooleanExtra(DocumentsContract.EXTRA_SHOW_FILESIZE, false);
        state.setShowSize(state.forceSize || LocalPreferences.getDisplayFileSize(this));
        state.initAcceptMimes(intent);
        state.excludedAuthorities = getExcludedAuthorities();

@@ -319,10 +317,6 @@ public abstract class BaseActivity extends Activity
                setDisplayAdvancedDevices(!mState.showAdvanced);
                return true;

            case R.id.menu_file_size:
                setDisplayFileSize(!LocalPreferences.getDisplayFileSize(this));
                return true;

            default:
                return super.onOptionsItemSelected(item);
        }
@@ -501,22 +495,6 @@ public abstract class BaseActivity extends Activity
        invalidateOptionsMenu();
    }

    /**
     * Set file size visible based on explicit user action.
     */
    void setDisplayFileSize(boolean display) {
        Metrics.logUserAction(this,
                display ? Metrics.USER_ACTION_SHOW_SIZE : Metrics.USER_ACTION_HIDE_SIZE);

        LocalPreferences.setDisplayFileSize(this, display);
        mState.setShowSize(display);
        DirectoryFragment dir = getDirectoryFragment();
        if (dir != null) {
            dir.onDisplayStateChanged();
        }
        invalidateOptionsMenu();
    }

    /**
     * Set mode based on explicit user action.
     */
+0 −8
Original line number Diff line number Diff line
@@ -25,8 +25,6 @@ import static com.android.documentsui.State.ACTION_PICK_COPY_DESTINATION;
import android.view.Menu;
import android.view.MenuItem;

import com.android.documentsui.MenuManager.DirectoryDetails;

final class DocumentsMenuManager extends MenuManager {

    private boolean mPicking;
@@ -60,12 +58,6 @@ final class DocumentsMenuManager extends MenuManager {
        }
    }

    @Override
    void updateFileSize(MenuItem fileSize, DirectoryDetails directoryDetails) {
        super.updateFileSize(fileSize, directoryDetails);
        fileSize.setVisible(fileSize.isVisible() && !mPicking);
    }

    @Override
    void updateSelectAll(MenuItem selectAll, SelectionDetails selectionDetails) {
        selectAll.setVisible(mState.allowMultiple);
+0 −1
Original line number Diff line number Diff line
@@ -48,7 +48,6 @@ public class LauncherActivity extends Activity {
    // Array of boolean extras that should be copied when creating new launch intents.
    // Missing intents will be ignored.
    private static final String[] PERSISTENT_BOOLEAN_EXTRAS = {
        DocumentsContract.EXTRA_SHOW_FILESIZE,
        DocumentsContract.EXTRA_SHOW_ADVANCED,
        DocumentsContract.EXTRA_FANCY_FEATURES,
        Shared.EXTRA_PRODUCTIVITY_MODE
Loading