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()) {