Commit 7f907dbc authored by mengcuiguang's avatar mengcuiguang

优化代码位为null问题

parent 9723d6e7
...@@ -67,7 +67,6 @@ android { ...@@ -67,7 +67,6 @@ android {
// buildConfigField "String", "MainIp", DEBUG_URL // buildConfigField "String", "MainIp", DEBUG_URL
// manifestPlaceholders = [TD_SCHEMA_KEY: DEBUG_TD_SCHEMA_KEY, // manifestPlaceholders = [TD_SCHEMA_KEY: DEBUG_TD_SCHEMA_KEY,
// TD_KEY : DEBUG_TD_KEY] // TD_KEY : DEBUG_TD_KEY]
buildConfigField "boolean", "LOG_DEBUG", "true" buildConfigField "boolean", "LOG_DEBUG", "true"
buildConfigField "String", "AppKeyPre", "\"abcd\"" buildConfigField "String", "AppKeyPre", "\"abcd\""
buildConfigField "String", "MainIp", RELEASE_URL buildConfigField "String", "MainIp", RELEASE_URL
...@@ -85,27 +84,16 @@ android { ...@@ -85,27 +84,16 @@ android {
release { release {
// 不显示Log // 不显示Log
// buildConfigField "boolean", "LOG_DEBUG", "false" buildConfigField "boolean", "LOG_DEBUG", "false"
// buildConfigField "String", "AppKeyPre", "\"abcd\""
// buildConfigField "String", "MainIp", RELEASE_URL
// manifestPlaceholders = [TD_SCHEMA_KEY: RELEASE_TD_SCHEMA_KEY,
// TD_KEY : RELEASE_TD_KEY]
//
// //混淆
// minifyEnabled true
// zipAlignEnabled true
// shrinkResources true//打开
buildConfigField "boolean", "LOG_DEBUG", "true"
buildConfigField "String", "AppKeyPre", "\"abcd\"" buildConfigField "String", "AppKeyPre", "\"abcd\""
buildConfigField "String", "MainIp", RELEASE_URL buildConfigField "String", "MainIp", RELEASE_URL
manifestPlaceholders = [TD_SCHEMA_KEY: RELEASE_TD_SCHEMA_KEY, manifestPlaceholders = [TD_SCHEMA_KEY: RELEASE_TD_SCHEMA_KEY,
TD_KEY : RELEASE_TD_KEY] TD_KEY : RELEASE_TD_KEY]
//混淆 //混淆
minifyEnabled false minifyEnabled true
zipAlignEnabled false zipAlignEnabled true
shrinkResources false//打开 shrinkResources true//打开
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release signingConfig signingConfigs.release
......
...@@ -148,32 +148,70 @@ public class TtCsjAdManager { ...@@ -148,32 +148,70 @@ public class TtCsjAdManager {
* 按包渠道更新代码位 * 按包渠道更新代码位
*/ */
public static void updataIdByPkg(ServerAdBean adBean) { public static void updataIdByPkg(ServerAdBean adBean) {
if (adBean != null && adBean.getCsj() != null) { if (adBean != null &&
adBean.getCsj() != null &&
adBean.getCsj().getVedio() != null) {
AdIdBean.VedioBean idBean = adBean.getCsj().getVedio(); AdIdBean.VedioBean idBean = adBean.getCsj().getVedio();
// 信息流 // 信息流
if (!TextUtils.isEmpty(adBean.getCsj().getExpress().getEXPRESS_DIALOG())) {
TT_AD_NATIVEEXPRESS_AWARD = adBean.getCsj().getExpress().getEXPRESS_DIALOG(); TT_AD_NATIVEEXPRESS_AWARD = adBean.getCsj().getExpress().getEXPRESS_DIALOG();
}
if (!TextUtils.isEmpty(adBean.getCsj().getExpress().getEXPRESS_COMMON())) {
TT_AD_NATIVEEXPRESS_WALK = adBean.getCsj().getExpress().getEXPRESS_COMMON(); TT_AD_NATIVEEXPRESS_WALK = adBean.getCsj().getExpress().getEXPRESS_COMMON();
TT_AD_NATIVEEXPRESS_WATER = adBean.getCsj().getExpress().getEXPRESS_COMMON(); TT_AD_NATIVEEXPRESS_WATER = adBean.getCsj().getExpress().getEXPRESS_COMMON();
TT_AD_NATIVEEXPRESS_MORNINGCLOCK = adBean.getCsj().getExpress().getEXPRESS_COMMON(); TT_AD_NATIVEEXPRESS_MORNINGCLOCK = adBean.getCsj().getExpress().getEXPRESS_COMMON();
TT_AD_NATIVEEXPRESS_EAT = adBean.getCsj().getExpress().getEXPRESS_COMMON(); TT_AD_NATIVEEXPRESS_EAT = adBean.getCsj().getExpress().getEXPRESS_COMMON();
}
// 激励视频 // 激励视频
if (!TextUtils.isEmpty(idBean.getHOMEWATER())) {
TT_AD_VEDIO_DRINK = idBean.getHOMEWATER();//喝水打卡 TT_AD_VEDIO_DRINK = idBean.getHOMEWATER();//喝水打卡
}
if (!TextUtils.isEmpty(idBean.getWALK())) {
TT_AD_VEDIO_WALK = idBean.getWALK();//走路打卡 TT_AD_VEDIO_WALK = idBean.getWALK();//走路打卡
}
if (!TextUtils.isEmpty(idBean.getCHALLENGE_VEDIO())) {
TT_AD_VEDIO_MAIN = idBean.getCHALLENGE_VEDIO();// 我的界面视频 TT_AD_VEDIO_MAIN = idBean.getCHALLENGE_VEDIO();// 我的界面视频
}
if (!TextUtils.isEmpty(idBean.getCHALLENGE_CARD())) {
TT_AD_VEDIO_ERASE = idBean.getCHALLENGE_CARD();// 刮刮乐 TT_AD_VEDIO_ERASE = idBean.getCHALLENGE_CARD();// 刮刮乐
}
if (!TextUtils.isEmpty(idBean.getCHALLENGE_TURN())) {
TT_AD_VEDIO_TURNABLE = idBean.getCHALLENGE_TURN();// 大转盘 TT_AD_VEDIO_TURNABLE = idBean.getCHALLENGE_TURN();// 大转盘
}
if (!TextUtils.isEmpty(idBean.getWALK_BUBBLE())) {
TT_AD_VEDIO_MOREDIALOG = idBean.getWALK_BUBBLE();// 气泡 TT_AD_VEDIO_MOREDIALOG = idBean.getWALK_BUBBLE();// 气泡
}
if (!TextUtils.isEmpty(idBean.getSIGNIN_HOMEPAGE_CARD())) {
TT_AD_VEDIO_SIGN = idBean.getSIGNIN_HOMEPAGE_CARD();// 签到 TT_AD_VEDIO_SIGN = idBean.getSIGNIN_HOMEPAGE_CARD();// 签到
}
if (!TextUtils.isEmpty(idBean.getEATMEAL_SUBSIDY())) {
TT_AD_VEDIO_EAT = idBean.getEATMEAL_SUBSIDY();// 饭补 TT_AD_VEDIO_EAT = idBean.getEATMEAL_SUBSIDY();// 饭补
}
if (!TextUtils.isEmpty(idBean.getOFFLINE_DOUBLE())) {
TT_AD_VEDIO_OFFINELINE = idBean.getOFFLINE_DOUBLE();// 离线弹框 TT_AD_VEDIO_OFFINELINE = idBean.getOFFLINE_DOUBLE();// 离线弹框
}
if (!TextUtils.isEmpty(idBean.getDRAWCASH())) {
TT_AD_VEDIO_DRAWCASH = idBean.getDRAWCASH();// 提现 TT_AD_VEDIO_DRAWCASH = idBean.getDRAWCASH();// 提现
}
if (!TextUtils.isEmpty(idBean.getHIGH_ACTIVITY())) {
TT_AD_VEDIO_MOST = idBean.getHIGH_ACTIVITY();// 超级翻倍/高额任务 TT_AD_VEDIO_MOST = idBean.getHIGH_ACTIVITY();// 超级翻倍/高额任务
}
if (!TextUtils.isEmpty(idBean.getBLESSINGBAG())) {
TT_AD_VEDIO_BLESSINGBAG = idBean.getBLESSINGBAG();// 福袋 TT_AD_VEDIO_BLESSINGBAG = idBean.getBLESSINGBAG();// 福袋
}
if (!TextUtils.isEmpty(idBean.getHOMEVEDIO_CHALLENGE())) {
TT_AD_VEDIO_HOMEVEDIO = idBean.getHOMEVEDIO_CHALLENGE();// 首页视频翻倍 TT_AD_VEDIO_HOMEVEDIO = idBean.getHOMEVEDIO_CHALLENGE();// 首页视频翻倍
}
if (!TextUtils.isEmpty(idBean.getSMALLHOMEVEDIO_DOUBLE())) {
TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getSMALLHOMEVEDIO_DOUBLE();// 短视频翻倍 TT_AD_VEDIO_SMALLHOMEVEDIO = idBean.getSMALLHOMEVEDIO_DOUBLE();// 短视频翻倍
}
if (!TextUtils.isEmpty(idBean.getKUYINYUE_VEDIO())) {
TT_AD_VEDIO_KYLVEDIO = idBean.getKUYINYUE_VEDIO();// 来电秀视频 TT_AD_VEDIO_KYLVEDIO = idBean.getKUYINYUE_VEDIO();// 来电秀视频
}
// 全屏广告 // 全屏广告
if (!TextUtils.isEmpty(adBean.getCsj().getFullvedio().getFULLVEDIO_COMMON())) {
TT_AD_FULLVEDIO_ALL = adBean.getCsj().getFullvedio().getFULLVEDIO_COMMON(); TT_AD_FULLVEDIO_ALL = adBean.getCsj().getFullvedio().getFULLVEDIO_COMMON();
} }
} }
}
} }
...@@ -88,26 +88,58 @@ object YlhAdManager { ...@@ -88,26 +88,58 @@ object YlhAdManager {
* 按包渠道更新代码位 * 按包渠道更新代码位
*/ */
fun updataIdByPkg(adBean: ServerAdBean?) { fun updataIdByPkg(adBean: ServerAdBean?) {
if (adBean != null && adBean.ylh != null) { if (adBean != null && adBean.ylh != null && adBean.ylh.vedio != null) {
val idBean = adBean.ylh.vedio val idBean = adBean.ylh.vedio
// 激励视频 // 激励视频
if(!TextUtils.isEmpty(idBean.homewater)){
YLH_AD_VEDIO_DRINK = idBean.homewater //喝水打卡 YLH_AD_VEDIO_DRINK = idBean.homewater //喝水打卡
}
if(!TextUtils.isEmpty(idBean.walk)){
YLH_AD_VEDIO_WALK = idBean.walk //走路打卡 YLH_AD_VEDIO_WALK = idBean.walk //走路打卡
}
if(!TextUtils.isEmpty(idBean.challengE_VEDIO)){
YLH_AD_VEDIO_MAIN = idBean.challengE_VEDIO // 我的界面视频 YLH_AD_VEDIO_MAIN = idBean.challengE_VEDIO // 我的界面视频
}
if(!TextUtils.isEmpty(idBean.challengE_CARD)){
YLH_AD_VEDIO_ERASE = idBean.challengE_CARD // 刮刮乐 YLH_AD_VEDIO_ERASE = idBean.challengE_CARD // 刮刮乐
}
if(!TextUtils.isEmpty(idBean.challengE_TURN)){
YLH_AD_VEDIO_TURNABLE = idBean.challengE_TURN // 大转盘 YLH_AD_VEDIO_TURNABLE = idBean.challengE_TURN // 大转盘
}
if(!TextUtils.isEmpty(idBean.walK_BUBBLE)){
YLH_AD_VEDIO_MOREDIALOG = idBean.walK_BUBBLE // 气泡 YLH_AD_VEDIO_MOREDIALOG = idBean.walK_BUBBLE // 气泡
}
if(!TextUtils.isEmpty(idBean.signiN_HOMEPAGE_CARD)){
YLH_AD_VEDIO_SIGN = idBean.signiN_HOMEPAGE_CARD // 签到 YLH_AD_VEDIO_SIGN = idBean.signiN_HOMEPAGE_CARD // 签到
}
if(!TextUtils.isEmpty(idBean.eatmeaL_SUBSIDY)){
YLH_AD_VEDIO_EAT = idBean.eatmeaL_SUBSIDY // 饭补 YLH_AD_VEDIO_EAT = idBean.eatmeaL_SUBSIDY // 饭补
}
if(!TextUtils.isEmpty(idBean.offlinE_DOUBLE)){
YLH_AD_VEDIO_OFFINELINE = idBean.offlinE_DOUBLE // 离线弹框 YLH_AD_VEDIO_OFFINELINE = idBean.offlinE_DOUBLE // 离线弹框
}
if(!TextUtils.isEmpty(idBean.drawcash)){
YLH_AD_VEDIO_DRAWCASH = idBean.drawcash // 提现 YLH_AD_VEDIO_DRAWCASH = idBean.drawcash // 提现
}
if(!TextUtils.isEmpty(idBean.higH_ACTIVITY)){
YLH_AD_VEDIO_MOST = idBean.higH_ACTIVITY // 超级翻倍/高额任务 YLH_AD_VEDIO_MOST = idBean.higH_ACTIVITY // 超级翻倍/高额任务
}
if(!TextUtils.isEmpty(idBean.blessingbag)){
YLH_AD_VEDIO_BLESSINGBAG = idBean.blessingbag // 福袋 YLH_AD_VEDIO_BLESSINGBAG = idBean.blessingbag // 福袋
}
if(!TextUtils.isEmpty(idBean.homevediO_CHALLENGE)){
YLH_AD_VEDIO_HOMEVEDIO = idBean.homevediO_CHALLENGE // 首页视频翻倍 YLH_AD_VEDIO_HOMEVEDIO = idBean.homevediO_CHALLENGE // 首页视频翻倍
}
if(!TextUtils.isEmpty(idBean.smallhomevediO_DOUBLE)){
YLH_AD_VEDIO_SMALLHOMEVEDIO = idBean.smallhomevediO_DOUBLE // 短视频翻倍 YLH_AD_VEDIO_SMALLHOMEVEDIO = idBean.smallhomevediO_DOUBLE // 短视频翻倍
}
if(!TextUtils.isEmpty(idBean.kuyinyuE_VEDIO)){
YLH_AD_VEDIO_KYLVEDIO = idBean.kuyinyuE_VEDIO // 来电秀视频 YLH_AD_VEDIO_KYLVEDIO = idBean.kuyinyuE_VEDIO // 来电秀视频
}
YLH_AD_NATIVEEXPRESS_AWARD=adBean.ylh.express.expresS_DIALOG if(!TextUtils.isEmpty(adBean.ylh.express.expresS_DIALOG)){
YLH_AD_NATIVEEXPRESS_AWARD = adBean.ylh.express.expresS_DIALOG
}
} }
} }
} }
\ No newline at end of file
...@@ -4,9 +4,9 @@ import java.io.Serializable; ...@@ -4,9 +4,9 @@ import java.io.Serializable;
public class AdIdBean implements Serializable { public class AdIdBean implements Serializable {
private VedioBean vedio; private VedioBean vedio=null;
private ExpressBean express; private ExpressBean express=null;
private FullvedioBean fullvedio; private FullvedioBean fullvedio=null;
public VedioBean getVedio() { public VedioBean getVedio() {
return vedio; return vedio;
...@@ -22,21 +22,21 @@ public class AdIdBean implements Serializable { ...@@ -22,21 +22,21 @@ public class AdIdBean implements Serializable {
public class VedioBean implements Serializable{ public class VedioBean implements Serializable{
// 激励视频 // 激励视频
private String KUYINYUE_VEDIO;//来电秀 private String KUYINYUE_VEDIO=null;//来电秀
private String SMALLHOMEVEDIO_DOUBLE;//短视频翻倍 private String SMALLHOMEVEDIO_DOUBLE=null;//短视频翻倍
private String HOMEVEDIO_CHALLENGE;//首页视频翻倍 private String HOMEVEDIO_CHALLENGE=null;//首页视频翻倍
private String BLESSINGBAG;//首页福袋 private String BLESSINGBAG=null;//首页福袋
private String OFFLINE_DOUBLE;//离线 private String OFFLINE_DOUBLE=null;//离线
private String SIGNIN_HOMEPAGE_CARD;//签到 private String SIGNIN_HOMEPAGE_CARD=null;//签到
private String CHALLENGE_TURN;//大转盘 private String CHALLENGE_TURN=null;//大转盘
private String WALK_BUBBLE;//气泡 private String WALK_BUBBLE=null;//气泡
private String CHALLENGE_VEDIO;//我的页面视频 private String CHALLENGE_VEDIO=null;//我的页面视频
private String HOMEWATER;//喝水打卡 private String HOMEWATER=null;//喝水打卡
private String WALK;//走路打卡 private String WALK=null;//走路打卡
private String CHALLENGE_CARD;//刮刮乐 private String CHALLENGE_CARD=null;//刮刮乐
private String EATMEAL_SUBSIDY;//饭补 private String EATMEAL_SUBSIDY=null;//饭补
private String DRAWCASH;//提现 private String DRAWCASH=null;//提现
private String HIGH_ACTIVITY;//超级加倍/高额任务 private String HIGH_ACTIVITY=null;//超级加倍/高额任务
public String getKUYINYUE_VEDIO() { public String getKUYINYUE_VEDIO() {
return KUYINYUE_VEDIO; return KUYINYUE_VEDIO;
...@@ -101,8 +101,8 @@ public class AdIdBean implements Serializable { ...@@ -101,8 +101,8 @@ public class AdIdBean implements Serializable {
public class ExpressBean implements Serializable{ public class ExpressBean implements Serializable{
// 信息流 // 信息流
private String EXPRESS_COMMON;//通用 private String EXPRESS_COMMON=null;//通用
private String EXPRESS_DIALOG;//弹框 private String EXPRESS_DIALOG=null;//弹框
public String getEXPRESS_COMMON() { public String getEXPRESS_COMMON() {
return EXPRESS_COMMON; return EXPRESS_COMMON;
...@@ -115,7 +115,7 @@ public class AdIdBean implements Serializable { ...@@ -115,7 +115,7 @@ public class AdIdBean implements Serializable {
public class FullvedioBean implements Serializable{ public class FullvedioBean implements Serializable{
// 全屏 // 全屏
private String FULLVEDIO_COMMON;//通用 private String FULLVEDIO_COMMON=null;//通用
public String getFULLVEDIO_COMMON() { public String getFULLVEDIO_COMMON() {
return FULLVEDIO_COMMON; return FULLVEDIO_COMMON;
......
...@@ -4,8 +4,8 @@ import java.io.Serializable; ...@@ -4,8 +4,8 @@ import java.io.Serializable;
public class ServerAdBean implements Serializable { public class ServerAdBean implements Serializable {
private AdIdBean csj; private AdIdBean csj = null;
private AdIdBean ylh; private AdIdBean ylh = null;
public AdIdBean getCsj() { public AdIdBean getCsj() {
return csj; return csj;
......
...@@ -5,4 +5,7 @@ ...@@ -5,4 +5,7 @@
# For customization when using a Version Control System, please read the # For customization when using a Version Control System, please read the
# header note. # header note.
#Sat Feb 06 15:44:58 CST 2021 #Sat Feb 06 15:44:58 CST 2021
sdk.dir=/Users/Hello/Library/Android/sdk
#sdk.dir=/Users/Hello/Library/Android/sdk
sdk.dir=/Users/mcg/Library/Android/sdk
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment