Re: [android-developers] modify the RecentTasks List

2009-12-07 Thread Dianne Hackborn
Though the code being discussed here is not part of the SDK, so you may want
to post to android-porting if you are talking about modifying the platform.

On Sun, Dec 6, 2009 at 10:21 PM, Romain Guy romain...@android.com wrote:

 Hi,

 No you cannot modify this list.

 On Sun, Dec 6, 2009 at 6:51 AM, Tung wongchunt...@gmail.com wrote:
  I know I can get recent tasks list by using
  ActivityManager - public ListRecentTaskInfo 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 ListActivityManager.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();
 ArrayListActivityManager.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 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 



 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  All such questions should be posted on
 public forums, where I and others can see and answer them

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] modify the RecentTasks List

2009-12-06 Thread Romain Guy
Hi,

No you cannot modify this list.

On Sun, Dec 6, 2009 at 6:51 AM, Tung wongchunt...@gmail.com wrote:
 I know I can get recent tasks list by using
 ActivityManager - public ListRecentTaskInfo 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 ListActivityManager.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();
        ArrayListActivityManager.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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en