| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.app.backup; |
| 18 |
|
| 19 |
import android.annotation.SystemApi; |
| 20 |
import android.os.Parcel; |
| 21 |
import android.os.Parcelable; |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
@SystemApi |
| 30 |
public class BackupProgress implements Parcelable { |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
public final long bytesExpected; |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
public final long bytesTransferred; |
| 40 |
|
| 41 |
public BackupProgress(long _bytesExpected, long _bytesTransferred) { |
| 42 |
bytesExpected = _bytesExpected; |
| 43 |
bytesTransferred = _bytesTransferred; |
| 44 |
} |
| 45 |
|
| 46 |
public int describeContents() { |
| 47 |
return 0; |
| 48 |
} |
| 49 |
|
| 50 |
public void writeToParcel(Parcel out, int flags) { |
| 51 |
out.writeLong(bytesExpected); |
| 52 |
out.writeLong(bytesTransferred); |
| 53 |
} |
| 54 |
|
| 55 |
public static final @android.annotation.NonNull Creator<BackupProgress> CREATOR = new Creator<BackupProgress>() { |
| 56 |
public BackupProgress createFromParcel(Parcel in) { |
| 57 |
return new BackupProgress(in); |
| 58 |
} |
| 59 |
|
| 60 |
public BackupProgress[] newArray(int size) { |
| 61 |
return new BackupProgress[size]; |
| 62 |
} |
| 63 |
}; |
| 64 |
|
| 65 |
private BackupProgress(Parcel in) { |
| 66 |
bytesExpected = in.readLong(); |
| 67 |
bytesTransferred = in.readLong(); |
| 68 |
} |
| 69 |
} |