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

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

DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master

Bug: 134405016
Change-Id: I5cc56bc3eb5b18a87e96749bb4b237d865443ef7
parents 684dd53b c99b50e6
Loading
Loading
Loading
Loading

Android.bp

0 → 100644
+104 −0
Original line number Diff line number Diff line
// Copyright (C) 2019 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.

java_defaults {
    name: "documentsui_defaults",

    static_libs: [
        "androidx.appcompat_appcompat",
        "androidx.legacy_legacy-support-core-ui",
        "androidx.legacy_legacy-support-v13",
        "androidx.legacy_legacy-support-v4",
        "androidx.recyclerview_recyclerview",
        "androidx.recyclerview_recyclerview-selection",
        "androidx.transition_transition",
        "apache-commons-compress",
        "com.google.android.material_material",
        "guava",
    ],

    privileged: true,

    certificate: "platform",

    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },

    sdk_version: "system_current",
    min_sdk_version: "28",
    target_sdk_version: "28",
}

filegroup {
    name: "DocumentsUI-srcs",
    srcs: [
        "src/**/*.java",
	":statslog-docsui-java-gen",
    ],
}

java_library {
    name: "docsui-statsd",
    srcs: [
        ":statslog-docsui-java-gen",
    ],
}

genrule {
    name: "statslog-docsui-java-gen",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --java $(out) --module docsui --javaPackage com.android.documentsui --javaClass DocumentsStatsLog",
    out: ["com/android/documentsui/DocumentsStatsLog.java"],
}

android_library {
    name: "DocumentsUI-res-lib",

    manifest: "AndroidManifest.xml",

    static_libs: [
        "androidx.appcompat_appcompat",
        "com.google.android.material_material",
    ],

    resource_dirs: [
        "res",
    ],

    aaptflags: [
        "--auto-add-overlay",
    ],

    min_sdk_version: "28",
    target_sdk_version: "28",
}

android_app {
    name: "DocumentsUI",

    defaults: ["documentsui_defaults"],

    manifest: "AndroidManifest.xml",

    srcs: [
        ":DocumentsUI-srcs",
    ],

    resource_dirs: [
        "res",
    ],

    required: ["privapp_whitelist_com.android.documentsui"],
}

Android.mk

deleted100644 → 0
+0 −44
Original line number Diff line number Diff line
LOCAL_PATH:= $(call my-dir)

########################
# Complete DocumentsUI app:
include $(CLEAR_VARS)

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

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

include $(LOCAL_PATH)/build_apk.mk

########################
# Minimal DocumentsUI app (supports Scoped Directory Access only):
include $(CLEAR_VARS)

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_RESOURCE_DIR := $(LOCAL_PATH)/minimal/res
LOCAL_FULL_MANIFEST_FILE := $(LOCAL_PATH)/minimal/AndroidManifest.xml

include $(LOCAL_PATH)/build_apk.mk

# Include makefiles for tests and libraries under the current path
include $(call all-makefiles-under, $(LOCAL_PATH))
+15 −14
Original line number Diff line number Diff line
@@ -19,17 +19,13 @@
<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" />
    <uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS" />

    <uses-sdk android:minSdkVersion="21"/>
    <uses-permission android:name="android.permission.CHANGE_OVERLAY_PACKAGES" />

    <application
        android:name=".DocumentsApplication"
@@ -96,6 +92,7 @@
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.APP_FILES" />
            </intent-filter>
            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
        </activity-alias>
@@ -119,7 +116,7 @@
            </intent-filter>
        </activity>

        <activity-alias android:name="ViewDownloadsActivity"
        <activity-alias android:name=".ViewDownloadsActivity"
                        android:targetActivity=".files.FilesActivity"
                        android:enabled="@bool/handle_view_downloads_intent">
            <intent-filter>
@@ -137,18 +134,16 @@
            </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"
            android:exported="false"/>

        <provider
            android:name=".picker.PickCountRecordProvider"
            android:authorities="com.android.documentsui.pickCountRecord"
            android:exported="false"/>

        <provider
            android:name=".archives.ArchivesProvider"
            android:authorities="com.android.documentsui.archives"
@@ -174,6 +169,12 @@
            </intent-filter>
        </receiver>

        <receiver android:name=".PreBootReceiver">
            <intent-filter>
                <action android:name="android.intent.action.PRE_BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

        <!-- Run FileOperationService in a separate process so that we can use FileLock class to
            wait until jumbo clip is done writing to disk before reading it. See ClipStorage for
            details. -->
@@ -186,7 +187,7 @@
        <activity
            android:name=".selection.demo.SelectionDemoActivity"
            android:label="Selection Demo"
            android:theme="@style/Theme.AppCompat.Light.NoActionBar">
            android:theme="@style/DocumentsTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
            </intent-filter>

MODULE_LICENSE_APACHE2

0 → 100644
+0 −0

Empty file added.

PREUPLOAD.cfg

0 → 100644
+16 −0
Original line number Diff line number Diff line
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}

api_lint_hook = ${REPO_ROOT}/frameworks/base/tools/apilint/apilint_sha.sh ${PREUPLOAD_COMMIT}

strings_lint_hook = ${REPO_ROOT}/frameworks/base/tools/stringslint/stringslint_sha.sh ${PREUPLOAD_COMMIT}

hidden_api_txt_checksorted_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/checksorted_sha.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}

hidden_api_txt_exclude_hook = ${REPO_ROOT}/frameworks/base/tools/hiddenapi/exclude.sh ${PREUPLOAD_COMMIT} ${REPO_ROOT}

ktlint_hook = ${REPO_ROOT}/prebuilts/ktlint/ktlint.py -f ${PREUPLOAD_FILES}

owners_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "OWNERS$"

shell_hook = ${REPO_ROOT}/frameworks/base/tools/aosp/aosp_sha.sh ${PREUPLOAD_COMMIT} "^packages/Shell/"
Loading