fix: 处理 sonar 新变动代码的异味 https://jira.shanqu.cc/browse/GHZS-921
This commit is contained in:
@ -167,15 +167,15 @@ import tv.danmaku.ijk.media.exo2.ExoSourceManager;
|
||||
|
||||
public class MainActivity extends BaseActivity {
|
||||
|
||||
public final static String EB_SKIP_MAIN = "MainActivity";
|
||||
public final static String SWITCH_TO_COMMUNITY = "switch_to_community";
|
||||
public final static String SWITCH_TO_VIDEO = "switch_to_video";
|
||||
public final static String SHOW_AD = "show_ad";
|
||||
private final static int COUNTDOWN_AD = 100;
|
||||
private final static int countdownMaxCount = 3;
|
||||
public static final String EB_SKIP_MAIN = "MainActivity";
|
||||
public static final String SWITCH_TO_COMMUNITY = "switch_to_community";
|
||||
public static final String SWITCH_TO_VIDEO = "switch_to_video";
|
||||
public static final String SHOW_AD = "show_ad";
|
||||
private static final int COUNTDOWN_AD = 100;
|
||||
private static final int COUNTDOWN_MAX_COUNT = 3;
|
||||
private int countdownCount = 0;
|
||||
|
||||
private final static String CURRENT_PAGE = "current_page";
|
||||
private static final String CURRENT_PAGE = "current_page";
|
||||
|
||||
private PackageViewModel mPackageViewModel;
|
||||
|
||||
@ -547,8 +547,8 @@ public class MainActivity extends BaseActivity {
|
||||
if (msg.what == COUNTDOWN_AD) {
|
||||
countdownCount++;
|
||||
TextView jumpBtn = findViewById(R.id.jumpBtn);
|
||||
jumpBtn.setText(String.format(Locale.CHINA, "跳过 %d", countdownMaxCount - countdownCount));
|
||||
if (countdownMaxCount < countdownCount) {
|
||||
jumpBtn.setText(String.format(Locale.CHINA, "跳过 %d", COUNTDOWN_MAX_COUNT - countdownCount));
|
||||
if (COUNTDOWN_MAX_COUNT < countdownCount) {
|
||||
hideStartUpAd();
|
||||
} else {
|
||||
mBaseHandler.sendEmptyMessageDelayed(COUNTDOWN_AD, 1000);
|
||||
|
||||
Reference in New Issue
Block a user