CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 InviteCodeActivity.java 源代码,内容仅作参考
package ak.im.ui.activity;
import ak.application.AKApplication;
import ak.i.a0;
import ak.im.BuildConfig;
import ak.im.loginDB.AppLoginDBHelper;
import ak.im.module.ServerListBean;
import ak.im.module.User;
import ak.im.sdk.manager.AKeyManager;
import ak.im.utils.AkeyChatUtils;
import ak.im.utils.HttpURLTools;
import ak.im.utils.Log;
import ak.view.CircleImageView;
import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.FragmentActivity;
import com.asim.protobuf.Akeychat;
import com.contrarywind.view.WheelView;
import com.huawei.hms.support.api.entity.core.CommonCode;
import com.mobile.auth.gatewayauth.Constant;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.internal.Ref$ObjectRef;
import kotlin.text.StringsKt__StringsKt;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.anko.AsyncKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import retrofit2.m;
@kotlin.j(d1 = {"\u0000\u0081\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0006\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\t*\u0001\u001a\u0018\u0000 J2\u00020\u0001:\u0001JB\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010#\u001a\u0004\u0018\u00010\u000e2\u0006\u0010$\u001a\u00020%H\u0002J\u0010\u0010&\u001a\u00020\u00042\u0006\u0010'\u001a\u00020\u0004H\u0002J\b\u0010(\u001a\u00020)H\u0003J\b\u0010*\u001a\u00020\u0004H\u0002J\b\u0010+\u001a\u00020)H\u0002J\b\u0010,\u001a\u00020)H\u0002J\"\u0010-\u001a\u00020)2\u0006\u0010.\u001a\u00020/2\u0006\u00100\u001a\u00020/2\b\u00101\u001a\u0004\u0018\u000102H\u0014J\u0012\u00103\u001a\u00020)2\b\u00104\u001a\u0004\u0018\u000105H\u0014J\b\u00106\u001a\u00020)H\u0016J\u0010\u00107\u001a\u00020)2\u0006\u00108\u001a\u000209H\u0007J\u0010\u0010:\u001a\u00020)2\u0006\u0010;\u001a\u000202H\u0014J\b\u0010<\u001a\u00020)H\u0016J\u0010\u0010=\u001a\u00020)2\u0006\u00104\u001a\u000205H\u0014J\b\u0010>\u001a\u00020)H\u0016J\b\u0010?\u001a\u00020)H\u0014J\f\u0010@\u001a\b\u0012\u0004\u0012\u00020B0AJ\b\u0010C\u001a\u00020)H\u0002J\b\u0010D\u001a\u00020)H\u0002J\b\u0010E\u001a\u00020)H\u0002J\b\u0010F\u001a\u00020)H\u0003J\b\u0010G\u001a\u00020)H\u0002J\b\u0010H\u001a\u00020)H\u0002J\b\u0010I\u001a\u00020)H\u0002R\"\u0010\u0003\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0006\u0010\u0007\"\u0004\b\b\u0010\tR\u000e\u0010\n\u001a\u00020\u000bX\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\r\u001a\u0004\u0018\u00010\u000eX\u0082\u000e¢\u0006\u0002\n\u0000R\u0019\u0010\u000f\u001a\n \u0005*\u0004\u0018\u00010\u00100\u0010¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u001a\u0010\u0013\u001a\u00020\u0014X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0015\u0010\u0016\"\u0004\b\u0017\u0010\u0018R\u0010\u0010\u0019\u001a\u00020\u001aX\u0082\u0004¢\u0006\u0004\n\u0002\u0010\u001bR*\u0010\u001c\u001a\u0012\u0012\u0004\u0012\u00020\u00040\u001dj\b\u0012\u0004\u0012\u00020\u0004`\u001eX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u001f\u0010 \"\u0004\b!\u0010\"¨\u0006K"}, d2 = {"Lak/im/ui/activity/InviteCodeActivity;", "Lak/im/ui/activity/SwipeBackActivity;", "()V", "currentId", "", "kotlin.jvm.PlatformType", "getCurrentId", "()Ljava/lang/String;", "setCurrentId", "(Ljava/lang/String;)V", "defaultExpiredTimeSpan", "", "expiredTimestamp", "mBitmap", "Landroid/graphics/Bitmap;", "mmkv", "Lak/im/loginDB/AppLoginDBHelper;", "getMmkv", "()Lak/im/loginDB/AppLoginDBHelper;", "needShowChange", "", "getNeedShowChange", "()Z", "setNeedShowChange", "(Z)V", "receiver", "ak/im/ui/activity/InviteCodeActivity$receiver$1", "Lak/im/ui/activity/InviteCodeActivity$receiver$1;", "serverList", "Ljava/util/ArrayList;", "Lkotlin/collections/ArrayList;", "getServerList", "()Ljava/util/ArrayList;", "setServerList", "(Ljava/util/ArrayList;)V", "getCacheBitmapFromView", "view", "Landroid/view/View;", "getQRCodeContent", "publishUrl", "getServerListData", "", "getSuggestString", "init", "initButtonViews", "onActivityResult", Constant.LOGIN_ACTIVITY_REQUEST_CODE, "", "resultCode", "data", "Landroid/content/Intent;", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onDestroy", "onEventMainThread", "event", "Lak/event/GenerateQRCodeFinishEvent;", "onNewIntent", CommonCode.Resolution.HAS_RESOLUTION_FROM_APK, "onPause", "onRestoreInstanceState", "onResume", "onStop", "queryPublishUrlTest", "Lio/reactivex/Observable;", "Lak/retrofit/QueryPublishUrlAPI$PublishUrlInfo;", "refreshView", "refreshViewOnAUKeyStatusChange", "saveInviteCodeToAlbum", "shareQRCode", "showChooseServerDialog", "startGenerateQRCode", "startPickDateTime", "Companion", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class InviteCodeActivity extends SwipeBackActivity {
@NotNull
public static final a a = new a(null);
@NotNull
private static final String f1682b = "InviteCodeActivity";
@NotNull
private static final String f1683c = kotlin.jvm.internal.r.stringPlus("InviteCodeActivity", ak.im.sdk.manager.ye.getInstance().getUsername());
@Nullable
private Bitmap f1685e;
private final AppLoginDBHelper i;
private String j;
@NotNull
private ArrayList<String> k;
private boolean l;
@NotNull
public Map<Integer, View> f1684d = new LinkedHashMap();
private final long f = 1800000;
private long g = -1;
@NotNull
private final InviteCodeActivity$receiver$1 h = new BroadcastReceiver() {
@Override
public void onReceive(@NotNull Context context, @NotNull Intent intent) {
kotlin.jvm.internal.r.checkNotNullParameter(context, "context");
kotlin.jvm.internal.r.checkNotNullParameter(intent, "intent");
if (kotlin.jvm.internal.r.areEqual(intent.getAction(), ak.im.p1.A)) {
InviteCodeActivity.this.H();
}
}
};
@kotlin.j(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0086D¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006R\u0011\u0010\u0007\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0006¨\u0006\t"}, d2 = {"Lak/im/ui/activity/InviteCodeActivity$Companion;", "", "()V", "TAG", "", "getTAG", "()Ljava/lang/String;", "key", "getKey", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.o oVar) {
this();
}
@NotNull
public final String getKey() {
return InviteCodeActivity.f1683c;
}
@NotNull
public final String getTAG() {
return InviteCodeActivity.f1682b;
}
}
@kotlin.j(d1 = {"\u0000)\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\t\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J0\u0010\u0002\u001a\u00020\u00032\f\u0010\u0004\u001a\b\u0012\u0002\b\u0003\u0018\u00010\u00052\b\u0010\u0006\u001a\u0004\u0018\u00010\u00072\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0016¨\u0006\f"}, d2 = {"ak/im/ui/activity/InviteCodeActivity$showChooseServerDialog$2", "Landroid/widget/AdapterView$OnItemClickListener;", "onItemClick", "", "parent", "Landroid/widget/AdapterView;", "view", "Landroid/view/View;", "position", "", "id", "", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class b implements AdapterView.OnItemClickListener {
b() {
}
@Override
public void onItemClick(@Nullable AdapterView<?> adapterView, @Nullable View view, int i, long j) {
String valueOf = String.valueOf(view == null ? null : view.getTag());
a aVar = InviteCodeActivity.a;
Log.i(aVar.getTAG(), kotlin.jvm.internal.r.stringPlus("view tag is ", valueOf));
InviteCodeActivity.this.getMmkv().put(aVar.getKey(), valueOf, 0);
InviteCodeActivity.this.getIBaseActivity().dismissFullWindowDialog();
InviteCodeActivity.this.setCurrentId(valueOf);
((TextView) InviteCodeActivity.this._$_findCachedViewById(ak.im.w1.current_server_id)).setText(InviteCodeActivity.this.getCurrentId());
InviteCodeActivity.this.startGenerateQRCode();
}
}
@kotlin.j(d1 = {"\u0000%\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\b\u0010\u0003\u001a\u00020\u0004H\u0016J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u0007H\u0016J\u0010\u0010\b\u001a\u00020\u00042\u0006\u0010\t\u001a\u00020\u0002H\u0016J\u0010\u0010\n\u001a\u00020\u00042\u0006\u0010\u000b\u001a\u00020\fH\u0016¨\u0006\r"}, d2 = {"ak/im/ui/activity/InviteCodeActivity$startGenerateQRCode$2", "Lak/rxjava/AKObserver;", "Landroid/graphics/Bitmap;", "onComplete", "", "onError", "e", "", "onNext", "bitmap", "onSubscribe", com.nostra13.universalimageloader.core.d.a, "Lio/reactivex/disposables/Disposable;", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class c extends ak.j.a<Bitmap> {
c() {
}
@Override
public void onComplete() {
}
@Override
public void onError(@NotNull Throwable e2) {
kotlin.jvm.internal.r.checkNotNullParameter(e2, "e");
InviteCodeActivity.this.getIBaseActivity().dismissPGDialog();
e2.printStackTrace();
Log.w(InviteCodeActivity.a.getTAG(), kotlin.jvm.internal.r.stringPlus("onError ", e2.getMessage()));
ak.im.utils.j4.sendEvent(ak.event.k7.newToastEvent(ak.im.utils.n5.getStrByResId(ak.im.b2.internet_bad)));
}
@Override
public void onSubscribe(@NotNull io.reactivex.disposables.b d2) {
kotlin.jvm.internal.r.checkNotNullParameter(d2, "d");
super.onSubscribe(d2);
InviteCodeActivity.this.getIBaseActivity().showPGDialog(null, InviteCodeActivity.this.getString(ak.im.b2.please_wait), true);
}
@Override
public void onNext(@NotNull Bitmap bitmap) {
kotlin.jvm.internal.r.checkNotNullParameter(bitmap, "bitmap");
InviteCodeActivity.this.getIBaseActivity().dismissPGDialog();
InviteCodeActivity.this.f1685e = bitmap;
if (InviteCodeActivity.this.f1685e != null) {
EventBus.getDefault().post(new ak.event.z1());
return;
}
Log.w(InviteCodeActivity.a.getTAG(), "bitmap is null ");
ak.im.utils.j4.sendEvent(ak.event.k7.newToastEvent(ak.im.utils.n5.getStrByResId(ak.im.b2.internet_bad)));
}
}
@kotlin.j(d1 = {"\u0000\u0019\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0010\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\b\u0010\u0006\u001a\u00020\u0005H\u0016J\u0012\u0010\u0007\u001a\u00020\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u0002H\u0016¨\u0006\t"}, d2 = {"ak/im/ui/activity/InviteCodeActivity$startPickDateTime$adp1$1", "Lcom/contrarywind/adapter/WheelAdapter;", "", "getItem", "index", "", "getItemsCount", "indexOf", "o", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class d implements b.b.a.a<String> {
final ArrayList<String> a;
d(ArrayList<String> arrayList) {
this.a = arrayList;
}
@Override
public int getItemsCount() {
return this.a.size();
}
@Override
@NotNull
public String getItem(int i) {
String str = this.a.get(i);
kotlin.jvm.internal.r.checkNotNullExpressionValue(str, "wheel1[index]");
return str;
}
@Override
public int indexOf(@Nullable String str) {
int indexOf;
indexOf = CollectionsKt___CollectionsKt.indexOf((List<? extends Object>) ((List) this.a), (Object) str);
return indexOf;
}
}
@kotlin.j(d1 = {"\u0000\u0019\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0010\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\b\u0010\u0006\u001a\u00020\u0005H\u0016J\u0012\u0010\u0007\u001a\u00020\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u0002H\u0016¨\u0006\t"}, d2 = {"ak/im/ui/activity/InviteCodeActivity$startPickDateTime$adp2$1", "Lcom/contrarywind/adapter/WheelAdapter;", "", "getItem", "index", "", "getItemsCount", "indexOf", "o", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class e implements b.b.a.a<String> {
final ArrayList<String> a;
e(ArrayList<String> arrayList) {
this.a = arrayList;
}
@Override
public int getItemsCount() {
return this.a.size();
}
@Override
@NotNull
public String getItem(int i) {
String str = this.a.get(i);
kotlin.jvm.internal.r.checkNotNullExpressionValue(str, "wheel2[index]");
return str;
}
@Override
public int indexOf(@Nullable String str) {
int indexOf;
indexOf = CollectionsKt___CollectionsKt.indexOf((List<? extends Object>) ((List) this.a), (Object) str);
return indexOf;
}
}
@kotlin.j(d1 = {"\u0000\u0019\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001J\u0010\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u0005H\u0016J\b\u0010\u0006\u001a\u00020\u0005H\u0016J\u0012\u0010\u0007\u001a\u00020\u00052\b\u0010\b\u001a\u0004\u0018\u00010\u0002H\u0016¨\u0006\t"}, d2 = {"ak/im/ui/activity/InviteCodeActivity$startPickDateTime$adp3$1", "Lcom/contrarywind/adapter/WheelAdapter;", "", "getItem", "index", "", "getItemsCount", "indexOf", "o", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class f implements b.b.a.a<String> {
final ArrayList<String> a;
f(ArrayList<String> arrayList) {
this.a = arrayList;
}
@Override
public int getItemsCount() {
return this.a.size();
}
@Override
@NotNull
public String getItem(int i) {
String str = this.a.get(i);
kotlin.jvm.internal.r.checkNotNullExpressionValue(str, "wheel3[index]");
return str;
}
@Override
public int indexOf(@Nullable String str) {
int indexOf;
indexOf = CollectionsKt___CollectionsKt.indexOf((List<? extends Object>) ((List) this.a), (Object) str);
return indexOf;
}
}
public InviteCodeActivity() {
AppLoginDBHelper mmkv = ak.im.sdk.manager.ye.getInstance().getMMKV();
this.i = mmkv;
String str = f1683c;
String str2 = mmkv.get(str);
this.j = str2 == null || str2.length() == 0 ? ak.im.sdk.manager.af.getInstance().getCurrentEnterpriseInfo().enterpriseID : mmkv.get(str);
this.k = new ArrayList<>();
}
public final void H() {
View findViewById = findViewById(ak.im.w1.main_head);
if (AKeyManager.isSecurity()) {
kotlin.jvm.internal.r.checkNotNull(findViewById);
findViewById.setBackgroundColor(getResources().getColor(ak.im.t1.sec_title_unpress));
TextView textView = (TextView) _$_findCachedViewById(ak.im.w1.tv_title_back);
kotlin.jvm.internal.r.checkNotNull(textView);
textView.setBackgroundResource(ak.im.v1.sec_title_selector);
return;
}
kotlin.jvm.internal.r.checkNotNull(findViewById);
findViewById.setBackgroundColor(getResources().getColor(ak.im.t1.unsec_title_unpress));
TextView textView2 = (TextView) _$_findCachedViewById(ak.im.w1.tv_title_back);
kotlin.jvm.internal.r.checkNotNull(textView2);
textView2.setBackgroundResource(ak.im.v1.unsec_title_selector);
}
private final void I() {
try {
if (this.f1685e != null) {
CardView cv_invite_code = (CardView) _$_findCachedViewById(ak.im.w1.cv_invite_code);
kotlin.jvm.internal.r.checkNotNullExpressionValue(cv_invite_code, "cv_invite_code");
Bitmap c2 = c(cv_invite_code);
File file = new File(ak.im.utils.l4.getSaveAttachImagePath());
if (!file.exists()) {
file.mkdirs();
}
String name = ak.im.sdk.manager.nf.getInstance().getUserMe().getName();
String str = file + '/' + ((Object) ak.comm.i.MD5Encode(name)) + "-invitecode-" + ((Object) ak.im.utils.f4.getCurDateStr("yyyy-MM-dd-HH-mm-ss")) + ".png";
ak.im.utils.m4.saveImage(c2, str, false);
MediaScannerConnection.scanFile(this.context, new String[]{str}, null, null);
gh0 iBaseActivity = getIBaseActivity();
String string = getString(ak.im.b2.image_save_success);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string, "getString(R.string.image_save_success)");
String substring = string.substring(2);
kotlin.jvm.internal.r.checkNotNullExpressionValue(substring, "this as java.lang.String).substring(startIndex)");
iBaseActivity.showToast(substring);
}
} catch (Exception e2) {
AkeyChatUtils.logException(e2);
getIBaseActivity().showToast(getString(ak.im.b2.qr_code_save_fail));
}
}
@SuppressLint({"CheckResult"})
private final void J() {
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
CardView cv_invite_code = (CardView) _$_findCachedViewById(ak.im.w1.cv_invite_code);
kotlin.jvm.internal.r.checkNotNullExpressionValue(cv_invite_code, "cv_invite_code");
ref$ObjectRef.element = c(cv_invite_code);
if (ak.im.g2.c.a.a.isFlavor("pro")) {
AsyncKt.doAsync$default(this, null, new InviteCodeActivity$shareQRCode$1(this, ref$ObjectRef), 1, null);
} else {
new ak.im.utils.k5(this, this.context, 1, (Bitmap) ref$ObjectRef.element).startShare(true, "");
}
}
private final void K() {
boolean z;
String str = this.j;
ViewGroup viewGroup = null;
View inflate = getLayoutInflater().inflate(ak.im.x1.change_server_dialog, (ViewGroup) null);
LinearLayout linearLayout = (LinearLayout) inflate.findViewById(ak.im.w1.parentLayout);
ListView listView = (ListView) linearLayout.findViewById(ak.im.w1.listView);
if (this.k.size() <= 3) {
ak.e.a.gone(listView);
int size = this.k.size() - 1;
if (size >= 0) {
int i = 0;
z = false;
while (true) {
int i2 = i + 1;
View inflate2 = getLayoutInflater().inflate(ak.im.x1.change_server_dialog_item, viewGroup);
ImageView imageView = (ImageView) inflate2.findViewById(ak.im.w1.choose);
TextView textView = (TextView) inflate2.findViewById(ak.im.w1.server_name);
ak.im.sdk.manager.cf.getInstance().displayImage(ak.im.sdk.manager.af.getInstance().getCurrentEnterpriseInfo().enterpriseLogoUrl, ak.im.v1.beep_server, (ImageView) inflate2.findViewById(ak.im.w1.server_img));
textView.setText(this.k.get(i));
inflate2.setTag(textView.getText().toString());
if (kotlin.jvm.internal.r.areEqual(str, textView.getText())) {
ak.e.a.visible(imageView);
z = true;
} else {
ak.e.a.gone(imageView);
}
inflate2.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.L(InviteCodeActivity.this, view);
}
});
linearLayout.addView(inflate2);
if (i == size) {
break;
}
i = i2;
viewGroup = null;
}
} else {
z = false;
}
} else {
ak.e.a.visible(listView);
ak.im.ui.view.k2 k2Var = new ak.im.ui.view.k2(this, this.k, str);
listView.setAdapter((ListAdapter) k2Var);
listView.setOnItemClickListener(new b());
z = k2Var.f3139d;
}
if (!z) {
try {
String str2 = f1682b;
Log.i(str2, "history " + ((Object) this.j) + " is lost,change to login server");
View childAt = linearLayout.getChildAt(0);
ak.e.a.visible(childAt.findViewById(ak.im.w1.choose));
this.j = ak.im.sdk.manager.af.getInstance().getCurrentEnterpriseInfo().enterpriseID;
((TextView) childAt.findViewById(ak.im.w1.server_name)).setText(this.j);
this.i.put(f1683c, this.j, 0);
} catch (Exception e2) {
e2.printStackTrace();
}
}
getIBaseActivity().showFullWindowDialog(inflate);
}
public static final void L(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
String obj = view.getTag().toString();
Log.i(f1682b, kotlin.jvm.internal.r.stringPlus("view tag is ", obj));
this$0.i.put(f1683c, obj, 0);
this$0.getIBaseActivity().dismissFullWindowDialog();
this$0.j = obj;
((TextView) this$0._$_findCachedViewById(ak.im.w1.current_server_id)).setText(this$0.j);
this$0.startGenerateQRCode();
}
public static final io.reactivex.e0 M(InviteCodeActivity this$0, a0.b it) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
kotlin.jvm.internal.r.checkNotNullParameter(it, "it");
if (it.a == 0) {
String str = it.f306c.a;
kotlin.jvm.internal.r.checkNotNullExpressionValue(str, "it.publishinfo.publishurl");
return ak.im.utils.f5.getQRCode(this$0.d(str));
}
return io.reactivex.z.error(new Throwable());
}
private final void N() {
View inflate = getLayoutInflater().inflate(ak.im.x1.date_pick_view, (ViewGroup) null);
inflate.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.R(InviteCodeActivity.this, view);
}
});
getIBaseActivity().showFullWindowDialog(inflate);
ViewGroup viewGroup = (ViewGroup) inflate;
ArrayList arrayList = new ArrayList();
int i = 0;
while (i < 31) {
int i2 = i + 1;
kotlin.jvm.internal.w wVar = kotlin.jvm.internal.w.a;
String string = getString(ak.im.b2.invite_code_expired_time_day);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string, "getString(R.string.invite_code_expired_time_day)");
String format = String.format(string, Arrays.copyOf(new Object[]{Integer.valueOf(i)}, 1));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format, "format(format, *args)");
arrayList.add(format);
i = i2;
}
arrayList.add(getString(ak.im.b2.invite_code_expired_time_forever));
d dVar = new d(arrayList);
ArrayList arrayList2 = new ArrayList();
int i3 = 0;
while (i3 < 24) {
int i4 = i3 + 1;
kotlin.jvm.internal.w wVar2 = kotlin.jvm.internal.w.a;
String string2 = getString(ak.im.b2.invite_code_expired_time_hour);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string2, "getString(R.string.invite_code_expired_time_hour)");
String format2 = String.format(string2, Arrays.copyOf(new Object[]{Integer.valueOf(i3)}, 1));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format2, "format(format, *args)");
arrayList2.add(format2);
i3 = i4;
}
e eVar = new e(arrayList2);
ArrayList arrayList3 = new ArrayList();
int i5 = 0;
while (i5 < 60) {
int i6 = i5 + 1;
kotlin.jvm.internal.w wVar3 = kotlin.jvm.internal.w.a;
String string3 = getString(ak.im.b2.invite_code_expired_time_minute);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string3, "getString(R.string.invit…code_expired_time_minute)");
String format3 = String.format(string3, Arrays.copyOf(new Object[]{Integer.valueOf(i5)}, 1));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format3, "format(format, *args)");
arrayList3.add(format3);
i5 = i6;
}
f fVar = new f(arrayList3);
final WheelView wheelView = (WheelView) viewGroup.findViewById(ak.im.w1.w1);
wheelView.setAdapter(dVar);
int i7 = ak.im.t1.blue_3c;
wheelView.setTextColorCenter(i7);
wheelView.setTextSize(15.0f);
wheelView.setCurrentItem(0);
wheelView.setLineSpacingMultiplier(2.4f);
wheelView.setItemsVisible(5);
final WheelView wheelView2 = (WheelView) viewGroup.findViewById(ak.im.w1.w2);
wheelView2.setTextColorCenter(i7);
wheelView2.setTextSize(15.0f);
wheelView2.setAdapter(eVar);
wheelView2.setCurrentItem(0);
wheelView2.setItemsVisible(5);
wheelView2.setLineSpacingMultiplier(2.4f);
final WheelView wheelView3 = (WheelView) viewGroup.findViewById(ak.im.w1.w3);
wheelView3.setTextColorCenter(i7);
wheelView3.setTextSize(15.0f);
wheelView3.setItemsVisible(5);
wheelView3.setLineSpacingMultiplier(2.4f);
wheelView3.setAdapter(fVar);
wheelView3.setCurrentItem(30);
viewGroup.findViewById(ak.im.w1.empty_area).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.O(InviteCodeActivity.this, view);
}
});
viewGroup.findViewById(ak.im.w1.tv_cancel).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.P(InviteCodeActivity.this, view);
}
});
viewGroup.findViewById(ak.im.w1.tv_ensure).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.Q(WheelView.this, wheelView2, wheelView3, this, view);
}
});
}
public static final void O(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.getIBaseActivity().dismissFullWindowDialog();
}
public static final void P(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.getIBaseActivity().dismissFullWindowDialog();
}
public static final void Q(WheelView wheelView, WheelView wheelView2, WheelView wheelView3, InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
if (wheelView.getCurrentItem() == 0 && wheelView2.getCurrentItem() == 0 && wheelView3.getCurrentItem() == 0) {
this$0.getIBaseActivity().showToast(this$0.getString(ak.im.b2.invalid_expired_time));
return;
}
this$0.getIBaseActivity().dismissFullWindowDialog();
if (wheelView.getCurrentItem() == 31) {
this$0.g = -1L;
} else {
this$0.g = ak.im.utils.f4.getRightTime() + (wheelView.getCurrentItem() * 86400000) + (wheelView2.getCurrentItem() * 3600000) + (wheelView3.getCurrentItem() * 60000);
}
this$0.startGenerateQRCode();
}
public static final void R(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.getIBaseActivity().dismissFullWindowDialog();
}
private final Bitmap c(View view) {
Bitmap createBitmap = Bitmap.createBitmap(view.getWidth(), view.getHeight(), Bitmap.Config.ARGB_8888);
kotlin.jvm.internal.r.checkNotNullExpressionValue(createBitmap, "createBitmap(view.getWid… Bitmap.Config.ARGB_8888)");
Canvas canvas = new Canvas(createBitmap);
Drawable background = view.getBackground();
kotlin.jvm.internal.r.checkNotNullExpressionValue(background, "view.getBackground()");
background.draw(canvas);
view.draw(canvas);
return createBitmap;
}
private final String d(String str) {
int indexOf$default;
String str2;
Akeychat.QRCodeShareInfo.b newBuilder = Akeychat.QRCodeShareInfo.newBuilder();
newBuilder.setDiscoverId(this.j);
newBuilder.setDiscoverhost(this.j);
newBuilder.setExpiredtime(this.g);
newBuilder.setShareuser(ak.im.sdk.manager.nf.getInstance().getUserMe().getJID());
newBuilder.setAutoAddFriend(((CheckBox) _$_findCachedViewById(ak.im.w1.check)).isChecked());
String encodeBytes = ak.comm.d.encodeBytes(newBuilder.build().toByteArray());
boolean z = false;
try {
String query = Uri.parse(str).getQuery();
if (query != null) {
}
z = true;
z = !z;
} catch (Throwable unused) {
indexOf$default = StringsKt__StringsKt.indexOf$default((CharSequence) str, '?', 0, false, 6, (Object) null);
if (indexOf$default > 0) {
z = true;
}
}
if (z) {
str2 = str + "&shareinfo=" + ((Object) encodeBytes);
} else {
str2 = str + "?shareinfo=" + ((Object) encodeBytes);
}
Log.d(f1682b, "The invite code content is1 " + str2 + " \n " + newBuilder);
return str2;
}
@SuppressLint({"CheckResult"})
private final void e() {
getIBaseActivity().showPGDialog(ak.im.b2.waiting);
((ak.i.i) AkeyChatUtils.baseApi(true).create(ak.i.i.class)).getServerList(this.j).subscribeOn(io.reactivex.w0.a.io()).observeOn(io.reactivex.q0.c.a.mainThread()).subscribe(new io.reactivex.s0.g() {
@Override
public final void accept(Object obj) {
InviteCodeActivity.f(InviteCodeActivity.this, (ServerListBean) obj);
}
}, new io.reactivex.s0.g() {
@Override
public final void accept(Object obj) {
InviteCodeActivity.g(InviteCodeActivity.this, (Throwable) obj);
}
});
}
public static final void f(InviteCodeActivity this$0, ServerListBean serverListBean) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.getIBaseActivity().dismissPGDialog();
if (serverListBean.getReturn_code() == 0) {
if (kotlin.jvm.internal.r.areEqual("main_server", serverListBean.getCurrent_server()) && kotlin.jvm.internal.r.areEqual(ak.im.sdk.manager.af.getInstance().getCurrentEnterpriseInfo().enterpriseID, this$0.j)) {
ak.e.a.gone((TextView) this$0._$_findCachedViewById(ak.im.w1.change_server));
ak.e.a.gone(this$0._$_findCachedViewById(ak.im.w1.deliver));
} else {
ak.e.a.visible((TextView) this$0._$_findCachedViewById(ak.im.w1.change_server));
ak.e.a.visible(this$0._$_findCachedViewById(ak.im.w1.deliver));
String main = serverListBean.getMain();
boolean z = false;
if (!(main == null || main.length() == 0)) {
String str = this$0.i.get(f1683c);
if ((str == null || str.length() == 0) ? true : true) {
this$0.j = serverListBean.getMain();
((TextView) this$0._$_findCachedViewById(ak.im.w1.current_server_id)).setText(this$0.j);
}
}
}
this$0.k.clear();
this$0.k.add(serverListBean.getMain());
if (serverListBean.getAcceleration_server().size() > 0) {
this$0.k.addAll(serverListBean.getAcceleration_server());
}
} else {
ak.e.a.gone((TextView) this$0._$_findCachedViewById(ak.im.w1.change_server));
ak.e.a.gone(this$0._$_findCachedViewById(ak.im.w1.deliver));
}
this$0.startGenerateQRCode();
}
public static final void g(InviteCodeActivity this$0, Throwable th) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.getIBaseActivity().dismissPGDialog();
Log.e(f1682b, kotlin.jvm.internal.r.stringPlus("getServerListData failed,error is ", th.getMessage()));
th.printStackTrace();
ak.e.a.gone((TextView) this$0._$_findCachedViewById(ak.im.w1.change_server));
ak.e.a.gone(this$0._$_findCachedViewById(ak.im.w1.deliver));
this$0.startGenerateQRCode();
}
private final String h() {
String nickName;
User userMe = ak.im.sdk.manager.nf.getInstance().getUserMe();
if (userMe == null) {
Log.w(f1682b, "user me is null");
nickName = "";
} else {
nickName = userMe.getNickName();
kotlin.jvm.internal.r.checkNotNullExpressionValue(nickName, "user.nickName");
}
if (((CheckBox) _$_findCachedViewById(ak.im.w1.check)).isChecked()) {
kotlin.jvm.internal.w wVar = kotlin.jvm.internal.w.a;
String string = getString(ak.im.b2.invite_code_suggest);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string, "getString(R.string.invite_code_suggest)");
String format = String.format(string, Arrays.copyOf(new Object[]{nickName, AKApplication.getAppName(), AKApplication.getAppName(), nickName}, 4));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format, "format(format, *args)");
return format;
}
kotlin.jvm.internal.w wVar2 = kotlin.jvm.internal.w.a;
String string2 = getString(ak.im.b2.invite_code_suggest_with_add_friend);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string2, "getString(R.string.invit…_suggest_with_add_friend)");
String format2 = String.format(string2, Arrays.copyOf(new Object[]{nickName, AKApplication.getAppName(), AKApplication.getAppName()}, 3));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format2, "format(format, *args)");
return format2;
}
public static final void i(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.finish();
}
private final void init() {
TextView textView = (TextView) _$_findCachedViewById(ak.im.w1.tv_title_back);
if (textView != null) {
textView.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.i(InviteCodeActivity.this, view);
}
});
}
ImageView imageView = (ImageView) _$_findCachedViewById(ak.im.w1.qr_code_img);
if (imageView != null) {
imageView.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public final boolean onLongClick(View view) {
boolean j;
j = InviteCodeActivity.j(InviteCodeActivity.this, view);
return j;
}
});
}
((LinearLayout) _$_findCachedViewById(ak.im.w1.is_add_auto)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.k(InviteCodeActivity.this, view);
}
});
this.g = ak.im.utils.f4.getRightTime() + this.f;
m();
((TextView) _$_findCachedViewById(ak.im.w1.current_server_id)).setText(this.j);
((TextView) _$_findCachedViewById(ak.im.w1.change_server)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.l(InviteCodeActivity.this, view);
}
});
}
public static final boolean j(InviteCodeActivity this$0, View noName_0) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
kotlin.jvm.internal.r.checkNotNullParameter(noName_0, "$noName_0");
this$0.I();
return true;
}
public static final void k(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
int i = ak.im.w1.check;
((CheckBox) this$0._$_findCachedViewById(i)).setChecked(!((CheckBox) this$0._$_findCachedViewById(i)).isChecked());
((TextView) this$0._$_findCachedViewById(ak.im.w1.tv_invite_code_suggest)).setText(this$0.h());
this$0.startGenerateQRCode();
}
public static final void l(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.K();
}
private final void m() {
((Button) _$_findCachedViewById(ak.im.w1.btn_save)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.n(InviteCodeActivity.this, view);
}
});
((Button) _$_findCachedViewById(ak.im.w1.btn_save_bp)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.o(InviteCodeActivity.this, view);
}
});
((Button) _$_findCachedViewById(ak.im.w1.btn_share)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.p(InviteCodeActivity.this, view);
}
});
((ImageView) _$_findCachedViewById(ak.im.w1.iv_set_time)).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
InviteCodeActivity.q(InviteCodeActivity.this, view);
}
});
((LinearLayout) _$_findCachedViewById(ak.im.w1.ll_save_transmit)).setVisibility(8);
((LinearLayout) _$_findCachedViewById(ak.im.w1.ll_save_transmit_bp)).setVisibility(0);
}
public static final void n(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.I();
}
public static final void o(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.I();
}
public static final void p(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.J();
}
public static final void q(InviteCodeActivity this$0, View view) {
kotlin.jvm.internal.r.checkNotNullParameter(this$0, "this$0");
this$0.N();
}
private final void refreshView() {
User userMe = ak.im.sdk.manager.nf.getInstance().getUserMe();
if (userMe == null) {
Log.w(f1682b, "user me is null");
return;
}
String nickName = userMe.getNickName();
if (nickName != null) {
TextView textView = (TextView) _$_findCachedViewById(ak.im.w1.nick_name_txt);
kotlin.jvm.internal.r.checkNotNull(textView);
textView.setText(nickName);
}
TextView textView2 = (TextView) _$_findCachedViewById(ak.im.w1.tv_invite_code_suggest);
if (textView2 != null) {
textView2.setText(h());
}
H();
}
public final void startGenerateQRCode() {
String str;
int i = ak.im.v1.ic_default_male;
User userMe = ak.im.sdk.manager.nf.getInstance().getUserMe();
if (userMe != null) {
str = userMe.getHeadImgThumb();
if (kotlin.jvm.internal.r.areEqual(User.FEMALE, userMe.getGender())) {
i = ak.im.v1.ic_default_female;
}
} else {
str = null;
}
if (!TextUtils.isEmpty(str)) {
String downloadUrl = AkeyChatUtils.getDownloadUrl(str);
com.bumptech.glide.request.f fVar = new com.bumptech.glide.request.f();
fVar.error(i);
com.bumptech.glide.c.with((FragmentActivity) this).asBitmap().load(downloadUrl).apply(fVar).into((CircleImageView) _$_findCachedViewById(ak.im.w1.avatar_img));
}
StringBuilder sb = new StringBuilder();
sb.append("https://");
sb.append(ak.im.sdk.manager.ye.getInstance().getOssCenterHost());
try {
okhttp3.y build = HttpURLTools.getOkHttpClientBuilder(sb.toString(), ak.im.sdk.manager.ye.getInstance().getAccessToken(), false).build();
HashMap hashMap = new HashMap();
hashMap.put("device_type", User.ANDROID_PLATFORM);
hashMap.put("module", "");
hashMap.put("product_type", BuildConfig.PRODUCT_TYPE);
hashMap.put("device_type", User.ANDROID_PLATFORM);
hashMap.put("language", ak.comm.b.a.getLanguage());
String bigVersion = ak.im.sdk.manager.ye.getInstance().getBigVersion();
kotlin.jvm.internal.r.checkNotNullExpressionValue(bigVersion, "getInstance().bigVersion");
hashMap.put("version", bigVersion);
String enterpriseId = ak.im.sdk.manager.ye.getInstance().getServer().getEnterpriseId();
kotlin.jvm.internal.r.checkNotNullExpressionValue(enterpriseId, "getInstance().server.enterpriseId");
hashMap.put("server_id", enterpriseId);
((ak.i.a0) new m.b().baseUrl(sb.toString()).client(build).addCallAdapterFactory(retrofit2.adapter.rxjava2.g.create()).addConverterFactory(retrofit2.p.a.a.create()).build().create(ak.i.a0.class)).getPublishUrl(hashMap).observeOn(io.reactivex.w0.a.io()).flatMap(new io.reactivex.s0.o() {
@Override
public final Object apply(Object obj) {
io.reactivex.e0 M;
M = InviteCodeActivity.M(InviteCodeActivity.this, (a0.b) obj);
return M;
}
}).subscribeOn(io.reactivex.w0.a.io()).observeOn(io.reactivex.q0.c.a.mainThread()).subscribe(new c());
} catch (Exception e2) {
Log.e(f1682b, "startGenerateQRCode exception");
AkeyChatUtils.logException(e2);
}
}
public void _$_clearFindViewByIdCache() {
this.f1684d.clear();
}
@Nullable
public View _$_findCachedViewById(int i) {
Map<Integer, View> map = this.f1684d;
View view = map.get(Integer.valueOf(i));
if (view == null) {
View findViewById = findViewById(i);
if (findViewById == null) {
return null;
}
map.put(Integer.valueOf(i), findViewById);
return findViewById;
}
return view;
}
public final String getCurrentId() {
return this.j;
}
public final AppLoginDBHelper getMmkv() {
return this.i;
}
public final boolean getNeedShowChange() {
return this.l;
}
@NotNull
public final ArrayList<String> getServerList() {
return this.k;
}
@Override
public void onActivityResult(int i, int i2, @Nullable Intent intent) {
}
@Override
public void onCreate(@Nullable Bundle bundle) {
requestWindowFeature(1);
super.onCreate(bundle);
setContentView(ak.im.x1.invitecode_layout);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(ak.im.p1.A);
registerReceiver(this.h, intentFilter);
EventBus.getDefault().register(this);
init();
e();
}
@Override
public void onDestroy() {
EventBus.getDefault().unregister(this);
unregisterReceiver(this.h);
Bitmap bitmap = this.f1685e;
if (bitmap != null) {
bitmap.recycle();
}
super.onDestroy();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onEventMainThread(@NotNull ak.event.z1 event) {
kotlin.jvm.internal.r.checkNotNullParameter(event, "event");
if (this.f1685e != null) {
((ImageView) _$_findCachedViewById(ak.im.w1.qr_code_img)).setImageBitmap(this.f1685e);
String string = getString(ak.im.b2.invite_code_expired_time_forever);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string, "getString(R.string.invit…ode_expired_time_forever)");
long j = this.g;
if (j != -1) {
string = ak.im.utils.f4.getDate(j, getString(ak.im.b2.yyyy_mm_dd_hh_mm2));
kotlin.jvm.internal.r.checkNotNullExpressionValue(string, "getDate(expiredTimestamp…tring.yyyy_mm_dd_hh_mm2))");
}
TextView textView = (TextView) _$_findCachedViewById(ak.im.w1.tv_invite_code_expired_time);
if (textView == null) {
return;
}
kotlin.jvm.internal.w wVar = kotlin.jvm.internal.w.a;
String string2 = getString(ak.im.b2.invite_code_expired_time);
kotlin.jvm.internal.r.checkNotNullExpressionValue(string2, "getString(R.string.invite_code_expired_time)");
String format = String.format(string2, Arrays.copyOf(new Object[]{string}, 1));
kotlin.jvm.internal.r.checkNotNullExpressionValue(format, "format(format, *args)");
textView.setText(format);
return;
}
Log.w(f1682b, "bitmap is null ,not set qrcode");
}
@Override
public void onNewIntent(@NotNull Intent intent) {
kotlin.jvm.internal.r.checkNotNullParameter(intent, "intent");
super.onNewIntent(intent);
setIntent(intent);
init();
}
@Override
public void onPause() {
super.onPause();
}
@Override
protected void onRestoreInstanceState(@NotNull Bundle savedInstanceState) {
kotlin.jvm.internal.r.checkNotNullParameter(savedInstanceState, "savedInstanceState");
super.onRestoreInstanceState(savedInstanceState);
finish();
}
@Override
public void onResume() {
super.onResume();
refreshView();
}
@Override
public void onStop() {
super.onStop();
}
@NotNull
public final io.reactivex.z<a0.b> queryPublishUrlTest() {
a0.b bVar = new a0.b();
bVar.a = 0;
bVar.f305b = "success";
a0.a aVar = new a0.a();
bVar.f306c = aVar;
aVar.a = "http://download.weigongju.org/79816567444";
io.reactivex.z<a0.b> just = io.reactivex.z.just(bVar);
kotlin.jvm.internal.r.checkNotNullExpressionValue(just, "just(result)");
return just;
}
public final void setCurrentId(String str) {
this.j = str;
}
public final void setNeedShowChange(boolean z) {
this.l = z;
}
public final void setServerList(@NotNull ArrayList<String> arrayList) {
kotlin.jvm.internal.r.checkNotNullParameter(arrayList, "<set-?>");
this.k = arrayList;
}
}