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

Commit f9e95a6e authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Ensure user can only share documents from allowed users." into rvc-dev am: b89e9a7a

Change-Id: I7b97368d0f91861ebf0eb8c2827956d80e32ef8e
parents a6a0a67c b89e9a7a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -201,6 +201,9 @@
    <!-- Toast shown when user want to share files amount over limit [CHAR LIMIT=60] -->
    <string name="toast_share_over_limit">Can\u2019t share more than <xliff:g id="count" example="1">%1$d</xliff:g> files</string>

    <!-- Toast shown when a document is not allowed to share across users. This is a last-resort toast and not expected to be shown. [CHAR LIMIT=48] -->
    <string name="toast_action_not_allowed">Action not allowed</string>

    <!-- Title of dialog when prompting user to select an app to share documents with [CHAR LIMIT=32] -->
    <string name="share_via">Share via</string>

+3 −1
Original line number Diff line number Diff line
@@ -89,6 +89,7 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
    @VisibleForTesting
    public static final int CODE_FORWARD = 42;
    public static final int CODE_AUTHENTICATION = 43;
    public static final int CODE_FORWARD_CROSS_PROFILE = 44;

    @VisibleForTesting
    static final int LOADER_ID = 42;
@@ -259,7 +260,7 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
    }

    @Override
    public void openRoot(ResolveInfo app) {
    public void openRoot(ResolveInfo app, UserId userId) {
        throw new UnsupportedOperationException("Can't open an app.");
    }

@@ -758,6 +759,7 @@ public abstract class AbstractActionHandler<T extends FragmentActivity & CommonA
    public void loadDocumentsForCurrentStack() {
        DocumentStack stack = mState.stack;
        if (!stack.isRecents() && stack.isEmpty()) {
            // TODO: we may also need to reload cross-profile supported root with empty stack
            DirectoryResult result = new DirectoryResult();

            // TODO (b/35996595): Consider plumbing through the actual exception, though it might
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public interface ActionHandler {

    void openRoot(RootInfo root);

    void openRoot(ResolveInfo app);
    void openRoot(ResolveInfo app, UserId userId);

    void loadRoot(Uri uri, UserId userId);

+1 −1
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ public abstract class BaseActivity
        Metrics.logActivityLaunch(mState, intent);

        mProviders = DocumentsApplication.getProvidersCache(this);
        mDocs = DocumentsAccess.create(this);
        mDocs = DocumentsAccess.create(this, mState);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);
+23 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.documentsui;

/**
 * Represents an exception related to cross profile.
 */
public abstract class CrossProfileException extends Exception {
}
Loading