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

Commit e84b3a6c authored by Xin Li's avatar Xin Li Committed by Gerrit Code Review
Browse files

Merge "Merge Android 12"

parents d9c9ceec 02dd0ed8
Loading
Loading
Loading
Loading
+181 −4
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@ package {
    default_applicable_licenses: ["packages_apps_Launcher3_license"],
}

min_launcher3_sdk_version = "26"

// Added automatically by a large-scale-change
// See: http://go/android-license-faq
license {
@@ -36,14 +38,15 @@ android_library {
        "androidx.test.runner",
        "androidx.test.rules",
        "androidx.test.uiautomator_uiautomator",
        "androidx.preference_preference",
        "SystemUISharedLib",
    ],
    srcs: [
        "tests/tapl/**/*.java",
        "src/com/android/launcher3/util/SecureSettingsObserver.java",
        "src/com/android/launcher3/ResourceUtils.java",
        "src/com/android/launcher3/testing/TestProtocol.java",
    ],
    resource_dirs: [ ],
    manifest: "tests/tapl/AndroidManifest.xml",
    platform_apis: true,
}
@@ -52,19 +55,37 @@ java_library_static {
    name: "launcher_log_protos_lite",
    srcs: [
        "protos/*.proto",
        "proto_overrides/*.proto",
        "protos_overrides/*.proto",
    ],
    sdk_version: "current",
    proto: {
        type: "lite",
        local_include_dirs:[
            "protos",
            "proto_overrides",
            "protos_overrides",
        ],
    },
    static_libs: ["libprotobuf-java-lite"],
}

java_library_static {
    name: "launcher_quickstep_log_protos_lite",
    srcs: [
        "quickstep/protos_overrides/*.proto",
    ],
    sdk_version: "current",
    proto: {
        type: "lite",
        local_include_dirs:[
            "quickstep/protos_overrides",
        ],
    },
    static_libs: [
      "libprotobuf-java-lite",
      "launcher_log_protos_lite"
      ],
}

