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

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

Merge "Merge Android Pie into master"

parents 74ebf7a2 ccb8ed4d
Loading
Loading
Loading
Loading
+129 −22
Original line number Diff line number Diff line
@@ -16,6 +16,18 @@

LOCAL_PATH := $(call my-dir)

#
# Prebuilt Java Libraries
#
include $(CLEAR_VARS)
LOCAL_MODULE := libSharedSystemUI
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_SRC_FILES := quickstep/libs/sysui_shared.jar
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_SDK_VERSION := current
include $(BUILD_PREBUILT)

#
# Build rule for Launcher3 app.
#
@@ -24,21 +36,26 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v4 \
    android-support-annotations

LOCAL_STATIC_ANDROID_LIBRARIES := \
    android-support-compat \
    android-support-media-compat \
    android-support-core-utils \
    android-support-core-ui \
    android-support-fragment \
    android-support-v7-recyclerview \
    android-support-v7-palette \
    android-support-dynamic-animation

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, src_config) \
    $(call all-java-files-under, src_ui_overrides) \
    $(call all-java-files-under, src_flags) \
    $(call all-proto-files-under, protos) \
    $(call all-proto-files-under, proto_overrides)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/res \
    prebuilts/sdk/current/support/v7/recyclerview/res \

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

@@ -46,9 +63,7 @@ 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_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages android.support.v7.recyclerview \
LOCAL_USE_AAPT2 := true

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
@@ -70,14 +85,20 @@ include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v4 \
    android-support-annotations

LOCAL_STATIC_ANDROID_LIBRARIES := \
    android-support-compat \
    android-support-media-compat \
    android-support-core-utils \
    android-support-core-ui \
    android-support-fragment \
    android-support-v7-recyclerview \
    android-support-v7-palette \
    android-support-dynamic-animation

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, src_config) \
    $(call all-java-files-under, src_ui_overrides) \
    $(call all-java-files-under, go/src_flags) \
    $(call all-proto-files-under, protos) \
    $(call all-proto-files-under, proto_overrides)
@@ -85,7 +106,6 @@ LOCAL_SRC_FILES := \
LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/go/res \
    $(LOCAL_PATH)/res \
    prebuilts/sdk/current/support/v7/recyclerview/res \

LOCAL_PROGUARD_FLAG_FILES := proguard.flags

@@ -93,9 +113,7 @@ 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_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages android.support.v7.recyclerview \
LOCAL_USE_AAPT2 := true

LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 21
@@ -114,22 +132,111 @@ LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*
include $(BUILD_PACKAGE)

#
# Launcher proto buffer jar used for development
# Build rule for Quickstep app.
#
include $(CLEAR_VARS)

LOCAL_SRC_FILES := $(call all-proto-files-under, protos) $(call all-proto-files-under, proto_overrides)
LOCAL_MODULE_TAGS := optional

LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-annotations \
    libSharedSystemUI

