Extract common parts

This commit is contained in:
TacoTheDank 2020-07-11 19:11:18 -04:00
parent ecb551c971
commit cbea326846
2 changed files with 2 additions and 4 deletions

View File

@ -227,12 +227,11 @@ public class ProxyDialog {
if(required) {
testSuccessful = false;
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setText(R.string.proxy_test_label);
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);
} else {
testSuccessful = true;
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setText(android.R.string.ok);
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);
}
dialog.getButton(AlertDialog.BUTTON_POSITIVE).setEnabled(true);
}
private void test() {

View File

@ -183,15 +183,14 @@ public class PlaybackServiceNotificationBuilder {
notification.addAction(R.drawable.ic_notification_pause, //pause action
context.getString(R.string.pause_label),
pauseButtonPendingIntent);
compactActionList.add(numActions++);
} else {
PendingIntent playButtonPendingIntent = getPendingIntentForMediaAction(
KeyEvent.KEYCODE_MEDIA_PLAY, numActions);
notification.addAction(R.drawable.ic_notification_play, //play action
context.getString(R.string.play_label),
playButtonPendingIntent);
compactActionList.add(numActions++);
}
compactActionList.add(numActions++);
// ff follows play, then we have skip (if it's present)
PendingIntent ffButtonPendingIntent = getPendingIntentForMediaAction(