diff --git a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl index b4394d647a..31158b895b 100644 --- a/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl +++ b/OsmAnd-telegram/src/net/osmand/aidl/IOsmAndAidlInterface.aidl @@ -94,6 +94,8 @@ import net.osmand.aidl.contextmenu.RemoveContextMenuButtonsParams; import net.osmand.aidl.mapmarker.RemoveMapMarkersParams; +import net.osmand.aidl.quickaction.QuickActionParams; + // NOTE: Add new methods at the end of file!!! interface IOsmAndAidlInterface { @@ -849,4 +851,6 @@ interface IOsmAndAidlInterface { boolean getGpxColor(inout GpxColorParams params); boolean importProfile(in ProfileSettingsParams params); + + boolean executeQuickAction(in QuickActionParams params); } diff --git a/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.aidl b/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.aidl new file mode 100644 index 0000000000..2a2fca38d8 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.aidl @@ -0,0 +1,3 @@ +package net.osmand.aidl.quickaction; + +parcelable QuickActionParams; \ No newline at end of file diff --git a/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.java b/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.java new file mode 100644 index 0000000000..b9fd262600 --- /dev/null +++ b/OsmAnd-telegram/src/net/osmand/aidl/quickaction/QuickActionParams.java @@ -0,0 +1,47 @@ +package net.osmand.aidl.quickaction; + +import android.os.Parcel; +import android.os.Parcelable; + +public class QuickActionParams implements Parcelable { + + private int actionNumber; + + public QuickActionParams(int actionNumber) { + this.actionNumber = actionNumber; + } + + public QuickActionParams(Parcel in) { + readFromParcel(in); + } + + public static final Creator CREATOR = new Creator() { + @Override + public QuickActionParams createFromParcel(Parcel in) { + return new QuickActionParams(in); + } + + @Override + public QuickActionParams[] newArray(int size) { + return new QuickActionParams[size]; + } + }; + + public int getActionNumber() { + return actionNumber; + } + + @Override + public void writeToParcel(Parcel out, int flags) { + out.writeInt(actionNumber); + } + + private void readFromParcel(Parcel in) { + actionNumber = in.readInt(); + } + + @Override + public int describeContents() { + return 0; + } +} \ No newline at end of file