LOCAL_STATIC_ANDROID_LIBRARIES := \
    android-support-compat \
    android-support-media-compat \
    android-support-core-utils \
    android-support-core-ui \
    android-support-fragment \
    android-support-v7-recyclerview \
    android-support-dynamic-animation

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, quickstep/src) \
    $(call all-java-files-under, src_flags) \
    $(call all-proto-files-under, protos) \
    $(call all-proto-files-under, proto_overrides)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/quickstep/res \
    $(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_USE_AAPT2 := true

LOCAL_SDK_VERSION := system_current
LOCAL_MIN_SDK_VERSION := 26
LOCAL_PACKAGE_NAME := Launcher3QuickStep
LOCAL_PRIVILEGED_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3

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

LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*

include $(BUILD_PACKAGE)

#
# Build rule for Launcher3 Go app with quickstep for Android Go devices.
#
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := launcher_proto_lib
LOCAL_IS_HOST_MODULE := true
LOCAL_STATIC_JAVA_LIBRARIES := host-libprotobuf-java-nano

include $(BUILD_HOST_JAVA_LIBRARY)
LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v4 \
    android-support-v7-recyclerview \
    android-support-dynamic-animation \
    libSharedSystemUI

LOCAL_SRC_FILES := \
    $(call all-java-files-under, src) \
    $(call all-java-files-under, quickstep/src) \
    $(call all-java-files-under, go/src_flags) \
    $(call all-proto-files-under, protos) \
    $(call all-proto-files-under, proto_overrides)

LOCAL_RESOURCE_DIR := \
    $(LOCAL_PATH)/quickstep/res \
    $(LOCAL_PATH)/go/res \
    $(LOCAL_PATH)/res \
    prebuilts/sdk/current/support/v7/recyclerview/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_AAPT_FLAGS := \
    --auto-add-overlay \
    --extra-packages android.support.v7.recyclerview \

LOCAL_SDK_VERSION := system_current
LOCAL_MIN_SDK_VERSION := 26
LOCAL_PACKAGE_NAME := Launcher3QuickStepGo
LOCAL_PRIVILEGED_MODULE := true
LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3

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

LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml
LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.*

include $(BUILD_PACKAGE)


# ==================================================
include $(call all-makefiles-under,$(LOCAL_PATH))
+7 −11
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.launcher3">
    <uses-sdk android:targetSdkVersion="23" android:minSdkVersion="21"/>

    <!--
    The manifest defines the common entries that should be present in any derivative of Launcher3.
@@ -43,6 +42,7 @@
    <uses-permission android:name="android.permission.BIND_APPWIDGET" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />

    <application
        android:backupAgent="com.android.launcher3.LauncherBackupAgent"
@@ -80,19 +80,15 @@
            </intent-filter>
        </receiver>

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

        <service
            android:name="com.android.launcher3.compat.WallpaperManagerCompatVL$ColorExtractionService"
            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"
        <service
            android:name="com.android.launcher3.notification.NotificationListener"
            android:label="@string/icon_badging_service_title"
            android:enabled="@bool/notification_badging_enabled"
            android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
            <intent-filter>
+3 −51
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
    <permission
        android:name="com.android.launcher3.permission.READ_SETTINGS"
        android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
        android:protectionLevel="normal"
        android:protectionLevel="signatureOrSystem"
        android:label="@string/permlab_read_settings"
        android:description="@string/permdesc_read_settings"/>
    <permission
@@ -71,8 +71,8 @@
            android:clearTaskOnLaunch="true"
            android:stateNotNeeded="true"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="nosensor"
            android:configChanges="keyboard|keyboardHidden|navigation"
            android:screenOrientation="unspecified"
            android:configChanges="keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenSize|screenLayout|smallestScreenSize"
            android:resizeableActivity="true"
            android:resumeWhilePausing="true"
            android:taskAffinity=""
@@ -112,53 +112,5 @@
            android:writePermission="com.android.launcher3.permission.WRITE_SETTINGS"
            android:readPermission="com.android.launcher3.permission.READ_SETTINGS" />

        <!-- ENABLE_FOR_TESTING

        <activity
            android:name="com.android.launcher3.testing.LauncherExtension"
            android:launchMode="singleTask"
            android:clearTaskOnLaunch="true"
            android:stateNotNeeded="true"
            android:theme="@style/Theme"
            android:windowSoftInputMode="adjustPan"
            android:screenOrientation="nosensor"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.HOME" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.MONKEY"/>
            </intent-filter>
        </activity>

        <activity
            android:name="com.android.launcher3.testing.MemoryDumpActivity"
            android:theme="@android:style/Theme.NoDisplay"
            android:label="* HPROF"
            android:excludeFromRecents="true"
            android:icon="@drawable/ic_launcher_home"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="com.android.launcher3.testing.ToggleWeightWatcher"
            android:label="Show Mem"
            android:icon="@drawable/ic_launcher_home">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <service android:name="com.android.launcher3.testing.MemoryTracker" />

        -->

    </application>
</manifest>
+64 −32
Original line number Diff line number Diff line
buildscript {
    repositories {
        mavenCentral()
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0'
        classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
        classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.3'
    }
}

final String SUPPORT_LIBS_VERSION = '28.0.0-SNAPSHOT'

apply plugin: 'com.android.application'
apply plugin: 'com.google.protobuf'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.0'
    compileSdkVersion 28
    buildToolsVersion '28.0.0'

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 26
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        debug {
@@ -30,17 +33,40 @@ android {
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    flavorDimensions "default"

    productFlavors {
        aosp {
            dimension "default"
            applicationId 'com.android.launcher3'
            testApplicationId 'com.android.launcher3.tests'
        }

        l3go {
            dimension "default"
            applicationId 'com.android.launcher3'
            testApplicationId 'com.android.launcher3.tests'
        }

        quickstep {
            dimension "default"
            applicationId 'com.android.launcher3'
            testApplicationId 'com.android.launcher3.tests'
        }
    }

    // Disable release builds for now
    android.variantFilter { variant ->
        if (variant.buildType.name.endsWith('release')) {
            variant.setIgnore(true);
        }
    }

    sourceSets {
        main {
            res.srcDirs = ['res']
@@ -52,55 +78,61 @@ android {
            }
        }

        debug {
            manifest.srcFile "AndroidManifest.xml"
        }

        androidTest {
            res.srcDirs = ['tests/res']
            java.srcDirs = ['tests/src']
            manifest.srcFile "tests/AndroidManifest-common.xml"
        }

        aosp {
            java.srcDirs = ['src_flags']
            manifest.srcFile "AndroidManifest.xml"
        androidTestDebug {
            manifest.srcFile "tests/AndroidManifest.xml"
        }

        aospAndroidTest {
            manifest.srcFile "tests/AndroidManifest.xml"
        aosp {
            java.srcDirs = ['src_flags', "src_ui_overrides"]
        }

        l3go {
            res.srcDirs = ['go/res']
            java.srcDirs = ['go/src_flags']
            // Note: we are using the Launcher3 manifest here because the gradle manifest-merger uses
            // different attributes than the build system.
            manifest.srcFile "AndroidManifest.xml"
            java.srcDirs = ['go/src_flags', "src_ui_overrides"]
            manifest.srcFile "go/AndroidManifest.xml"
        }

        l3goAndroidTest {
            manifest.srcFile "tests/AndroidManifest.xml"
        quickstep {
            res.srcDirs = ['quickstep/res']
            java.srcDirs = ['src_flags', 'quickstep/src']
            manifest.srcFile "quickstep/AndroidManifest.xml"
        }
    }
}

repositories {
    maven { url "../../../prebuilts/fullsdk-darwin/extras/android/m2repository" }
    maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
    mavenCentral()
    jcenter()
    google()
}

final String SUPPORT_LIBS_VERSION = '26.0.0-SNAPSHOT'
dependencies {
    compile "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
    compile "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}"
    compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
    compile "com.android.support:palette-v7:${SUPPORT_LIBS_VERSION}"
    compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'

    testCompile 'junit:junit:4.12'
    androidTestCompile "org.mockito:mockito-core:1.9.5"
    androidTestCompile 'com.google.dexmaker:dexmaker:1.2'
    androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
    androidTestCompile "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}"
    implementation "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}"
    implementation "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}"
    implementation "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}"
    implementation 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'

    quickstepImplementation fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar')

    testImplementation 'junit:junit:4.12'
    androidTestImplementation "org.mockito:mockito-core:1.9.5"
    androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
    androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
    androidTestImplementation 'com.android.support.test:runner:1.0.0'
    androidTestImplementation 'com.android.support.test:rules:1.0.0'
    androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
    androidTestImplementation "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}"
}

protobuf {
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="long_press_widget_to_add" msgid="4001616142797446267">"المس مع الاستمرار لاختيار اختصار."</string>
    <string name="long_accessible_way_to_add" msgid="2725225828389948328">"يمكنك النقر نقرًا مزدوجًا مع الاستمرار لاختيار اختصار أو استخدام الإجراءات المخصصة."</string>
    <string name="long_accessible_way_to_add" msgid="2725225828389948328">"يمكنك النقر مرّتين مع الاستمرار لاختيار اختصار أو استخدام الإجراءات المخصصة."</string>
    <string name="widget_button_text" msgid="4221900832360456858">"الاختصارات"</string>
    <string name="widgets_bottom_sheet_title" msgid="3949835990909395998">"اختصارات <xliff:g id="NAME">%1$s</xliff:g>"</string>
</resources>
Loading