Loading res/values/config.xml +1 −2 Original line number Diff line number Diff line Loading @@ -18,8 +18,7 @@ <!-- Intentionally unset. Vendors should set this in an overlay. --> <string name="trusted_quick_viewer_package" translatable="false"></string> <!-- Enable productivity oriented features like "Documents" root, and new window view. --> <bool name="productivity_device">true</bool> <bool name="show_documents_root">false</bool> <!-- Indicates if search view is taking the whole toolbar space. On larger layouts we reduce this to an input-box adjacent to menu actions. --> Loading src/com/android/documentsui/base/Shared.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ public final class Shared { * Returns true if "Documents" root should be shown. */ public static boolean shouldShowDocumentsRoot(Context context) { return context.getResources().getBoolean(R.bool.productivity_device); return context.getResources().getBoolean(R.bool.show_documents_root); } /* Loading tests/common/com/android/documentsui/testing/TestResources.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public abstract class TestResources extends Resources { } public void setProductivityDeviceEnabled(boolean enabled) { bools.put(R.bool.productivity_device, enabled); bools.put(R.bool.show_documents_root, enabled); } @Override Loading tests/unit/com/android/documentsui/files/ActionHandlerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -321,15 +321,15 @@ public class ActionHandlerTest { @Test public void testInitLocation_DefaultsToDownloads() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, false); mActivity.resources.bools.put(R.bool.show_documents_root, false); mHandler.initLocation(mActivity.getIntent()); assertRootPicked(TestRootsAccess.DOWNLOADS.getUri()); } @Test public void testInitLocation_ProductivityDefaultsToHome() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, true); public void testInitLocation_DocumentsRootEnabled() throws Exception { mActivity.resources.bools.put(R.bool.show_documents_root, true); mHandler.initLocation(mActivity.getIntent()); assertRootPicked(TestRootsAccess.HOME.getUri()); Loading tests/unit/com/android/documentsui/picker/ActionHandlerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class ActionHandlerTest { @Test public void testInitLocation_CopyDestination_DefaultsToDownloads() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, false); mActivity.resources.bools.put(R.bool.show_documents_root, false); Intent intent = mActivity.getIntent(); intent.setAction(Shared.ACTION_PICK_COPY_DESTINATION); Loading @@ -92,8 +92,8 @@ public class ActionHandlerTest { } @Test public void testInitLocation_CopyDestination_DefaultsToHome() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, true); public void testInitLocation_CopyDestination_DocumentsRootEnabled() throws Exception { mActivity.resources.bools.put(R.bool.show_documents_root, true); Intent intent = mActivity.getIntent(); intent.setAction(Shared.ACTION_PICK_COPY_DESTINATION); Loading Loading
res/values/config.xml +1 −2 Original line number Diff line number Diff line Loading @@ -18,8 +18,7 @@ <!-- Intentionally unset. Vendors should set this in an overlay. --> <string name="trusted_quick_viewer_package" translatable="false"></string> <!-- Enable productivity oriented features like "Documents" root, and new window view. --> <bool name="productivity_device">true</bool> <bool name="show_documents_root">false</bool> <!-- Indicates if search view is taking the whole toolbar space. On larger layouts we reduce this to an input-box adjacent to menu actions. --> Loading
src/com/android/documentsui/base/Shared.java +1 −1 Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ public final class Shared { * Returns true if "Documents" root should be shown. */ public static boolean shouldShowDocumentsRoot(Context context) { return context.getResources().getBoolean(R.bool.productivity_device); return context.getResources().getBoolean(R.bool.show_documents_root); } /* Loading
tests/common/com/android/documentsui/testing/TestResources.java +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ public abstract class TestResources extends Resources { } public void setProductivityDeviceEnabled(boolean enabled) { bools.put(R.bool.productivity_device, enabled); bools.put(R.bool.show_documents_root, enabled); } @Override Loading
tests/unit/com/android/documentsui/files/ActionHandlerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -321,15 +321,15 @@ public class ActionHandlerTest { @Test public void testInitLocation_DefaultsToDownloads() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, false); mActivity.resources.bools.put(R.bool.show_documents_root, false); mHandler.initLocation(mActivity.getIntent()); assertRootPicked(TestRootsAccess.DOWNLOADS.getUri()); } @Test public void testInitLocation_ProductivityDefaultsToHome() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, true); public void testInitLocation_DocumentsRootEnabled() throws Exception { mActivity.resources.bools.put(R.bool.show_documents_root, true); mHandler.initLocation(mActivity.getIntent()); assertRootPicked(TestRootsAccess.HOME.getUri()); Loading
tests/unit/com/android/documentsui/picker/ActionHandlerTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ public class ActionHandlerTest { @Test public void testInitLocation_CopyDestination_DefaultsToDownloads() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, false); mActivity.resources.bools.put(R.bool.show_documents_root, false); Intent intent = mActivity.getIntent(); intent.setAction(Shared.ACTION_PICK_COPY_DESTINATION); Loading @@ -92,8 +92,8 @@ public class ActionHandlerTest { } @Test public void testInitLocation_CopyDestination_DefaultsToHome() throws Exception { mActivity.resources.bools.put(R.bool.productivity_device, true); public void testInitLocation_CopyDestination_DocumentsRootEnabled() throws Exception { mActivity.resources.bools.put(R.bool.show_documents_root, true); Intent intent = mActivity.getIntent(); intent.setAction(Shared.ACTION_PICK_COPY_DESTINATION); Loading