Loading Android.mk +60 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir) # # Build app code. # Build rule for Launcher3 app. # include $(CLEAR_VARS) Loading @@ -26,12 +26,15 @@ LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ android-support-v7-recyclerview \ android-support-v7-palette 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-proto-files-under, protos) $(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 \ Loading @@ -40,7 +43,7 @@ LOCAL_RESOURCE_DIR := \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ 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 := \ Loading @@ -59,15 +62,66 @@ LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* include $(BUILD_PACKAGE) # # Build rule for Launcher3 Go app for Android Go devices. # include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ 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, go/src_flags) \ $(call all-proto-files-under, protos) \ $(call all-proto-files-under, proto_overrides) LOCAL_RESOURCE_DIR := \ $(LOCAL_PATH)/go/res \ $(LOCAL_PATH)/res \ prebuilts/sdk/current/support/v7/recyclerview/res \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags 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 := current LOCAL_MIN_SDK_VERSION := 21 LOCAL_PACKAGE_NAME := Launcher3Go 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 := go/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* include $(BUILD_PACKAGE) # # Launcher proto buffer jar used for development # include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-proto-files-under, protos) LOCAL_SRC_FILES := $(call all-proto-files-under, protos) $(call all-proto-files-under, proto_overrides) LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ --proto_path=$(LOCAL_PATH)/proto_overrides/ LOCAL_PROTO_JAVA_OUTPUT_PARAMS := enum_style=java LOCAL_MODULE_TAGS := optional Loading AndroidManifest-common.xml +6 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,12 @@ android:permission="android.permission.BIND_JOB_SERVICE"> </service> <service android:name="com.android.launcher3.compat.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:enabled="@bool/notification_badging_enabled" android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> Loading AndroidManifest.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ android:launchMode="singleTask" android:clearTaskOnLaunch="true" android:stateNotNeeded="true" android:windowSoftInputMode="adjustPan|stateUnchanged" android:windowSoftInputMode="adjustPan" android:screenOrientation="nosensor" android:configChanges="keyboard|keyboardHidden|navigation" android:resizeableActivity="true" Loading @@ -82,6 +82,7 @@ <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.MONKEY"/> <category android:name="android.intent.category.LAUNCHER_APP" /> </intent-filter> </activity> Loading build.gradle +29 −5 Original line number Diff line number Diff line Loading @@ -35,28 +35,49 @@ android { applicationId 'com.android.launcher3' testApplicationId 'com.android.launcher3.tests' } l3go { applicationId 'com.android.launcher3' testApplicationId 'com.android.launcher3.tests' } } sourceSets { main { res.srcDirs = ['res'] java.srcDirs = ['src', 'src_config'] java.srcDirs = ['src'] manifest.srcFile 'AndroidManifest-common.xml' proto.srcDirs 'protos/' proto { srcDir 'protos/' srcDir 'proto_overrides/' } } androidTest { java.srcDirs = ['tests/src'] res.srcDirs = ['tests/res'] java.srcDirs = ['tests/src'] manifest.srcFile "tests/AndroidManifest-common.xml" } aosp { java.srcDirs = ['src_flags'] manifest.srcFile "AndroidManifest.xml" } aospAndroidTest { manifest.srcFile "tests/AndroidManifest.xml" } 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" } l3goAndroidTest { manifest.srcFile "tests/AndroidManifest.xml" } } } Loading @@ -68,12 +89,13 @@ repositories { 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-2' compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' testCompile 'junit:junit:4.12' androidTestCompile "org.mockito:mockito-core:1.+" 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' Loading @@ -91,7 +113,9 @@ protobuf { task.builtins { remove java javanano { option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano" option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano" option "java_package=launcher_dump.proto|com.android.launcher3.model.nano" option "enum_style=java" } } Loading go/AndroidManifest.xml 0 → 100644 +53 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 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" xmlns:tools="http://schemas.android.com/tools" package="com.android.launcher3" > <uses-sdk android:targetSdkVersion="23" android:minSdkVersion="21"/> <application android:backupAgent="com.android.launcher3.LauncherBackupAgent" android:fullBackupOnly="true" android:fullBackupContent="@xml/backupscheme" android:hardwareAccelerated="true" android:icon="@drawable/ic_launcher_home" android:label="@string/derived_app_name" android:theme="@style/LauncherTheme" android:largeHeap="@bool/config_largeHeap" android:restoreAnyVersion="true" android:supportsRtl="true" > <!-- Activity for handling PinItemRequest. Only supports shortcuts --> <activity android:name="com.android.launcher3.dragndrop.AddItemActivity" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:label="@string/action_add_to_workspace" tools:node="replace" > <intent-filter> <action android:name="android.content.pm.action.CONFIRM_PIN_SHORTCUT" /> </intent-filter> </activity> </application> </manifest> Loading
Android.mk +60 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ LOCAL_PATH := $(call my-dir) # # Build app code. # Build rule for Launcher3 app. # include $(CLEAR_VARS) Loading @@ -26,12 +26,15 @@ LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ android-support-v7-recyclerview \ android-support-v7-palette 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-proto-files-under, protos) $(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 \ Loading @@ -40,7 +43,7 @@ LOCAL_RESOURCE_DIR := \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ 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 := \ Loading @@ -59,15 +62,66 @@ LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* include $(BUILD_PACKAGE) # # Build rule for Launcher3 Go app for Android Go devices. # include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ 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, go/src_flags) \ $(call all-proto-files-under, protos) \ $(call all-proto-files-under, proto_overrides) LOCAL_RESOURCE_DIR := \ $(LOCAL_PATH)/go/res \ $(LOCAL_PATH)/res \ prebuilts/sdk/current/support/v7/recyclerview/res \ LOCAL_PROGUARD_FLAG_FILES := proguard.flags 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 := current LOCAL_MIN_SDK_VERSION := 21 LOCAL_PACKAGE_NAME := Launcher3Go 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 := go/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* include $(BUILD_PACKAGE) # # Launcher proto buffer jar used for development # include $(CLEAR_VARS) LOCAL_SRC_FILES := $(call all-proto-files-under, protos) LOCAL_SRC_FILES := $(call all-proto-files-under, protos) $(call all-proto-files-under, proto_overrides) LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ --proto_path=$(LOCAL_PATH)/proto_overrides/ LOCAL_PROTO_JAVA_OUTPUT_PARAMS := enum_style=java LOCAL_MODULE_TAGS := optional Loading
AndroidManifest-common.xml +6 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,12 @@ android:permission="android.permission.BIND_JOB_SERVICE"> </service> <service android:name="com.android.launcher3.compat.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:enabled="@bool/notification_badging_enabled" android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> Loading
AndroidManifest.xml +2 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ android:launchMode="singleTask" android:clearTaskOnLaunch="true" android:stateNotNeeded="true" android:windowSoftInputMode="adjustPan|stateUnchanged" android:windowSoftInputMode="adjustPan" android:screenOrientation="nosensor" android:configChanges="keyboard|keyboardHidden|navigation" android:resizeableActivity="true" Loading @@ -82,6 +82,7 @@ <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.MONKEY"/> <category android:name="android.intent.category.LAUNCHER_APP" /> </intent-filter> </activity> Loading
build.gradle +29 −5 Original line number Diff line number Diff line Loading @@ -35,28 +35,49 @@ android { applicationId 'com.android.launcher3' testApplicationId 'com.android.launcher3.tests' } l3go { applicationId 'com.android.launcher3' testApplicationId 'com.android.launcher3.tests' } } sourceSets { main { res.srcDirs = ['res'] java.srcDirs = ['src', 'src_config'] java.srcDirs = ['src'] manifest.srcFile 'AndroidManifest-common.xml' proto.srcDirs 'protos/' proto { srcDir 'protos/' srcDir 'proto_overrides/' } } androidTest { java.srcDirs = ['tests/src'] res.srcDirs = ['tests/res'] java.srcDirs = ['tests/src'] manifest.srcFile "tests/AndroidManifest-common.xml" } aosp { java.srcDirs = ['src_flags'] manifest.srcFile "AndroidManifest.xml" } aospAndroidTest { manifest.srcFile "tests/AndroidManifest.xml" } 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" } l3goAndroidTest { manifest.srcFile "tests/AndroidManifest.xml" } } } Loading @@ -68,12 +89,13 @@ repositories { 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-2' compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' testCompile 'junit:junit:4.12' androidTestCompile "org.mockito:mockito-core:1.+" 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' Loading @@ -91,7 +113,9 @@ protobuf { task.builtins { remove java javanano { option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano" option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano" option "java_package=launcher_dump.proto|com.android.launcher3.model.nano" option "enum_style=java" } } Loading
go/AndroidManifest.xml 0 → 100644 +53 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** ** Copyright 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" xmlns:tools="http://schemas.android.com/tools" package="com.android.launcher3" > <uses-sdk android:targetSdkVersion="23" android:minSdkVersion="21"/> <application android:backupAgent="com.android.launcher3.LauncherBackupAgent" android:fullBackupOnly="true" android:fullBackupContent="@xml/backupscheme" android:hardwareAccelerated="true" android:icon="@drawable/ic_launcher_home" android:label="@string/derived_app_name" android:theme="@style/LauncherTheme" android:largeHeap="@bool/config_largeHeap" android:restoreAnyVersion="true" android:supportsRtl="true" > <!-- Activity for handling PinItemRequest. Only supports shortcuts --> <activity android:name="com.android.launcher3.dragndrop.AddItemActivity" android:theme="@android:style/Theme.DeviceDefault.Light.Dialog.Alert" android:excludeFromRecents="true" android:autoRemoveFromRecents="true" android:label="@string/action_add_to_workspace" tools:node="replace" > <intent-filter> <action android:name="android.content.pm.action.CONFIRM_PIN_SHORTCUT" /> </intent-filter> </activity> </application> </manifest>