OtaDeviceInfo.java
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Copyright (C) 2015 The Telink Bluetooth Light Project
*
*/
package com.telink.bluetooth.light;
import android.os.Parcel;
/**
* OTA设备信息
*/
public class OtaDeviceInfo extends DeviceInfo {
public static final Creator<OtaDeviceInfo> CREATOR = new Creator<OtaDeviceInfo>() {
@Override
public OtaDeviceInfo createFromParcel(Parcel in) {
return new OtaDeviceInfo(in);
}
@Override
public OtaDeviceInfo[] newArray(int size) {
return new OtaDeviceInfo[size];
}
};
/**
* firmware数据
*/
public byte[] firmware;
/**
* ota进度
*/
public int progress;
public OtaDeviceInfo() {
}
public OtaDeviceInfo(Parcel in) {
super(in);
this.progress = in.readInt();
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
dest.writeInt(this.progress);
}
}