尝试解决首页换源白屏 bug fix

pull/11/head
于俊 4 years ago
parent 15091be2b0
commit 51209f1110
  1. 8
      .idea/misc.xml
  2. 6
      app/src/main/java/com/github/tvbox/osc/player/controller/VodController.java
  3. 11
      app/src/main/java/com/github/tvbox/osc/ui/activity/HomeActivity.java
  4. 7
      app/src/main/java/com/github/tvbox/osc/ui/activity/SearchActivity.java

@ -9,12 +9,16 @@
<map>
<entry key="..\:/tvbox/TVBoxOS/app/src/main/layout/activity_detail.xml" value="0.16893115942028986" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/layout/activity_live_play.xml" value="0.1" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/item_channel_group_layout.xml" value="0.22826086956521738" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/item_live_channel_layout.xml" value="0.22826086956521738" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/drawable/box_controller_top_bg.xml" value="0.2455" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_detail.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_live_play.xml" value="0.3369894099848714" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_play.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_search.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/activity_setting.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/fragment_model.xml" value="0.33" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/item_channel_group_layout.xml" value="0.22826086956521738" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/item_live_channel_layout.xml" value="0.22826086956521738" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/loadsir_loading_layout.xml" value="0.3619791666666667" />
<entry key="..\:/tvbox/TVBoxOS/app/src/main/res/layout/player_vod_control_view.xml" value="0.3619791666666667" />
</map>
</option>

@ -297,10 +297,11 @@ public class VodController extends BaseController {
updatePlayerCfgView();
listener.updatePlayerCfg();
listener.replay(false);
hideBottom();
// hideBottom();
} catch (JSONException e) {
e.printStackTrace();
}
mPlayerBtn.requestFocus();
}
});
mPlayerIJKBtn.setOnClickListener(new OnClickListener() {
@ -325,10 +326,11 @@ public class VodController extends BaseController {
updatePlayerCfgView();
listener.updatePlayerCfg();
listener.replay(false);
hideBottom();
// hideBottom();
} catch (JSONException e) {
e.printStackTrace();
}
mPlayerIJKBtn.requestFocus();
}
});
// 增加播放页面片头片尾时间重置

@ -216,7 +216,7 @@ public class HomeActivity extends BaseActivity {
if (home != null && home.getName() != null && !home.getName().isEmpty())
tvName.setText(home.getName());
if (dataInitOk && jarInitOk) {
// showLoading();
showLoading();
sourceViewModel.getSort(ApiConfig.get().getHomeSourceBean().getKey());
if (hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
LOG.e("有");
@ -404,6 +404,11 @@ public class HomeActivity extends BaseActivity {
private void exit() {
if (System.currentTimeMillis() - mExitTime < 2000) {
//这一段借鉴来自 q群老哥 IDCardWeb
EventBus.getDefault().unregister(this);
AppManager.getInstance().appExit(0);
ControlManager.get().stopServer();
finish();
super.onBackPressed();
} else {
mExitTime = System.currentTimeMillis();
@ -583,8 +588,8 @@ public class HomeActivity extends BaseActivity {
bundle.putBoolean("useCache", true);
intent.putExtras(bundle);
HomeActivity.this.startActivity(intent);
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(0);
// android.os.Process.killProcess(android.os.Process.myPid());
// System.exit(0);
}
}

@ -85,7 +85,6 @@ public class SearchActivity extends BaseActivity {
initView();
initViewModel();
initData();
enableKeyboard(this);
}
/*
@ -190,6 +189,12 @@ public class SearchActivity extends BaseActivity {
etSearch.setText("");
}
});
etSearch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
enableKeyboard(SearchActivity.this);
}
});
keyboard.setOnSearchKeyListener(new SearchKeyboard.OnSearchKeyListener() {
@Override
public void onSearchKey(int pos, String key) {

Loading…
Cancel
Save