Search in sources :

Example 16 with Parcel

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

the class ActivityManagerProxy method startRunning.

public void startRunning(String pkg, String cls, String action, String indata) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeString(pkg);
    data.writeString(cls);
    data.writeString(action);
    data.writeString(indata);
    mRemote.transact(START_RUNNING_TRANSACTION, data, reply, 0);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 17 with Parcel

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

the class ActivityManagerProxy method serviceDoneExecuting.

public void serviceDoneExecuting(IBinder token, int type, int startId, int res) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeStrongBinder(token);
    data.writeInt(type);
    data.writeInt(startId);
    data.writeInt(res);
    mRemote.transact(SERVICE_DONE_EXECUTING_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 18 with Parcel

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

the class ActivityManagerProxy method profileControl.

public boolean profileControl(String process, int userId, boolean start, String path, ParcelFileDescriptor fd, int profileType) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeString(process);
    data.writeInt(userId);
    data.writeInt(start ? 1 : 0);
    data.writeInt(profileType);
    data.writeString(path);
    if (fd != null) {
        data.writeInt(1);
        fd.writeToParcel(data, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
    } else {
        data.writeInt(0);
    }
    mRemote.transact(PROFILE_CONTROL_TRANSACTION, data, reply, 0);
    reply.readException();
    boolean res = reply.readInt() != 0;
    reply.recycle();
    data.recycle();
    return res;
}
Also used : Parcel(android.os.Parcel)

Example 19 with Parcel

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

the class ActivityManagerProxy method killBackgroundProcesses.

public void killBackgroundProcesses(String packageName, int userId) throws RemoteException {
    Parcel data = Parcel.obtain();
    Parcel reply = Parcel.obtain();
    data.writeInterfaceToken(IActivityManager.descriptor);
    data.writeString(packageName);
    data.writeInt(userId);
    mRemote.transact(KILL_BACKGROUND_PROCESSES_TRANSACTION, data, reply, 0);
    reply.readException();
    data.recycle();
    reply.recycle();
}
Also used : Parcel(android.os.Parcel)

Example 20 with Parcel

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

the class ActivityManagerProxy method unregisterUserSwitchObserver.

public void unregisterUserSwitchObserver(IUserSwitchObserver 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_USER_SWITCH_OBSERVER_TRANSACTION, data, reply, 0);
    reply.readException();
    data.recycle();
    reply.recycle();
}
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