java_library {
    name: "LauncherPluginLib",

@@ -73,5 +94,161 @@ java_library {
    srcs: ["src_plugins/**/*.java"],

    sdk_version: "current",
    min_sdk_version: "28",
    min_sdk_version: min_launcher3_sdk_version,
}

// Library with all the dependencies for building Launcher3
android_library {
    name: "Launcher3ResLib",
    srcs: [ ],
    resource_dirs: ["res"],
    static_libs: [
        "LauncherPluginLib",
        "launcher_quickstep_log_protos_lite",
        "androidx-constraintlayout_constraintlayout",
        "androidx.recyclerview_recyclerview",
        "androidx.dynamicanimation_dynamicanimation",
        "androidx.fragment_fragment",
        "androidx.preference_preference",
        "androidx.slice_slice-view",
        "androidx.cardview_cardview",
        "iconloader_base",
    ],
    manifest: "AndroidManifest-common.xml",
    sdk_version: "current",
    min_sdk_version: min_launcher3_sdk_version,
    lint: {
        baseline_filename: "lint-baseline-res-lib.xml",
    },
}

//
// Build rule for Launcher3 dependencies lib.
//
android_library {
    name: "Launcher3CommonDepsLib",
    srcs: ["src_build_config/**/*.java"],
    static_libs: ["Launcher3ResLib"],
    sdk_version: "current",
    min_sdk_version: min_launcher3_sdk_version,
    manifest: "AndroidManifest-common.xml",
    lint: {
        baseline_filename: "lint-baseline-common-deps-lib.xml",
    },
}

//
// Build rule for Launcher3 app.
//
android_app {
    name: "Launcher3",

    static_libs: [
        "Launcher3CommonDepsLib",
    ],
    srcs: [
        "src/**/*.java",
        "src_shortcuts_overrides/**/*.java",
        "src_ui_overrides/**/*.java",
        "ext_tests/src/**/*.java",
    ],
    resource_dirs: [
        "ext_tests/res",
    ],
    optimize: {
        proguard_flags_files: ["proguard.flags"],
        // Proguard is disable for testing. Derivarive prjects to keep proguard enabled
        enabled: false,
    },

    sdk_version: "current",
    min_sdk_version: min_launcher3_sdk_version,
    target_sdk_version: "current",
    privileged: true,
    system_ext_specific: true,

    overrides: [
        "Home",
        "Launcher2",
    ],
    required: ["privapp_whitelist_com.android.launcher3"],

    jacoco: {
        include_filter: ["com.android.launcher3.**"],
    },
    additional_manifests: [
        "AndroidManifest-common.xml",
    ],
    lint: {
        baseline_filename: "lint-baseline-launcher3.xml",
    },
}

// Library with all the dependencies for building quickstep
android_library {
    name: "QuickstepResLib",
    srcs: [ ],
    resource_dirs: [
        "quickstep/res",
    ],
    static_libs: [
        "Launcher3ResLib",
        "SystemUISharedLib",
        "SystemUI-statsd",
    ],
    manifest: "quickstep/AndroidManifest.xml",
    min_sdk_version: "current",
}


// Source code used for test helpers
filegroup {
    name: "launcher-src-ext-tests",
    srcs: ["ext_tests/src/**/*.java"],
}

// Common source files used to build launcher
filegroup {
    name: "launcher-src-no-build-config",
    srcs: [
        "src/**/*.java",
        "src_shortcuts_overrides/**/*.java",
        "quickstep/src/**/*.java",
    ],
}

// Proguard files for Launcher3
filegroup {
    name: "launcher-proguard-rules",
    srcs: ["proguard.flags"],
}


// Library with all the dependencies for building Launcher Go
android_library {
    name: "LauncherGoResLib",
    srcs: [
        "src/**/*.java",
        "quickstep/src/**/*.java",
        "go/src/**/*.java",
        "go/quickstep/src/**/*.java",
    ],
    resource_dirs: [
        "go/res",
        "go/quickstep/res",
    ],
    static_libs: [
        "Launcher3CommonDepsLib",
        "QuickstepResLib",
    ],
    manifest: "quickstep/AndroidManifest-launcher.xml",
    additional_manifests: [
        "go/AndroidManifest.xml",
        "AndroidManifest-common.xml",
    ],
    min_sdk_version: "current",
    lint: {
        baseline_filename: "lint-baseline-go-res-lib.xml",
    },
}
+11 −100
Original line number Diff line number Diff line
@@ -16,86 +16,6 @@

LOCAL_PATH := $(call my-dir)

#
# Build rule for Launcher3 dependencies lib.
#
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_AAPT2_ONLY := true
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_ANDROID_LIBRARIES := \
    androidx.recyclerview_recyclerview \
    androidx.dynamicanimation_dynamicanimation \
    androidx.preference_preference \
    iconloader_base

LOCAL_STATIC_JAVA_LIBRARIES := \
    LauncherPluginLib \
    launcher_log_protos_lite

LOCAL_SRC_FILES := \
    $(call all-proto-files-under, protos) \
    $(call all-proto-files-under, proto_overrides) \
    $(call all-java-files-under, src_build_config) \

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PROGUARD_ENABLED := disabled

LOCAL_PROTOC_OPTIMIZE_TYPE := nano
LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ --proto_path=$(LOCAL_PATH)/proto_overrides/
LOCAL_PROTO_JAVA_OUTPUT_PARAMS := enum_style=java

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
LOCAL_MODULE := Launcher3CommonDepsLib
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MANIFEST_FILE := AndroidManifest-common.xml

include $(BUILD_STATIC_JAVA_LIBRARY)

#
# Build rule for Launcher3 app.
#
include $(CLEAR_VARS)
LOCAL_USE_AAPT2 := true
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, src_shortcuts_overrides) \
    $(call all-java-files-under, src_ui_overrides) \
    $(call all-java-files-under, ext_tests/src)
    
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/ext_tests/res

LOCAL_PROGUARD_FLAG_FILES := proguard.flags
# Proguard is disable for testing. Derivarive prjects to keep proguard enabled
LOCAL_PROGUARD_ENABLED := disabled

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
LOCAL_PACKAGE_NAME := Launcher3
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SYSTEM_EXT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3

LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml

LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*

LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
LOCAL_LICENSE_CONDITIONS := notice
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE
include $(BUILD_PACKAGE)

#
# Build rule for Launcher3 Go app for Android Go devices.
#
@@ -114,7 +34,7 @@ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/go/res
LOCAL_PROGUARD_FLAG_FILES := proguard.flags

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
LOCAL_MIN_SDK_VERSION := 26
LOCAL_PACKAGE_NAME := Launcher3Go
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SYSTEM_EXT_MODULE := true
@@ -142,9 +62,7 @@ LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-statsd \
    SystemUISharedLib \
    launcherprotosnano \
    launcher_log_protos_lite
    SystemUISharedLib
ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
@@ -161,12 +79,9 @@ LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, quickstep/src) \
    $(call all-java-files-under, quickstep/recents_ui_overrides/src) \
    $(call all-java-files-under, src_shortcuts_overrides)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/quickstep/res \
    $(LOCAL_PATH)/quickstep/recents_ui_overrides/res
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/quickstep/res
LOCAL_PROGUARD_ENABLED := disabled


@@ -195,9 +110,7 @@ LOCAL_SYSTEM_EXT_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3
LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/quickstep/res \
    $(LOCAL_PATH)/quickstep/recents_ui_overrides/res
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/quickstep/res

LOCAL_FULL_LIBS_MANIFEST_FILES := \
    $(LOCAL_PATH)/quickstep/AndroidManifest-launcher.xml \
@@ -221,9 +134,7 @@ LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    SystemUI-statsd \
    SystemUISharedLib \
    launcherprotosnano \
    launcher_log_protos_lite
    SystemUISharedLib
ifneq (,$(wildcard frameworks/base))
  LOCAL_PRIVATE_PLATFORM_APIS := true
else
@@ -235,13 +146,13 @@ LOCAL_STATIC_ANDROID_LIBRARIES := Launcher3CommonDepsLib
LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, quickstep/src) \
    $(call all-java-files-under, quickstep/recents_ui_overrides/src) \
    $(call all-java-files-under, go/src)
    $(call all-java-files-under, go/src) \
    $(call all-java-files-under, go/quickstep/src)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/quickstep/res \
    $(LOCAL_PATH)/quickstep/recents_ui_overrides/res \
    $(LOCAL_PATH)/go/res
    $(LOCAL_PATH)/go/quickstep/res \
    $(LOCAL_PATH)/go/res \
    $(LOCAL_PATH)/quickstep/res

LOCAL_PROGUARD_FLAG_FILES := proguard.flags
LOCAL_PROGUARD_ENABLED := full
@@ -254,7 +165,7 @@ LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.launcher3

LOCAL_FULL_LIBS_MANIFEST_FILES := \
    $(LOCAL_PATH)/go/AndroidManifest.xml \
    $(LOCAL_PATH)/quickstep/AndroidManifest-launcher.xml \
    $(LOCAL_PATH)/go/AndroidManifest-launcher.xml \
    $(LOCAL_PATH)/AndroidManifest-common.xml

LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
+19 −30
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
-->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.launcher3">

    <!--
@@ -29,13 +30,8 @@
    at compile time. Note that the components defined in AndroidManifest.xml are also required,
    with some minor changed based on the derivative app.
    -->
    <permission
        android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
        android:protectionLevel="dangerous"
        android:label="@string/permlab_install_shortcut"
        android:description="@string/permdesc_install_shortcut" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
@@ -45,9 +41,8 @@
    <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
    <uses-permission android:name="android.permission.READ_DEVICE_CONFIG" />
    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />

    <!-- TODO(b/150802536): Enabled only for ENABLE_FIXED_ROTATION_TRANSFORM feature flag -->
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"/>
    <!-- for rotating surface by arbitrary degree -->
    <uses-permission android:name="android.permission.ROTATE_SURFACE_FLINGER" />
    
    <!--
    Permissions required for read/write access to the workspace data. These permission name
