权限判断
This commit is contained in:
@@ -41,6 +41,8 @@ import com.google.firebase.messaging.FirebaseMessaging;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.jakewharton.rxbinding3.view.RxView;
|
||||
import com.lzf.easyfloat.interfaces.OnPermissionResult;
|
||||
import com.lzf.easyfloat.permission.PermissionUtils;
|
||||
import com.tencent.imsdk.v2.V2TIMCallback;
|
||||
import com.tencent.imsdk.v2.V2TIMManager;
|
||||
import com.tencent.imsdk.v2.V2TIMSDKConfig;
|
||||
@@ -483,6 +485,14 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
if (IMLoginManager.get(mContext).isHint()) {
|
||||
HintDialog fragment = new HintDialog();
|
||||
fragment.show(((FragmentActivity) mContext).getSupportFragmentManager(), "HintDialog");
|
||||
fragment.setListener(new HintDialog.HintListener() {
|
||||
@Override
|
||||
public void requestPermission() {
|
||||
PermissionUtils.requestPermission(mContext, b -> {
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1265,7 +1275,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveFloatEvent(LiveFloatEvent event) {
|
||||
if (event != null && event.getmLiveBean() != null && !TextUtils.isEmpty(event.getmLiveBean().getPull())){
|
||||
if (event != null && event.getmLiveBean() != null && !TextUtils.isEmpty(event.getmLiveBean().getPull())) {
|
||||
new Handler().post(() -> LiveFloatView.getInstance()
|
||||
.cacheLiveData(event.getmLiveBean(), event.getmLiveType(), event.getmLiveSDK(), event.getmLiveTypeVal())
|
||||
.builderFloat(mContext, event.getmLiveBean().getPull(), LiveAudienceActivity.class));
|
||||
|
||||
Reference in New Issue
Block a user