I know I can get recent tasks list by using
ActivityManager - public List<RecentTaskInfo> getRecentTasks(int
maxNum, int flags);
but can I modfiy it?
I also check the source code to find out the storage of recent tasks.
but I cannot understand it. Where the recent tasks from?
I want to add a method setRecentTasks to ActivityManagerNative.java
ActivityManagerNative.java
public List<ActivityManager.RecentTaskInfo> getRecentTasks(int
maxNum,
int flags) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(maxNum);
data.writeInt(flags);
mRemote.transact(GET_RECENT_TASKS_TRANSACTION, data, reply,
0);
reply.readException();
ArrayList<ActivityManager.RecentTaskInfo> list
= reply.createTypedArrayList
(ActivityManager.RecentTaskInfo.CREATOR);
data.recycle();
reply.recycle();
return list;
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en