本文整理汇总了Java中net.sourceforge.servestream.utils.MusicUtils.sService方法的典型用法代码示例。如果您正苦于以下问题:Java MusicUtils.sService方法的具体用法?Java MusicUtils.sService怎么用?Java MusicUtils.sService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.servestream.utils.MusicUtils
的用法示例。
在下文中一共展示了MusicUtils.sService方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removePlaylistItem
import net.sourceforge.servestream.utils.MusicUtils; //导入方法依赖的package包/类
private void removePlaylistItem(int which) {
View v = mList.getChildAt(which - mList.getFirstVisiblePosition());
if (v == null) {
Log.d(TAG, "No view when removing playlist item " + which);
return;
}
try {
if (MusicUtils.sService != null
&& which != MusicUtils.sService.getQueuePosition()) {
mDeletedOneRow = true;
}
} catch (RemoteException e) {
// Service died, so nothing playing.
mDeletedOneRow = true;
}
v.setVisibility(View.GONE);
mList.invalidateViews();
((NowPlayingCursor)mTrackCursor).removeItem(which);
v.setVisibility(View.VISIBLE);
mList.invalidateViews();
}
示例2: getTrackCursor
import net.sourceforge.servestream.utils.MusicUtils; //导入方法依赖的package包/类
private Cursor getTrackCursor(TrackListAdapter.TrackQueryHandler queryhandler, String filter,
boolean async) {
if (queryhandler == null) {
throw new IllegalArgumentException();
}
Cursor ret = null;
if (MusicUtils.sService != null) {
ret = new NowPlayingCursor(MusicUtils.sService, mCursorCols);
if (ret.getCount() == 0) {
finish();
}
} else {
// Nothing is playing.
}
// This special case is for the "nowplaying" cursor, which cannot be handled
// asynchronously using AsyncQueryHandler, so we do some extra initialization here.
if (ret != null && async) {
init(ret, false);
}
return ret;
}
示例3: removePlaylistItem
import net.sourceforge.servestream.utils.MusicUtils; //导入方法依赖的package包/类
private void removePlaylistItem(int which) {
View v = getListView().getChildAt(which - getListView().getFirstVisiblePosition());
if (v == null) {
Log.d(TAG, "No view when removing playlist item " + which);
return;
}
try {
if (MusicUtils.sService != null
&& which != MusicUtils.sService.getQueuePosition()) {
mDeletedOneRow = true;
}
} catch (RemoteException e) {
// Service died, so nothing playing.
mDeletedOneRow = true;
}
v.setVisibility(View.GONE);
getListView().invalidateViews();
((NowPlayingCursor)mTrackCursor).removeItem(which);
v.setVisibility(View.VISIBLE);
getListView().invalidateViews();
}