mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-05 08:33:07 +00:00
Tried to mitigate the random crash on opening
This commit is contained in:
@@ -20,6 +20,7 @@ public class App extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
CrashReporter.initialize(this);
|
||||
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
|
||||
|
||||
@@ -237,6 +237,7 @@ public class MusicService extends Service implements Playback.PlaybackCallbacks
|
||||
}
|
||||
|
||||
private void restoreState() {
|
||||
try {
|
||||
QueueRepository queueRepository = new QueueRepository(App.getInstance());
|
||||
List<Song> restoredQueue = queueRepository.getSongs();
|
||||
|
||||
@@ -255,6 +256,9 @@ public class MusicService extends Service implements Playback.PlaybackCallbacks
|
||||
handleChangeInternal(META_CHANGED);
|
||||
handleChangeInternal(QUEUE_CHANGED);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void quit() {
|
||||
|
||||
Reference in New Issue
Block a user