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

Commit b7ebcec0 authored by Xin Li's avatar Xin Li
Browse files

Merge Android Pie into master

Bug: 112104996
Change-Id: Ic9fa8871b8e89e3633be17b0013cada8bfbb70d1
parents 1cefee6d 06cc4df5
Loading
Loading
Loading
Loading
+32 −25
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
########################
# Complete DocumentsUI app:
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_STATIC_JAVA_LIBRARIES += guava

LOCAL_PACKAGE_NAME := DocumentsUI
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/AndroidManifest.xml

LOCAL_STATIC_ANDROID_LIBRARIES := \
        android-support-v4 \
        android-support-v7-appcompat \
        android-support-v13 \
        android-support-design \
        android-support-transition \
        android-support-v7-recyclerview
include $(LOCAL_PATH)/build_apk.mk

LOCAL_USE_AAPT2 := true

LOCAL_JACK_FLAGS := \
  -D jack.optimization.inner-class.accessors=true

# Only enable asserts on userdebug/eng builds
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
LOCAL_JACK_FLAGS += -D jack.assert.policy=always
endif
########################
# Minimal DocumentsUI app (supports Scoped Directory Access only):
include $(CLEAR_VARS)

LOCAL_PACKAGE_NAME := DocumentsUI
LOCAL_SRC_FILES := \
        src/com/android/documentsui/ScopedAccessActivity.java \
        src/com/android/documentsui/ScopedAccessPackageReceiver.java \
        src/com/android/documentsui/ScopedAccessProvider.java \
        src/com/android/documentsui/ScopedAccessMetrics.java \
        src/com/android/documentsui/archives/Archive.java \
        src/com/android/documentsui/archives/ArchiveId.java \
        src/com/android/documentsui/archives/ArchivesProvider.java \
        src/com/android/documentsui/archives/Loader.java \
        src/com/android/documentsui/archives/Proxy.java \
        src/com/android/documentsui/archives/ReadableArchive.java \
        src/com/android/documentsui/archives/WriteableArchive.java \
        src/com/android/documentsui/base/Providers.java \
        src/com/android/documentsui/base/SharedMinimal.java \
        src/com/android/documentsui/prefs/ScopedAccessLocalPreferences.java

LOCAL_PACKAGE_NAME := DocumentsUIMinimal
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/minimal/res
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/minimal/AndroidManifest.xml

include $(LOCAL_PATH)/build_apk.mk

include $(BUILD_PACKAGE)
# Include makefiles for tests and libraries under the current path
include $(call all-makefiles-under, $(LOCAL_PATH))
+39 −2
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2007-2017 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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.documentsui">

    <uses-permission android:name="android.permission.GET_APP_GRANTED_URI_PERMISSIONS" />
    <uses-permission android:name="android.permission.FORCE_PERSISTABLE_URI_PERMISSIONS" />
    <uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
    <uses-permission android:name="android.permission.REMOVE_TASKS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.CACHE_CONTENT" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -61,7 +81,7 @@

        <activity
            android:name=".inspector.InspectorActivity"
            android:label="@string/menu_inspector"
            android:label="@string/menu_inspect"
            android:icon="@drawable/launcher_icon"
            android:theme="@style/DocumentsTheme">
        </activity>
@@ -109,7 +129,7 @@
        </activity-alias>

        <activity
            android:name=".OpenExternalDirectoryActivity"
            android:name=".ScopedAccessActivity"
            android:theme="@android:style/Theme.Translucent.NoTitleBar">
            <intent-filter>
                <action android:name="android.os.storage.action.OPEN_EXTERNAL_DIRECTORY" />
@@ -117,6 +137,13 @@
            </intent-filter>
        </activity>

        <provider
            android:name=".ScopedAccessProvider"
            android:authorities="com.android.documentsui.scopedAccess"
            android:permission="android.permission.MANAGE_SCOPED_ACCESS_DIRECTORY_PERMISSIONS"
            android:exported="true">
        </provider>

        <provider
            android:name=".picker.LastAccessedProvider"
            android:authorities="com.android.documentsui.lastAccessed"
@@ -155,5 +182,15 @@
            android:exported="false"
            android:process=":com.android.documentsui.services">
        </service>

        <activity
            android:name=".selection.demo.SelectionDemoActivity"
            android:label="Selection Demo"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>
        </activity>

    </application>
</manifest>
+4 −3
Original line number Diff line number Diff line
@@ -7,17 +7,18 @@ LOCAL_PRIVATE_PLATFORM_APIS := true

LOCAL_SRC_FILES := $(call all-java-files-under, src) \

LOCAL_JAVA_LIBRARIES := android.test.runner
LOCAL_JAVA_LIBRARIES := android.test.runner android.test.base
LOCAL_STATIC_ANDROID_LIBRARIES := android-support-v4
LOCAL_STATIC_JAVA_LIBRARIES := \
    mockito-target \
    ub-uiautomator \
    legacy-android-test
    ub-uiautomator

LOCAL_USE_AAPT2 := true
LOCAL_PACKAGE_NAME := DocumentsUIAppPerfTests
LOCAL_INSTRUMENTATION_FOR := DocumentsUI

LOCAL_COMPATIBILITY_SUITE += device-tests

LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<configuration description="Runs DocumentsUIAppPerfTests metric instrumentation.">
    <option name="test-suite-tag" value="apct" />
    <option name="test-suite-tag" value="apct-metric-instrumentation" />
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="DocumentsUIAppPerfTests.apk" />
    </target_preparer>

    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
        <option name="runner" value="android.test.InstrumentationTestRunner" />
        <option name="package" value="com.android.documentsui.appperftests" />
    </test>
</configuration>

build_apk.mk

0 → 100644
+28 −0
Original line number Diff line number Diff line
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true

LOCAL_STATIC_JAVA_LIBRARIES += guava

LOCAL_STATIC_ANDROID_LIBRARIES := \
        android-support-core-ui \
        android-support-v4 \
        android-support-v7-appcompat \
        android-support-v13 \
        $(ANDROID_SUPPORT_DESIGN_TARGETS) \
        android-support-transition \
        android-support-v7-recyclerview

LOCAL_USE_AAPT2 := true

LOCAL_JACK_FLAGS := \
  -D jack.optimization.inner-class.accessors=true

# Only enable asserts on userdebug/eng builds
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
LOCAL_JACK_FLAGS += -D jack.assert.policy=always
endif

LOCAL_CERTIFICATE := platform
LOCAL_PROGUARD_FLAG_FILES := proguard.flags

include $(BUILD_PACKAGE)
Loading