@@ -82,41 +77,27 @@
        android:restoreAnyVersion="true"
        android:supportsRtl="true" >

        <!-- Intent received used to install shortcuts from other applications -->
        <receiver
            android:name="com.android.launcher3.InstallShortcutReceiver"
            android:permission="com.android.launcher.permission.INSTALL_SHORTCUT"
            android:enabled="@bool/enable_install_shortcut_api" >
            <intent-filter>
                <action android:name="com.android.launcher.action.INSTALL_SHORTCUT" />
            </intent-filter>
        </receiver>

        <!-- Intent received when a session is committed -->
        <receiver
            android:name="com.android.launcher3.SessionCommitReceiver" >
            android:name="com.android.launcher3.SessionCommitReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.content.pm.action.SESSION_COMMITTED" />
            </intent-filter>
        </receiver>

        <!-- Intent received used to initialize a restored widget -->
        <receiver android:name="com.android.launcher3.AppWidgetsRestoredReceiver" >
        <receiver android:name="com.android.launcher3.AppWidgetsRestoredReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_HOST_RESTORED"/>
            </intent-filter>
        </receiver>

        <service
            android:name="com.android.launcher3.uioverrides.dynamicui.WallpaperManagerCompatVL$ColorExtractionService"
            android:exported="false"
            android:process=":wallpaper_chooser"
            android:permission="android.permission.BIND_JOB_SERVICE" />

        <service
            android:name="com.android.launcher3.notification.NotificationListener"
            android:label="@string/notification_dots_service_title"
            android:enabled="@bool/notification_dots_enabled"
            android:exported="true"
            android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
            <intent-filter>
                <action android:name="android.service.notification.NotificationListenerService" />
@@ -127,10 +108,10 @@
                       android:value="true" />

        <activity android:name="com.android.launcher3.dragndrop.AddItemActivity"
            android:theme="@style/AppItemActivityTheme"
            android:theme="@style/AddItemActivityTheme"
            android:excludeFromRecents="true"
            android:autoRemoveFromRecents="true"
            android:label="@string/action_add_to_workspace" >
            android:exported="true">
            <intent-filter>
                <action android:name="android.content.pm.action.CONFIRM_PIN_SHORTCUT" />
                <action android:name="android.content.pm.action.CONFIRM_PIN_APPWIDGET" />
@@ -165,6 +146,7 @@
            android:name="com.android.launcher3.settings.SettingsActivity"
            android:label="@string/settings_button_text"
            android:theme="@style/HomeSettingsTheme"
            android:exported="true"
            android:autoRemoveFromRecents="true">
            <intent-filter>
                <action android:name="android.intent.action.APPLICATION_PREFERENCES" />
@@ -187,6 +169,7 @@
            android:name="com.android.launcher3.secondarydisplay.SecondaryDisplayLauncher"
            android:theme="@style/AppTheme"
            android:launchMode="singleTop"
            android:exported="true"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
@@ -194,5 +177,11 @@
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <!-- [b/197780098] Disable eager initialization of Jetpack libraries. -->
        <provider
            android:name="androidx.startup.InitializationProvider"
            android:authorities="${applicationId}.androidx-startup"
            tools:node="remove" />
    </application>
</manifest>
+3 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.launcher3">
    <uses-sdk android:targetSdkVersion="29" android:minSdkVersion="25"/>
    <uses-sdk android:targetSdkVersion="30" android:minSdkVersion="26"/>
    <!--
    Manifest entries specific to Launcher3. This is merged with AndroidManifest-common.xml.
    Refer comments around specific entries on how to extend individual components.
@@ -49,10 +49,11 @@
            android:stateNotNeeded="true"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="unspecified"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize|density"
            android:resizeableActivity="true"
            android:resumeWhilePausing="true"
            android:taskAffinity=""
            android:exported="true"
            android:enabled="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
+1 −0
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ tracyzhou@google.com
peanutbutter@google.com
xuqiu@google.com
sreyasr@google.com
thiruram@google.com

per-file FeatureFlags.java, globs = set noparent
per-file FeatureFlags.java = sunnygoyal@google.com, winsonc@google.com, zakcohen@google.com, mrcasey@google.com, adamcohen@google.com, hyunyoungs@google.com
Loading