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/gpx/AGpxBitmap.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

49 lines
981 B
Java

package net.osmand.aidlapi.gpx;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Parcel;
import androidx.annotation.NonNull;
import net.osmand.aidlapi.AidlParams;
public class AGpxBitmap extends AidlParams {
private Bitmap bitmap;
public AGpxBitmap(@NonNull Bitmap bitmap) {
this.bitmap = bitmap;
}
public AGpxBitmap(Parcel in) {
readFromParcel(in);
}
public Bitmap getBitmap() {
return bitmap;
}
public static final Creator<AGpxBitmap> CREATOR = new Creator<AGpxBitmap>() {
@Override
public AGpxBitmap createFromParcel(Parcel in) {
return new AGpxBitmap(in);
}
@Override
public AGpxBitmap[] newArray(int size) {
return new AGpxBitmap[size];
}
};
@Override
public void writeToBundle(Bundle bundle) {
bundle.putParcelable("bitmap", bitmap);
}
@Override
protected void readFromBundle(Bundle bundle) {
bundle.setClassLoader(Bitmap.class.getClassLoader());
bitmap = bundle.getParcelable("bitmap");
}
}