下面列出了android.app.ActivityManager.AppTask#getTaskInfo ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Returns the RecentTaskInfo for the task, if the ActivityManager succeeds in finding the task.
* @param task AppTask containing information about a task.
* @return The RecentTaskInfo associated with the task, or null if it couldn't be found.
*/
public static RecentTaskInfo getTaskInfoFromTask(AppTask task) {
RecentTaskInfo info = null;
try {
info = task.getTaskInfo();
} catch (IllegalArgumentException e) {
Log.e(TAG, "Failed to retrieve task info: ", e);
}
return info;
}
/**
* Returns the RecentTaskInfo for the task, if the ActivityManager succeeds in finding the task.
* @param task AppTask containing information about a task.
* @return The RecentTaskInfo associated with the task, or null if it couldn't be found.
*/
public static RecentTaskInfo getTaskInfoFromTask(AppTask task) {
RecentTaskInfo info = null;
try {
info = task.getTaskInfo();
} catch (IllegalArgumentException e) {
Log.e(TAG, "Failed to retrieve task info: ", e);
}
return info;
}
/**
* Returns the RecentTaskInfo for the task, if the ActivityManager succeeds in finding the task.
* @param task AppTask containing information about a task.
* @return The RecentTaskInfo associated with the task, or null if it couldn't be found.
*/
public static RecentTaskInfo getTaskInfoFromTask(AppTask task) {
RecentTaskInfo info = null;
try {
info = task.getTaskInfo();
} catch (IllegalArgumentException e) {
Log.e(TAG, "Failed to retrieve task info: ", e);
}
return info;
}