|
|
@@ -100,6 +100,7 @@ public class SplashAct extends BaseActivity {
|
|
|
|
|
|
private void init() {
|
|
|
if (SysAppUtil.isNotSupport(this)) return;
|
|
|
+ new Exception("Splash go to checkuser").printStackTrace();
|
|
|
SheepApp.getInstance().getNetComponent().getApiService().checkUserFirst()
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
@@ -183,10 +184,12 @@ public class SplashAct extends BaseActivity {
|
|
|
.setOnTickListener(new RxjavaCountDownTimer.OnTickListener() {
|
|
|
@Override
|
|
|
public void onFinish() {
|
|
|
- if (!isDestroyed()) {
|
|
|
- ViewUtil.setVisibility(splash_skip, View.INVISIBLE);//设置为INVISIBLE代表定时器结束
|
|
|
- if (!goLink) {
|
|
|
- sendHandlerMessages(10);
|
|
|
+ if (timer != null) {
|
|
|
+ if (!isDestroyed()) {
|
|
|
+ ViewUtil.setVisibility(splash_skip, View.INVISIBLE);//设置为INVISIBLE代表定时器结束
|
|
|
+ if (!goLink) {
|
|
|
+ sendHandlerMessages(10);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -276,12 +279,12 @@ public class SplashAct extends BaseActivity {
|
|
|
private void sendHandlerMessages(int time) {
|
|
|
try {
|
|
|
new Exception("Splash go to next").printStackTrace();
|
|
|
- if(timer!=null){
|
|
|
+ if (timer != null) {
|
|
|
timer.clear();
|
|
|
timer = null;
|
|
|
}
|
|
|
mHandler.removeMessages(0);
|
|
|
- mHandler.sendEmptyMessageDelayed(0, /*BuildConfig.DEBUG ? 100 :*/ time);
|
|
|
+ mHandler.sendEmptyMessageDelayed(0, time);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|