/** Set state mode based on explicit user action. */ private void setUserMode(int mode) { mState.userMode = mode; /// M: Check the fragment get from FragmentManager whether is null. DirectoryFragment directory = DirectoryFragment.get(getFragmentManager()); if (directory != null) { directory.onUserModeChanged(); } else { Log.w(TAG, "setUserMode with null DirectoryFragment in activity:" + this.hashCode()); } }
private void setDisplayFileSize(boolean display) { LocalPreferences.setDisplayFileSize(this, display); mState.showSize = display; DirectoryFragment.get(getFragmentManager()).onDisplayStateChanged(); invalidateOptionsMenu(); }