优化观众直播间PortraitLiveManager的强引用导致的内存泄漏
This commit is contained in:
parent
3e7942dbd4
commit
721172d48a
@ -105,7 +105,7 @@ import java.util.TreeMap;
|
||||
*/
|
||||
|
||||
public abstract class LiveActivity extends AbsActivity implements SocketMessageListener, LiveShareDialogFragment.ActionListener, KeyBoardHeightChangeListener {
|
||||
|
||||
public String anyway;
|
||||
public ViewGroup mContainer;
|
||||
protected ViewGroup mPageContainer;
|
||||
protected LiveRoomViewHolder mLiveRoomViewHolder;
|
||||
@ -618,9 +618,9 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
*/
|
||||
@Override
|
||||
public void onLinkMicAnchorPlayUrl(String pkUid, String playUrl) {
|
||||
if (LiveAudienceActivity.anyway == null) {
|
||||
if (anyway == null) {
|
||||
mLiveLinkMicAnchorPresenter.onLinkMicAnchorPlayUrl(pkUid, playUrl);
|
||||
} else if (mLiveLinkMicAnchorPresenter != null && LiveAudienceActivity.anyway.equals("0")) {
|
||||
} else if (mLiveLinkMicAnchorPresenter != null && anyway.equals("0")) {
|
||||
mLiveLinkMicAnchorPresenter.onLinkMicAnchorPlayUrl(pkUid, playUrl);
|
||||
}
|
||||
if (this instanceof LiveAudienceActivity) {
|
||||
|
@ -116,7 +116,7 @@ import java.util.List;
|
||||
public class LiveAudienceActivity extends LiveActivity {
|
||||
|
||||
private static final String TAG = "LiveAudienceActivity";
|
||||
public static String anyway;
|
||||
|
||||
public JSONObject pkInfo;
|
||||
public static LiveAudienceActivity liveAudienceActivity;
|
||||
|
||||
|
@ -60,7 +60,10 @@ public class LiveMoreDialogFragment extends AbsDialogFragment {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dismiss();
|
||||
if (((LiveAudienceActivity) mContext).pkInfo != null && ((LiveAudienceActivity) mContext).pkInfo.getIntValue("ifpk") == 0 && ((LiveAudienceActivity) mContext).anyway.equals("1") && LiveRoomViewHolder.d_pk_view.getVisibility() != View.VISIBLE) {
|
||||
if (mContext instanceof LiveAudienceActivity && (((LiveAudienceActivity) mContext).pkInfo != null &&
|
||||
((LiveAudienceActivity) mContext).pkInfo.getIntValue("ifpk") == 0 &&
|
||||
((LiveAudienceActivity) mContext).anyway.equals("1") &&
|
||||
LiveRoomViewHolder.d_pk_view.getVisibility() != View.VISIBLE)) {
|
||||
((LiveAudienceActivity) mContext).btnSmallScreen.setVisibility(View.VISIBLE);
|
||||
((LiveAudienceActivity) mContext).setCurrentItem(0);
|
||||
((LiveAudienceActivity) mContext).getmLivePlayViewHolder().fullScreen();
|
||||
|
Loading…
Reference in New Issue
Block a user