(String title, final Bundle args, final SimpleTask<Void> move, final SimpleTask<Void> show)
| 1519 | } |
| 1520 | |
| 1521 | public void undo(String title, final Bundle args, final SimpleTask<Void> move, final SimpleTask<Void> show) { |
| 1522 | SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); |
| 1523 | int undo_timeout = prefs.getInt("undo_timeout", 5000); |
| 1524 | |
| 1525 | if (undo_timeout == 0) { |
| 1526 | if (move != null) { |
| 1527 | move.execute(this, args, "undo:move"); |
| 1528 | show.cancel(this); |
| 1529 | } |
| 1530 | } else |
| 1531 | undo(undo_timeout, title, args, move, show); |
| 1532 | } |
| 1533 | |
| 1534 | private Snackbar undo(long undo_timeout, String title, final Bundle args, final SimpleTask move, final SimpleTask show) { |
| 1535 | if (drawerLayout == null || drawerLayout.getChildCount() == 0) { |
no test coverage detected