Removed app context for PreferenceUtil class
This commit is contained in:
parent
5df5f6c93e
commit
2bbe39eab7
97 changed files with 397 additions and 456 deletions
|
@ -45,7 +45,7 @@ class TopExceptionHandler() : Thread.UncaughtExceptionHandler {
|
|||
}
|
||||
}
|
||||
report += "-------------------------------\n\n"
|
||||
ActivityCompat.startActivity(App.context, Intent(App.context, ErrorHandlerActivity::class.java)
|
||||
ActivityCompat.startActivity(App.getContext(), Intent(App.getContext(), ErrorHandlerActivity::class.java)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.putExtra("error", report), null)
|
||||
defaultUEH.uncaughtException(t, e)
|
||||
|
|
|
@ -209,7 +209,7 @@ object MusicPlayerRemote {
|
|||
fun openQueue(queue: ArrayList<Song>, startPosition: Int, startPlaying: Boolean) {
|
||||
if (!tryToHandleOpenPlayingQueue(queue, startPosition, startPlaying) && musicService != null) {
|
||||
musicService!!.openQueue(queue, startPosition, startPlaying)
|
||||
if (PreferenceUtil.getInstance().isShuffleModeOn)
|
||||
if (PreferenceUtil.getInstance(musicService).isShuffleModeOn)
|
||||
setShuffleMode(MusicService.SHUFFLE_MODE_NONE)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,8 +87,8 @@ object PlaylistMenuHelper {
|
|||
private class SavePlaylistAsyncTask internal constructor(context: Context) : WeakContextAsyncTask<Playlist, String, String>(context) {
|
||||
|
||||
override fun doInBackground(vararg params: Playlist): String {
|
||||
return String.format(App.instance.applicationContext.getString(R.string
|
||||
.saved_playlist_to), PlaylistsUtil.savePlaylist(App.instance.applicationContext, params[0]))
|
||||
return String.format(App.getContext().getString(R.string
|
||||
.saved_playlist_to), PlaylistsUtil.savePlaylist(App.getContext(), params[0]))
|
||||
}
|
||||
|
||||
override fun onPostExecute(string: String) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue