正在查看: Biko v2.0.23 应用的 InputUserInfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Biko v2.0.23 应用的 InputUserInfoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package app.callpe.ui.user;
import android.R;
import android.app.Activity;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputFilter;
import android.text.TextWatcher;
import android.util.TypedValue;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import androidx.core.content.FileProvider;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import app.callpe.App;
import app.callpe.common.utils.DateHelper;
import app.callpe.common.utils.FileUriUtils;
import app.callpe.common.utils.PermissionHelper;
import app.callpe.common.utils.ResultState;
import app.callpe.common.utils.extensions.ActivityExtKt;
import app.callpe.common.utils.extensions.EdittextExtKt;
import app.callpe.common.utils.extensions.StringExtKt;
import app.callpe.common.utils.extensions.ViewExtKt;
import app.callpe.common.utils.file_helper.CompressFile;
import app.callpe.common.utils.helper_functions.DialogHelper;
import app.callpe.common.utils.helper_functions.EmojiFilter;
import app.callpe.data.model.LanguageResponse;
import app.callpe.data.model.User;
import app.callpe.data.model.UserDetailBody;
import app.callpe.data.repository.upload.UploadProgressHelper;
import app.callpe.databinding.ActivityInputUserInfoBinding;
import app.callpe.service.FirebaseNotificationService;
import app.callpe.ui.bottomsheet.AvatarBottomSheet;
import app.callpe.ui.bottomsheet.InterestAndLanguage;
import app.callpe.ui.chat.ChatActivity;
import app.callpe.ui.dialog.DobPickerDialog;
import app.callpe.ui.home.HomeActivity;
import app.callpe.ui.home.StreamerHomeActivity;
import app.callpe.ui.onboarding.StreamerOnboardActivity;
import com.adjust.sdk.Constants;
import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder;
import com.crazylegend.core.dto.Config;
import com.crazylegend.core.modifiers.base.BaseSinglePickerModifier;
import com.crazylegend.imagepicker.images.ImageModel;
import com.crazylegend.imagepicker.pickers.SingleImagePicker;
import com.facebook.internal.NativeProtocol;
import com.google.android.material.chip.Chip;
import com.google.gson.Gson;
import dagger.hilt.android.AndroidEntryPoint;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlin.text.StringsKt;
import kotlinx.coroutines.Job;
import timber.log.Timber;
@Metadata(d1 = {"\u0000z\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010&\u001a\u00020'H\u0002J\b\u0010(\u001a\u00020'H\u0002J\b\u0010)\u001a\u00020'H\u0002J\b\u0010*\u001a\u00020'H\u0002J\b\u0010+\u001a\u00020'H\u0002J\u0010\u0010,\u001a\u00020'2\u0006\u0010-\u001a\u00020.H\u0002J\b\u0010/\u001a\u00020'H\u0002J\b\u00100\u001a\u00020'H\u0002J\b\u00101\u001a\u000202H\u0002J\b\u00103\u001a\u00020'H\u0002J\b\u00104\u001a\u00020'H\u0002J\b\u00105\u001a\u00020'H\u0002J\u0012\u00106\u001a\u00020'2\b\u00107\u001a\u0004\u0018\u000108H\u0014J\b\u00109\u001a\u00020'H\u0002J\b\u0010:\u001a\u00020'H\u0002J\b\u0010;\u001a\u00020'H\u0002J-\u0010<\u001a\u00020'2\u0006\u0010=\u001a\u00020>2\u000e\u0010\u001d\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00070\u00062\u0006\u0010?\u001a\u00020@H\u0016¢\u0006\u0002\u0010AJ\b\u0010B\u001a\u00020'H\u0002J\b\u0010C\u001a\u00020'H\u0002J \u0010D\u001a\u00020'2\u0016\u0010E\u001a\u0012\u0012\u0004\u0012\u00020F0\u000fj\b\u0012\u0004\u0012\u00020F`\u0010H\u0002J\b\u0010G\u001a\u00020'H\u0002J\b\u0010H\u001a\u00020'H\u0002J\b\u0010I\u001a\u00020'H\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082.¢\u0006\u0002\n\u0000R\u0016\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\bR\u001a\u0010\t\u001a\u00020\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR*\u0010\u000e\u001a\u0012\u0012\u0004\u0012\u00020\u00070\u000fj\b\u0012\u0004\u0012\u00020\u0007`\u0010X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u0012\"\u0004\b\u0013\u0010\u0014R(\u0010\u0015\u001a\u0010\u0012\f\u0012\n \u0018*\u0004\u0018\u00010\u00170\u00170\u0016X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0019\u0010\u001a\"\u0004\b\u001b\u0010\u001cR\u0016\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u00070\u0006X\u0082\u000e¢\u0006\u0004\n\u0002\u0010\bR\u0010\u0010\u001e\u001a\u0004\u0018\u00010\u001fX\u0082\u000e¢\u0006\u0002\n\u0000R\u001b\u0010 \u001a\u00020!8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b$\u0010%\u001a\u0004\b\"\u0010#¨\u0006J"}, d2 = {"Lapp/callpe/ui/user/InputUserInfoActivity;", "Landroidx/appcompat/app/AppCompatActivity;", "()V", "binding", "Lapp/callpe/databinding/ActivityInputUserInfoBinding;", "cameraPermission", "", "", "[Ljava/lang/String;", "currentDate", "getCurrentDate", "()Ljava/lang/String;", "setCurrentDate", "(Ljava/lang/String;)V", "languageList", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "getLanguageList", "()Ljava/util/ArrayList;", "setLanguageList", "(Ljava/util/ArrayList;)V", "launcher", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "kotlin.jvm.PlatformType", "getLauncher", "()Landroidx/activity/result/ActivityResultLauncher;", "setLauncher", "(Landroidx/activity/result/ActivityResultLauncher;)V", NativeProtocol.RESULT_ARGS_PERMISSIONS, "uploadProgressHelper", "Lapp/callpe/data/repository/upload/UploadProgressHelper;", "viewModel", "Lapp/callpe/ui/user/UserViewModel;", "getViewModel", "()Lapp/callpe/ui/user/UserViewModel;", "viewModel$delegate", "Lkotlin/Lazy;", "femaleSelected", "", "getUser", "goToHomeActivity", "goToStreamerHomeActivity", "goToStreamerOnBoardingActivity", "loadImage", "imageModel", "Lcom/crazylegend/imagepicker/images/ImageModel;", "maleSelected", "observeEditText", "observeEvent", "Lkotlinx/coroutines/Job;", "observeUploadProgress", "onCameraClick", "onClick", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onFemaleSelected", "onGalleryClick", "onMaleSelected", "onRequestPermissionsResult", "requestCode", "", "grantResults", "", "(I[Ljava/lang/String;[I)V", "refresh", "save", "setUpChosenLanguageList", "languages", "Lapp/callpe/data/model/LanguageResponse;", "setValues", "showGenderDialog", "showTip", "app_bikoRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
@AndroidEntryPoint
public final class InputUserInfoActivity extends Hilt_InputUserInfoActivity {
private ActivityInputUserInfoBinding binding;
private ActivityResultLauncher<Intent> launcher;
private UploadProgressHelper uploadProgressHelper;
private final Lazy viewModel;
private String currentDate = DateHelper.getTodayDate();
private String[] permissions = {"android.permission.RECORD_AUDIO", "android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE"};
private final String[] cameraPermission = {"android.permission.CAMERA", "android.permission.RECORD_AUDIO"};
private ArrayList<String> languageList = new ArrayList<>();
public InputUserInfoActivity() {
final ComponentActivity componentActivity = (ComponentActivity) this;
final Function0 function0 = null;
this.viewModel = new ViewModelLazy(Reflection.getOrCreateKotlinClass(UserViewModel.class), new Function0<ViewModelStore>() {
{
super(0);
}
public final ViewModelStore m2200invoke() {
return componentActivity.getViewModelStore();
}
}, new Function0<ViewModelProvider.Factory>() {
{
super(0);
}
public final ViewModelProvider.Factory m2199invoke() {
return componentActivity.getDefaultViewModelProviderFactory();
}
}, new Function0<CreationExtras>() {
{
super(0);
}
public final CreationExtras m2201invoke() {
CreationExtras creationExtras;
Function0 function02 = function0;
return (function02 == null || (creationExtras = (CreationExtras) function02.invoke()) == null) ? componentActivity.getDefaultViewModelCreationExtras() : creationExtras;
}
});
ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult((ActivityResultContract) new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
InputUserInfoActivity.launcher$lambda$1(InputUserInfoActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul… //\n }\n }");
this.launcher = registerForActivityResult;
}
public final UserViewModel getViewModel() {
return (UserViewModel) this.viewModel.getValue();
}
public final String getCurrentDate() {
return this.currentDate;
}
public final void setCurrentDate(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.currentDate = str;
}
public final ArrayList<String> getLanguageList() {
return this.languageList;
}
public final void setLanguageList(ArrayList<String> arrayList) {
Intrinsics.checkNotNullParameter(arrayList, "<set-?>");
this.languageList = arrayList;
}
public final ActivityResultLauncher<Intent> getLauncher() {
return this.launcher;
}
public final void setLauncher(ActivityResultLauncher<Intent> activityResultLauncher) {
Intrinsics.checkNotNullParameter(activityResultLauncher, "<set-?>");
this.launcher = activityResultLauncher;
}
public static final void launcher$lambda$1(InputUserInfoActivity inputUserInfoActivity, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
Intrinsics.checkNotNullParameter(activityResult, "result");
if (activityResult.getResultCode() == -1) {
File newFile = inputUserInfoActivity.getViewModel().getNewFile();
if (newFile != null) {
RequestBuilder load = Glide.with((FragmentActivity) inputUserInfoActivity).load(newFile.getPath());
ActivityInputUserInfoBinding activityInputUserInfoBinding = inputUserInfoActivity.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
load.into(activityInputUserInfoBinding.avatar);
String compressedImageFile = CompressFile.getCompressedImageFile(Uri.fromFile(newFile), (Context) inputUserInfoActivity, 30);
if (compressedImageFile == null) {
compressedImageFile = newFile.getPath();
}
inputUserInfoActivity.getViewModel().setAvatar(compressedImageFile);
return;
}
return;
}
activityResult.getResultCode();
}
protected void onCreate(Bundle savedInstanceState) {
String[] strArr;
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= 33) {
strArr = new String[]{"android.permission.READ_MEDIA_IMAGES"};
} else if (Build.VERSION.SDK_INT >= 30) {
strArr = new String[]{"android.permission.READ_EXTERNAL_STORAGE"};
} else if (Build.VERSION.SDK_INT == 29) {
strArr = new String[]{"android.permission.READ_EXTERNAL_STORAGE"};
} else {
strArr = new String[]{"android.permission.WRITE_EXTERNAL_STORAGE", "android.permission.READ_EXTERNAL_STORAGE"};
}
this.permissions = strArr;
ActivityInputUserInfoBinding inflate = ActivityInputUserInfoBinding.inflate(getLayoutInflater());
Intrinsics.checkNotNullExpressionValue(inflate, "inflate(layoutInflater)");
this.binding = inflate;
this.uploadProgressHelper = new UploadProgressHelper((Context) this, (Activity) this);
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
setContentView(activityInputUserInfoBinding.getRoot());
onClick();
observeEditText();
observeEvent();
observeUploadProgress();
getUser();
setValues();
getViewModel().getAvatars();
getViewModel().getUserDetails(true);
}
private final void setValues() {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.userName.setFilters(new InputFilter[]{new InputFilter.LengthFilter(20), new EmojiFilter()});
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding3;
}
EditText editText = activityInputUserInfoBinding2.userName;
Intrinsics.checkNotNullExpressionValue(editText, "binding.userName");
EdittextExtKt.disablePaste(editText);
}
private final void showTip() {
LifecycleOwnerKt.getLifecycleScope((LifecycleOwner) this).launchWhenStarted(new InputUserInfoActivity$showTip$1(this, null));
}
private final Job observeEvent() {
return LifecycleOwnerKt.getLifecycleScope((LifecycleOwner) this).launchWhenStarted(new InputUserInfoActivity$observeEvent$1(this, null));
}
private final void observeUploadProgress() {
getViewModel().getResult().observe((LifecycleOwner) this, new InputUserInfoActivity$sam$androidx_lifecycle_Observer$0(new Function1<ResultState<? extends Double>, Unit>() {
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
public class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[ResultState.Status.values().length];
try {
iArr[ResultState.Status.LOADING.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[ResultState.Status.ERROR.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[ResultState.Status.SUCCESS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[ResultState.Status.RESET.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
$EnumSwitchMapping$0 = iArr;
}
}
{
super(1);
}
public Object invoke(Object obj) {
invoke((ResultState<Double>) obj);
return Unit.INSTANCE;
}
public final void invoke(ResultState<Double> resultState) {
UploadProgressHelper uploadProgressHelper;
UploadProgressHelper uploadProgressHelper2;
UploadProgressHelper uploadProgressHelper3;
UploadProgressHelper uploadProgressHelper4;
UploadProgressHelper uploadProgressHelper5;
int i = WhenMappings.$EnumSwitchMapping$0[resultState.getStatus().ordinal()];
if (i == 1) {
uploadProgressHelper = InputUserInfoActivity.this.uploadProgressHelper;
if (uploadProgressHelper != null) {
Double data = resultState.getData();
uploadProgressHelper.progressDialogPercent(data != null ? (float) data.doubleValue() : 0.0f);
return;
}
return;
}
if (i == 2) {
uploadProgressHelper2 = InputUserInfoActivity.this.uploadProgressHelper;
if (uploadProgressHelper2 != null) {
uploadProgressHelper2.dismiss();
return;
}
return;
}
if (i == 3) {
uploadProgressHelper3 = InputUserInfoActivity.this.uploadProgressHelper;
if (uploadProgressHelper3 != null) {
uploadProgressHelper3.dismiss();
return;
}
return;
}
if (i != 4) {
return;
}
uploadProgressHelper4 = InputUserInfoActivity.this.uploadProgressHelper;
if (uploadProgressHelper4 != null) {
uploadProgressHelper4.dismiss();
}
uploadProgressHelper5 = InputUserInfoActivity.this.uploadProgressHelper;
if (uploadProgressHelper5 != null) {
uploadProgressHelper5.setProgressDialog();
}
}
}));
}
private final void getUser() {
String str;
String stringExtra = getIntent().getStringExtra("user");
String str2 = stringExtra;
if (!(str2 == null || str2.length() == 0)) {
User user = (User) new Gson().fromJson(stringExtra, User.class);
if (user != null) {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
TextView textView = activityInputUserInfoBinding.referralTxt;
Intrinsics.checkNotNullExpressionValue(textView, "binding.referralTxt");
textView.setVisibility(8);
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding3 = null;
}
View view = activityInputUserInfoBinding3.referralTxtValueHolder;
Intrinsics.checkNotNullExpressionValue(view, "binding.referralTxtValueHolder");
view.setVisibility(8);
getViewModel().setUser(user);
String dob = user.getDob();
if (dob == null || (str = StringExtKt.formatDateByPattern(dob, "yyyy-MM-dd", "dd-MM-yyyy")) == null) {
str = this.currentDate;
}
this.currentDate = str;
ActivityInputUserInfoBinding activityInputUserInfoBinding4 = this.binding;
if (activityInputUserInfoBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding4 = null;
}
activityInputUserInfoBinding4.selectDobBtn.setText(this.currentDate);
String dob2 = user.getDob();
if (dob2 == null) {
dob2 = "";
}
this.currentDate = dob2;
ActivityInputUserInfoBinding activityInputUserInfoBinding5 = this.binding;
if (activityInputUserInfoBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding5 = null;
}
LinearLayout linearLayout = activityInputUserInfoBinding5.dobParent;
Intrinsics.checkNotNullExpressionValue(linearLayout, "binding.dobParent");
ViewExtKt.showOrGone(linearLayout, true);
ActivityInputUserInfoBinding activityInputUserInfoBinding6 = this.binding;
if (activityInputUserInfoBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding6 = null;
}
activityInputUserInfoBinding6.userName.setText(user.getName());
ActivityInputUserInfoBinding activityInputUserInfoBinding7 = this.binding;
if (activityInputUserInfoBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding7 = null;
}
activityInputUserInfoBinding7.submitBtn.setText(getString(2131953034));
if (Intrinsics.areEqual(user.getGender(), "MALE")) {
onMaleSelected();
maleSelected();
} else {
onFemaleSelected();
femaleSelected();
}
String avatar = user.getAvatar();
if (avatar != null) {
getViewModel().setAvatar(avatar);
RequestBuilder load = Glide.with((FragmentActivity) this).load(avatar);
ActivityInputUserInfoBinding activityInputUserInfoBinding8 = this.binding;
if (activityInputUserInfoBinding8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding8;
}
load.into(activityInputUserInfoBinding2.avatar);
return;
}
return;
}
return;
}
showTip();
}
private final void onFemaleSelected() {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.maleRadioBtn.setChecked(false);
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding3;
}
activityInputUserInfoBinding2.femaleRadioBtn.setChecked(true);
}
private final void onMaleSelected() {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.maleRadioBtn.setChecked(true);
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding3;
}
activityInputUserInfoBinding2.femaleRadioBtn.setChecked(false);
}
private final void observeEditText() {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.userName.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
}
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
ActivityInputUserInfoBinding activityInputUserInfoBinding2;
ActivityInputUserInfoBinding activityInputUserInfoBinding3;
activityInputUserInfoBinding2 = InputUserInfoActivity.this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding4 = null;
if (activityInputUserInfoBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding2 = null;
}
Editable text = activityInputUserInfoBinding2.userName.getText();
String str = String.valueOf(text != null ? StringsKt.trim(text) : null).length() + " / 20";
activityInputUserInfoBinding3 = InputUserInfoActivity.this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding4 = activityInputUserInfoBinding3;
}
activityInputUserInfoBinding4.nickNameTextCount.setText(str);
}
});
}
private final void onClick() {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.submitBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$3(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding3 = null;
}
activityInputUserInfoBinding3.maleButton.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$4(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding4 = this.binding;
if (activityInputUserInfoBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding4 = null;
}
activityInputUserInfoBinding4.femaleButton.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$5(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding5 = this.binding;
if (activityInputUserInfoBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding5 = null;
}
activityInputUserInfoBinding5.referralTxt.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$7(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding6 = this.binding;
if (activityInputUserInfoBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding6 = null;
}
activityInputUserInfoBinding6.selectDobBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$8(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding7 = this.binding;
if (activityInputUserInfoBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding7 = null;
}
activityInputUserInfoBinding7.avatarParent.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$9(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding8 = this.binding;
if (activityInputUserInfoBinding8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding8 = null;
}
activityInputUserInfoBinding8.avatar.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$10(InputUserInfoActivity.this, view);
}
});
ActivityInputUserInfoBinding activityInputUserInfoBinding9 = this.binding;
if (activityInputUserInfoBinding9 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding9;
}
activityInputUserInfoBinding2.editLanguage.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InputUserInfoActivity.onClick$lambda$11(InputUserInfoActivity.this, view);
}
});
}
public static final void onClick$lambda$3(InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
inputUserInfoActivity.save();
}
public static final void onClick$lambda$4(InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
inputUserInfoActivity.onMaleSelected();
}
public static final void onClick$lambda$5(InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
inputUserInfoActivity.onFemaleSelected();
}
public static final void onClick$lambda$7(final InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
ActivityInputUserInfoBinding activityInputUserInfoBinding = inputUserInfoActivity.binding;
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = null;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.referralTxtValueHolder.setVisibility(0);
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = inputUserInfoActivity.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
} else {
activityInputUserInfoBinding2 = activityInputUserInfoBinding3;
}
activityInputUserInfoBinding2.scroll.post(new Runnable() {
@Override
public final void run() {
InputUserInfoActivity.onClick$lambda$7$lambda$6(InputUserInfoActivity.this);
}
});
}
public static final void onClick$lambda$7$lambda$6(InputUserInfoActivity inputUserInfoActivity) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
ActivityInputUserInfoBinding activityInputUserInfoBinding = inputUserInfoActivity.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.scroll.fullScroll(130);
}
public static final void onClick$lambda$8(final InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
DobPickerDialog dobPickerDialog = new DobPickerDialog(inputUserInfoActivity.currentDate, new Function1<String, Unit>() {
{
super(1);
}
public Object invoke(Object obj) {
invoke((String) obj);
return Unit.INSTANCE;
}
public final void invoke(String str) {
ActivityInputUserInfoBinding activityInputUserInfoBinding;
Intrinsics.checkNotNullParameter(str, "it");
activityInputUserInfoBinding = InputUserInfoActivity.this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.selectDobBtn.setText(StringExtKt.formatDateByPattern(str, "yyyy-MM-dd", "dd-MM-yyyy"));
InputUserInfoActivity.this.setCurrentDate(str);
}
});
dobPickerDialog.setEdit(true);
dobPickerDialog.show(inputUserInfoActivity.getSupportFragmentManager(), dobPickerDialog.getTag());
}
public static final void onClick$lambda$9(final InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
ArrayList avatars = App.Companion.getAvatars();
if (avatars == null) {
avatars = new ArrayList();
}
AvatarBottomSheet avatarBottomSheet = new AvatarBottomSheet(avatars, new Function1<String, Unit>() {
{
super(1);
}
public Object invoke(Object obj) {
invoke((String) obj);
return Unit.INSTANCE;
}
public final void invoke(String str) {
ActivityInputUserInfoBinding activityInputUserInfoBinding;
UserViewModel viewModel;
Intrinsics.checkNotNullParameter(str, "it");
RequestBuilder load = Glide.with(InputUserInfoActivity.this).load(str);
activityInputUserInfoBinding = InputUserInfoActivity.this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
load.into(activityInputUserInfoBinding.avatar);
viewModel = InputUserInfoActivity.this.getViewModel();
viewModel.setAvatar(str);
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m2202invoke();
return Unit.INSTANCE;
}
public final void m2202invoke() {
InputUserInfoActivity.this.onCameraClick();
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m2203invoke();
return Unit.INSTANCE;
}
public final void m2203invoke() {
InputUserInfoActivity.this.onGalleryClick();
}
});
if (avatarBottomSheet.isAdded() || avatarBottomSheet.isVisible()) {
return;
}
avatarBottomSheet.setShowGalleryOptions(true);
avatarBottomSheet.show(inputUserInfoActivity.getSupportFragmentManager(), "StreamerDetailBottomSheet");
}
public static final void onClick$lambda$10(InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
ActivityInputUserInfoBinding activityInputUserInfoBinding = inputUserInfoActivity.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.avatarParent.callOnClick();
}
public static final void onClick$lambda$11(final InputUserInfoActivity inputUserInfoActivity, View view) {
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
InterestAndLanguage newInstance = InterestAndLanguage.INSTANCE.newInstance(false, new ArrayList<>(), inputUserInfoActivity.languageList);
newInstance.setListener(new InterestAndLanguage.BottomSheetDialogListener() {
@Override
public void onBottomSheetDismissed() {
InputUserInfoActivity.this.refresh();
}
});
newInstance.show(inputUserInfoActivity.getSupportFragmentManager(), "BottomSheet");
}
public final void refresh() {
getViewModel().getUserDetails(true);
this.languageList.clear();
}
public final void setUpChosenLanguageList(ArrayList<LanguageResponse> languages) {
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
activityInputUserInfoBinding.selectedLanguageGroup.removeAllViews();
Iterator<LanguageResponse> it = languages.iterator();
while (it.hasNext()) {
LanguageResponse next = it.next();
this.languageList.add(next.getLanguage());
View inflate = getLayoutInflater().inflate(2131558792, (ViewGroup) null, false);
Intrinsics.checkNotNull(inflate, "null cannot be cast to non-null type com.google.android.material.chip.Chip");
View view = (Chip) inflate;
view.setText(next.getLanguage());
view.setTypeface(Typeface.DEFAULT_BOLD);
int applyDimension = (int) TypedValue.applyDimension(1, 14.0f, getResources().getDisplayMetrics());
view.setPadding(applyDimension, 0, applyDimension, 0);
view.setClickable(false);
view.setChipBackgroundColor(getColorStateList(2131100106));
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = this.binding;
if (activityInputUserInfoBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding2 = null;
}
activityInputUserInfoBinding2.selectedLanguageGroup.addView(view);
}
}
public final void loadImage(ImageModel imageModel) {
RequestBuilder load = Glide.with((FragmentActivity) this).load(imageModel.getContentUri());
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
load.into(activityInputUserInfoBinding.avatar);
try {
String realPath = FileUriUtils.getRealPath((Context) this, imageModel.getContentUri());
String compressedImageFile = CompressFile.getCompressedImageFile(Uri.fromFile(realPath != null ? new File(realPath) : null), (Context) this, 30);
if (compressedImageFile != null) {
realPath = compressedImageFile;
}
getViewModel().setAvatar(realPath);
} catch (Exception e) {
Timber.e(e);
}
}
public final void onCameraClick() {
Context context = (Context) this;
if (!PermissionHelper.permissionArrayGranted(context, this.cameraPermission)) {
ActivityCompat.requestPermissions((Activity) this, this.cameraPermission, 200);
return;
}
String str = getCacheDir().getAbsolutePath() + "/picFolder/";
new File(str).mkdirs();
File file = new File(str + System.currentTimeMillis() + ".jpg");
try {
file.createNewFile();
} catch (IOException unused) {
}
Uri uriForFile = FileProvider.getUriForFile(context, "app.b1k0.provider", file);
getViewModel().setNewFile(new File(CompressFile.getCompressedImageFile(Uri.fromFile(file), context)));
Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
intent.putExtra("output", uriForFile);
intent.addFlags(1);
if (intent.resolveActivity(getPackageManager()) != null) {
this.launcher.launch(intent);
} else {
Toast.makeText(context, "No camera app found", 0).show();
}
}
public final void onGalleryClick() {
Context context = (Context) this;
if (!PermissionHelper.permissionArrayGranted(context, this.permissions)) {
ActivityCompat.requestPermissions((Activity) this, this.permissions, 200);
} else {
SingleImagePicker.INSTANCE.showPicker(context, new String[0], new Config(false), new Function1<BaseSinglePickerModifier, Unit>() {
public final void invoke(BaseSinglePickerModifier baseSinglePickerModifier) {
Intrinsics.checkNotNullParameter(baseSinglePickerModifier, "$this$showPicker");
}
public Object invoke(Object obj) {
invoke((BaseSinglePickerModifier) obj);
return Unit.INSTANCE;
}
}, new InputUserInfoActivity$onGalleryClick$2(this));
}
}
private final void save() {
UploadProgressHelper uploadProgressHelper;
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
String valueOf = String.valueOf(activityInputUserInfoBinding.referralTxtValue.getText());
String str = valueOf;
String str2 = str == null || str.length() == 0 ? null : valueOf;
String avatar = getViewModel().getAvatar();
if (avatar == null || avatar.length() == 0) {
ActivityExtKt.toast((Activity) this, "Avatar required");
return;
}
ActivityInputUserInfoBinding activityInputUserInfoBinding2 = this.binding;
if (activityInputUserInfoBinding2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding2 = null;
}
Editable text = activityInputUserInfoBinding2.userName.getText();
if (!(text == null || text.length() == 0)) {
ActivityInputUserInfoBinding activityInputUserInfoBinding3 = this.binding;
if (activityInputUserInfoBinding3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding3 = null;
}
if (!StringExtKt.isOnlySpaces(String.valueOf(activityInputUserInfoBinding3.userName.getText()))) {
ActivityInputUserInfoBinding activityInputUserInfoBinding4 = this.binding;
if (activityInputUserInfoBinding4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding4 = null;
}
if (!activityInputUserInfoBinding4.femaleRadioBtn.isChecked()) {
ActivityInputUserInfoBinding activityInputUserInfoBinding5 = this.binding;
if (activityInputUserInfoBinding5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding5 = null;
}
if (!activityInputUserInfoBinding5.maleRadioBtn.isChecked()) {
ActivityExtKt.toast((Activity) this, "Gender required");
return;
}
}
ActivityInputUserInfoBinding activityInputUserInfoBinding6 = this.binding;
if (activityInputUserInfoBinding6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding6 = null;
}
if (Intrinsics.areEqual(activityInputUserInfoBinding6.selectDobBtn.getText().toString(), getString(2131952570))) {
ActivityExtKt.toast((Activity) this, "Dob required");
return;
}
if (DateHelper.INSTANCE.isUnderAge(this.currentDate)) {
ActivityExtKt.toast((Activity) this, "You must be at least 18 years old.");
return;
}
ActivityInputUserInfoBinding activityInputUserInfoBinding7 = this.binding;
if (activityInputUserInfoBinding7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding7 = null;
}
String valueOf2 = String.valueOf(activityInputUserInfoBinding7.userName.getText());
ActivityInputUserInfoBinding activityInputUserInfoBinding8 = this.binding;
if (activityInputUserInfoBinding8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding8 = null;
}
String str3 = activityInputUserInfoBinding8.maleRadioBtn.isChecked() ? "MALE" : "FEMALE";
String str4 = this.currentDate;
String token = FirebaseNotificationService.INSTANCE.getToken((Context) this);
String avatar2 = getViewModel().getAvatar();
if (avatar2 == null) {
avatar2 = "";
}
UserDetailBody userDetailBody = new UserDetailBody(str4, token, str3, valueOf2, -1L, avatar2, str2, null, null, null, null, 1920, null);
String avatar3 = getViewModel().getAvatar();
if (!(avatar3 == null || avatar3.length() == 0)) {
String avatar4 = getViewModel().getAvatar();
Intrinsics.checkNotNull(avatar4);
if (!StringsKt.contains$default(avatar4, Constants.SCHEME, false, 2, (Object) null) && (uploadProgressHelper = this.uploadProgressHelper) != null) {
uploadProgressHelper.setProgressDialog();
}
}
Timber.e(valueOf2 + ' ' + str3 + ' ' + str4, new Object[0]);
StringBuilder sb = new StringBuilder();
sb.append("user ");
sb.append(userDetailBody);
Timber.e(sb.toString(), new Object[0]);
getViewModel().updateProfile(userDetailBody);
return;
}
}
ActivityExtKt.toast((Activity) this, "Nickname required");
}
private final void showGenderDialog() {
final String[] strArr = {"Male", "Female"};
AlertDialog.Builder builder = new AlertDialog.Builder((Context) this);
builder.setTitle("Select Gender").setItems(strArr, new DialogInterface.OnClickListener() {
@Override
public final void onClick(DialogInterface dialogInterface, int i) {
InputUserInfoActivity.showGenderDialog$lambda$13(strArr, this, dialogInterface, i);
}
});
AlertDialog create = builder.create();
Intrinsics.checkNotNullExpressionValue(create, "builder.create()");
create.show();
}
public static final void showGenderDialog$lambda$13(String[] strArr, InputUserInfoActivity inputUserInfoActivity, DialogInterface dialogInterface, int i) {
Intrinsics.checkNotNullParameter(strArr, "$options");
Intrinsics.checkNotNullParameter(inputUserInfoActivity, "this$0");
Intrinsics.checkNotNullParameter(dialogInterface, "dialogInterface");
String str = strArr[i];
if (Intrinsics.areEqual(str, "Male")) {
inputUserInfoActivity.maleSelected();
} else if (Intrinsics.areEqual(str, "Female")) {
inputUserInfoActivity.femaleSelected();
}
dialogInterface.dismiss();
}
private final void maleSelected() {
getViewModel().setGenderChange("MALE");
}
private final void femaleSelected() {
getViewModel().setGenderChange("FEMALE");
}
private final void goToHomeActivity() {
Intent intent = new Intent((Context) this, (Class<?>) HomeActivity.class);
intent.addFlags(268468224);
startActivity(intent);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
private final void goToStreamerOnBoardingActivity() {
Intent intent = new Intent((Context) this, (Class<?>) StreamerOnboardActivity.class);
ActivityInputUserInfoBinding activityInputUserInfoBinding = this.binding;
if (activityInputUserInfoBinding == null) {
Intrinsics.throwUninitializedPropertyAccessException("binding");
activityInputUserInfoBinding = null;
}
intent.putExtra("user_name", String.valueOf(activityInputUserInfoBinding.userName.getText()));
intent.addFlags(268468224);
startActivity(intent);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
public final void goToStreamerHomeActivity() {
Intent intent = new Intent((Context) this, (Class<?>) StreamerHomeActivity.class);
intent.addFlags(268468224);
startActivity(intent);
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
Intrinsics.checkNotNullParameter(permissions, NativeProtocol.RESULT_ARGS_PERMISSIONS);
Intrinsics.checkNotNullParameter(grantResults, "grantResults");
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode != 200) {
if (requestCode != 8002) {
return;
}
if (grantResults.length == 0) {
return;
}
if (grantResults[0] == 0 && grantResults[1] == 0) {
return;
}
DialogHelper.showPermissionDialog((Context) this, (Activity) this, getString(2131952428), "Camera Permission required", ChatActivity.CAMERA_PERMISSION);
return;
}
if (grantResults.length == 0) {
return;
}
if (Build.VERSION.SDK_INT < 30 ? Build.VERSION.SDK_INT != 29 ? grantResults[0] != 0 || grantResults[1] != 0 : grantResults[0] != 0 : grantResults[0] != 0) {
r1 = false;
}
if (r1) {
return;
}
DialogHelper.showPermissionDialog((Context) this, (Activity) this, getString(2131952428), getString(2131952439), ChatActivity.MEDIA_PERMISSION);
}
}