diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-11-02 11:04:49 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-11-02 11:23:31 -0700 |
commit | 73133391e5b67db7d057468e516327a5b942a612 (patch) | |
tree | bd69654326a92172fc3a044610c495d541615c13 | |
parent | 31a07c9340f08c6cf0348bfa6ff2ba03c85437c8 (diff) | |
download | packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.tar.gz packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.tar.bz2 packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.zip |
Adding a placeholder recents activity
Change-Id: Idde86b4008559cde8bcf13fba90a8c72c3f1f591
-rw-r--r-- | Android.mk | 18 | ||||
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | quickstep/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | quickstep/libs/sysui_shared.jar | bin | 0 -> 71118 bytes | |||
-rw-r--r-- | quickstep/src/com/android/quickstep/RecentsActivity.java | 45 |
5 files changed, 65 insertions, 6 deletions
diff --git a/Android.mk b/Android.mk index 1e4083560..282b878dd 100644 --- a/Android.mk +++ b/Android.mk @@ -17,6 +17,14 @@ LOCAL_PATH := $(call my-dir) # +# Prebuilt Java Libraries +# +include $(CLEAR_VARS) +LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ + libSharedSystemUI:quickstep/libs/sysui_shared.jar +include $(BUILD_MULTI_PREBUILT) + +# # Build rule for Launcher3 app. # include $(CLEAR_VARS) @@ -121,7 +129,8 @@ LOCAL_MODULE_TAGS := optional LOCAL_STATIC_JAVA_LIBRARIES := \ android-support-v4 \ android-support-v7-recyclerview \ - android-support-dynamic-animation + android-support-dynamic-animation \ + libSharedSystemUI LOCAL_SRC_FILES := \ $(call all-java-files-under, src) \ @@ -136,7 +145,7 @@ LOCAL_RESOURCE_DIR := \ $(LOCAL_PATH)/res \ prebuilts/sdk/current/support/v7/recyclerview/res \ -LOCAL_PROGUARD_FLAG_FILES := proguard.flags +LOCAL_PROGUARD_ENABLED := disabled LOCAL_PROTOC_OPTIMIZE_TYPE := nano LOCAL_PROTOC_FLAGS := --proto_path=$(LOCAL_PATH)/protos/ --proto_path=$(LOCAL_PATH)/proto_overrides/ @@ -146,8 +155,8 @@ LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ --extra-packages android.support.v7.recyclerview \ -LOCAL_SDK_VERSION := current -LOCAL_MIN_SDK_VERSION := 21 +LOCAL_SDK_VERSION := system_current +LOCAL_MIN_SDK_VERSION := 26 LOCAL_PACKAGE_NAME := Launcher3QuickStep LOCAL_PRIVILEGED_MODULE := true LOCAL_OVERRIDES_PACKAGES := Home Launcher2 Launcher3 @@ -157,7 +166,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ $(LOCAL_PATH)/AndroidManifest-common.xml LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml - LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* include $(BUILD_PACKAGE) diff --git a/build.gradle b/build.gradle index 9b0989c92..f357e5ca8 100644 --- a/build.gradle +++ b/build.gradle @@ -109,6 +109,8 @@ dependencies { compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}" compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' + quickstepCompile fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar') + testCompile 'junit:junit:4.12' androidTestCompile "org.mockito:mockito-core:1.9.5" androidTestCompile 'com.google.dexmaker:dexmaker:1.2' diff --git a/quickstep/AndroidManifest.xml b/quickstep/AndroidManifest.xml index eb05864a0..08c740c4f 100644 --- a/quickstep/AndroidManifest.xml +++ b/quickstep/AndroidManifest.xml @@ -36,8 +36,12 @@ android:supportsRtl="true" > <service android:name="com.android.quickstep.TouchInteractionService" - android:exported="false" /> + android:exported="true" /> + <!-- STOPSHIP: Change exported to false once all the integration is complete. + It is set to true so that the activity can be started from command line --> + <activity android:name="com.android.quickstep.RecentsActivity" + android:exported="true" /> </application> </manifest> diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar Binary files differnew file mode 100644 index 000000000..2f6c8810f --- /dev/null +++ b/quickstep/libs/sysui_shared.jar diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java new file mode 100644 index 000000000..75a6b9e98 --- /dev/null +++ b/quickstep/src/com/android/quickstep/RecentsActivity.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 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. + */ +package com.android.quickstep; + +import android.app.ListActivity; +import android.os.Bundle; +import android.support.annotation.Nullable; +import android.widget.ArrayAdapter; + +import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan; +import com.android.systemui.shared.recents.model.RecentsTaskLoader; +import com.android.systemui.shared.recents.model.Task; + +/** + * A simple activity to show the recently launched tasks + */ +public class RecentsActivity extends ListActivity { + + private ArrayAdapter<Task> mAdapter; + + @Override + protected void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(this); + plan.preloadPlan(new RecentsTaskLoader(this, 1, 1, 0), -1); + + mAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1); + mAdapter.addAll(plan.getTaskStack().getStackTasks()); + setListAdapter(mAdapter); + } +} |