Skip to content

Commit

Permalink
增加针对某些dataBinding的场景,
Browse files Browse the repository at this point in the history
当context detach activity被回收会出现。
  • Loading branch information
TestSmirk committed Aug 5, 2021
1 parent 05c70ed commit fddaac5
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,12 @@ public void setRotateWithSystem(boolean rotateWithSystem) {
*/
@SuppressWarnings("ResourceType")
public GSYVideoPlayer getFullWindowPlayer() {
ViewGroup vp = (ViewGroup) (CommonUtil.scanForActivity(getContext())).findViewById(Window.ID_ANDROID_CONTENT);
Activity activity = CommonUtil.scanForActivity(getContext());
if (activity == null) {
return null;
}
ViewGroup vp = (ViewGroup) activity.findViewById(Window.ID_ANDROID_CONTENT);

final View full = vp.findViewById(getFullId());
GSYVideoPlayer gsyVideoPlayer = null;
if (full != null) {
Expand Down

0 comments on commit fddaac5

Please sign in to comment.