Java Code Examples for android.os.Parcel.writeInt()

The following are Jave code examples for showing how to use writeInt() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: letv   File: RemoteDeviceManager.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 2
Project: letv   File: d.java   View Source Code Vote up 6 votes
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();
    }
}
 
Example 3
Project: SunmiUI   File: ProgressWheel.java   View Source Code Vote up 5 votes
@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));
}
 
Example 4
Project: okwallet   File: PaymentIntent.java   View Source Code Vote up 5 votes
@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);
}
 
Example 5
Project: FontProvider   File: FontInfo.java   View Source Code Vote up 5 votes
@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);
}
 
Example 6
Project: MainCalendar   File: ShiftsWorkRecord.java   View Source Code Vote up 5 votes
@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);
}
 
Example 7
Project: Sega   File: SearchView.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeString(query);
    out.writeInt(isSearchOpen ? 1 : 0);
    out.writeList(searchFiltersStates);
}
 
Example 8
Project: moebooru-android   File: TagBean.java   View Source Code Vote up 5 votes
@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);
}
 
Example 9
Project: SimpleUILauncher   File: ActivityResultInfo.java   View Source Code Vote up 5 votes
@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);
    }
}
 
Example 10
Project: IPCInvoker   File: XParcelableWrapper.java   View Source Code Vote up 5 votes
@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);
    }
}
 
Example 11
Project: letv   File: IMediaControllerCallback.java   View Source Code Vote up 5 votes
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();
    }
}
 
Example 12
Project: FileDownloader-master   File: SmallMessageSnapshot.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(this.sofarBytes);
    dest.writeInt(this.totalBytes);
}
 
Example 13
Project: letv   File: MediaBrowserCompat.java   View Source Code Vote up 4 votes
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(this.mFlags);
    this.mDescription.writeToParcel(out, flags);
}
 
Example 14
Project: SimpleUILauncher   File: PagedView.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(currentPage);
}
 
Example 15
Project: MeetMusic   File: FolderInfo.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(this.name);
    dest.writeString(this.path);
    dest.writeInt(this.count);
}
 
Example 16
Project: TreasureHunting   File: AudioPoint.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);
    dest.writeInt(Radius);
    dest.writeParcelable(Direction, flags);
}
 
Example 17
Project: aarLibrary   File: ResultRecord.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(requestCode);
    dest.writeInt(resultCode);
    dest.writeBundle(resultBundle);
}
 
Example 18
Project: Hands-On-Android-UI-Development   File: Allowance.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(amountPerDay);
    dest.writeTypedList(items);
}
 
Example 19
Project: TextReader   File: DirectionalViewpager.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeInt(position);
    out.writeParcelable(adapterState, flags);
}
 
Example 20
Project: Trackr   File: UserHasFriend.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.friendId);
    dest.writeInt(this.permissionStatus);
    dest.writeInt(this.userId);
}