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