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