diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java b/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java index c2e6e78142..16cd021ff3 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/PerformLiveUpdateAsyncTask.java @@ -80,7 +80,7 @@ public class PerformLiveUpdateAsyncTask } else { settings.LIVE_UPDATES_RETRIES.resetToDefault(); List ll = result.getItemsForUpdate(); - if (!ll.isEmpty()) { + if (ll != null && !ll.isEmpty()) { ArrayList itemsToDownload = new ArrayList<>(ll.size()); for (IncrementalChangesManager.IncrementalUpdate iu : ll) { IndexItem indexItem = new IndexItem(iu.fileName, "Incremental update", diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java index 0d74a9b47c..5d066fa968 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoGroupsActivity.java @@ -617,9 +617,9 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements if (!checkOperationIsNotRunning()) { return; } - String operation = osMoPlugin.getGroups().leaveGroup((OsMoGroup) selectedObject); + String operation = osMoPlugin.getGroups().leaveGroup(selectedObject); startLongRunningOperation(operation); - adapter.update((OsMoGroup) selectedObject); + adapter.update(selectedObject); adapter.notifyDataSetChanged(); } @@ -1037,7 +1037,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements } public void hideProgressBar() { - OsMoGroupsActivity.this.operation = null; + this.operation = null; setSupportProgressBarIndeterminateVisibility(false); } @@ -1210,7 +1210,7 @@ public class OsMoGroupsActivity extends OsmandExpandableListActivity implements } else { label.setTypeface(Typeface.DEFAULT, Typeface.ITALIC); } - View v = (View) row.findViewById(R.id.settings); + View v = row.findViewById(R.id.settings); if(model.isMainGroup()) { v.setVisibility(View.GONE); } else {