一键修复下载成功跳转至首页

This commit is contained in:
huangzhuanghua
2016-11-21 09:27:54 +08:00
parent bbffe7737b
commit 7c801366ef
2 changed files with 14 additions and 2 deletions

View File

@ -42,6 +42,7 @@ import com.gh.download.DownloadStatus;
import com.gh.gamecenter.entity.AppEntity;
import com.gh.gamecenter.entity.GameUpdateEntity;
import com.gh.gamecenter.eventbus.EBReuse;
import com.gh.gamecenter.eventbus.EBSkip;
import com.gh.gamecenter.manager.PackageManager;
import com.gh.gamecenter.volley.extended.JsonObjectExtendedRequest;
import com.gh.gamecenter.volley.extended.StringExtendedRequest;
@ -228,8 +229,20 @@ public class SettingActivity extends BaseActivity implements OnClickListener {
editor.putBoolean("isShow", true);
editor.putBoolean("isCheckShow", false);
editor.apply();
toast("修复成功,快去首页看看吧");
toast("修复成功");
EventBus.getDefault().post(new EBReuse("Refresh"));
finish();
new Thread(){
@Override
public void run() {
try {
sleep(800);
} catch (InterruptedException e) {
e.printStackTrace();
}
EventBus.getDefault().post(new EBSkip("GameFragment", 0));
}
}.start();
break;
case R.id.setting_rl_autoinstall:
setting_sb_autoinstall.performClick();