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

Commit 9403f9ff authored by Kelvin Kwan's avatar Kelvin Kwan
Browse files

Add INTERACT_ACROSS_USERS permission for DocsUI AndroidManifest

Test: make aosp_x86_64-eng
Test: make flame-userdebug
Test: check INTERACT_ACROSS_USERS in /system/etc/permissions/com.android.documentsui.xml
Test: check INTERACT_ACROSS_USERS grant to DocumentsUI.apk
Test: atest DocumentsUITests:com.android.documentsui.PermissionsTest
Bug: 148198996

Change-Id: I99b7efee67d5d452fd64f29d436d65b8a04cf100
parent 81870e9f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    <uses-permission android:name="android.permission.CACHE_CONTENT" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES" />
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />

    <application
        android:name=".DocumentsApplication"
+44 −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;

import android.Manifest;
import android.content.pm.PackageManager;

import com.android.documentsui.files.FilesActivity;

import org.junit.Test;

public class PermissionsTest extends ActivityTest<FilesActivity> {

    private static final String TAG = "PermissionsTest";

    public PermissionsTest() {
        super(FilesActivity.class);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
    }

    @Test
    public void testPermissionGranted_interactAcrossUsers() {
        assertEquals(PackageManager.PERMISSION_GRANTED,
                context.checkSelfPermission(Manifest.permission.INTERACT_ACROSS_USERS));
    }
}