| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
package android.os; |
| 17 |
|
| 18 |
import android.os.Parcel; |
| 19 |
import android.os.Parcelable; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
public class BatteryProperty implements Parcelable { |
| 30 |
private long mValueLong; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public BatteryProperty() { |
| 36 |
mValueLong = Long.MIN_VALUE; |
| 37 |
} |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
public long getLong() { |
| 43 |
return mValueLong; |
| 44 |
} |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
public void setLong(long val) { |
| 50 |
mValueLong = val; |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
private BatteryProperty(Parcel p) { |
| 59 |
readFromParcel(p); |
| 60 |
} |
| 61 |
|
| 62 |
public void readFromParcel(Parcel p) { |
| 63 |
mValueLong = p.readLong(); |
| 64 |
} |
| 65 |
|
| 66 |
public void writeToParcel(Parcel p, int flags) { |
| 67 |
p.writeLong(mValueLong); |
| 68 |
} |
| 69 |
|
| 70 |
public static final @android.annotation.NonNull Parcelable.Creator<BatteryProperty> CREATOR |
| 71 |
= new Parcelable.Creator<BatteryProperty>() { |
| 72 |
public BatteryProperty createFromParcel(Parcel p) { |
| 73 |
return new BatteryProperty(p); |
| 74 |
} |
| 75 |
|
| 76 |
public BatteryProperty[] newArray(int size) { |
| 77 |
return new BatteryProperty[size]; |
| 78 |
} |
| 79 |
}; |
| 80 |
|
| 81 |
public int describeContents() { |
| 82 |
return 0; |
| 83 |
} |
| 84 |
} |