Addwarning message downloading from mobile internet

This commit is contained in:
Victor Shcherb 2013-05-16 01:43:32 +02:00
parent dc1e35f3ee
commit 37e59f6ce1
2 changed files with 22 additions and 1 deletions

View file

@ -9,6 +9,8 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="download_using_mobile_internet">Currently WiFi is not connectted. Do you want to continue downloading with current internet connection?</string>
<string name="street_name">Street</string>
<string name="hno">House number</string>
<string name="website">Web site</string>

View file

@ -618,10 +618,27 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
@Override
public void onClick(DialogInterface dialog, int which) {
downloadFilesPreCheckSpace(list);
downloadFilesCheckInternet(list);
}
});
msg.show();
} else {
downloadFilesCheckInternet(list);
}
}
protected void downloadFilesCheckInternet(final List<DownloadEntry> list) {
if(!getMyApplication().getExternalServiceAPI().isWifiConnected()) {
Builder builder = new AlertDialog.Builder(this);
builder.setMessage(getString(R.string.download_using_mobile_internet));
builder.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
downloadFilesPreCheckSpace(list);
}
});
builder.setNegativeButton(R.string.default_buttons_no, null);
builder.show();
} else {
downloadFilesPreCheckSpace(list);
}
@ -659,6 +676,8 @@ public class DownloadIndexActivity extends OsmandExpandableListActivity {
builder.show();
}
}
@Override
protected void onDestroy() {