Fix compilation

This commit is contained in:
Victor Shcherb 2015-02-18 18:31:24 +01:00
parent 74ec219475
commit 62ae4e799a
3 changed files with 16 additions and 17 deletions

View file

@ -1,18 +1,14 @@
package net.osmand.plus;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.preference.PreferenceScreen;
import android.support.v4.app.Fragment;
import android.widget.CompoundButton.OnCheckedChangeListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import net.osmand.IProgress;
import net.osmand.Location;
import net.osmand.PlatformUtil;
import net.osmand.access.AccessibilityPlugin;
import net.osmand.plus.activities.LocalIndexInfo;
import net.osmand.plus.download.LocalIndexesFragment.LoadLocalIndexTask;
import net.osmand.plus.activities.MapActivity;
import net.osmand.plus.activities.SettingsActivity;
import net.osmand.plus.audionotes.AudioVideoNotesPlugin;
@ -31,9 +27,11 @@ import net.osmand.plus.views.OsmandMapTileView;
import org.apache.commons.logging.Log;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.preference.PreferenceScreen;
import android.support.v4.app.Fragment;
public abstract class OsmandPlugin {
@ -187,7 +185,9 @@ public abstract class OsmandPlugin {
public void updateLocation(Location location) {}
public void contextMenuLocalIndexes(Activity activity, Fragment fragment, Object info, ContextMenuAdapter adapter) {};
public void contextMenuFragment(Activity activity, Fragment fragment, Object info, ContextMenuAdapter adapter) {}
public void optionsMenuFragment(Activity activity, Fragment fragment, ContextMenuAdapter optionsMenuAdapter) {}
public List<String> indexingFiles(IProgress progress) { return null;}
@ -325,14 +325,14 @@ public abstract class OsmandPlugin {
public static void onContextMenuActivity(Activity activity, Fragment fragment, Object info, ContextMenuAdapter adapter) {
for (OsmandPlugin plugin : getEnabledPlugins()) {
plugin.contextMenuLocalIndexes(activity, fragment, info, adapter);
plugin.contextMenuFragment(activity, fragment, info, adapter);
}
}
public static void onOptionsMenuActivity(Activity activity, Fragment fragment, ContextMenuAdapter optionsMenuAdapter) {
for (OsmandPlugin plugin : getEnabledPlugins()) {
plugin.optionsMenuLocalIndexes(activity, fragment, optionsMenuAdapter);
plugin.optionsMenuFragment(activity, fragment, optionsMenuAdapter);
}
}

View file

@ -503,7 +503,6 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment {
.listen(listener).position(3).reg();
optionsMenuAdapter.item(R.string.local_index_mi_restore)
.listen(listener).position(4).reg();
OsmandPlugin.onOptionsMenuActivity(getDownloadActivity(), null, optionsMenuAdapter);
// doesn't work correctly
//int max = getResources().getInteger(R.integer.abs__max_action_buttons);
int max = 3;

View file

@ -158,7 +158,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
}
@Override
public void contextMenuLocalIndexes(final Activity la, final Fragment fragment, final Object info, ContextMenuAdapter adapter) {
public void contextMenuFragment(final Activity la, final Fragment fragment, final Object info, ContextMenuAdapter adapter) {
if (fragment instanceof AvailableGPXFragment) {
adapter.item(R.string.local_index_mi_upload_gpx)
.icons(R.drawable.ic_action_gup_dark, R.drawable.ic_action_gup_light)
@ -174,7 +174,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
}
@Override
public void optionsMenuLocalIndexes(final Activity activity, final Fragment fragment, ContextMenuAdapter optionsMenuAdapter) {
public void optionsMenuFragment(final Activity activity, final Fragment fragment, ContextMenuAdapter optionsMenuAdapter) {
if (fragment instanceof AvailableGPXFragment) {
final AvailableGPXFragment f = ((AvailableGPXFragment) fragment);
optionsMenuAdapter.item(R.string.local_index_mi_upload_gpx)