setup for version 0.7.0
This commit is contained in:
parent
72289ced39
commit
c89dc4ba5b
5 changed files with 25 additions and 26 deletions
|
|
@ -301,7 +301,8 @@ class ActionBarHandler {
|
|||
boolean externalAudioPlayer = PreferenceManager.getDefaultSharedPreferences(activity)
|
||||
.getBoolean(activity.getString(R.string.useExternalAudioPlayer), false);
|
||||
Intent intent;
|
||||
if (!externalAudioPlayer)//internal (background) music player: explicit intent
|
||||
|
||||
if (!externalAudioPlayer && android.os.Build.VERSION.SDK_INT >= 18)//internal music player: explicit intent
|
||||
{
|
||||
intent = new Intent(activity, BackgroundPlayer.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -221,14 +221,18 @@ public class BackgroundPlayer extends Service /*implements MediaPlayer.OnPrepare
|
|||
};
|
||||
|
||||
private void afterPlayCleanup() {
|
||||
//noteBuilder.setProgress(0, 0, false);//remove progress bar
|
||||
noteMgr.cancel(noteID);//remove notification
|
||||
//noteBuilder.setProgress(0, 0, false);
|
||||
//remove progress bar
|
||||
//remove notification
|
||||
noteMgr.cancel(noteID);
|
||||
unregisterReceiver(broadcastReceiver);
|
||||
mediaPlayer.release();//release mediaPlayer's system resources
|
||||
//release mediaPlayer's system resources
|
||||
mediaPlayer.release();
|
||||
|
||||
|
||||
wifiLock.release();//release wifilock
|
||||
stopForeground(true);//remove foreground status of service; make us killable
|
||||
//release wifilock
|
||||
wifiLock.release();
|
||||
//remove foreground status of service; make us killable
|
||||
stopForeground(true);
|
||||
|
||||
stopSelf();
|
||||
}
|
||||
|
|
@ -245,11 +249,4 @@ public class BackgroundPlayer extends Service /*implements MediaPlayer.OnPrepare
|
|||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
private class ListenerThread extends Thread implements AudioManager.OnAudioFocusChangeListener {
|
||||
@Override
|
||||
public void onAudioFocusChange(int focusChange) {
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,14 +116,13 @@ public class VideoItemListFragment extends ListFragment {
|
|||
});
|
||||
}
|
||||
getActivity().runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
|
||||
public void run() {
|
||||
getListView().removeFooterView(footer);
|
||||
}
|
||||
}
|
||||
|
||||
);
|
||||
@Override
|
||||
public void run() {
|
||||
if (android.os.Build.VERSION.SDK_INT >= 19) {
|
||||
getListView().removeFooterView(footer);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -198,6 +197,8 @@ public class VideoItemListFragment extends ListFragment {
|
|||
videoListAdapter.clearVideoList();
|
||||
setListShown(false);
|
||||
startSearch(query, lastPage);
|
||||
//todo: Somehow this command is not working on older devices,
|
||||
// although it was introduced with API level 8. Test this and find a solution.
|
||||
getListView().smoothScrollToPosition(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue