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();
}
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();
}
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;
}
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();
}
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();
}
Aggregations