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

Commit 253a9924 authored by Jon Mann's avatar Jon Mann
Browse files

Implement support for viewing document settings in external applications

Makes DocumentsUI respect the Documents#FLAG_SUPPORTS_SETTINGS flag and invoke the DocumentsContract#ACTION_DOCUMENT_SETTINGS intent.

Test: Added unit testing.
Bug: 34219584
Change-Id: Ib1e8e1362e694ec973db20dd52ea229ba182520a
parent c90398b6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -49,4 +49,10 @@
            android:id="@+id/menu_delete"
            android:title="@string/menu_delete" />
    </group>
    <group
        android:id="@+id/menu_settings_group">
        <item
            android:id="@+id/menu_view_in_owner"
            android:title="@string/menu_view_in_owner" />
    </group>
</menu>
+5 −0
Original line number Diff line number Diff line
@@ -62,4 +62,9 @@
        android:title="@string/menu_rename"
        android:showAsAction="never"
        android:visible="false" />
    <item
        android:id="@+id/menu_view_in_owner"
        android:title="@string/menu_view_in_owner"
        android:showAsAction="never"
        android:visible="false" />
</menu>
+2 −0
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@
    <string name="menu_extract">Extract to\u2026</string>
    <!-- Menu item that renames the selected document [CHAR LIMIT=28] -->
    <string name="menu_rename">Rename</string>
    <!-- Menu item that renames the selected document [CHAR LIMIT=28] -->
    <string name="menu_view_in_owner">View in <xliff:g id="source" example="Google Drive">%1$s</xliff:g></string>

    <!-- Menu item title that creates a new window in the activity [CHAR LIMIT=28] -->
    <string name="menu_new_window">New window</string>
+5 −0
Original line number Diff line number Diff line
@@ -220,6 +220,11 @@ public abstract class AbstractActionHandler<T extends Activity & CommonAddons>
        throw new UnsupportedOperationException("Can't paste into folder.");
    }

    @Override
    public void viewInOwner() {
        throw new UnsupportedOperationException("Can't view in application.");
    }

    @Override
    public void selectAllFiles() {
        Metrics.logUserAction(mActivity, Metrics.USER_ACTION_SELECT_ALL);
+2 −0
Original line number Diff line number Diff line
@@ -120,6 +120,8 @@ public interface ActionHandler {

    void loadDocumentsForCurrentStack();

    void viewInOwner();

    /**
     * Allow action handler to be initialized in a new scope.
     * @return this
Loading