android 函数文档,Android文档ActivityManager.RunningTaskInfo翻译

ActivityManager.RunningTaskInfo类提供了关于系统中当前运行任务的详细信息,包括任务的唯一标识、活动数量、顶部活动组件等。这个类主要用于了解用户交互过的任务状态,即使其进程可能已被系统回收。信息包括任务的描述、活动计数和运行状态等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ActivityManager.RunningTaskInfo

结构

继承关系

public class ActivityManager.RunningTaskInfo extends

Object implements Parcelable

java.lang.Object

android.app.ActivityManager.RunningTaskInfo

类概述

Information you can retrieve about a particular

task that is currently "running" in the system. Note that a running

task does not mean the given task actually has a process it is

actively running in; it simply means that the user has gone to it

and never closed it, but currently the system may have killed its

process and is only holding on to its last state in order to

restart it when the user returns.

你可以获取系统当前正在运行的任务的信息。注意:正在运行的任务不是一个任务的进程真正运行;它简单的说就是用户运行它并且没有关闭它,但是,系统可能会kill它的进程并且系统为了可以重启它而保留它最新的状态。

公共构造函数

public

The component launched as the first activity in

the task. This can be considered the "application" of this

task.

任务里第一个启动Activity的组件。可以认为这个任务的应用程序。

public

Description of the task's current

state.

任务当前状态的描述。

public int id

A unique identifier for this task.

任务唯一的标识。

public int numActivities

Number of activities in this task.

任务里Activity的数量。

public int numRunning

Number of activities that are currently running

(not stopped and persisted) in this task.

当前正在运行的Activity数量(不是停止的或持久的)。

public Bitmap thumbnail

Thumbnail representation of the task's current

state. Currently always null.

表示任务状态的缩略图。总是null。

public

The activity component at the top of the history

stack of the task. This is what the user is currently

doing.

任务堆栈顶层的Activity组件。这是用户最近做的事情。

公共方法

public intdescribeContents()

Describe the kinds of special objects contained in

this Parcelable's marshalled representation.

指定对象的类型描述。

参数

enabled Whether or not to enable smooth scrollbar.

返回值

l

a bitmask indicating the set of special object

types marshalled by the Parcelable.

指示对象类型的位掩码。

public voidreadFromParcel(Parcel source)

参数

返回值

public voidwriteToParcel(Parcel dest,

int flags)

Flatten this object in to a Parcel.

写入Parcel的对象。

参数

dest

The Parcel in which the object should be

written.

flags

Additional flags about how the object should be

written. May be 0 or.

dest

对象将要写入的Parcel。

flags

对象写入方式的标志,可以为0或PARCELABLE_WRITE_RETURN_VALUE。

返回值

void

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值