altosui: Add config and pyro tabs to graph widget
[fw/altos] / altosdroid / app / src / main / java / org / altusmetrum / AltosDroid / PreloadMapActivity.java
index a9f30f119c240973d0df8f11225964c6550e1c67..eb1230116c7cf4406486a7490d89432a95e9e09f 100644 (file)
@@ -33,7 +33,7 @@ import android.location.Location;
 import android.location.LocationManager;
 import android.location.LocationListener;
 
-import org.altusmetrum.altoslib_13.*;
+import org.altusmetrum.altoslib_14.*;
 
 /**
  * This Activity appears as a dialog. It lists any paired devices and
@@ -296,10 +296,10 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe
 
        @Override
        protected void onCreate(Bundle savedInstanceState) {
+               setTheme(AltosDroid.dialog_themes[AltosDroidPreferences.font_size()]);
                super.onCreate(savedInstanceState);
 
                // Setup the window
-               requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
                setContentView(R.layout.map_preload);
 
                // Set result CANCELED incase the user backs out
@@ -356,8 +356,11 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe
 
                // Listen for GPS and Network position updates
                LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
-
-               locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, this);
+               try {
+                       locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, this);
+               } catch (Exception e) {
+                       locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000, 1, this);
+               }
 
                new AltosLaunchSites(this);
        }