|
|
|
@ -60,9 +60,13 @@ public class UpdateConfig implements Parcelable { |
|
|
|
|
*/ |
|
|
|
|
private String mAuthority; |
|
|
|
|
/** |
|
|
|
|
* 下载失败是否支持点击通知栏重复下载 |
|
|
|
|
* 下载失败是否支持点击通知栏重新下载 |
|
|
|
|
*/ |
|
|
|
|
private boolean isReDownload = true; |
|
|
|
|
/** |
|
|
|
|
* 下载失败后,最大重新下载次数 |
|
|
|
|
*/ |
|
|
|
|
private int reDownloads = 3; |
|
|
|
|
/** |
|
|
|
|
* 是否显示百分比 |
|
|
|
|
*/ |
|
|
|
@ -194,6 +198,14 @@ public class UpdateConfig implements Parcelable { |
|
|
|
|
isReDownload = reDownload; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getReDownloads() { |
|
|
|
|
return reDownloads; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setReDownloads(int reDownloads) { |
|
|
|
|
this.reDownloads = reDownloads; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public boolean isVibrate() { |
|
|
|
|
return isVibrate; |
|
|
|
|
} |
|
|
|
@ -238,7 +250,6 @@ public class UpdateConfig implements Parcelable { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public boolean isDeleteCancelFile() { |
|
|
|
|
return isDeleteCancelFile; |
|
|
|
|
} |
|
|
|
@ -266,17 +277,21 @@ public class UpdateConfig implements Parcelable { |
|
|
|
|
dest.writeString(this.mChannelName); |
|
|
|
|
dest.writeString(this.mAuthority); |
|
|
|
|
dest.writeByte(this.isReDownload ? (byte) 1 : (byte) 0); |
|
|
|
|
dest.writeInt(this.reDownloads); |
|
|
|
|
dest.writeByte(this.isShowPercentage ? (byte) 1 : (byte) 0); |
|
|
|
|
dest.writeByte(this.isVibrate ? (byte) 1 : (byte) 0); |
|
|
|
|
dest.writeByte(this.isSound ? (byte) 1 : (byte) 0); |
|
|
|
|
dest.writeValue(this.versionCode); |
|
|
|
|
dest.writeInt(mRequestProperty!=null ? this.mRequestProperty.size() : 0); |
|
|
|
|
if(mRequestProperty!=null){ |
|
|
|
|
dest.writeInt(this.mRequestProperty.size()); |
|
|
|
|
for (Map.Entry<String, String> entry : this.mRequestProperty.entrySet()) { |
|
|
|
|
dest.writeString(entry.getKey()); |
|
|
|
|
dest.writeString(entry.getValue()); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
dest.writeInt(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dest.writeByte(this.isDeleteCancelFile ? (byte) 1 : (byte) 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -292,6 +307,7 @@ public class UpdateConfig implements Parcelable { |
|
|
|
|
this.mChannelName = in.readString(); |
|
|
|
|
this.mAuthority = in.readString(); |
|
|
|
|
this.isReDownload = in.readByte() != 0; |
|
|
|
|
this.reDownloads = in.readInt(); |
|
|
|
|
this.isShowPercentage = in.readByte() != 0; |
|
|
|
|
this.isVibrate = in.readByte() != 0; |
|
|
|
|
this.isSound = in.readByte() != 0; |
|
|
|
|