Android Recent Key & RecentTaskInfo

Recent Key UI -> Home screen (SystemShortCut 快捷方式的一种)
RecentTaskInfo -> WMS (其实是 ActivityManager 的内部静态类,继承自 TaskInfo。 可提供给App 使用 )
TaskInfo参考之前的介绍:https://www.jianshu.com/p/1aee1948ebf6

1. RecentTaskInfo 源码

frameworks/base/core/java/android/app/ActivityManager.java

package android.app;

@SystemService(Context.ACTIVITY_SERVICE)
public class ActivityManager {
    /**
     * Information you can retrieve about tasks that the user has most recently
     * started or visited.
     */
    public static class RecentTaskInfo extends TaskInfo implements Parcelable {...}

2. SystemShortCut 源码

packages/apps/Launcher3/src/com/android/launcher3/popup/SystemShortcut.java

package com.android.launcher3.popup;
/**
 * Represents a system shortcut for a given app. The shortcut should have a label and icon, and an
 * onClickListener that depends on the item that the shortcut services.
 *
 * Example system shortcuts, defined as inner classes, include Widgets and AppInfo.
 * @param <T>
 */
public abstract class SystemShortcut<T extends Context & ActivityContext> extends ItemInfo
        implements View.OnClickListener {

-- End --

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容