Search in sources :

Example 96 with Parcel

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

the class ActivityManagerProxy method peekService.

public IBinder peekService(Intent service, String resolvedType) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    service.writeToParcel(data, 0);
    data.writeString(resolvedType);
    mRemote.transact(PEEK_SERVICE_TRANSACTION, data, reply, 0);
    reply.readException();
    IBinder binder = reply.readStrongBinder();
    reply.recycle();
    data.recycle();
    return binder;
}
Also used : IBinder(android.os.IBinder) Parcel(android.os.Parcel)

Example 97 with Parcel

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

the class ActivityManagerProxy method startActivityIntentSender.

public int startActivityIntentSender(IApplicationThread caller, IntentSender intent, Intent fillInIntent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flagsMask, int flagsValues, Bundle options) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(caller != null ? caller.asBinder() : null);
    intent.writeToParcel(data, 0);
    if (fillInIntent != null) {
        data.writeInt(1);
        fillInIntent.writeToParcel(data, 0);
    } else {
        data.writeInt(0);
    }
    data.writeString(resolvedType);
    data.writeStrongBinder(resultTo);
    data.writeString(resultWho);
    data.writeInt(requestCode);
    data.writeInt(flagsMask);
    data.writeInt(flagsValues);
    if (options != null) {
        data.writeInt(1);
        options.writeToParcel(data, 0);
    } else {
        data.writeInt(0);
    }
    mRemote.transact(START_ACTIVITY_INTENT_SENDER_TRANSACTION, data, reply, 0);
    reply.readException();
    int result = reply.readInt();
    reply.recycle();
    data.recycle();
    return result;
}
Also used : Parcel(android.os.Parcel)

Example 98 with Parcel

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

the class ActivityManagerProxy method stopService.

public int stopService(IApplicationThread caller, Intent service, String resolvedType, int userId) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(caller != null ? caller.asBinder() : null);
    service.writeToParcel(data, 0);
    data.writeString(resolvedType);
    data.writeInt(userId);
    mRemote.transact(STOP_SERVICE_TRANSACTION, data, reply, 0);
    reply.readException();
    int res = reply.readInt();
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel)

Example 99 with Parcel

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

the class ApplicationThreadProxy method scheduleWindowVisibility.

public final void scheduleWindowVisibility(IBinder token, boolean showWindow) throws RemoteException {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(IApplicationThread.descriptor);
    data.writeStrongBinder(token);
    data.writeInt(showWindow ? 1 : 0);
    mRemote.transact(SCHEDULE_WINDOW_VISIBILITY_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
    data.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 100 with Parcel

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

the class ApplicationThreadProxy method scheduleSleeping.

public final void scheduleSleeping(IBinder token, boolean sleeping) throws RemoteException {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(IApplicationThread.descriptor);
    data.writeStrongBinder(token);
    data.writeInt(sleeping ? 1 : 0);
    mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
    data.recycle();
}
Also used : Parcel(android.os.Parcel)

Aggregations

Parcel (android.os.Parcel)3232 Point (android.graphics.Point)263 SmallTest (android.test.suitebuilder.annotation.SmallTest)152 RemoteException (android.os.RemoteException)109 IBinder (android.os.IBinder)98 IOException (java.io.IOException)83 FileOutputStream (java.io.FileOutputStream)63 File (java.io.File)51 Bundle (android.os.Bundle)50 SmallTest (android.support.test.filters.SmallTest)49 Test (org.junit.Test)47 ArrayList (java.util.ArrayList)40 ParcelFileDescriptor (android.os.ParcelFileDescriptor)35 ComponentName (android.content.ComponentName)31 Intent (android.content.Intent)28 KeyphraseRecognitionEvent (android.hardware.soundtrigger.SoundTrigger.KeyphraseRecognitionEvent)28 Keyphrase (android.hardware.soundtrigger.SoundTrigger.Keyphrase)24 FileInputStream (java.io.FileInputStream)24 KeyphraseSoundModel (android.hardware.soundtrigger.SoundTrigger.KeyphraseSoundModel)20 ParcelUuid (android.os.ParcelUuid)20