"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "navit/android/src/org/navitproject/navit/NavitDownloadSelectMapActivity.java" between
navit-0.5.5.tar.gz and navit-0.5.6.tar.gz

About: NavIt is a car navigation system with GPS tracking and a routing engine.

NavitDownloadSelectMapActivity.java  (navit-0.5.5):NavitDownloadSelectMapActivity.java  (navit-0.5.6)
skipping to change at line 30 skipping to change at line 30
import android.Manifest; import android.Manifest;
import android.app.Activity; import android.app.Activity;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.app.ExpandableListActivity; import android.app.ExpandableListActivity;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.location.Location; import android.location.Location;
import android.location.LocationManager; import android.location.LocationManager;
import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.Message; import android.os.Message;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.ExpandableListView; import android.widget.ExpandableListView;
import android.widget.SimpleExpandableListAdapter; import android.widget.SimpleExpandableListAdapter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
skipping to change at line 198 skipping to change at line 199
int childPosition, long id) { int childPosition, long id) {
super.onChildClick(parent, v, groupPosition, childPosition, id); super.onChildClick(parent, v, groupPosition, childPosition, id);
Log.d(TAG, "p:" + groupPosition + ", child_pos:" + childPosition); Log.d(TAG, "p:" + groupPosition + ", child_pos:" + childPosition);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
HashMap<String, String> child = (HashMap<String, String>) sAdapter.getCh ild(groupPosition, childPosition); HashMap<String, String> child = (HashMap<String, String>) sAdapter.getCh ild(groupPosition, childPosition);
String mapIndex = child.get("map_index"); String mapIndex = child.get("map_index");
if (mapIndex != null) { if (mapIndex != null) {
int mi = Integer.parseInt(mapIndex); int mi = Integer.parseInt(mapIndex);
if (NavitMapDownloader.osm_maps[mi].mEstSizeBytes / 1024 / 1024 / 95 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N
0 >= 4) { && NavitMapDownloader.osm_maps[mi].mEstSizeBytes >= Math.pow
(2, 32) * 0.95) {
// limit map download size to 3.8GiB on Android versions before
Nougat
NavitDialogs.sendDialogMessage(NavitDialogs.MSG_TOAST_LONG, null , NavitDialogs.sendDialogMessage(NavitDialogs.MSG_TOAST_LONG, null ,
getTstring(R.string.map_download_oversize), getTstring(R.string.map_download_oversize),
-1, 0, 0); -1, 0, 0);
return true; return true;
} }
Intent resultIntent = new Intent(); Intent resultIntent = new Intent();
resultIntent.putExtra("map_index", mi); resultIntent.putExtra("map_index", mi);
setResult(Activity.RESULT_OK, resultIntent); setResult(Activity.RESULT_OK, resultIntent);
finish(); finish();
} else { } else {
 End of changes. 2 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)