Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-01-05 17:53:12 +01:00
commit 1877c30de9
6 changed files with 22 additions and 9 deletions

View file

@ -9,6 +9,9 @@ import net.osmand.plus.OsmandApplication;
public class DashBaseFragment extends SherlockFragment {
public OsmandApplication getMyApplication(){
if (getActivity() == null){
return null;
}
return (OsmandApplication) getActivity().getApplication();
}

View file

@ -84,7 +84,8 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
}
protected void updateCount(String s) {
if (!DashDownloadMapsFragment.this.isAdded()){
if (!DashDownloadMapsFragment.this.isAdded() ||
getMyApplication() == null){
return;
}
File ms = getMyApplication().getAppPath(s);
@ -104,7 +105,8 @@ public class DashDownloadMapsFragment extends DashBaseFragment {
@Override
protected void onPostExecute(Void result) {
super.onPostExecute(result);
if (!DashDownloadMapsFragment.this.isAdded()){
if (!DashDownloadMapsFragment.this.isAdded()
|| getMyApplication() == null){
return;
}
if(countMaps > 0) {

View file

@ -78,10 +78,16 @@ public class DashMapFragment extends DashBaseFragment implements IMapDownloaderC
if (view == null) {
return;
}
Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
ImageView map = (ImageView) view.findViewById(R.id.map_image);
final Bitmap image = getMyApplication().getResourceManager().getRenderer().getBitmap();
final ImageView map = (ImageView) view.findViewById(R.id.map_image);
if (image != null) {
map.setImageBitmap(image);
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
map.setImageBitmap(image);
}
});
}
}

View file

@ -143,9 +143,10 @@ public class DashUpdatesFragment extends DashBaseFragment {
//needed when rotation is performed and progress can be null
if (!updateOnlyProgress) {
getProgressIfPossible(basicProgressAsyncTask.getDescription());
if (currentProgress == null) {
return;
}
}
if (currentProgress == null) {
return;
}
if (updateOnlyProgress) {

View file

@ -841,6 +841,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
}
}
listAdapter.notifyDataSetChanged();
expandAllGroups();
}
public void cancelFilter(){

View file

@ -333,7 +333,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
@Override
public void registerOptionsMenuItems(final MapActivity mapActivity, ContextMenuAdapter helper) {
helper.item(R.string.osmo_groups).icons(R.drawable.ic_action_eye_dark, R.drawable.ic_action_eye_light).position(6)
helper.item(R.string.osmo_groups).icons(R.drawable.ic_osmo_dark, R.drawable.ic_osmo_light).position(6)
.listen(new OnContextMenuClick() {
@Override
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {