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

Commit 317d65f8 authored by Steve McKay's avatar Steve McKay
Browse files

Don't show Documents root by default.

Replace "productivity_device" with "show_documents_root" bit.

Bug: 34678759
Change-Id: I242e833a6d64db27ff1019a5d87e5bc8c1e1ee4a
parent 296018e3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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. -->
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }

    /*
+1 −1
Original line number Diff line number Diff line
@@ -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
+3 −3
Original line number Diff line number Diff line
@@ -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());
+3 −3
Original line number Diff line number Diff line
@@ -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);
@@ -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);