|
|
@@ -494,6 +494,15 @@ public class SysAppUtil {
|
|
|
.setBtnLeftText(file.exists() ? "立即安装" : "立即更新").setBtnLeftNotDissDialog(true).setBtnLeftOnClickListener(new View.OnClickListener() {
|
|
|
private void installApk(File file){
|
|
|
if(file != null && file.exists()) {
|
|
|
+ //升级后继承渠道
|
|
|
+ String channel = ChannelContent.getInstance().getChannel_name();
|
|
|
+ try {
|
|
|
+ if(!TextUtils.isEmpty(channel) && !ZipChannelUtil.isAddQUA(file)){
|
|
|
+ ZipChannelUtil.writeQUA(file, channel);
|
|
|
+ }
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
ApkUtils.installApk(SheepApp.getInstance(), file.getAbsolutePath());
|
|
|
}
|
|
|
}
|