Lines Matching refs:item

96                 PlaylistItem item = mPlaylist.get(i);  in updateStatus()  local
97 mPlayer.getStatus(item, (i == mPlaylist.size() - 1) /* update */); in updateStatus()
119 PlaylistItem item = new PlaylistItem( in add() local
121 mPlaylist.add(item); in add()
126 mPlayer.enqueue(item); in add()
129 return item; in add()
148 PlaylistItem item = getCurrentItem(); in seek() local
149 if (pos != item.getPosition()) { in seek()
150 item.setPosition(pos); in seek()
151 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in seek()
152 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in seek()
153 mPlayer.seek(item); in seek()
156 return item; in seek()
169 for (PlaylistItem item : mPlaylist) { in getStatus()
170 if (item.getItemId().equals(iid)) { in getStatus()
171 if (item == getCurrentItem()) { in getStatus()
172 mPlayer.getStatus(item, false); in getStatus()
174 return item; in getStatus()
239 for (PlaylistItem item : mPlaylist) { in suspend()
240 item.setRemoteItemId(null); in suspend()
241 item.setDuration(0); in suspend()
243 PlaylistItem item = getCurrentItem(); in suspend() local
245 log("suspend: item=" + item + ", pos=" + pos); in suspend()
247 if (item != null) { in suspend()
248 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in suspend()
249 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in suspend()
250 item.setState(MediaItemStatus.PLAYBACK_STATE_PENDING); in suspend()
251 item.setPosition(pos); in suspend()
264 for (PlaylistItem item : mPlaylist) { in unsuspend()
265 mPlayer.enqueue(item); in unsuspend()
318 PlaylistItem item = getCurrentItem(); in checkItemCurrent() local
319 if (item == null || !item.getItemId().equals(iid)) { in checkItemCurrent()
325 PlaylistItem item = getCurrentItem(); in updatePlaybackState() local
326 if (item != null) { in updatePlaybackState()
327 if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PENDING) { in updatePlaybackState()
328 item.setState(mPaused ? MediaItemStatus.PLAYBACK_STATE_PAUSED in updatePlaybackState()
331 mPlayer.play(item); in updatePlaybackState()
333 } else if (mPaused && item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING) { in updatePlaybackState()
335 item.setState(MediaItemStatus.PLAYBACK_STATE_PAUSED); in updatePlaybackState()
336 } else if (!mPaused && item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED) { in updatePlaybackState()
338 item.setState(MediaItemStatus.PLAYBACK_STATE_PLAYING); in updatePlaybackState()
342 mCallback.onItemChanged(item); in updatePlaybackState()
353 for (PlaylistItem item : mPlaylist) { in removeItem()
354 if (iid.equals(item.getItemId())) { in removeItem()
356 mPlayer.remove(item.getRemoteItemId()); in removeItem()
357 } else if (item.getState() == MediaItemStatus.PLAYBACK_STATE_PLAYING in removeItem()
358 || item.getState() == MediaItemStatus.PLAYBACK_STATE_PAUSED){ in removeItem()
361 item.setState(state); in removeItem()
362 found = item; in removeItem()
368 queue.add(item); in removeItem()
381 PlaylistItem item = getCurrentItem(); in finishItem() local
382 if (item != null) { in finishItem()
383 removeItem(item.getItemId(), error ? in finishItem()
406 for (PlaylistItem item : mPlaylist) { in toString()
407 result += "\n" + item.toString(); in toString()
417 void onItemChanged(PlaylistItem item); in onItemChanged() argument