本文整理汇总了Java中android.os.Parcel.writeInt方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.writeInt方法的具体用法?Java Parcel.writeInt怎么用?Java Parcel.writeInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.writeInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: scanDevices
import android.os.Parcel; //导入方法依赖的package包/类
public void scanDevices(PendingIntent resultIntent) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (resultIntent != null) {
_data.writeInt(1);
resultIntent.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(1, _data, _reply, 0);
ExceptionUtils.readExceptionFromParcel(_reply);
} finally {
_reply.recycle();
_data.recycle();
}
}
示例2: a
import android.os.Parcel; //导入方法依赖的package包/类
public final int a(String str, int i) {
Parcel obtain = Parcel.obtain();
Parcel obtain2 = Parcel.obtain();
try {
obtain.writeInterfaceToken(z);
obtain.writeString(str);
obtain.writeInt(i);
this.a.transact(2, obtain, obtain2, 0);
obtain2.readException();
int readInt = obtain2.readInt();
return readInt;
} finally {
obtain2.recycle();
obtain.recycle();
}
}
示例3: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeFloat(this.mProgress);
out.writeFloat(this.mTargetProgress);
out.writeByte((byte) (isSpinning ? 1 : 0));
out.writeFloat(this.spinSpeed);
out.writeInt(this.barWidth);
out.writeInt(this.barColor);
out.writeInt(this.rimWidth);
out.writeInt(this.rimColor);
out.writeInt(this.circleRadius);
out.writeByte((byte) (linearProgress ? 1 : 0));
out.writeByte((byte) (fillRadius ? 1 : 0));
}
示例4: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(final Parcel dest, final int flags) {
dest.writeSerializable(amount);
final byte[] program = script.getProgram();
dest.writeInt(program.length);
dest.writeByteArray(program);
}
示例5: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.name);
dest.writeInt(this.weight);
dest.writeByte(this.italic ? (byte) 1 : (byte) 0);
dest.writeString(this.ttc);
dest.writeStringArray(this.ttf);
}
示例6: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeLong(this.mIndex);
dest.writeString(this.mTitle);
dest.writeSerializable(this.mStartDate);
dest.writeInt(this.mPeriod);
dest.writeTypedList(this.mItems);
dest.writeSerializable(this.mCreateTime);
dest.writeByte(this.mIsNew ? (byte) 1 : (byte) 0);
}
示例7: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeString(query);
out.writeInt(isSearchOpen ? 1 : 0);
out.writeList(searchFiltersStates);
}
示例8: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this._id);
parcel.writeLong(this.id);
parcel.writeString(this.name);
parcel.writeInt(this.count);
parcel.writeInt(this.type);
}
示例9: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(requestCode);
dest.writeInt(resultCode);
if (data != null) {
dest.writeInt(1);
data.writeToParcel(dest, flags);
} else {
dest.writeInt(0);
}
}
示例10: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
if (target != null) {
dest.writeInt(HAS_DATA);
dest.writeString(target.getClass().getName());
target.writeToParcel(dest);
} else {
dest.writeInt(NO_DATA);
}
}
示例11: onMetadataChanged
import android.os.Parcel; //导入方法依赖的package包/类
public void onMetadataChanged(MediaMetadataCompat metadata) throws RemoteException {
Parcel _data = Parcel.obtain();
try {
_data.writeInterfaceToken(Stub.DESCRIPTOR);
if (metadata != null) {
_data.writeInt(1);
metadata.writeToParcel(_data, 0);
} else {
_data.writeInt(0);
}
this.mRemote.transact(4, _data, null, 1);
} finally {
_data.recycle();
}
}
示例12: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(this.sofarBytes);
dest.writeInt(this.totalBytes);
}
示例13: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel out, int flags) {
out.writeInt(this.mFlags);
this.mDescription.writeToParcel(out, flags);
}
示例14: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(currentPage);
}
示例15: writeToParcel
import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.name);
dest.writeString(this.path);
dest.writeInt(this.count);
}