Fix the remaining TODO #101

This commit is contained in:
cpfeiffer 2015-08-28 13:49:36 +02:00
parent d27bf567cf
commit ff989390f9
1 changed files with 2 additions and 4 deletions

View File

@ -41,8 +41,6 @@ public class GBDevice implements Parcelable {
private State mState = State.NOT_CONNECTED; private State mState = State.NOT_CONNECTED;
private short mBatteryLevel = BATTERY_UNKNOWN; private short mBatteryLevel = BATTERY_UNKNOWN;
private short mBatteryThresholdPercent = BATTERY_THRESHOLD_PERCENT; private short mBatteryThresholdPercent = BATTERY_THRESHOLD_PERCENT;
//TODO: get rid of String mBatteryStatus in favor of Enum mBatteryState
private String mBatteryStatus;
private BatteryState mBatteryState; private BatteryState mBatteryState;
private short mRssi = RSSI_UNKNOWN; private short mRssi = RSSI_UNKNOWN;
private String mBusyTask; private String mBusyTask;
@ -62,7 +60,7 @@ public class GBDevice implements Parcelable {
mHardwareVersion = in.readString(); mHardwareVersion = in.readString();
mState = State.values()[in.readInt()]; mState = State.values()[in.readInt()];
mBatteryLevel = (short) in.readInt(); mBatteryLevel = (short) in.readInt();
mBatteryStatus = in.readString(); mBatteryState = (BatteryState) in.readSerializable();
mRssi = (short) in.readInt(); mRssi = (short) in.readInt();
mBusyTask = in.readString(); mBusyTask = in.readString();
@ -78,7 +76,7 @@ public class GBDevice implements Parcelable {
dest.writeString(mHardwareVersion); dest.writeString(mHardwareVersion);
dest.writeInt(mState.ordinal()); dest.writeInt(mState.ordinal());
dest.writeInt(mBatteryLevel); dest.writeInt(mBatteryLevel);
dest.writeString(mBatteryStatus); dest.writeSerializable(mBatteryState);
dest.writeInt(mRssi); dest.writeInt(mRssi);
dest.writeString(mBusyTask); dest.writeString(mBusyTask);
} }