Loading res/values/config.xml +2 −1 Original line number Diff line number Diff line Loading @@ -24,5 +24,6 @@ <!-- Indicates if the home directory should be hidden in the roots list, that is presented in the drawer/left side panel ) --> <bool name="home_root_hidden">true</bool> <!-- Indicates if the advanced roots like internal storage should be hidden in the roots list) --> <bool name="advanced_roots_hidden">true</bool> </resources> src/com/android/documentsui/RootsFragment.java +9 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,8 @@ public class RootsFragment extends Fragment { if (root.isHome() && isHomeRootHidden(context)) { continue; } else if (root.isAdvanced() && areAdvancedRootsHidden(context)) { continue; } else if (root.isLibrary()) { if (DEBUG) Log.d(TAG, "Adding " + root + " as library."); libraries.add(item); Loading Loading @@ -377,6 +379,13 @@ public class RootsFragment extends Fragment { return context.getResources().getBoolean(R.bool.home_root_hidden); } /* * Indicates if the advanced roots should be hidden. */ private boolean areAdvancedRootsHidden(Context context) { return context.getResources().getBoolean(R.bool.advanced_roots_hidden); } @Override public View getView(int position, View convertView, ViewGroup parent) { final Item item = getItem(position); Loading src/com/android/documentsui/model/RootInfo.java +4 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,10 @@ public class RootInfo implements Durable, Parcelable, Comparable<RootInfo> { return (flags & Root.FLAG_SUPPORTS_SEARCH) != 0; } public boolean isAdvanced() { return (flags & Root.FLAG_ADVANCED) != 0; } public boolean isLocalOnly() { return (flags & Root.FLAG_LOCAL_ONLY) != 0; } Loading Loading
res/values/config.xml +2 −1 Original line number Diff line number Diff line Loading @@ -24,5 +24,6 @@ <!-- Indicates if the home directory should be hidden in the roots list, that is presented in the drawer/left side panel ) --> <bool name="home_root_hidden">true</bool> <!-- Indicates if the advanced roots like internal storage should be hidden in the roots list) --> <bool name="advanced_roots_hidden">true</bool> </resources>
src/com/android/documentsui/RootsFragment.java +9 −0 Original line number Diff line number Diff line Loading @@ -320,6 +320,8 @@ public class RootsFragment extends Fragment { if (root.isHome() && isHomeRootHidden(context)) { continue; } else if (root.isAdvanced() && areAdvancedRootsHidden(context)) { continue; } else if (root.isLibrary()) { if (DEBUG) Log.d(TAG, "Adding " + root + " as library."); libraries.add(item); Loading Loading @@ -377,6 +379,13 @@ public class RootsFragment extends Fragment { return context.getResources().getBoolean(R.bool.home_root_hidden); } /* * Indicates if the advanced roots should be hidden. */ private boolean areAdvancedRootsHidden(Context context) { return context.getResources().getBoolean(R.bool.advanced_roots_hidden); } @Override public View getView(int position, View convertView, ViewGroup parent) { final Item item = getItem(position); Loading
src/com/android/documentsui/model/RootInfo.java +4 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,10 @@ public class RootInfo implements Durable, Parcelable, Comparable<RootInfo> { return (flags & Root.FLAG_SUPPORTS_SEARCH) != 0; } public boolean isAdvanced() { return (flags & Root.FLAG_ADVANCED) != 0; } public boolean isLocalOnly() { return (flags & Root.FLAG_LOCAL_ONLY) != 0; } Loading