Prevent force close in some cases when boarded departure has expired

This commit is contained in:
Doug Keen 2012-10-03 17:36:56 -07:00
parent 6ac9a2ece4
commit 94ed29467d
2 changed files with 7 additions and 5 deletions

View File

@ -591,6 +591,13 @@ public class ViewDeparturesActivity extends SActivity implements
final BartRunnerApplication application = (BartRunnerApplication) getApplication();
final Departure boardedDeparture = application
.getBoardedDeparture();
if (boardedDeparture == null) {
mode.finish();
refreshBoardedDeparture();
return true;
}
if (boardedDeparture.isAlarmPending()) {
cancelAlarmButton.setVisible(true);
setAlarmButton.setIcon(R.drawable.ic_action_alarm);

View File

@ -59,11 +59,6 @@ import static com.nineoldandroids.view.ViewPropertyAnimator.animate;
* }));
* </pre>
*
* <p>
* This class Requires API level 12 or later due to use of
* {@link android.view.ViewPropertyAnimator}.
* </p>
*
* @see SwipeDismissListViewTouchListener
*/
public class SwipeDismissTouchListener implements View.OnTouchListener {