package com.epson.mobilephone.common.maintain2;

import android.os.Parcel;
import android.os.Parcelable;

public class BatteryInfoEx implements Parcelable {
    public static final Parcelable.Creator<BatteryInfoEx> CREATOR = new Parcelable.Creator<BatteryInfoEx>() {
        public BatteryInfoEx createFromParcel(Parcel parcel) {
            return new BatteryInfoEx(parcel);
        }

        public BatteryInfoEx[] newArray(int i) {
            return new BatteryInfoEx[i];
        }
    };
    public static final int EPS_BATTERY_FIXED = 1;
    public static final int EPS_BATTERY_REMOVABLE_EXTERNAL = 3;
    public static final int EPS_BATTERY_REMOVABLE_INTEARNAL = 2;
    public static final int EPS_BATTERY_TYPE_UNKNOWN = 0;
    public static final int EPS_CHARGE_STATE_CHARGING = 1;
    public static final int EPS_CHARGE_STATE_NONE = 0;
    public static final int EPS_CHARGE_STATE_NOT_INSERTED = 2;
    public static final int EPS_POWER_SOUECE_AC = 1;
    public static final int EPS_POWER_SOUECE_BATTERY = 2;
    public static final int EPS_POWER_SOUECE_BATTERY2 = 3;
    public static final int EPS_POWER_SOUECE_NOT_SUPPORTED = -1;
    public static final int EPS_POWER_SOUECE_UNKNOWN = 0;
    public int[] batteryRemain;
    public int[] batteryState;
    public int[] batteryType;
    public int number;
    public int powerSourceType;

    public int describeContents() {
        return 0;
    }

    public BatteryInfoEx() {
    }

    private BatteryInfoEx(Parcel parcel) {
        powerSourceType = parcel.readInt();
        number = parcel.readInt();
        batteryType = new int[parcel.readInt()];
        parcel.readIntArray(batteryType);
        batteryState = new int[parcel.readInt()];
        parcel.readIntArray(batteryState);
        batteryRemain = new int[parcel.readInt()];
        parcel.readIntArray(batteryRemain);
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeInt(powerSourceType);
        parcel.writeInt(number);
        parcel.writeInt(batteryType.length);
        parcel.writeIntArray(batteryType);
        parcel.writeInt(batteryState.length);
        parcel.writeIntArray(batteryState);
        parcel.writeInt(batteryRemain.length);
        parcel.writeIntArray(batteryRemain);
    }
}
