@Override
 public void writeToParcel(@NonNull Parcel dest, int flags) {
   super.writeToParcel(dest, flags);
   dest.writeInt(isFlashing ? 1 : 0);
   dest.writeInt(isConfigurationChanged ? 1 : 0);
   dest.writeLongArray(mmCurrentPlayTime);
 }
Exemplo n.º 2
0
 @Test
 public void testReadWriteLongArray() throws Exception {
   final long[] longs = {1, 2};
   parcel.writeLongArray(longs);
   final long[] longs2 = new long[longs.length];
   parcel.readLongArray(longs2);
   assertTrue(Arrays.equals(longs, longs2));
 }
Exemplo n.º 3
0
  public void writeToParcel(Parcel dest, int flags) {
    super.writeToParcel(dest, flags);

    dest.writeParcelable(user, flags);
    dest.writeLongArray(xValues);
    dest.writeTypedList(yValues);
    dest.writeInt(id);
  }
Exemplo n.º 4
0
  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeStringArray(new String[] {this.body, this.createdAt, this.mediaUrl});

    dest.writeLongArray(new long[] {this.id, this.numFavorites, this.numReTweets});

    dest.writeParcelable(user, 10);

    dest.writeBooleanArray(new boolean[] {this.favorited, this.retweeted});
  }
 @Override
 public void enqueue(long[] list, int action) throws android.os.RemoteException {
   android.os.Parcel _data = android.os.Parcel.obtain();
   android.os.Parcel _reply = android.os.Parcel.obtain();
   try {
     _data.writeInterfaceToken(DESCRIPTOR);
     _data.writeLongArray(list);
     _data.writeInt(action);
     mRemote.transact(Stub.TRANSACTION_enqueue, _data, _reply, 0);
     _reply.readException();
   } finally {
     _reply.recycle();
     _data.recycle();
   }
 }
 @Override
 public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags)
     throws android.os.RemoteException {
   switch (code) {
     case INTERFACE_TRANSACTION:
       {
         reply.writeString(DESCRIPTOR);
         return true;
       }
     case TRANSACTION_openFile:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _arg0;
         _arg0 = data.readString();
         boolean _arg1;
         _arg1 = (0 != data.readInt());
         this.openFile(_arg0, _arg1);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_openFileAsync:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _arg0;
         _arg0 = data.readString();
         this.openFileAsync(_arg0);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_open:
       {
         data.enforceInterface(DESCRIPTOR);
         long[] _arg0;
         _arg0 = data.createLongArray();
         int _arg1;
         _arg1 = data.readInt();
         this.open(_arg0, _arg1);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_getQueuePosition:
       {
         data.enforceInterface(DESCRIPTOR);
         int _result = this.getQueuePosition();
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
     case TRANSACTION_isPlaying:
       {
         data.enforceInterface(DESCRIPTOR);
         boolean _result = this.isPlaying();
         reply.writeNoException();
         reply.writeInt(((_result) ? (1) : (0)));
         return true;
       }
     case TRANSACTION_stop:
       {
         data.enforceInterface(DESCRIPTOR);
         this.stop();
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_pause:
       {
         data.enforceInterface(DESCRIPTOR);
         this.pause();
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_play:
       {
         data.enforceInterface(DESCRIPTOR);
         this.play();
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_prev:
       {
         data.enforceInterface(DESCRIPTOR);
         this.prev();
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_next:
       {
         data.enforceInterface(DESCRIPTOR);
         this.next();
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_duration:
       {
         data.enforceInterface(DESCRIPTOR);
         long _result = this.duration();
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_position:
       {
         data.enforceInterface(DESCRIPTOR);
         long _result = this.position();
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_seek:
       {
         data.enforceInterface(DESCRIPTOR);
         long _arg0;
         _arg0 = data.readLong();
         long _result = this.seek(_arg0);
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_getTrackName:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _result = this.getTrackName();
         reply.writeNoException();
         reply.writeString(_result);
         return true;
       }
     case TRANSACTION_getAlbumName:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _result = this.getAlbumName();
         reply.writeNoException();
         reply.writeString(_result);
         return true;
       }
     case TRANSACTION_getAlbumId:
       {
         data.enforceInterface(DESCRIPTOR);
         long _result = this.getAlbumId();
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_getArtistName:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _result = this.getArtistName();
         reply.writeNoException();
         reply.writeString(_result);
         return true;
       }
     case TRANSACTION_getArtistId:
       {
         data.enforceInterface(DESCRIPTOR);
         long _result = this.getArtistId();
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_enqueue:
       {
         data.enforceInterface(DESCRIPTOR);
         long[] _arg0;
         _arg0 = data.createLongArray();
         int _arg1;
         _arg1 = data.readInt();
         this.enqueue(_arg0, _arg1);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_getQueue:
       {
         data.enforceInterface(DESCRIPTOR);
         long[] _result = this.getQueue();
         reply.writeNoException();
         reply.writeLongArray(_result);
         return true;
       }
     case TRANSACTION_moveQueueItem:
       {
         data.enforceInterface(DESCRIPTOR);
         int _arg0;
         _arg0 = data.readInt();
         int _arg1;
         _arg1 = data.readInt();
         this.moveQueueItem(_arg0, _arg1);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_setQueuePosition:
       {
         data.enforceInterface(DESCRIPTOR);
         int _arg0;
         _arg0 = data.readInt();
         this.setQueuePosition(_arg0);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_getPath:
       {
         data.enforceInterface(DESCRIPTOR);
         java.lang.String _result = this.getPath();
         reply.writeNoException();
         reply.writeString(_result);
         return true;
       }
     case TRANSACTION_getAudioId:
       {
         data.enforceInterface(DESCRIPTOR);
         long _result = this.getAudioId();
         reply.writeNoException();
         reply.writeLong(_result);
         return true;
       }
     case TRANSACTION_setShuffleMode:
       {
         data.enforceInterface(DESCRIPTOR);
         int _arg0;
         _arg0 = data.readInt();
         this.setShuffleMode(_arg0);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_getShuffleMode:
       {
         data.enforceInterface(DESCRIPTOR);
         int _result = this.getShuffleMode();
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
     case TRANSACTION_removeTracks:
       {
         data.enforceInterface(DESCRIPTOR);
         int _arg0;
         _arg0 = data.readInt();
         int _arg1;
         _arg1 = data.readInt();
         int _result = this.removeTracks(_arg0, _arg1);
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
     case TRANSACTION_removeTrack:
       {
         data.enforceInterface(DESCRIPTOR);
         long _arg0;
         _arg0 = data.readLong();
         int _result = this.removeTrack(_arg0);
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
     case TRANSACTION_setRepeatMode:
       {
         data.enforceInterface(DESCRIPTOR);
         int _arg0;
         _arg0 = data.readInt();
         this.setRepeatMode(_arg0);
         reply.writeNoException();
         return true;
       }
     case TRANSACTION_getRepeatMode:
       {
         data.enforceInterface(DESCRIPTOR);
         int _result = this.getRepeatMode();
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
     case TRANSACTION_getMediaMountedCount:
       {
         data.enforceInterface(DESCRIPTOR);
         int _result = this.getMediaMountedCount();
         reply.writeNoException();
         reply.writeInt(_result);
         return true;
       }
   }
   return super.onTransact(code, data, reply, flags);
 }