1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-07 22:22:00 +02:00
Gadgetbridge/app/src/main/java/net/osmand/aidlapi/navigation/ANavigationVoiceRouterMessageParams.java
Andreas Shimokawa 0d1a1f8a9f experiment with osmand
add osmand license note to readme
Cleanup unneeded aidl and java
2023-05-21 22:50:52 +02:00

60 lines
1.5 KiB
Java

package net.osmand.aidlapi.navigation;
import android.os.Bundle;
import android.os.Parcel;
import net.osmand.aidlapi.AidlParams;
public class ANavigationVoiceRouterMessageParams extends AidlParams {
private long callbackId = -1L;
private boolean subscribeToUpdates = true;
public ANavigationVoiceRouterMessageParams() {
}
protected ANavigationVoiceRouterMessageParams(Parcel in) {
readFromParcel(in);
}
public static final Creator<ANavigationVoiceRouterMessageParams> CREATOR = new Creator<ANavigationVoiceRouterMessageParams>() {
@Override
public ANavigationVoiceRouterMessageParams createFromParcel(Parcel in) {
return new ANavigationVoiceRouterMessageParams(in);
}
@Override
public ANavigationVoiceRouterMessageParams[] newArray(int size) {
return new ANavigationVoiceRouterMessageParams[size];
}
};
public long getCallbackId() {
return callbackId;
}
public void setCallbackId(long callbackId) {
this.callbackId = callbackId;
}
public void setSubscribeToUpdates(boolean subscribeToUpdates) {
this.subscribeToUpdates = subscribeToUpdates;
}
public boolean isSubscribeToUpdates() {
return subscribeToUpdates;
}
@Override
protected void readFromBundle(Bundle bundle) {
callbackId = bundle.getLong("callbackId");
subscribeToUpdates = bundle.getBoolean("subscribeToUpdates");
}
@Override
public void writeToBundle(Bundle bundle) {
bundle.putLong("callbackId", callbackId);
bundle.putBoolean("subscribeToUpdates", subscribeToUpdates);
}
}