From d078668ba500fcc75c8ec51ec80c74e154351ada Mon Sep 17 00:00:00 2001 From: rachytski Date: Thu, 5 Jul 2012 17:13:51 -0700 Subject: [PATCH] downloading mandatory resources automatically if the user is connected through WiFi. --- .../src/com/mapswithme/maps/DownloadResourcesActivity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java index 4ee204a6cf..88d99d3b48 100644 --- a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java +++ b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java @@ -17,6 +17,7 @@ import android.widget.ProgressBar; import android.widget.TextView; import com.mapswithme.maps.location.LocationService; +import com.mapswithme.util.ConnectionState; public class DownloadResourcesActivity extends Activity implements LocationService.Listener, MapStorage.Listener { @@ -287,6 +288,9 @@ public class DownloadResourcesActivity extends Activity implements LocationServi mLocationMsgView = (TextView)findViewById(R.id.download_resources_location_message); prepareFilesDownload(); + + if (ConnectionState.getState(this) == ConnectionState.CONNECTED_BY_WIFI) + onDownloadClicked(mDownloadButton); } }