Fix compilation and spaces
This commit is contained in:
parent
84be1ba7e0
commit
335f085f4b
5 changed files with 60 additions and 58 deletions
|
@ -95,7 +95,9 @@ import net.osmand.aidlapi.mapmarker.RemoveMapMarkersParams;
|
|||
|
||||
import net.osmand.aidlapi.quickaction.QuickActionParams;
|
||||
import net.osmand.aidlapi.quickaction.QuickActionInfoParams;
|
||||
|
||||
import net.osmand.aidlapi.lock.SetLockStateParams;
|
||||
|
||||
import net.osmand.aidlapi.events.AKeyEventsParams;
|
||||
|
||||
// NOTE: Add new methods at the end of file!!!
|
||||
|
@ -843,11 +845,12 @@ interface IOsmAndAidlInterface {
|
|||
boolean executeQuickAction(in QuickActionParams params);
|
||||
|
||||
boolean getQuickActionsInfo(out List<QuickActionInfoParams> quickActions);
|
||||
|
||||
/**
|
||||
* Toggle Lock/Unlock screen.
|
||||
*/
|
||||
|
||||
boolean setLockState(in SetLockStateParams params);
|
||||
|
||||
/**
|
||||
* Method to register for key events.
|
||||
*
|
||||
|
|
|
@ -14,7 +14,8 @@ public class AKeyEventsParams extends AidlParams {
|
|||
private boolean subscribeToUpdates = true;
|
||||
private ArrayList<Integer> keyEventList;
|
||||
|
||||
public AKeyEventsParams() { }
|
||||
public AKeyEventsParams() {
|
||||
}
|
||||
|
||||
protected AKeyEventsParams(Parcel in) {
|
||||
readFromParcel(in);
|
||||
|
@ -47,9 +48,11 @@ public class AKeyEventsParams extends AidlParams {
|
|||
public boolean isSubscribeToUpdates() {
|
||||
return subscribeToUpdates;
|
||||
}
|
||||
|
||||
public void setKeyEventList(ArrayList<Integer> keyEventList) {
|
||||
this.keyEventList = keyEventList;
|
||||
}
|
||||
|
||||
public ArrayList<Integer> getKeyEventList() {
|
||||
return keyEventList;
|
||||
}
|
||||
|
|
|
@ -2358,7 +2358,6 @@ public class OsmandAidlApi {
|
|||
a.points, a.wptPoints, a.wptCategoryNames);
|
||||
}
|
||||
|
||||
|
||||
private Map<Long, Set<Integer>> keyEventCallbacks = new ConcurrentHashMap<>();
|
||||
|
||||
public boolean onKeyEvent(KeyEvent event) {
|
||||
|
|
|
@ -15,7 +15,6 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.aidl.OsmandAidlApi.GpxBitmapCreatedCallback;
|
||||
import net.osmand.aidl.OsmandAidlApi.OsmandAppInitCallback;
|
||||
import net.osmand.aidl.OsmandAidlApi.SearchCompleteCallback;
|
||||
import net.osmand.aidlapi.lock.SetLockStateParams;
|
||||
import net.osmand.aidlapi.IOsmAndAidlCallback;
|
||||
import net.osmand.aidlapi.IOsmAndAidlInterface;
|
||||
import net.osmand.aidlapi.calculateroute.CalculateRouteParams;
|
||||
|
@ -28,6 +27,7 @@ import net.osmand.aidlapi.customization.OsmandSettingsInfoParams;
|
|||
import net.osmand.aidlapi.customization.OsmandSettingsParams;
|
||||
import net.osmand.aidlapi.customization.ProfileSettingsParams;
|
||||
import net.osmand.aidlapi.customization.SetWidgetsParams;
|
||||
import net.osmand.aidlapi.events.AKeyEventsParams;
|
||||
import net.osmand.aidlapi.favorite.AFavorite;
|
||||
import net.osmand.aidlapi.favorite.AddFavoriteParams;
|
||||
import net.osmand.aidlapi.favorite.RemoveFavoriteParams;
|
||||
|
@ -46,6 +46,7 @@ import net.osmand.aidlapi.gpx.RemoveGpxParams;
|
|||
import net.osmand.aidlapi.gpx.ShowGpxParams;
|
||||
import net.osmand.aidlapi.gpx.StartGpxRecordingParams;
|
||||
import net.osmand.aidlapi.gpx.StopGpxRecordingParams;
|
||||
import net.osmand.aidlapi.lock.SetLockStateParams;
|
||||
import net.osmand.aidlapi.map.ALatLon;
|
||||
import net.osmand.aidlapi.map.SetMapLocationParams;
|
||||
import net.osmand.aidlapi.maplayer.AddMapLayerParams;
|
||||
|
@ -88,8 +89,8 @@ import net.osmand.aidlapi.search.SearchParams;
|
|||
import net.osmand.aidlapi.search.SearchResult;
|
||||
import net.osmand.aidlapi.tiles.ASqliteDbFile;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.settings.backend.OsmAndAppCustomization;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.settings.backend.OsmAndAppCustomization;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
|
|
@ -62,10 +62,8 @@ public class MapActivityKeyListener implements KeyEvent.Callback {
|
|||
}
|
||||
} else if (mapScrollHelper.isScrollingDirectionKeyCode(keyCode)) {
|
||||
return mapScrollHelper.onKeyDown(keyCode, event);
|
||||
} else if(app.getAidlApi().onKeyEvent(event)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return app.getAidlApi().onKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -125,12 +123,10 @@ public class MapActivityKeyListener implements KeyEvent.Callback {
|
|||
mapActivity.changeZoom(1);
|
||||
return true;
|
||||
}
|
||||
} else if (app.getAidlApi().onKeyEvent(event)){
|
||||
} else if (OsmandPlugin.onMapActivityKeyUp(mapActivity, keyCode)) {
|
||||
return true;
|
||||
} else{
|
||||
return OsmandPlugin.onMapActivityKeyUp(mapActivity, keyCode);
|
||||
}
|
||||
return false;
|
||||
return app.getAidlApi().onKeyEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue