Prevent force close in some cases when boarded departure has expired
This commit is contained in:
parent
6ac9a2ece4
commit
94ed29467d
@ -591,6 +591,13 @@ public class ViewDeparturesActivity extends SActivity implements
|
|||||||
final BartRunnerApplication application = (BartRunnerApplication) getApplication();
|
final BartRunnerApplication application = (BartRunnerApplication) getApplication();
|
||||||
final Departure boardedDeparture = application
|
final Departure boardedDeparture = application
|
||||||
.getBoardedDeparture();
|
.getBoardedDeparture();
|
||||||
|
|
||||||
|
if (boardedDeparture == null) {
|
||||||
|
mode.finish();
|
||||||
|
refreshBoardedDeparture();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (boardedDeparture.isAlarmPending()) {
|
if (boardedDeparture.isAlarmPending()) {
|
||||||
cancelAlarmButton.setVisible(true);
|
cancelAlarmButton.setVisible(true);
|
||||||
setAlarmButton.setIcon(R.drawable.ic_action_alarm);
|
setAlarmButton.setIcon(R.drawable.ic_action_alarm);
|
||||||
|
@ -59,11 +59,6 @@ import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
|
|||||||
* }));
|
* }));
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* <p>
|
|
||||||
* This class Requires API level 12 or later due to use of
|
|
||||||
* {@link android.view.ViewPropertyAnimator}.
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @see SwipeDismissListViewTouchListener
|
* @see SwipeDismissListViewTouchListener
|
||||||
*/
|
*/
|
||||||
public class SwipeDismissTouchListener implements View.OnTouchListener {
|
public class SwipeDismissTouchListener implements View.OnTouchListener {
|
||||||
|
Loading…
Reference in New Issue
Block a user