Skip to content

Commit 95798d4

Browse files
author
lucas
committed
adapter 中的 buildWidgetRotationListener 添加null判断
1 parent 84af555 commit 95798d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

VideoOS/venvy_pub/src/main/java/cn/com/videopls/pub/VideoPlusViewHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ public void run() {
5757

5858
if (videoPlusView != null) {
5959
if (videoPlusView.getAdapter() != null) {
60-
videoPlusView.getAdapter().buildWidgetRotationListener().onRotate(orientationType == RotateStatus.TO_LANDSCAPE.getId() ?
61-
RotateStatus.TO_LANDSCAPE : RotateStatus.TO_VERTICAL);
60+
if (videoPlusView.getAdapter().buildWidgetRotationListener() != null) {
61+
videoPlusView.getAdapter().buildWidgetRotationListener().onRotate(orientationType == RotateStatus.TO_LANDSCAPE.getId() ?
62+
RotateStatus.TO_LANDSCAPE : RotateStatus.TO_VERTICAL);
63+
}
64+
6265
}
6366
if (appType == VenvyObservableTarget.Constant.CONSTANT_APP_TYPE_TOOLS) {
6467
videoPlusView.launchVisionToolsProgram(appletsId,data); // 请求视联网小工具

0 commit comments

Comments
 (0)