|
|
|
|
@ -1181,13 +1181,13 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { |
|
|
|
|
List<String> items = Part.get(response.body().string()); |
|
|
|
|
if (!items.contains(source)) items.add(0, source); |
|
|
|
|
App.post(() -> setPartAdapter(items)); |
|
|
|
|
App.post(() -> setPartAdapter(items), 1000); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void onFailure(@NonNull Call call, @NonNull IOException e) { |
|
|
|
|
List<String> items = Arrays.asList(source); |
|
|
|
|
App.post(() -> setPartAdapter(items)); |
|
|
|
|
App.post(() -> setPartAdapter(items), 1000); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
@ -1195,7 +1195,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
private void setPartAdapter(List<String> items) { |
|
|
|
|
mBinding.part.setVisibility(View.VISIBLE); |
|
|
|
|
mPartAdapter.setItems(items, null); |
|
|
|
|
setR2Callback(2000); |
|
|
|
|
setR2Callback(1000); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void checkFlag(Vod item) { |
|
|
|
|
@ -1611,7 +1611,7 @@ public class VideoActivity extends BaseActivity implements CustomKeyDownVod.List |
|
|
|
|
@Override |
|
|
|
|
public boolean dispatchKeyEvent(KeyEvent event) { |
|
|
|
|
hasKeyEvent = true; |
|
|
|
|
if (!isFullscreen() && KeyUtil.isBackKey(event) && Setting.getSmallWindowBackKey() == 1 && getCurrentFocus() != mBinding.video) { |
|
|
|
|
if (mBinding.progressLayout.isContent() && !isFullscreen() && KeyUtil.isBackKey(event) && Setting.getSmallWindowBackKey() == 1 && getCurrentFocus() != mBinding.video) { |
|
|
|
|
mFocus1 = mBinding.video; |
|
|
|
|
getFocus1().requestFocus(); |
|
|
|
|
return true; |
|
|
|
|
|