From e5c9a7b56663c3fa81931bafbdb678f5b18fc432 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Sun, 5 Mar 2017 00:53:36 -0500 Subject: [PATCH] Remove promptRestoreFromRemoteQueue --- .../activity/SubsonicFragmentActivity.java | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/app/src/main/java/net/nullsum/audinaut/activity/SubsonicFragmentActivity.java b/app/src/main/java/net/nullsum/audinaut/activity/SubsonicFragmentActivity.java index 571ad1e..8d47635 100644 --- a/app/src/main/java/net/nullsum/audinaut/activity/SubsonicFragmentActivity.java +++ b/app/src/main/java/net/nullsum/audinaut/activity/SubsonicFragmentActivity.java @@ -746,68 +746,8 @@ public class SubsonicFragmentActivity extends SubsonicActivity implements Downlo return null; } - - @Override - protected void done(Void arg) { - if(!context.isDestroyedCompat() && playerQueue != null) { - promptRestoreFromRemoteQueue(playerQueue); - } - } }.execute(); } - private void promptRestoreFromRemoteQueue(final PlayerQueue remoteState) { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - String message = getResources().getString(R.string.common_confirm_message, Util.formatDate(remoteState.changed)); - builder.setIcon(android.R.drawable.ic_dialog_alert) - .setTitle(R.string.common_confirm) - .setMessage(message) - .setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - new SilentBackgroundTask(SubsonicFragmentActivity.this) { - @Override - protected Void doInBackground() throws Throwable { - DownloadService downloadService = getDownloadService(); - downloadService.clear(); - downloadService.download(remoteState.songs, false, false, false, false, remoteState.currentPlayingIndex, remoteState.currentPlayingPosition); - return null; - } - }.execute(); - } - }) - .setNeutralButton(R.string.common_cancel, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - new SilentBackgroundTask(SubsonicFragmentActivity.this) { - @Override - protected Void doInBackground() throws Throwable { - DownloadService downloadService = getDownloadService(); - downloadService.serializeQueue(false); - return null; - } - }.execute(); - } - }) - .setNegativeButton(R.string.common_never, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialogInterface, int i) { - new SilentBackgroundTask(SubsonicFragmentActivity.this) { - @Override - protected Void doInBackground() throws Throwable { - DownloadService downloadService = getDownloadService(); - downloadService.serializeQueue(false); - - SharedPreferences.Editor editor = Util.getPreferences(SubsonicFragmentActivity.this).edit(); - editor.putBoolean(Constants.PREFERENCES_KEY_RESUME_PLAY_QUEUE_NEVER, true); - editor.commit(); - return null; - } - }.execute(); - } - }); - - builder.create().show(); - } private void createAccount() { final Context context = this;