Fixes on pR

This commit is contained in:
madwasp79 2019-01-28 16:36:20 +02:00
parent 56c2dc60ba
commit 7f65f22d16
3 changed files with 12 additions and 18 deletions

View file

@ -1715,21 +1715,18 @@ public class OsmandAidlApi {
intent.addFlags(item.flags);
}
final Intent finalIntent = intent;
adapter.addItem(new ContextMenuItem.ItemBuilder()
.setId(item.getId())
.setTitle(item.name)
.setIcon(getIconId(item.iconName))
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter,
int itemId, int position, boolean isChecked,
int[] viewCoordinates) {
activity.startActivity(finalIntent);
return true;
}
})
.createItem());
.setId(item.getId())
.setTitle(item.name)
.setIcon(getIconId(item.iconName))
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int position, boolean isChecked, int[] viewCoordinates) {
activity.startActivity(finalIntent);
return true;
}
})
.createItem());
}
}
}

View file

@ -647,7 +647,7 @@ public class OsmandApplication extends MultiDexApplication {
defaultHandler.uncaughtException(thread, ex);
} catch (Exception e) {
// swallow all exceptions
LOG.error("Exception while handle other exception" + e.getMessage(), e); //$NON-NLS-1$
android.util.Log.e(PlatformUtil.TAG, "Exception while handle other exception", e); //$NON-NLS-1$
}
}

View file

@ -32,7 +32,6 @@ import android.widget.TextView;
import android.widget.Toast;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
import net.osmand.data.FavouritePoint;
import net.osmand.data.LatLon;
import net.osmand.data.PointDescription;
@ -63,11 +62,9 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.logging.Log;
public class FavoritesTreeFragment extends OsmandExpandableListFragment {
public final static Log log = PlatformUtil.getLog(FavoritesTreeFragment.class);
public static final int SEARCH_ID = -1;
// public static final int EXPORT_ID = 0;
// public static final int IMPORT_ID = 1;