Search in sources :

Example 26 with Parcel

use of android.os.Parcel in project android_frameworks_base by ParanoidAndroid.

the class ActivityManagerProxy method unregisterProcessObserver.

public void unregisterProcessObserver(IProcessObserver observer) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(observer != null ? observer.asBinder() : null);
    mRemote.transact(UNREGISTER_PROCESS_OBSERVER_TRANSACTION, data, reply, 0);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 27 with Parcel

use of android.os.Parcel in project android_frameworks_base by ParanoidAndroid.

the class ActivityManagerProxy method startActivities.

public int startActivities(IApplicationThread caller, String callingPackage, Intent[] intents, String[] resolvedTypes, IBinder resultTo, Bundle options, int userId) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(caller != null ? caller.asBinder() : null);
    data.writeString(callingPackage);
    data.writeTypedArray(intents, 0);
    data.writeStringArray(resolvedTypes);
    data.writeStrongBinder(resultTo);
    if (options != null) {
        data.writeInt(1);
        options.writeToParcel(data, 0);
    } else {
        data.writeInt(0);
    }
    data.writeInt(userId);
    mRemote.transact(START_ACTIVITIES_TRANSACTION, data, reply, 0);
    reply.readException();
    int result = reply.readInt();
    reply.recycle();
    data.recycle();
    return result;
}
Also used : Parcel(android.os.Parcel)

Example 28 with Parcel

use of android.os.Parcel in project android_frameworks_base by ParanoidAndroid.

the class ActivityManagerProxy method finishReceiver.

public void finishReceiver(IBinder who, int resultCode, String resultData, Bundle map, boolean abortBroadcast) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(who);
    data.writeInt(resultCode);
    data.writeString(resultData);
    data.writeBundle(map);
    data.writeInt(abortBroadcast ? 1 : 0);
    mRemote.transact(FINISH_RECEIVER_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 29 with Parcel

use of android.os.Parcel in project android_frameworks_base by ParanoidAndroid.

the class ActivityManagerProxy method activityDestroyed.

public void activityDestroyed(IBinder token) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(token);
    mRemote.transact(ACTIVITY_DESTROYED_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 30 with Parcel

use of android.os.Parcel in project android_frameworks_base by ParanoidAndroid.

the class ActivityManagerProxy method getRecentTasks.

public List<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum, int flags, int userId) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeInt(maxNum);
    data.writeInt(flags);
    data.writeInt(userId);
    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;
}
Also used : Parcel(android.os.Parcel)

Aggregations

Parcel (android.os.Parcel)3542 Point (android.graphics.Point)263 Test (org.junit.Test)215 SmallTest (android.test.suitebuilder.annotation.SmallTest)163 RemoteException (android.os.RemoteException)139 IBinder (android.os.IBinder)120 IOException (java.io.IOException)105 FileOutputStream (java.io.FileOutputStream)72 File (java.io.File)69 Bundle (android.os.Bundle)56 Intent (android.content.Intent)51 SmallTest (android.support.test.filters.SmallTest)51 ArrayList (java.util.ArrayList)49 ParcelFileDescriptor (android.os.ParcelFileDescriptor)35 FileInputStream (java.io.FileInputStream)34 ComponentName (android.content.ComponentName)33 KeyphraseRecognitionEvent (android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionEvent)28 Keyphrase (android.hardware.soundtrigger.SoundTrigger.Keyphrase)24 KeyphraseSoundModel (android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel)20 Uri (android.net.Uri)20