From 32881d3f3509277c56e617ad25eef2351f5e199c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 24 Nov 2022 10:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=BB=E6=92=AD=E5=8F=91?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=BA=AB=E4=BB=BD=E5=88=A4=E6=96=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/main/dialog/MainStartDialogFragment.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java index 714a02b83..7d598b45a 100644 --- a/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java +++ b/main/src/main/java/com/yunbao/main/dialog/MainStartDialogFragment.java @@ -4,7 +4,6 @@ import android.Manifest; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; -import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.os.Handler; @@ -15,8 +14,6 @@ import android.view.WindowManager; import android.widget.ImageView; import android.widget.LinearLayout; -import androidx.fragment.app.FragmentActivity; - import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.yunbao.common.CommonAppConfig; @@ -24,6 +21,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.ProcessResultUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.live.LiveConfig; @@ -142,8 +140,10 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O mRootView.findViewById(R.id.btn_video).setOnClickListener(this); mRootView.findViewById(R.id.btn_close).setOnClickListener(this); } + private HttpCallback mGetLiveSdkCallback; private ProcessResultUtil mProcessResultUtil; + public void setMainStartChooseCallback(boolean isCallback, AbsActivity activity) { mProcessResultUtil = new ProcessResultUtil(activity); if (isCallback) { @@ -164,7 +164,8 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O @Override public void onVideoClick() { - if (Constants.isAnchor) { + boolean isAnchor = IMLoginManager.get(mContext).getUserInfo().anchorUserType(); + if (isAnchor) { mProcessResultUtil.requestPermissions(new String[]{ Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, @@ -230,6 +231,7 @@ public class MainStartDialogFragment extends AbsDialogFragment implements View.O } } }; + @Override public void onClick(View v) { if (!canClick()) {