X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altosdroid%2Fsrc%2Forg%2Faltusmetrum%2FAltosDroid%2FAltosDroidTab.java;h=ec73f5e3c4ba5f102278719b7ec20ee4a3283ec9;hp=9d612a1ed897ba33ae3036694a9318c867080737;hb=d5c038473d56ebbe61b8a71b5eb28d03385f8c48;hpb=87c8bb3956897830da1f7aaca2990a9571767b73 diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java index 9d612a1e..ec73f5e3 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -17,7 +18,7 @@ package org.altusmetrum.AltosDroid; -import org.altusmetrum.altoslib_8.*; +import org.altusmetrum.altoslib_12.*; import android.location.Location; import android.app.Activity; import android.graphics.Color; @@ -39,12 +40,6 @@ public abstract class AltosDroidTab extends Fragment implements AltosUnitsListen public abstract String tab_name(); - public void set_map_type(int map_type) { - } - - public void set_map_source(int map_source) { - } - public void units_changed(boolean imperial_units) { if (!isHidden()) show(last_telem_state, last_state, last_from_receiver, last_receiver); @@ -68,7 +63,10 @@ public abstract class AltosDroidTab extends Fragment implements AltosUnitsListen show(last_telem_state, last_state, last_from_receiver, last_receiver); } else ft.hide(this); - ft.commitAllowingStateLoss(); + try { + ft.commitAllowingStateLoss(); + } catch (IllegalStateException ie) { + } } @Override