remove parcelable code from determinebasaladapter
This commit is contained in:
parent
3dfac49b82
commit
05911be4e0
2 changed files with 3 additions and 81 deletions
|
@ -23,7 +23,7 @@ import info.nightscout.androidaps.plugins.OpenAPSMA.IobTotal;
|
|||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
|
||||
public class DetermineBasalAdapterAMAJS implements Parcelable {
|
||||
public class DetermineBasalAdapterAMAJS {
|
||||
private static Logger log = LoggerFactory.getLogger(DetermineBasalAdapterAMAJS.class);
|
||||
|
||||
|
||||
|
@ -47,44 +47,6 @@ public class DetermineBasalAdapterAMAJS implements Parcelable {
|
|||
private String storedProfile = null;
|
||||
private String storedMeal_data = null;
|
||||
|
||||
/**
|
||||
* Parcelable implementation
|
||||
* result string for display only
|
||||
**/
|
||||
protected DetermineBasalAdapterAMAJS(Parcel in) {
|
||||
storedCurrentTemp = in.readString();
|
||||
storedIobData = in.readString();
|
||||
storedGlucoseStatus = in.readString();
|
||||
storedProfile = in.readString();
|
||||
storedMeal_data = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(storedCurrentTemp);
|
||||
dest.writeString(storedIobData);
|
||||
dest.writeString(storedGlucoseStatus);
|
||||
dest.writeString(storedProfile);
|
||||
dest.writeString(storedMeal_data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<DetermineBasalAdapterAMAJS> CREATOR = new Creator<DetermineBasalAdapterAMAJS>() {
|
||||
@Override
|
||||
public DetermineBasalAdapterAMAJS createFromParcel(Parcel in) {
|
||||
return new DetermineBasalAdapterAMAJS(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetermineBasalAdapterAMAJS[] newArray(int size) {
|
||||
return new DetermineBasalAdapterAMAJS[size];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Main code
|
||||
*/
|
||||
|
@ -177,7 +139,6 @@ public class DetermineBasalAdapterAMAJS implements Parcelable {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// Store input params for Parcelable
|
||||
storedGlucoseStatus = mV8rt.executeStringScript("JSON.stringify(" + PARAM_glucoseStatus + ");");
|
||||
storedIobData = mV8rt.executeStringScript("JSON.stringify(" + PARAM_iobData + ");");
|
||||
storedCurrentTemp = mV8rt.executeStringScript("JSON.stringify(" + PARAM_currentTemp + ");");
|
||||
|
|
|
@ -22,7 +22,7 @@ import info.nightscout.androidaps.plugins.Loop.ScriptReader;
|
|||
import info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin;
|
||||
import info.nightscout.client.data.NSProfile;
|
||||
|
||||
public class DetermineBasalAdapterMAJS implements Parcelable {
|
||||
public class DetermineBasalAdapterMAJS {
|
||||
private static Logger log = LoggerFactory.getLogger(DetermineBasalAdapterMAJS.class);
|
||||
|
||||
|
||||
|
@ -46,45 +46,7 @@ public class DetermineBasalAdapterMAJS implements Parcelable {
|
|||
private String storedProfile = null;
|
||||
private String storedMeal_data = null;
|
||||
|
||||
/**
|
||||
* Parcelable implementation
|
||||
* result string for display only
|
||||
**/
|
||||
protected DetermineBasalAdapterMAJS(Parcel in) {
|
||||
storedCurrentTemp = in.readString();
|
||||
storedIobData = in.readString();
|
||||
storedGlucoseStatus = in.readString();
|
||||
storedProfile = in.readString();
|
||||
storedMeal_data = in.readString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(storedCurrentTemp);
|
||||
dest.writeString(storedIobData);
|
||||
dest.writeString(storedGlucoseStatus);
|
||||
dest.writeString(storedProfile);
|
||||
dest.writeString(storedMeal_data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<DetermineBasalAdapterMAJS> CREATOR = new Creator<DetermineBasalAdapterMAJS>() {
|
||||
@Override
|
||||
public DetermineBasalAdapterMAJS createFromParcel(Parcel in) {
|
||||
return new DetermineBasalAdapterMAJS(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DetermineBasalAdapterMAJS[] newArray(int size) {
|
||||
return new DetermineBasalAdapterMAJS[size];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
/**
|
||||
* Main code
|
||||
*/
|
||||
|
||||
|
@ -176,7 +138,6 @@ public class DetermineBasalAdapterMAJS implements Parcelable {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
// Store input params for Parcelable
|
||||
storedGlucoseStatus = mV8rt.executeStringScript("JSON.stringify(" + PARAM_glucoseStatus + ");");
|
||||
storedIobData = mV8rt.executeStringScript("JSON.stringify(" + PARAM_iobData + ");");
|
||||
storedCurrentTemp = mV8rt.executeStringScript("JSON.stringify(" + PARAM_currentTemp + ");");
|
||||
|
|
Loading…
Reference in a new issue