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 /quickstep/src/com | |
parent | 31a07c9340f08c6cf0348bfa6ff2ba03c85437c8 (diff) | |
download | android_packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.tar.gz android_packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.tar.bz2 android_packages_apps_Trebuchet-73133391e5b67db7d057468e516327a5b942a612.zip |
Adding a placeholder recents activity
Change-Id: Idde86b4008559cde8bcf13fba90a8c72c3f1f591
Diffstat (limited to 'quickstep/src/com')
-rw-r--r-- | quickstep/src/com/android/quickstep/RecentsActivity.java | 45 |
1 files changed, 45 insertions, 0 deletions
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); + } +} |