Don't show Documents root by default.

Replace "productivity_device" with "show_documents_root" bit.

Bug: 34678759
Change-Id: I242e833a6d64db27ff1019a5d87e5bc8c1e1ee4a
diff --git a/res/values/config.xml b/res/values/config.xml
index 17b9574..e963dda 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -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. -->
diff --git a/src/com/android/documentsui/base/Shared.java b/src/com/android/documentsui/base/Shared.java
index 0149e2c..ae297df 100644
--- a/src/com/android/documentsui/base/Shared.java
+++ b/src/com/android/documentsui/base/Shared.java
@@ -248,7 +248,7 @@
      * 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);
     }
 
     /*
diff --git a/tests/common/com/android/documentsui/testing/TestResources.java b/tests/common/com/android/documentsui/testing/TestResources.java
index a014af3..56d904c 100644
--- a/tests/common/com/android/documentsui/testing/TestResources.java
+++ b/tests/common/com/android/documentsui/testing/TestResources.java
@@ -64,7 +64,7 @@
     }
 
     public void setProductivityDeviceEnabled(boolean enabled) {
-        bools.put(R.bool.productivity_device, enabled);
+        bools.put(R.bool.show_documents_root, enabled);
     }
 
     @Override
diff --git a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
index 9955f36..c439b6f 100644
--- a/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
+++ b/tests/unit/com/android/documentsui/files/ActionHandlerTest.java
@@ -321,15 +321,15 @@
 
     @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());
diff --git a/tests/unit/com/android/documentsui/picker/ActionHandlerTest.java b/tests/unit/com/android/documentsui/picker/ActionHandlerTest.java
index 6607a00..c2e75f8 100644
--- a/tests/unit/com/android/documentsui/picker/ActionHandlerTest.java
+++ b/tests/unit/com/android/documentsui/picker/ActionHandlerTest.java
@@ -83,7 +83,7 @@
 
     @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);
@@ -92,8 +92,8 @@
     }
 
     @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);