VMOS Pro v2.9.9版本的 MD5 值为:42f292af86d02c1a08555cf2d3982a52
以下内容为反编译后的 VmListFragment.java 源代码,内容仅作参考
package com.vmos.pro.activities.main.fragments.vmlist;
import C7528;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.animation.Animation;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import androidx.annotation.RequiresApi;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.app.NotificationCompat;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.SimpleItemAnimator;
import com.binioter.guideview.C0884;
import com.blankj.utilcode.util.C0974;
import com.blankj.utilcode.util.ToastUtils;
import com.tencent.mars.xlog.Log;
import com.umeng.analytics.pro.bg;
import com.vmos.commonuilibrary.InterceptKetEventLayout;
import com.vmos.commonuilibrary.View$OnClickListenerC1394;
import com.vmos.commonuilibrary.View$OnClickListenerC1398;
import com.vmos.commonuilibrary.View$OnClickListenerC1406;
import com.vmos.commonuilibrary.ViewPagerSnapHelper;
import com.vmos.mvplibrary.BaseFmt;
import com.vmos.pro.R;
import com.vmos.pro.account.AccountHelper;
import com.vmos.pro.activities.activevip.ActiveVipActivity;
import com.vmos.pro.activities.activevip.ForeignAcitivtyDetail;
import com.vmos.pro.activities.addvm.AddVmActivityKt;
import com.vmos.pro.activities.backupsrom.BackupsRomActivity;
import com.vmos.pro.activities.login.LoginEmailActivity;
import com.vmos.pro.activities.login.LoginProcedureController;
import com.vmos.pro.activities.login.entity.LoginEntranceArg;
import com.vmos.pro.activities.main.MainActivity;
import com.vmos.pro.activities.main.RomUpdateManager;
import com.vmos.pro.activities.main.fragments.GuideBannerAdapter;
import com.vmos.pro.activities.main.fragments.PluginHelper;
import com.vmos.pro.activities.main.fragments.vmlist.RenameVmDialog;
import com.vmos.pro.activities.main.fragments.vmlist.VMStateInfoAdapter;
import com.vmos.pro.activities.main.fragments.vmlist.VmListBottomAdapter;
import com.vmos.pro.activities.main.fragments.vmlist.VmListContract;
import com.vmos.pro.activities.main.fragments.vmlist.VmListFragment;
import com.vmos.pro.activities.main.viewmodels.VmSettingsViewModel;
import com.vmos.pro.activities.operationevent.OperationEventActivity;
import com.vmos.pro.activities.operationevent.OperationEventConfigHelper;
import com.vmos.pro.activities.renderer.ShortcutTransferActivity;
import com.vmos.pro.activities.vip.JoinVipPaymentActivity;
import com.vmos.pro.activities.vip.VipEmailDetailActivity;
import com.vmos.pro.bean.GuideBannerBean;
import com.vmos.pro.bean.OperationEventConfig;
import com.vmos.pro.bean.ShortsCutBean;
import com.vmos.pro.bean.VmInfo;
import com.vmos.pro.bean.rom.RomInfo;
import com.vmos.pro.bean.rom.RomUpdateResultBean;
import com.vmos.pro.databinding.FragmentVmListBinding;
import com.vmos.pro.dialog.AndroidAssistantDialog;
import com.vmos.pro.dialog.CleanDialog;
import com.vmos.pro.fileUtil.SetInfoListener;
import com.vmos.pro.modules.user.points2vip.GetFreeVipActivity;
import com.vmos.pro.ui.protocol.WebViewActivity;
import com.vmos.pro.utils.TrackUtils;
import com.vmos.utillibrary.viewmodel.VmThroughViewModel;
import com.vmos.utillibrary.viewmodel.factory.VmThroughViewModelFactory;
import com.youth.banner.Banner;
import com.youth.banner.indicator.DrawableIndicator;
import defpackage.fa5;
import defpackage.mh0;
import defpackage.mx6;
import defpackage.qq0;
import defpackage.rg4;
import defpackage.s03;
import defpackage.xn1;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Function;
import io.reactivex.schedulers.Schedulers;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicReference;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@Metadata(bv = {}, d1 = {"\u0000\u0096\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u000b\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010!\n\u0002\b\r\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0010\t\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\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\u0005\n\u0002\u0018\u0002\n\u0002\b\u0011\b\u0007\u0018\u0000 \u00ad\u00022\n\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u00012\u00020\u00032\u00020\u00042\u00020\u00052\u00020\u00062\u00020\u0007:\u0002\u00ad\u0002B\t¢\u0006\u0006\b«\u0002\u0010¬\u0002J\u0010\u0010\u000b\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\bH\u0002J\b\u0010\f\u001a\u00020\nH\u0002J\b\u0010\r\u001a\u00020\nH\u0002J\b\u0010\u000e\u001a\u00020\nH\u0002J\u0012\u0010\u0011\u001a\u00020\n2\b\u0010\u0010\u001a\u0004\u0018\u00010\u000fH\u0002J\"\u0010\u0014\u001a\u00020\n2\b\u0010\u0010\u001a\u0004\u0018\u00010\u000f2\u000e\u0010\u0013\u001a\n\u0012\u0002\b\u0003\u0012\u0002\b\u00030\u0012H\u0002J\b\u0010\u0015\u001a\u00020\nH\u0002J\b\u0010\u0016\u001a\u00020\nH\u0002J\b\u0010\u0017\u001a\u00020\nH\u0002J\u0010\u0010\u0019\u001a\u00020\n2\u0006\u0010\u0018\u001a\u00020\bH\u0002J\u001a\u0010\u001e\u001a\u00020\n2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u0010\u001d\u001a\u00020\u001cH\u0002J\u0010\u0010 \u001a\u00020\n2\u0006\u0010\u001f\u001a\u00020\bH\u0002J\b\u0010!\u001a\u00020\nH\u0002J\u0010\u0010\"\u001a\u00020\n2\u0006\u0010\u001f\u001a\u00020\bH\u0002J\b\u0010#\u001a\u00020\nH\u0002J\b\u0010$\u001a\u00020\nH\u0002J\b\u0010%\u001a\u00020\nH\u0002J\b\u0010&\u001a\u00020\nH\u0002J\b\u0010'\u001a\u00020\nH\u0002J\u0010\u0010*\u001a\u00020\n2\u0006\u0010)\u001a\u00020(H\u0002J\u0010\u0010,\u001a\u00020\n2\u0006\u0010+\u001a\u00020(H\u0002J\b\u0010.\u001a\u00020-H\u0002J\u0018\u00101\u001a\u00020\n2\u0006\u0010/\u001a\u00020(2\u0006\u00100\u001a\u00020-H\u0002J\b\u00102\u001a\u00020\nH\u0002J\u0012\u00105\u001a\u0004\u0018\u0001042\u0006\u00103\u001a\u00020(H\u0002J\u001a\u00107\u001a\u00020\n2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u00106\u001a\u000204H\u0002J*\u0010<\u001a\u00020\n2\u0006\u00109\u001a\u0002082\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u00106\u001a\u0002042\u0006\u0010;\u001a\u00020:H\u0002J\b\u0010=\u001a\u00020\nH\u0002J\u0010\u0010?\u001a\u00020\n2\u0006\u0010>\u001a\u00020\bH\u0002J\b\u0010@\u001a\u00020\nH\u0002J\b\u0010A\u001a\u00020\nH\u0002J.\u0010G\u001a\u00020\n2\u0014\u0010C\u001a\u0010\u0012\u0004\u0012\u000204\u0012\u0006\u0012\u0004\u0018\u00010\u001a0B2\u0006\u0010E\u001a\u00020D2\u0006\u0010>\u001a\u00020FH\u0002J\u0018\u0010J\u001a\u00020-2\u0006\u0010H\u001a\u00020\u001a2\u0006\u0010I\u001a\u00020\u001aH\u0002J\"\u0010M\u001a\u00020(2\u000e\u0010L\u001a\n\u0012\u0004\u0012\u00020\u001a\u0018\u00010K2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001aH\u0002J$\u0010N\u001a\u00020\n2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\b\u00106\u001a\u0004\u0018\u0001042\u0006\u0010;\u001a\u00020:H\u0002J\b\u0010O\u001a\u00020\nH\u0002J\b\u0010P\u001a\u00020\nH\u0002J\b\u0010Q\u001a\u00020\nH\u0002J\b\u0010R\u001a\u00020\nH\u0002J\u0012\u0010U\u001a\u00020(2\b\u0010T\u001a\u0004\u0018\u00010SH\u0002J\u0010\u0010V\u001a\u00020\n2\u0006\u0010\u0018\u001a\u00020\bH\u0002J\b\u0010W\u001a\u00020\nH\u0002J\b\u0010X\u001a\u00020\nH\u0002J\b\u0010Y\u001a\u00020\nH\u0002J\u0010\u0010[\u001a\u00020\n2\u0006\u0010Z\u001a\u00020(H\u0002J\u0010\u0010\\\u001a\u00020\n2\u0006\u0010Z\u001a\u00020(H\u0002J\u0010\u0010^\u001a\u00020\n2\u0006\u0010]\u001a\u00020(H\u0002J\b\u0010_\u001a\u00020\u0002H\u0014J\b\u0010`\u001a\u00020(H\u0014J\b\u0010a\u001a\u00020(H\u0016J\u0012\u0010d\u001a\u00020\n2\b\u0010c\u001a\u0004\u0018\u00010bH\u0016J\u001a\u0010e\u001a\u00020\n2\u0006\u0010\u0018\u001a\u00020\b2\b\u0010c\u001a\u0004\u0018\u00010bH\u0016J\u0010\u0010h\u001a\u00020\n2\u0006\u0010g\u001a\u00020fH\u0007J\u0010\u0010i\u001a\u00020\n2\u0006\u0010\t\u001a\u00020\bH\u0014J\u0006\u0010j\u001a\u00020\nJ\u0006\u0010k\u001a\u00020\nJ\u0006\u0010l\u001a\u00020\nJ\u0012\u0010o\u001a\u00020\n2\b\u0010n\u001a\u0004\u0018\u00010mH\u0016J\u0010\u0010q\u001a\u00020\n2\u0006\u0010p\u001a\u00020(H\u0016J\b\u0010r\u001a\u00020\nH\u0016J\u0010\u0010u\u001a\u00020\n2\u0006\u0010t\u001a\u00020sH\u0007J\u0010\u0010u\u001a\u00020\n2\u0006\u0010t\u001a\u00020vH\u0007J\u0012\u0010u\u001a\u00020\n2\b\u0010t\u001a\u0004\u0018\u00010wH\u0007J\u0012\u0010u\u001a\u00020\n2\b\u0010t\u001a\u0004\u0018\u00010xH\u0007J\u0010\u0010y\u001a\u00020\n2\u0006\u0010/\u001a\u00020(H\u0016J\u0010\u0010z\u001a\u00020\n2\u0006\u0010\u001f\u001a\u00020\bH\u0016J\u0018\u0010{\u001a\u00020\n2\u0006\u0010\u001f\u001a\u00020\b2\u0006\u0010/\u001a\u00020(H\u0016J\b\u0010|\u001a\u00020\nH\u0016J\b\u0010}\u001a\u00020\nH\u0016J\b\u0010~\u001a\u00020\nH\u0016J\b\u0010\u007f\u001a\u00020\nH\u0016J\t\u0010\u0080\u0001\u001a\u00020\nH\u0016J\u001a\u0010\u0082\u0001\u001a\u00020\n2\u0006\u0010/\u001a\u00020(2\t\u0010\u0081\u0001\u001a\u0004\u0018\u00010\u001cJ\u0019\u0010\u0085\u0001\u001a\u00020\n2\u000e\u0010\u0084\u0001\u001a\t\u0012\u0004\u0012\u00020\u001a0\u0083\u0001H\u0016J\t\u0010\u0085\u0001\u001a\u00020\nH\u0016J\u0010\u0010\u0087\u0001\u001a\u00020\n2\u0007\u0010\u0086\u0001\u001a\u00020(J\u0012\u0010\u0088\u0001\u001a\u00020\n2\u0007\u0010\u0086\u0001\u001a\u00020(H\u0017J\"\u0010\u008b\u0001\u001a\u00020\n2\u0007\u0010\u0089\u0001\u001a\u00020-2\u000e\u0010\u008a\u0001\u001a\t\u0012\u0004\u0012\u0002040\u0083\u0001H\u0016J\u0012\u0010\u008d\u0001\u001a\u00020\n2\u0007\u0010\u008c\u0001\u001a\u00020-H\u0016J\u0012\u0010\u008f\u0001\u001a\u00020\n2\u0007\u0010\u008e\u0001\u001a\u00020-H\u0016JD\u0010\u0093\u0001\u001a\u00020\n2\u0014\u0010C\u001a\u0010\u0012\u0004\u0012\u000204\u0012\u0006\u0012\u0004\u0018\u00010\u001a0B2\u0006\u00106\u001a\u0002042\u0007\u0010\u0090\u0001\u001a\u00020F2\b\u0010;\u001a\u0004\u0018\u00010:2\n\u0010\u0092\u0001\u001a\u0005\u0018\u00010\u0091\u0001JR\u0010\u0096\u0001\u001a\u00020\n2\u0006\u0010;\u001a\u00020:2\u0006\u00106\u001a\u0002042\u0007\u0010\u0090\u0001\u001a\u00020F2\b\u0010\u0095\u0001\u001a\u00030\u0094\u00012\u0014\u0010C\u001a\u0010\u0012\u0004\u0012\u000204\u0012\u0006\u0012\u0004\u0018\u00010\u001a0B2\b\u0010\u001b\u001a\u0004\u0018\u00010\u001a2\u0006\u0010>\u001a\u00020FJ'\u0010\u009b\u0001\u001a\u00020\n2\u0007\u0010\u0097\u0001\u001a\u00020(2\u0007\u0010\u0098\u0001\u001a\u00020(2\n\u0010\u009a\u0001\u001a\u0005\u0018\u00010\u0099\u0001H\u0016J\u001b\u0010\u009e\u0001\u001a\u00020\n2\u0007\u0010\u009c\u0001\u001a\u00020(2\t\u0010\u009d\u0001\u001a\u0004\u0018\u00010\u001cJ\u0007\u0010\u009f\u0001\u001a\u00020\nJ\u0007\u0010 \u0001\u001a\u00020\nJ\u0007\u0010¡\u0001\u001a\u00020\nJ\u0007\u0010¢\u0001\u001a\u00020\nJ\u0007\u0010£\u0001\u001a\u00020\nJ\u0007\u0010¤\u0001\u001a\u00020\nJ\u0007\u0010¥\u0001\u001a\u00020\nJ\u0007\u0010¦\u0001\u001a\u00020-J\t\u0010§\u0001\u001a\u00020\nH\u0016J\u0015\u0010ª\u0001\u001a\u00020\n2\n\u0010©\u0001\u001a\u0005\u0018\u00010¨\u0001H\u0017R\u0017\u0010«\u0001\u001a\u00020(8\u0002X\u0082D¢\u0006\b\n\u0006\b«\u0001\u0010¬\u0001R\u001a\u0010®\u0001\u001a\u00030\u00ad\u00018\u0002@\u0002X\u0082.¢\u0006\b\n\u0006\b®\u0001\u0010¯\u0001R+\u0010°\u0001\u001a\u0004\u0018\u00010\b8\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\b°\u0001\u0010±\u0001\u001a\u0006\b²\u0001\u0010³\u0001\"\u0006\b´\u0001\u0010µ\u0001R)\u0010¶\u0001\u001a\u00020-8\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\b¶\u0001\u0010·\u0001\u001a\u0006\b¸\u0001\u0010¹\u0001\"\u0006\bº\u0001\u0010»\u0001R*\u0010½\u0001\u001a\u00030¼\u00018\u0006@\u0006X\u0086\u000e¢\u0006\u0018\n\u0006\b½\u0001\u0010¾\u0001\u001a\u0006\b¿\u0001\u0010À\u0001\"\u0006\bÁ\u0001\u0010Â\u0001R\u001c\u0010Ä\u0001\u001a\u0005\u0018\u00010Ã\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÄ\u0001\u0010Å\u0001R\u001c\u0010Ç\u0001\u001a\u0005\u0018\u00010Æ\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\bÇ\u0001\u0010È\u0001R\u001c\u0010Ê\u0001\u001a\u0005\u0018\u00010É\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\bÊ\u0001\u0010Ë\u0001R\u001c\u0010Í\u0001\u001a\u0005\u0018\u00010Ì\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\bÍ\u0001\u0010Î\u0001R \u0010Ï\u0001\u001a\t\u0012\u0004\u0012\u00020\u001a0\u0083\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\bÏ\u0001\u0010Ð\u0001R\u001c\u0010Ò\u0001\u001a\u0005\u0018\u00010Ñ\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÒ\u0001\u0010Ó\u0001R\u001c\u0010Õ\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÕ\u0001\u0010Ö\u0001R\"\u0010×\u0001\u001a\u000b\u0012\u0004\u0012\u000204\u0018\u00010\u0083\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b×\u0001\u0010Ð\u0001R'\u0010)\u001a\u00020(8\u0016@\u0016X\u0096\u000e¢\u0006\u0017\n\u0005\b)\u0010¬\u0001\u001a\u0006\bØ\u0001\u0010Ù\u0001\"\u0006\bÚ\u0001\u0010Û\u0001R\u001c\u0010Ü\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÜ\u0001\u0010Ö\u0001R\u001c\u0010Ý\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÝ\u0001\u0010Ö\u0001R\u001c\u0010Þ\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bÞ\u0001\u0010Ö\u0001R\u001c\u0010ß\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bß\u0001\u0010Ö\u0001R\u001c\u0010á\u0001\u001a\u0005\u0018\u00010à\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bá\u0001\u0010â\u0001R\u001c\u0010ã\u0001\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bã\u0001\u0010Ö\u0001R\u001c\u0010ä\u0001\u001a\u0005\u0018\u00010Ã\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bä\u0001\u0010Å\u0001R\u001b\u0010å\u0001\u001a\u0004\u0018\u00010F8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bå\u0001\u0010æ\u0001R\u001c\u0010è\u0001\u001a\u0005\u0018\u00010ç\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bè\u0001\u0010é\u0001R\u001c\u0010ë\u0001\u001a\u0005\u0018\u00010ê\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\bë\u0001\u0010ì\u0001R\u0019\u0010í\u0001\u001a\u00020-8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bí\u0001\u0010·\u0001R\u001c\u0010î\u0001\u001a\u0005\u0018\u00010Ã\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bî\u0001\u0010Å\u0001R\u001c\u0010ð\u0001\u001a\u0005\u0018\u00010ï\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bð\u0001\u0010ñ\u0001R\u001c\u0010ò\u0001\u001a\u0005\u0018\u00010\u0094\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bò\u0001\u0010ó\u0001R\u001b\u0010ô\u0001\u001a\u0004\u0018\u00010F8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bô\u0001\u0010æ\u0001R\u001b\u0010õ\u0001\u001a\u0004\u0018\u00010F8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bõ\u0001\u0010æ\u0001R\u001c\u0010÷\u0001\u001a\u0005\u0018\u00010ö\u00018\u0006@\u0006X\u0087\u000e¢\u0006\b\n\u0006\b÷\u0001\u0010ø\u0001R\u0019\u0010ù\u0001\u001a\u00020-8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bù\u0001\u0010·\u0001R\u001b\u0010ú\u0001\u001a\u0004\u0018\u00010m8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bú\u0001\u0010û\u0001R\u001c\u0010ý\u0001\u001a\u0005\u0018\u00010ü\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\bý\u0001\u0010þ\u0001R\u001c\u0010\u0080\u0002\u001a\u0005\u0018\u00010ÿ\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0080\u0002\u0010\u0081\u0002R\u0019\u0010\u0082\u0002\u001a\u00020-8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0082\u0002\u0010·\u0001R\u001c\u0010\u0084\u0002\u001a\u0005\u0018\u00010\u0083\u00028\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0084\u0002\u0010\u0085\u0002R\u0019\u0010\u0086\u0002\u001a\u00020(8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0086\u0002\u0010¬\u0001R2\u0010\u0088\u0002\u001a\u00020-2\u0007\u0010\u0087\u0002\u001a\u00020-8B@BX\u0082\u000e¢\u0006\u0018\n\u0006\b\u0088\u0002\u0010·\u0001\u001a\u0006\b\u0089\u0002\u0010¹\u0001\"\u0006\b\u008a\u0002\u0010»\u0001R\u001b\u0010\u008b\u0002\u001a\u0004\u0018\u00010D8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u008b\u0002\u0010\u008c\u0002R'\u0010\u008e\u0002\u001a\u0012\u0012\u0004\u0012\u00020\u001c\u0012\u0007\u0012\u0005\u0018\u00010Ô\u00010\u008d\u00028\u0002X\u0082\u0004¢\u0006\b\n\u0006\b\u008e\u0002\u0010\u008f\u0002R\u0018\u0010\u0091\u0002\u001a\u00030\u0090\u00028\u0002X\u0082\u0004¢\u0006\b\n\u0006\b\u0091\u0002\u0010\u0092\u0002R\u001c\u0010\u0094\u0002\u001a\u0005\u0018\u00010\u0093\u00028\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0094\u0002\u0010\u0095\u0002R\u001b\u0010\u0096\u0002\u001a\u0004\u0018\u00010D8\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0096\u0002\u0010\u008c\u0002R\u001c\u0010\u0098\u0002\u001a\u0005\u0018\u00010\u0097\u00028\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0098\u0002\u0010\u0099\u0002R\u001c\u0010\u009a\u0002\u001a\u0005\u0018\u00010Æ\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009a\u0002\u0010È\u0001R\u001c\u0010\u009b\u0002\u001a\u0005\u0018\u00010Ô\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009b\u0002\u0010Ö\u0001R\"\u0010\u009c\u0002\u001a\u000b\u0012\u0004\u0012\u00020-\u0018\u00010\u0083\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009c\u0002\u0010Ð\u0001R!\u0010¢\u0002\u001a\u00030\u009d\u00028BX\u0082\u0084\u0002¢\u0006\u0010\n\u0006\b\u009e\u0002\u0010\u009f\u0002\u001a\u0006\b \u0002\u0010¡\u0002R\u0017\u0010¥\u0002\u001a\u00020\n8BX\u0082\u0004¢\u0006\b\u001a\u0006\b£\u0002\u0010¤\u0002R\u0016\u0010¨\u0002\u001a\u0004\u0018\u00010S8F¢\u0006\b\u001a\u0006\b¦\u0002\u0010§\u0002R\u0014\u0010ª\u0002\u001a\u00020(8F¢\u0006\b\u001a\u0006\b©\u0002\u0010Ù\u0001¨\u0006®\u0002"}, d2 = {"Lcom/vmos/pro/activities/main/fragments/vmlist/VmListFragment;", "Lcom/vmos/mvplibrary/BaseFmt;", "Lcom/vmos/pro/activities/main/fragments/vmlist/VmListContract$Presenter;", "Lcom/vmos/pro/activities/main/fragments/vmlist/VmListContract$View;", "Landroid/view/View$OnClickListener;", "Lwi3;", "Lcom/vmos/pro/activities/main/fragments/vmlist/VMStateInfoAdapter$VMListAdapterCallback;", "Lu02;", "Landroid/view/View;", "contentView", "Lj66;", "initBinding", "showActivationDialog", "initGuideAnimationCoverView", "initMenu", "Lcom/vmos/pro/bean/GuideBannerBean;", "guideBannerBean", "inflateAndSetGuideData", "Lcom/youth/banner/Banner;", "banner", "setBannerLoopTime", "preStartVM", "toggleAddVMMenuVisibility", "hideAddVMMenuView", "view", "checkoutVipCount", "Lcom/vmos/pro/bean/VmInfo;", ku.f23928, "", "newVmName", "createShortcut", bg.aE, "showJoinVipDialogByAddVm", "showJoinVipDialogByAddVmChina", "showJoinVipDialogByAddVmForeign", "toggleSwcVmListModeView", "controlOperationEventEntranceVisibility", "toggleThroughVM", "toggleMenuVisibility", "refreshVMListUI", "", "spanCount", "setVMSpanCount", "nowPosition", "moveNavListItemOnCenter", "", "canEnterVm", "position", "reEnter", "startVmReenter", "assignLocalVmIdToRomUpdateResultList", "localVmId", "Lcom/vmos/pro/bean/rom/RomUpdateResultBean;", "obtainRomUpdateBeanByLocalVmId", "resultBean", "showVmUpdateDialog", "Lcom/vmos/commonuilibrary/ٴ;", "dialog", "Ljava/io/File;", "downloadFile", "fileDownloadSuccess", "showAllVmUpdateDialog", "tv", "doHide", "hideUpdateView", "removeUpdateView", "Landroid/util/ArrayMap;", "map", "Landroid/widget/LinearLayout;", "llSelect", "Landroid/widget/TextView;", "doUpdateAll", "vmInfo1", "vmInfo2", "vmInfoEquals", "", "list", "vmInfoIndexOf", "updateRomInfoAfterDownload", "processLogin", "initViewModel", "setVmListTouch", "notifyNavAdapter", "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;", "viewHolder", "getItemViewWidth", "showLVMNavPopWindow", "navVMSetting", "navShutdownVM", "showPenetrateGuideStep1", "localID", "updateView", "updateViewByIndex", "vmId", "notifyExistVmInfoViewByIndex", "createPresenter", "getLayoutId", "findFirstCompletelyVisibleItemPosition", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "onViewCreated", "Lc24;", "ev", "onEventPresentGuideAnimation", "setUp", "inflate", "initNavView", "downloadRomWhenGuide", "Lcom/vmos/pro/bean/rom/RomInfo;", "downloadedRomInfo", "guideDownloadSuccess", "progress", "guideDownloadProgress", "onResume", "Lpt2;", NotificationCompat.CATEGORY_EVENT, "onEventMainThread", "Lei4;", "Lョ;", "Lz;", "clickEnter", "onClick", "onItemClick", "warnRedirect2Permission", "showExistVmInfoView", "showBlur", "dismissBlur", "afterOnVmListSorted", "vmName", "setName", "", "curVmInfoList", "notifyExistVmInfoView", "vmLocalId", "startVmById", "hideDeleteVmView", "isUserClick", "updateResultBeans", "onRomUpdateResultGotten", "show", "toggleMenuRedDot", "toShow", "setAutoGuideRetryBtnVisibility", "tvProgress", "", "e", "onErrorRom", "Landroid/widget/ProgressBar;", "pb", "onCompleteRom", "requestCode", "resultCode", "Landroid/content/Intent;", "data", "onActivityResult", "vmPosition", "launchPackageName", "launchApp", "reorderAddVmLocalActToFront", "showVmListNav", "loadNavData", "navExitMode", "reloadTopViewHolder", "showPenetrateGuideStep2", "showPenetrateGuideStep3", "onBackPressed", "onDestroy", "Lf51;", "eventMessage", "onEventMessageReceive", "SELECT_SINGLE_VM_TO_UPDATE", "I", "Lcom/vmos/pro/databinding/FragmentVmListBinding;", "binding", "Lcom/vmos/pro/databinding/FragmentVmListBinding;", "indicatorIndex", "Landroid/view/View;", "getIndicatorIndex", "()Landroid/view/View;", "setIndicatorIndex", "(Landroid/view/View;)V", "showRedDot", "Z", "getShowRedDot", "()Z", "setShowRedDot", "(Z)V", "", "lastBackPressedTime", "J", "getLastBackPressedTime", "()J", "setLastBackPressedTime", "(J)V", "Landroidx/constraintlayout/widget/ConstraintLayout;", "vTop", "Landroidx/constraintlayout/widget/ConstraintLayout;", "Landroidx/recyclerview/widget/RecyclerView;", "rvVmList", "Landroidx/recyclerview/widget/RecyclerView;", "Landroid/widget/FrameLayout;", "flAddVm", "Landroid/widget/FrameLayout;", "Lcom/vmos/pro/activities/main/fragments/vmlist/VMStateInfoAdapter;", "mVmAdapter", "Lcom/vmos/pro/activities/main/fragments/vmlist/VMStateInfoAdapter;", "mVmInfoList", "Ljava/util/List;", "Landroid/view/ViewStub;", "viewStub", "Landroid/view/ViewStub;", "Landroid/widget/ImageView;", "ivMenu", "Landroid/widget/ImageView;", "mRomUpdateList", "getSpanCount", "()I", "setSpanCount", "(I)V", "ivSwcVmListSortMode", "ivAddVm", "ivEmailRegister", "ivThroughVm", "Landroid/widget/PopupWindow;", "mMenuPW", "Landroid/widget/PopupWindow;", "ivCheckUpdateRedDot", "clUpdateHintRoot", "tvUpdateHint", "Landroid/widget/TextView;", "Landroid/widget/Button;", "btnCheckUpdateDetail", "Landroid/widget/Button;", "Lcom/vmos/commonuilibrary/ViewPagerSnapHelper;", "mSnapHelper", "Lcom/vmos/commonuilibrary/ViewPagerSnapHelper;", "mFirstPageSelected", "rlGuideLayout", "Landroid/widget/RelativeLayout;", "rlGuideLayoutNoExternalSize", "Landroid/widget/RelativeLayout;", "progressBar", "Landroid/widget/ProgressBar;", "mTvProgress", "tvAutoGuideDownloadRetry", "Lcom/vmos/utillibrary/viewmodel/VmThroughViewModel;", "viewModel", "Lcom/vmos/utillibrary/viewmodel/VmThroughViewModel;", "canStartRendererActivity", "mRomInfo", "Lcom/vmos/pro/bean/rom/RomInfo;", "Lcom/vmos/commonuilibrary/InterceptKetEventLayout;", "mUpdateView", "Lcom/vmos/commonuilibrary/InterceptKetEventLayout;", "Lcom/vmos/commonuilibrary/InterceptKetEventLayout$ᐨ;", "callback", "Lcom/vmos/commonuilibrary/InterceptKetEventLayout$ᐨ;", "isUpdateViewShowing", "Lcom/vmos/pro/activities/main/fragments/PluginHelper;", "pluginHelper", "Lcom/vmos/pro/activities/main/fragments/PluginHelper;", "targetPosition", oa0.f27841, "needShowAddVmRedDot", "getNeedShowAddVmRedDot", "setNeedShowAddVmRedDot", "mLLI", "Landroid/widget/LinearLayout;", "Ljava/util/HashMap;", "guideAnimationCoverViews", "Ljava/util/HashMap;", "Lcom/vmos/pro/activities/operationevent/OperationEventConfigHelper;", "oeConfigHelper", "Lcom/vmos/pro/activities/operationevent/OperationEventConfigHelper;", "Lcom/vmos/pro/bean/OperationEventConfig;", "oeConfigData", "Lcom/vmos/pro/bean/OperationEventConfig;", "clNav", "Lcom/vmos/pro/activities/main/fragments/vmlist/VmListBottomAdapter;", "navAdapter", "Lcom/vmos/pro/activities/main/fragments/vmlist/VmListBottomAdapter;", "navList", "navImg", "mNavList", "Lcom/vmos/pro/activities/main/viewmodels/VmSettingsViewModel;", "vmSettingsViewModel$delegate", "Lfp2;", "getVmSettingsViewModel", "()Lcom/vmos/pro/activities/main/viewmodels/VmSettingsViewModel;", "vmSettingsViewModel", "getGuidePictureList", "()Lj66;", "guidePictureList", "getVisibleViewHolder", "()Landroidx/recyclerview/widget/RecyclerView$ViewHolder;", "visibleViewHolder", "getVisibleViewHolderLayoutPosition", "visibleViewHolderLayoutPosition", "<init>", "()V", "Companion", "app_release"}, k = 1, mv = {1, 7, 1})
@SuppressLint({"ClickableViewAccessibility", "SetTextI18n"})
public final class VmListFragment extends BaseFmt<VmListContract.Presenter> implements VmListContract.View, View.OnClickListener, wi3, VMStateInfoAdapter.VMListAdapterCallback, u02 {
@NotNull
private static final String TAG = "VMOS-VmListFragment";
private FragmentVmListBinding binding;
@Nullable
private Button btnCheckUpdateDetail;
@Nullable
private InterceptKetEventLayout.InterfaceC1366 callback;
private boolean canStartRendererActivity;
@Nullable
private LinearLayout clNav;
@Nullable
private ConstraintLayout clUpdateHintRoot;
@JvmField
@Nullable
public FrameLayout flAddVm;
@Nullable
private View indicatorIndex;
private boolean isUpdateViewShowing;
@Nullable
private ImageView ivAddVm;
@Nullable
private ImageView ivCheckUpdateRedDot;
@Nullable
private ImageView ivEmailRegister;
@Nullable
private ImageView ivMenu;
@Nullable
private ImageView ivSwcVmListSortMode;
@Nullable
private ImageView ivThroughVm;
private long lastBackPressedTime;
@Nullable
private LinearLayout mLLI;
@Nullable
private PopupWindow mMenuPW;
@Nullable
private List<Boolean> mNavList;
@Nullable
private RomInfo mRomInfo;
@Nullable
private List<RomUpdateResultBean> mRomUpdateList;
@JvmField
@Nullable
public ViewPagerSnapHelper mSnapHelper;
@Nullable
private TextView mTvProgress;
@Nullable
private InterceptKetEventLayout mUpdateView;
@Nullable
private ja6 mVMMenuPopupWindow;
@JvmField
@Nullable
public VMStateInfoAdapter mVmAdapter;
@Nullable
private VmListBottomAdapter navAdapter;
@Nullable
private ImageView navImg;
@Nullable
private RecyclerView navList;
@Nullable
private OperationEventConfig oeConfigData;
@Nullable
private PluginHelper pluginHelper;
@Nullable
private ProgressBar progressBar;
@Nullable
private ConstraintLayout rlGuideLayout;
@Nullable
private RelativeLayout rlGuideLayoutNoExternalSize;
@JvmField
@Nullable
public RecyclerView rvVmList;
private boolean showRedDot;
private int targetPosition;
@Nullable
private TextView tvAutoGuideDownloadRetry;
@Nullable
private TextView tvUpdateHint;
@Nullable
private ConstraintLayout vTop;
@JvmField
@Nullable
public VmThroughViewModel viewModel;
@Nullable
private ViewStub viewStub;
@NotNull
public static final Companion Companion = new Companion(null);
@NotNull
private static final Object HIDE_TAG = new Object();
@NotNull
private static final Object DONE_TAG = new Object();
private final int SELECT_SINGLE_VM_TO_UPDATE = 1192737;
@JvmField
@NotNull
public List<VmInfo> mVmInfoList = new ArrayList();
private int spanCount = 1;
private boolean mFirstPageSelected = true;
@NotNull
private final fp2 vmSettingsViewModel$delegate = FragmentViewModelLazyKt.createViewModelLazy(this, bh4.m3383(VmSettingsViewModel.class), new VmListFragment$special$$inlined$viewModels$default$2(new VmListFragment$special$$inlined$viewModels$default$1(this)), VmListFragment$vmSettingsViewModel$2.INSTANCE);
private boolean needShowAddVmRedDot = true;
@NotNull
private final HashMap<String, ImageView> guideAnimationCoverViews = new HashMap<>();
@NotNull
private final OperationEventConfigHelper oeConfigHelper = new OperationEventConfigHelper();
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082T¢\u0006\u0002\n\u0000¨\u0006\u0007"}, d2 = {"Lcom/vmos/pro/activities/main/fragments/vmlist/VmListFragment$Companion;", "", "()V", "DONE_TAG", "HIDE_TAG", "TAG", "", "app_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public static final class Companion {
private Companion() {
}
public Companion(ce0 ce0Var) {
this();
}
}
private final void assignLocalVmIdToRomUpdateResultList() {
if (C7397.m55533(this.mRomUpdateList) || C7397.m55533(this.mVmInfoList)) {
return;
}
for (VmInfo vmInfo : this.mVmInfoList) {
String m11674 = vmInfo.m11475().m11674();
int m11756 = vmInfo.m11475().m11683().m11756();
List<RomUpdateResultBean> list = this.mRomUpdateList;
y82.m51521(list);
Iterator<RomUpdateResultBean> it = list.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
RomUpdateResultBean next = it.next();
if (next != null && !next.m11784() && next.m11783() != null && y82.m51536(m11674, next.m11781()) && m11756 < next.m11783().m11793()) {
next.m11786(vmInfo.m11460());
break;
}
}
}
}
private final boolean canEnterVm() {
if (wg6.m48603().m48608() <= yg6.m51947()) {
return true;
}
C7305.m55293().m55300(bm4.m3636(R.string.vm_number_exceed_the_limit));
return false;
}
private final void checkoutVipCount(final View view) {
boolean z = true;
z = (AccountHelper.get().getIsAnnualCard() != 1 || this.mVmInfoList.size() >= 50) ? false : false;
if (this.mVmInfoList.size() >= 2 && !z) {
if (!AccountHelper.get().unlimited() && this.mVmInfoList.size() >= 6) {
C7305.m55293().m55300(bm4.m3636(R.string.vm_number_exceed_the_limit));
return;
} else if (!AccountHelper.get().unlimited() && this.mVmInfoList.size() >= 50) {
C7305.m55293().m55300(bm4.m3636(R.string.add_vm_9));
return;
} else if (AccountHelper.get().unlimited() && this.mVmInfoList.size() >= 99) {
C7305.m55293().m55300(bm4.m3636(R.string.add_vm_9));
return;
} else {
AccountHelper.get().checkVip(new sc5() {
@Override
public void onUserNotLogin() {
VmListFragment vmListFragment = VmListFragment.this;
View decorView = vmListFragment.requireActivity().getWindow().getDecorView();
y82.m51530(decorView, "requireActivity().window.decorView");
vmListFragment.showJoinVipDialogByAddVm(decorView);
}
@Override
public void onVipChecked(boolean z2, boolean z3) {
if (!z2 && !z3) {
VmListFragment.this.showJoinVipDialogByAddVm(view);
} else {
VmListFragment.this.reorderAddVmLocalActToFront();
}
}
}, requireActivity().getWindow().getDecorView());
return;
}
}
reorderAddVmLocalActToFront();
}
private final void controlOperationEventEntranceVisibility() {
Integer m10950;
Integer m10952;
Integer m10949;
if (this.oeConfigData == null) {
this.oeConfigData = this.oeConfigHelper.getLocalConfigData();
}
OperationEventConfig operationEventConfig = this.oeConfigData;
FragmentVmListBinding fragmentVmListBinding = null;
FragmentVmListBinding fragmentVmListBinding2 = null;
FragmentVmListBinding fragmentVmListBinding3 = null;
if (!((operationEventConfig == null || (m10949 = operationEventConfig.m10949()) == null || m10949.intValue() != 1) ? false : true)) {
FragmentVmListBinding fragmentVmListBinding4 = this.binding;
if (fragmentVmListBinding4 == null) {
y82.m51533("binding");
fragmentVmListBinding4 = null;
}
fragmentVmListBinding4.f9139.setVisibility(8);
FragmentVmListBinding fragmentVmListBinding5 = this.binding;
if (fragmentVmListBinding5 == null) {
y82.m51533("binding");
fragmentVmListBinding5 = null;
}
fragmentVmListBinding5.f9143.setVisibility(8);
FragmentVmListBinding fragmentVmListBinding6 = this.binding;
if (fragmentVmListBinding6 == null) {
y82.m51533("binding");
} else {
fragmentVmListBinding2 = fragmentVmListBinding6;
}
cg6.m5095(fragmentVmListBinding2.f9132, getNeedShowAddVmRedDot());
return;
}
OperationEventConfig operationEventConfig2 = this.oeConfigData;
if ((operationEventConfig2 == null || (m10952 = operationEventConfig2.m10952()) == null || m10952.intValue() != 1) ? false : true) {
FragmentVmListBinding fragmentVmListBinding7 = this.binding;
if (fragmentVmListBinding7 == null) {
y82.m51533("binding");
fragmentVmListBinding7 = null;
}
fragmentVmListBinding7.f9143.setVisibility(0);
ho1 ho1Var = ho1.f18937;
FragmentVmListBinding fragmentVmListBinding8 = this.binding;
if (fragmentVmListBinding8 == null) {
y82.m51533("binding");
fragmentVmListBinding8 = null;
}
ImageView imageView = fragmentVmListBinding8.f9143;
y82.m51530(imageView, "binding.ivOperationEventSmallIcon");
OperationEventConfig operationEventConfig3 = this.oeConfigData;
ho1Var.m23893(imageView, (operationEventConfig3 == null || (r7 = operationEventConfig3.m10954()) == null) ? "" : "");
} else {
FragmentVmListBinding fragmentVmListBinding9 = this.binding;
if (fragmentVmListBinding9 == null) {
y82.m51533("binding");
fragmentVmListBinding9 = null;
}
fragmentVmListBinding9.f9143.setVisibility(8);
}
OperationEventConfig operationEventConfig4 = this.oeConfigData;
if ((operationEventConfig4 != null && (m10950 = operationEventConfig4.m10950()) != null && m10950.intValue() == 1) && !OperationEventConfigHelper.Companion.isUserCloseBannerOnce()) {
if (this.mVmInfoList.isEmpty()) {
FragmentVmListBinding fragmentVmListBinding10 = this.binding;
if (fragmentVmListBinding10 == null) {
y82.m51533("binding");
} else {
fragmentVmListBinding3 = fragmentVmListBinding10;
}
fragmentVmListBinding3.f9139.setVisibility(8);
return;
}
FragmentVmListBinding fragmentVmListBinding11 = this.binding;
if (fragmentVmListBinding11 == null) {
y82.m51533("binding");
fragmentVmListBinding11 = null;
}
fragmentVmListBinding11.f9139.setVisibility(getSpanCount() <= 1 ? 8 : 0);
ho1 ho1Var2 = ho1.f18937;
FragmentVmListBinding fragmentVmListBinding12 = this.binding;
if (fragmentVmListBinding12 == null) {
y82.m51533("binding");
fragmentVmListBinding12 = null;
}
ImageView imageView2 = fragmentVmListBinding12.f9142;
y82.m51530(imageView2, "binding.ivOperationEventBanner");
OperationEventConfig operationEventConfig5 = this.oeConfigData;
ho1Var2.m23888(imageView2, operationEventConfig5 != null ? operationEventConfig5.m10948() : null);
return;
}
FragmentVmListBinding fragmentVmListBinding13 = this.binding;
if (fragmentVmListBinding13 == null) {
y82.m51533("binding");
} else {
fragmentVmListBinding = fragmentVmListBinding13;
}
fragmentVmListBinding.f9139.setVisibility(8);
}
private final void createShortcut(VmInfo vmInfo, String str) {
VmInfo m48630;
if (vmInfo == null || (m48630 = wg6.m48603().m48630(vmInfo.m11460())) == null) {
return;
}
Bitmap m50906 = m48630.m11472() == 2 ? xt5.m50906(m48630.m11470()) : null;
Application application = C7305.f45341;
int m11460 = vmInfo.m11460();
if (TextUtils.isEmpty(str)) {
str = m48630.m11433();
}
aa5.m688(application, m11460, str, ShortcutTransferActivity.class, m50906, R.mipmap.ic_float_ball_blue);
warnRedirect2Permission();
}
private final void doHide(View view) {
if (view.getTag() != null) {
if (view.getTag() == HIDE_TAG) {
hideUpdateView();
if6.m24979(this.clUpdateHintRoot);
return;
} else if (view.getTag() == DONE_TAG) {
removeUpdateView();
return;
} else {
return;
}
}
removeUpdateView();
}
private final void doUpdateAll(final ArrayMap<RomUpdateResultBean, VmInfo> arrayMap, LinearLayout linearLayout, final TextView textView) {
File file;
ArrayMap<RomUpdateResultBean, VmInfo> arrayMap2 = arrayMap;
linearLayout.removeAllViewsInLayout();
int size = arrayMap.size();
int i = 0;
while (i < size) {
final RomUpdateResultBean keyAt = arrayMap2.keyAt(i);
final VmInfo vmInfo = arrayMap2.get(keyAt);
boolean z = !keyAt.m11783().m11803();
Log.i(TAG, "doUpdateAll full update is " + z);
String str = C7946.m59219().dataDir;
if (z) {
file = new File(str, dy.f14342 + keyAt.m11781() + keyAt.m11783().m11793());
} else {
file = new File(str, dy.f14349 + SystemClock.uptimeMillis());
}
final File file2 = file;
String m11798 = keyAt.m11783().m11799() == null ? keyAt.m11783().m11798() : keyAt.m11783().m11799();
View inflate = View.inflate(requireActivity(), R.layout.item_single_vm_update_progress, null);
View findViewById = inflate.findViewById(R.id.tv_vm_name);
y82.m51523(findViewById, "null cannot be cast to non-null type android.widget.TextView");
y82.m51521(vmInfo);
((TextView) findViewById).setText(vmInfo.m11433());
final TextView textView2 = (TextView) inflate.findViewById(R.id.tv_progress);
final ProgressBar progressBar = (ProgressBar) inflate.findViewById(R.id.pb_download);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.topMargin = ey4.m19869(16);
linearLayout.addView(inflate, -1, layoutParams);
qq0.m38092().m38097(m11798, file2, new qq0.InterfaceC4816() {
@Override
public void onComplete() {
VmListFragment vmListFragment = this;
File file3 = file2;
RomUpdateResultBean romUpdateResultBean = keyAt;
y82.m51530(romUpdateResultBean, "resultBean");
TextView textView3 = textView2;
y82.m51530(textView3, "tvProgress");
ProgressBar progressBar2 = progressBar;
y82.m51530(progressBar2, "pb");
vmListFragment.onCompleteRom(file3, romUpdateResultBean, textView3, progressBar2, arrayMap, vmInfo, textView);
}
@Override
public void onError(@NotNull Throwable th) {
y82.m51531(th, "e");
VmListFragment vmListFragment = this;
ArrayMap<RomUpdateResultBean, VmInfo> arrayMap3 = arrayMap;
RomUpdateResultBean romUpdateResultBean = keyAt;
y82.m51530(romUpdateResultBean, "resultBean");
TextView textView3 = textView2;
y82.m51530(textView3, "tvProgress");
vmListFragment.onErrorRom(arrayMap3, romUpdateResultBean, textView3, file2, th);
}
@Override
public void onPause(int i2) {
}
@Override
public void onProgress(int i2, int i3) {
TextView textView3 = textView2;
StringBuilder sb = new StringBuilder();
sb.append(i2);
sb.append('%');
textView3.setText(sb.toString());
progressBar.setProgress(i2);
}
});
i++;
arrayMap2 = arrayMap;
}
}
public static final boolean m10580downloadRomWhenGuide$lambda4(View view, MotionEvent motionEvent) {
return true;
}
public final void fileDownloadSuccess(View$OnClickListenerC1398 view$OnClickListenerC1398, VmInfo vmInfo, RomUpdateResultBean romUpdateResultBean, File file) {
view$OnClickListenerC1398.m8735();
updateRomInfoAfterDownload(vmInfo, romUpdateResultBean, file);
startVmReenter(vmInfoIndexOf(this.mVmInfoList, vmInfo), true);
}
private final j66 getGuidePictureList() {
Log.d(TAG, "getGuidePictureList");
ArrayMap arrayMap = new ArrayMap();
arrayMap.put(ku.f23919, ku.f23904);
z96.m53214().m55003(new mh0.AbstractC4075<wu<GuideBannerBean>>() {
@Override
public void failure(@Nullable wu<GuideBannerBean> wuVar) {
}
@Override
public void success(@Nullable wu<GuideBannerBean> wuVar) {
if ((wuVar != null ? wuVar.m49360() : null) != null) {
String m30155 = lq1.m30155(wuVar.m49360());
if (!jp5.m27402(m30155)) {
dc6.f13598.m16929().encode(ku.f23772, m30155);
}
}
VmListFragment.this.inflateAndSetGuideData(wuVar != null ? wuVar.m49360() : null);
}
}, ((InterfaceC7260) z96.m53214().m53236(InterfaceC7260.class)).m55119(sz1.m41882(jq1.m27414(arrayMap))));
return j66.f21418;
}
private final int getItemViewWidth(RecyclerView.ViewHolder viewHolder) {
if (this.navList == null || viewHolder == null) {
return 1;
}
return viewHolder.itemView.getWidth();
}
public final boolean getNeedShowAddVmRedDot() {
if (this.needShowAddVmRedDot) {
ImageView imageView = this.ivAddVm;
if (imageView != null && imageView.getVisibility() == 0) {
return true;
}
}
return false;
}
public final VmSettingsViewModel getVmSettingsViewModel() {
return (VmSettingsViewModel) this.vmSettingsViewModel$delegate.getValue();
}
private final void hideAddVMMenuView() {
FragmentActivity requireActivity = requireActivity();
y82.m51523(requireActivity, "null cannot be cast to non-null type com.vmos.pro.activities.main.MainActivity");
((MainActivity) requireActivity).hideAddVMMenuView();
}
public static final void m10581hideDeleteVmView$lambda9(VmListFragment vmListFragment, int i) {
y82.m51531(vmListFragment, "this$0");
int size = vmListFragment.mVmInfoList.size();
int i2 = 0;
while (true) {
if (i2 >= size) {
i2 = -1;
break;
} else if (vmListFragment.mVmInfoList.get(i2).m11460() == i) {
break;
} else {
i2++;
}
}
boolean z = true;
if (i2 != -1) {
vmListFragment.mVmInfoList.remove(i2);
VMStateInfoAdapter vMStateInfoAdapter = vmListFragment.mVmAdapter;
if (vMStateInfoAdapter != null) {
vMStateInfoAdapter.notifyDataSetChanged();
}
vmListFragment.loadNavData();
VMStateInfoAdapter vMStateInfoAdapter2 = vmListFragment.mVmAdapter;
if (vMStateInfoAdapter2 != null && vMStateInfoAdapter2.getItemCount() == 0) {
VmThroughViewModel vmThroughViewModel = vmListFragment.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.FALSE);
}
}
FrameLayout frameLayout = vmListFragment.flAddVm;
y82.m51521(frameLayout);
VMStateInfoAdapter vMStateInfoAdapter3 = vmListFragment.mVmAdapter;
frameLayout.setVisibility((vMStateInfoAdapter3 == null || vMStateInfoAdapter3.getItemCount() != 0) ? false : false ? 0 : 8);
vmListFragment.dismissCommonLoadingDialog();
vmListFragment.controlOperationEventEntranceVisibility();
}
private final void hideUpdateView() {
this.isUpdateViewShowing = false;
if6.m24972(this.mUpdateView);
}
public final void inflateAndSetGuideData(GuideBannerBean guideBannerBean) {
ViewStub viewStub = this.viewStub;
y82.m51521(viewStub);
View inflate = viewStub.inflate();
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
recyclerView.setVisibility(8);
FrameLayout frameLayout = this.flAddVm;
y82.m51521(frameLayout);
frameLayout.setVisibility(8);
ImageView imageView = this.ivAddVm;
y82.m51521(imageView);
imageView.setVisibility(4);
this.rlGuideLayout = (ConstraintLayout) inflate.findViewById(R.id.rl_guide);
Button button = (Button) inflate.findViewById(R.id.btn_retry);
this.progressBar = (ProgressBar) inflate.findViewById(R.id.pb_progress);
this.mTvProgress = (TextView) inflate.findViewById(R.id.tv_progress);
this.tvAutoGuideDownloadRetry = (TextView) inflate.findViewById(R.id.tv_auto_guide_download_retry_button);
View findViewById = inflate.findViewById(R.id.guide_banner);
y82.m51530(findViewById, "view.findViewById(R.id.guide_banner)");
Banner<?, ?> banner = (Banner) findViewById;
View findViewById2 = inflate.findViewById(R.id.indicator);
y82.m51530(findViewById2, "view.findViewById(R.id.indicator)");
banner.addBannerLifecycleObserver(this);
y82.m51521(guideBannerBean);
List<GuideBannerBean.DataBean> m10901 = guideBannerBean.m10901();
y82.m51530(m10901, "guideBannerBean!!.guideBannerList");
GuideBannerAdapter guideBannerAdapter = new GuideBannerAdapter(m10901);
setBannerLoopTime(guideBannerBean, banner);
banner.setIndicator((DrawableIndicator) findViewById2, false);
banner.setAdapter(guideBannerAdapter);
this.rlGuideLayoutNoExternalSize = (RelativeLayout) inflate.findViewById(R.id.rl_guide_no_external_size);
if (wk0.f39640.m48769() < ku.f23908) {
ConstraintLayout constraintLayout = this.rlGuideLayout;
if (constraintLayout != null) {
constraintLayout.setVisibility(8);
}
RelativeLayout relativeLayout = this.rlGuideLayoutNoExternalSize;
if (relativeLayout != null) {
relativeLayout.setVisibility(0);
}
RelativeLayout relativeLayout2 = this.rlGuideLayoutNoExternalSize;
if (relativeLayout2 != null) {
relativeLayout2.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10582inflateAndSetGuideData$lambda2;
m10582inflateAndSetGuideData$lambda2 = VmListFragment.m10582inflateAndSetGuideData$lambda2(view, motionEvent);
return m10582inflateAndSetGuideData$lambda2;
}
});
}
button.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
VmListFragment.m10583inflateAndSetGuideData$lambda3(VmListFragment.this, view);
}
});
} else {
downloadRomWhenGuide();
}
FragmentVmListBinding fragmentVmListBinding = this.binding;
if (fragmentVmListBinding == null) {
y82.m51533("binding");
fragmentVmListBinding = null;
}
cg6.m5095(fragmentVmListBinding.f9132, getNeedShowAddVmRedDot());
}
public static final boolean m10582inflateAndSetGuideData$lambda2(View view, MotionEvent motionEvent) {
return true;
}
public static final void m10583inflateAndSetGuideData$lambda3(VmListFragment vmListFragment, View view) {
y82.m51531(vmListFragment, "this$0");
if (wk0.f39640.m48769() < ku.f23908) {
vmListFragment.downloadRomWhenGuide();
}
}
private final void initBinding(View view) {
FragmentVmListBinding m12625 = FragmentVmListBinding.m12625(view);
y82.m51530(m12625, "bind(contentView)");
this.binding = m12625;
}
private final void initGuideAnimationCoverView() {
this.guideAnimationCoverViews.put(GuideBannerBean.DataBean.GUIDE_CODE_DK, (ImageView) findViewById(R.id.iv_vm_list_add_btn_guide_cover));
this.guideAnimationCoverViews.put(GuideBannerBean.DataBean.GUIDE_CODE_ST, (ImageView) findViewById(R.id.iv_switch_vm_list_sort_mode_guide_cover));
this.guideAnimationCoverViews.put(GuideBannerBean.DataBean.GUIDE_CODE_CT, (ImageView) findViewById(R.id.iv_switch_event_through_vm_guide_cover));
}
private final void initMenu() {
View inflate = View.inflate(requireActivity(), R.layout.popip_window_vm_menu, null);
PopupWindow popupWindow = new PopupWindow(inflate, -1, -2);
this.mMenuPW = popupWindow;
y82.m51521(popupWindow);
popupWindow.setFocusable(true);
PopupWindow popupWindow2 = this.mMenuPW;
y82.m51521(popupWindow2);
popupWindow2.setOutsideTouchable(false);
PopupWindow popupWindow3 = this.mMenuPW;
y82.m51521(popupWindow3);
popupWindow3.setOnDismissListener(new PopupWindow.OnDismissListener() {
@Override
public final void onDismiss() {
VmListFragment.m10584initMenu$lambda1(VmListFragment.this);
}
});
this.ivCheckUpdateRedDot = (ImageView) inflate.findViewById(R.id.iv_vm_list_update_red_dot);
inflate.findViewById(R.id.cl_vm_list_menu_check_all_vm_update).setOnClickListener(this);
inflate.findViewById(R.id.tv_vm_list_menu_close_all_vm).setOnClickListener(this);
inflate.findViewById(R.id.v_outside).setOnClickListener(this);
}
public static final void m10584initMenu$lambda1(VmListFragment vmListFragment) {
y82.m51531(vmListFragment, "this$0");
ImageView imageView = vmListFragment.ivMenu;
if (imageView != null) {
imageView.setImageResource(vmListFragment.showRedDot ? R.mipmap.ic_common_menu_with_red_dot : R.drawable.ic_vmos_por_menu);
}
}
private final void initViewModel() {
MutableLiveData<Boolean> m15800;
VmThroughViewModel vmThroughViewModel = this.viewModel;
if (vmThroughViewModel == null || (m15800 = vmThroughViewModel.m15800()) == null) {
return;
}
m15800.observe(getViewLifecycleOwner(), new Observer() {
@Override
public final void onChanged(Object obj) {
VmListFragment.m10585initViewModel$lambda17(VmListFragment.this, ((Boolean) obj).booleanValue());
}
});
}
public static final void m10585initViewModel$lambda17(final VmListFragment vmListFragment, boolean z) {
y82.m51531(vmListFragment, "this$0");
boolean z2 = true;
if (z) {
TrackUtils.m14944(vmListFragment);
vmListFragment.setSpanCount(1);
dc6 dc6Var = dc6.f13598;
dc6Var.m16936().encode(w14.f38943, vmListFragment.getSpanCount());
vmListFragment.refreshVMListUI();
if (dc6Var.m16936().decodeBool(w14.f38897, true)) {
ImageView imageView = vmListFragment.navImg;
y82.m51521(imageView);
imageView.post(new Runnable() {
@Override
public final void run() {
VmListFragment.m10586initViewModel$lambda17$lambda16(VmListFragment.this);
}
});
}
PopupWindow popupWindow = vmListFragment.mMenuPW;
y82.m51521(popupWindow);
if (popupWindow.isShowing()) {
PopupWindow popupWindow2 = vmListFragment.mMenuPW;
y82.m51521(popupWindow2);
popupWindow2.dismiss();
}
ImageView imageView2 = vmListFragment.ivThroughVm;
y82.m51521(imageView2);
imageView2.setImageResource(R.drawable.ic_through_vm_on);
ImageView imageView3 = vmListFragment.ivThroughVm;
y82.m51521(imageView3);
imageView3.setTag(Boolean.TRUE);
LinearLayout linearLayout = vmListFragment.clNav;
y82.m51521(linearLayout);
linearLayout.setVisibility(0);
ImageView imageView4 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView4);
imageView4.setImageResource(R.drawable.ic_vm_list_single_column_off);
ImageView imageView5 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView5);
imageView5.setClickable(false);
ImageView imageView6 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView6);
imageView6.setEnabled(false);
int spanCount = vmListFragment.getSpanCount();
if (spanCount == 1) {
ImageView imageView7 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView7);
imageView7.setImageResource(R.drawable.ic_vm_list_single_column);
} else if (spanCount == 2) {
ImageView imageView8 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView8);
imageView8.setImageResource(R.drawable.ic_vm_list_double_column);
} else if (spanCount == 3) {
ImageView imageView9 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView9);
imageView9.setImageResource(R.drawable.ic_vm_list_triple_column);
}
vmListFragment.showVmListNav();
vmListFragment.setVmListTouch();
} else {
TrackUtils.m14945(vmListFragment, uj4.f36692, 0, null, 12, null);
ImageView imageView10 = vmListFragment.ivThroughVm;
y82.m51521(imageView10);
imageView10.setImageResource(R.drawable.ic_through_vm_off);
ImageView imageView11 = vmListFragment.ivThroughVm;
y82.m51521(imageView11);
imageView11.setTag(Boolean.FALSE);
ImageView imageView12 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView12);
imageView12.setImageResource(R.drawable.ic_vm_list_single_column);
ImageView imageView13 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView13);
imageView13.setClickable(true);
ImageView imageView14 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView14);
imageView14.setEnabled(true);
int spanCount2 = vmListFragment.getSpanCount();
if (spanCount2 == 1) {
ImageView imageView15 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView15);
imageView15.setImageResource(R.drawable.ic_vm_list_single_column);
} else if (spanCount2 == 2) {
ImageView imageView16 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView16);
imageView16.setImageResource(R.drawable.ic_vm_list_double_column);
} else if (spanCount2 == 3) {
ImageView imageView17 = vmListFragment.ivSwcVmListSortMode;
y82.m51521(imageView17);
imageView17.setImageResource(R.drawable.ic_vm_list_triple_column);
}
ConstraintLayout constraintLayout = vmListFragment.vTop;
y82.m51521(constraintLayout);
constraintLayout.setVisibility(0);
LinearLayout linearLayout2 = vmListFragment.clNav;
y82.m51521(linearLayout2);
linearLayout2.setVisibility(8);
RecyclerView recyclerView = vmListFragment.navList;
y82.m51521(recyclerView);
recyclerView.setAdapter(null);
vmListFragment.navAdapter = null;
vmListFragment.mNavList = null;
RecyclerView recyclerView2 = vmListFragment.rvVmList;
if (recyclerView2 != null) {
recyclerView2.setOnTouchListener(null);
}
RecyclerView recyclerView3 = vmListFragment.rvVmList;
y82.m51521(recyclerView3);
ViewGroup.LayoutParams layoutParams = recyclerView3.getLayoutParams();
y82.m51523(layoutParams, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
((ConstraintLayout.LayoutParams) layoutParams).setMargins(0, 0, 0, 0);
si6.f33861.m41138();
VMStateInfoAdapter vMStateInfoAdapter = vmListFragment.mVmAdapter;
if (vMStateInfoAdapter != null) {
vMStateInfoAdapter.notifyDataSetChanged();
}
}
if (wg6.m48603().m48604()) {
if (z) {
bh6.INSTANCE.m3415();
} else {
bh6 bh6Var = bh6.INSTANCE;
bh6Var.m3403(vmListFragment.requireActivity());
bh6Var.m3420(true);
bh6Var.m3407();
}
}
VMStateInfoAdapter vMStateInfoAdapter2 = vmListFragment.mVmAdapter;
y82.m51521(vMStateInfoAdapter2);
vMStateInfoAdapter2.setThrough(z);
VMStateInfoAdapter vMStateInfoAdapter3 = vmListFragment.mVmAdapter;
if ((vMStateInfoAdapter3 == null || vMStateInfoAdapter3.getItemCount() != 0) ? false : false) {
return;
}
vmListFragment.reloadTopViewHolder();
}
public static final void m10586initViewModel$lambda17$lambda16(VmListFragment vmListFragment) {
y82.m51531(vmListFragment, "this$0");
vmListFragment.showPenetrateGuideStep1();
}
public final void moveNavListItemOnCenter(int i) {
if (this.navAdapter == null || C7397.m55533(this.mNavList)) {
return;
}
List<Boolean> list = this.mNavList;
y82.m51521(list);
Boolean bool = Boolean.TRUE;
int indexOf = list.indexOf(bool);
int i2 = 0;
if (indexOf <= 0) {
indexOf = 0;
}
List<Boolean> list2 = this.mNavList;
y82.m51521(list2);
list2.set(indexOf, Boolean.FALSE);
List<Boolean> list3 = this.mNavList;
y82.m51521(list3);
if (list3.size() > i) {
List<Boolean> list4 = this.mNavList;
y82.m51521(list4);
list4.set(i, bool);
}
RecyclerView recyclerView = this.navList;
y82.m51521(recyclerView);
RecyclerView.ViewHolder findViewHolderForLayoutPosition = recyclerView.findViewHolderForLayoutPosition(i);
VmListBottomAdapter vmListBottomAdapter = this.navAdapter;
y82.m51521(vmListBottomAdapter);
vmListBottomAdapter.notifyItemChanged(indexOf);
VmListBottomAdapter vmListBottomAdapter2 = this.navAdapter;
y82.m51521(vmListBottomAdapter2);
vmListBottomAdapter2.notifyItemChanged(i);
if (findViewHolderForLayoutPosition == null) {
RecyclerView recyclerView2 = this.navList;
y82.m51521(recyclerView2);
findViewHolderForLayoutPosition = recyclerView2.findViewHolderForLayoutPosition(indexOf);
}
RecyclerView recyclerView3 = this.navList;
y82.m51521(recyclerView3);
int width = (recyclerView3.getWidth() / getItemViewWidth(findViewHolderForLayoutPosition)) / 2;
if (i - indexOf > 0) {
i2 = i + width;
} else {
int i3 = i - width;
if (i3 >= 0) {
i2 = i3;
}
}
Log.e(TAG, " targetPosition = " + i2);
RecyclerView recyclerView4 = this.navList;
y82.m51521(recyclerView4);
recyclerView4.smoothScrollToPosition(i2);
}
private final void navShutdownVM() {
int visibleViewHolderLayoutPosition = getVisibleViewHolderLayoutPosition();
if (visibleViewHolderLayoutPosition >= 0) {
c8.m4680(LifecycleOwnerKt.getLifecycleScope(this), hn0.m23853(), null, new VmListFragment$navShutdownVM$1(this, visibleViewHolderLayoutPosition, null), 2, null);
}
}
private final void navVMSetting() {
int visibleViewHolderLayoutPosition = getVisibleViewHolderLayoutPosition();
if (visibleViewHolderLayoutPosition >= 0) {
VmInfo vmInfo = this.mVmInfoList.get(visibleViewHolderLayoutPosition);
SetInfoListener.m13324().m13329(vmInfo);
FragmentActivity fragmentActivity = (FragmentActivity) mj.m31355(b16.m2508().m2512(), FragmentActivity.class);
if (fragmentActivity != null) {
c75.m4625().m4647(fragmentActivity);
}
c75.m4625().m4641(vmInfo.m11460(), vmInfo.m11435());
}
}
private final void notifyExistVmInfoViewByIndex(int i) {
if (this.mVmAdapter == null || this.rvVmList == null) {
return;
}
List<VmInfo> m48605 = wg6.m48603().m48605();
y82.m51530(m48605, "get().allVmInfo");
this.mVmInfoList = m48605;
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.setData(this.mVmInfoList);
List<VmInfo> m486052 = wg6.m48603().m48605();
y82.m51530(m486052, "get().allVmInfo");
Iterator<VmInfo> it = m486052.iterator();
int i2 = 0;
while (true) {
boolean z = true;
if (!it.hasNext()) {
i2 = -1;
break;
}
if (it.next().m11460() == i) {
break;
}
i2++;
}
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
if (vMStateInfoAdapter2 != null) {
vMStateInfoAdapter2.notifyItemChanged(i2);
}
loadNavData();
VMStateInfoAdapter vMStateInfoAdapter3 = this.mVmAdapter;
if ((vMStateInfoAdapter3 == null || vMStateInfoAdapter3.getItemCount() != 0) ? false : false) {
FrameLayout frameLayout = this.flAddVm;
y82.m51521(frameLayout);
frameLayout.setVisibility(0);
VmThroughViewModel vmThroughViewModel = this.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.FALSE);
} else {
FrameLayout frameLayout2 = this.flAddVm;
y82.m51521(frameLayout2);
frameLayout2.setVisibility(8);
}
controlOperationEventEntranceVisibility();
}
private final void notifyNavAdapter() {
VmListBottomAdapter vmListBottomAdapter = this.navAdapter;
if (vmListBottomAdapter != null) {
y82.m51521(vmListBottomAdapter);
vmListBottomAdapter.setVmSelectStates(this.mNavList);
VmListBottomAdapter vmListBottomAdapter2 = this.navAdapter;
y82.m51521(vmListBottomAdapter2);
vmListBottomAdapter2.notifyDataSetChanged();
}
}
private final RomUpdateResultBean obtainRomUpdateBeanByLocalVmId(int i) {
if (C7397.m55533(this.mRomUpdateList)) {
return null;
}
List<RomUpdateResultBean> list = this.mRomUpdateList;
y82.m51521(list);
for (RomUpdateResultBean romUpdateResultBean : list) {
if (romUpdateResultBean != null && romUpdateResultBean.m11785() == i) {
return romUpdateResultBean;
}
}
return null;
}
public static final void m10587onCompleteRom$lambda15(VmListFragment vmListFragment, File file, TextView textView, ProgressBar progressBar, VmInfo vmInfo, RomUpdateResultBean romUpdateResultBean, ArrayMap arrayMap, TextView textView2, boolean z) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(file, "$downloadFile");
y82.m51531(textView, "$tvProgress");
y82.m51531(progressBar, "$pb");
y82.m51531(romUpdateResultBean, "$resultBean");
y82.m51531(arrayMap, "$map");
y82.m51531(textView2, "$tv");
c8.m4680(LifecycleOwnerKt.getLifecycleScope(vmListFragment), hn0.m23853(), null, new VmListFragment$onCompleteRom$1$1(z, file, textView, progressBar, vmListFragment, vmInfo, romUpdateResultBean, arrayMap, textView2, null), 2, null);
}
public static final void m10588onErrorRom$lambda14(TextView textView) {
y82.m51531(textView, "$tvProgress");
textView.setText(R.string.download_error);
textView.setTextColor(-39322);
}
public static final Integer m10589onEventMainThread$lambda5(VmListFragment vmListFragment, ei4 ei4Var, Integer num) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(ei4Var, "$event");
VMStateInfoAdapter vMStateInfoAdapter = vmListFragment.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
List<VmInfo> data = vMStateInfoAdapter.getData();
int size = data.size();
for (int i = 0; i < size; i++) {
if (data.get(i).m11460() == ei4Var.m19131()) {
return Integer.valueOf(i);
}
}
return -1;
}
public static final void m10590onEventMainThread$lambda6(VmListFragment vmListFragment, int i) {
y82.m51531(vmListFragment, "this$0");
if (i >= 0) {
RecyclerView recyclerView = vmListFragment.rvVmList;
y82.m51521(recyclerView);
RecyclerView.ViewHolder findViewHolderForLayoutPosition = recyclerView.findViewHolderForLayoutPosition(i);
if (findViewHolderForLayoutPosition != null) {
VMStateInfoAdapter vMStateInfoAdapter = vmListFragment.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.setData(wg6.m48603().m48605());
VMStateInfoAdapter vMStateInfoAdapter2 = vmListFragment.mVmAdapter;
y82.m51521(vMStateInfoAdapter2);
vMStateInfoAdapter2.notifyReloadStateInfo(findViewHolderForLayoutPosition, i);
}
}
}
public static final void m10591onItemClick$lambda7(VmListFragment vmListFragment, int i, VmInfo vmInfo, String str) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(vmInfo, "$finalCurVmInfo1");
vmListFragment.setName(i, str);
vmInfo.m11440(str);
}
public static final void m10592onItemClick$lambda8(VmListFragment vmListFragment, VmInfo vmInfo, String str) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(vmInfo, "$finalCurVmInfo");
y82.m51531(str, "newVmName");
vmListFragment.createShortcut(vmInfo, str);
}
private final void preStartVM() {
Log.i(TAG, "preStartVM");
hj6.m23623().m23651(requireActivity(), this.mRomInfo, true, requireActivity().getWindow().getDecorView(), new VmListFragment$preStartVM$1(this));
}
private final void processLogin() {
AccountHelper.get().checkVip(new sc5() {
@Override
public void onVipChecked(boolean z, boolean z2) {
if (!z && !z2) {
AccountHelper accountHelper = AccountHelper.get();
final VmListFragment vmListFragment = VmListFragment.this;
accountHelper.getChargeChannel(vmListFragment.rvVmList, new xm1() {
@Override
public void chargeWithCode() {
ActiveVipActivity.startForResult(VmListFragment.this);
}
@Override
public void chargeWithGood() {
JoinVipPaymentActivity.Companion.startForResult(VmListFragment.this, 1, (String) null);
}
});
return;
}
VmListFragment.this.reorderAddVmLocalActToFront();
}
}, this.rvVmList);
}
private final void refreshVMListUI() {
Log.d(TAG, "test refreshVMListUI:");
setVMSpanCount(getSpanCount());
}
public final void removeUpdateView() {
InterceptKetEventLayout interceptKetEventLayout = this.mUpdateView;
if (interceptKetEventLayout != null) {
if6.m24976(interceptKetEventLayout, new Animation.AnimationListener() {
@Override
public void onAnimationEnd(@NotNull Animation animation) {
InterceptKetEventLayout interceptKetEventLayout2;
y82.m51531(animation, yn1.f42572);
View findViewById = VmListFragment.this.requireActivity().findViewById(16908290);
y82.m51523(findViewById, "null cannot be cast to non-null type android.view.ViewGroup");
interceptKetEventLayout2 = VmListFragment.this.mUpdateView;
((ViewGroup) findViewById).removeView(interceptKetEventLayout2);
VmListFragment.this.mUpdateView = null;
}
@Override
public void onAnimationRepeat(@NotNull Animation animation) {
y82.m51531(animation, yn1.f42572);
}
@Override
public void onAnimationStart(@NotNull Animation animation) {
y82.m51531(animation, yn1.f42572);
}
});
}
}
private final void setBannerLoopTime(GuideBannerBean guideBannerBean, Banner<?, ?> banner) {
List<GuideBannerBean.DataBean> m10901;
GuideBannerBean.DataBean dataBean = null;
long j = 5000;
if (((GuideBannerBean.DataBean) C7397.m55550(guideBannerBean != null ? guideBannerBean.m10901() : null, 0)) == null) {
banner.setLoopTime(5000L);
return;
}
if (guideBannerBean != null && (m10901 = guideBannerBean.m10901()) != null) {
dataBean = m10901.get(0);
}
if (dataBean != null && dataBean.m10918() > 0) {
j = dataBean.m10918() * 1000;
}
banner.setLoopTime(j);
}
private final void setNeedShowAddVmRedDot(boolean z) {
this.needShowAddVmRedDot = z;
dc6.f13598.m16929().putBoolean(ku.f23844, z);
}
public static final void m10593setUp$lambda0(VmListFragment vmListFragment) {
y82.m51531(vmListFragment, "this$0");
vmListFragment.startVmById(vmListFragment.requireArguments().getInt("vm_local_id", -1));
}
private final void setVMSpanCount(int i) {
RecyclerView.LayoutManager linearLayoutManager;
ViewPagerSnapHelper viewPagerSnapHelper = this.mSnapHelper;
if (viewPagerSnapHelper != null) {
y82.m51521(viewPagerSnapHelper);
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
viewPagerSnapHelper.m8654(recyclerView);
this.mSnapHelper = null;
}
boolean z = true;
if (i > 1) {
linearLayoutManager = new GridLayoutManager(getContext(), i);
RecyclerView recyclerView2 = this.rvVmList;
y82.m51521(recyclerView2);
SimpleItemAnimator simpleItemAnimator = (SimpleItemAnimator) recyclerView2.getItemAnimator();
y82.m51521(simpleItemAnimator);
simpleItemAnimator.setSupportsChangeAnimations(false);
} else {
if (this.mSnapHelper == null) {
ViewPagerSnapHelper viewPagerSnapHelper2 = new ViewPagerSnapHelper();
this.mSnapHelper = viewPagerSnapHelper2;
y82.m51521(viewPagerSnapHelper2);
viewPagerSnapHelper2.m8651(new VmListFragment$setVMSpanCount$1(this));
}
ViewPagerSnapHelper viewPagerSnapHelper3 = this.mSnapHelper;
y82.m51521(viewPagerSnapHelper3);
viewPagerSnapHelper3.attachToRecyclerView(this.rvVmList);
linearLayoutManager = new LinearLayoutManager(getContext(), 0, false);
RecyclerView recyclerView3 = this.rvVmList;
y82.m51521(recyclerView3);
SimpleItemAnimator simpleItemAnimator2 = (SimpleItemAnimator) recyclerView3.getItemAnimator();
y82.m51521(simpleItemAnimator2);
simpleItemAnimator2.setSupportsChangeAnimations(false);
}
int[] iArr = {R.dimen.padding_horizontal_vmlist_normal, R.dimen.padding_horizontal_vmlist_small, R.dimen.padding_horizontal_vmlist_min};
int m44538 = uc4.m44538(0, uc4.m44497(getSpanCount(), 3) - 1);
Log.i(TAG, "index : " + m44538);
int dimensionPixelSize = getResources().getDimensionPixelSize(iArr[m44538]);
if (i == 0) {
RecyclerView recyclerView4 = this.rvVmList;
y82.m51521(recyclerView4);
recyclerView4.setPadding(0, 0, 0, 0);
} else {
RecyclerView recyclerView5 = this.rvVmList;
y82.m51521(recyclerView5);
RecyclerView recyclerView6 = this.rvVmList;
y82.m51521(recyclerView6);
int paddingTop = recyclerView6.getPaddingTop();
RecyclerView recyclerView7 = this.rvVmList;
y82.m51521(recyclerView7);
recyclerView5.setPadding(dimensionPixelSize, paddingTop, dimensionPixelSize, recyclerView7.getPaddingBottom());
}
RecyclerView recyclerView8 = this.rvVmList;
y82.m51521(recyclerView8);
recyclerView8.setLayoutManager(linearLayoutManager);
RecyclerView recyclerView9 = this.rvVmList;
y82.m51521(recyclerView9);
if (recyclerView9.getTag() != null) {
if (i == 1) {
RecyclerView recyclerView10 = this.rvVmList;
y82.m51521(recyclerView10);
Object tag = recyclerView10.getTag();
y82.m51523(tag, "null cannot be cast to non-null type kotlin.Int");
} else {
RecyclerView recyclerView11 = this.rvVmList;
y82.m51521(recyclerView11);
Object tag2 = recyclerView11.getTag();
y82.m51523(tag2, "null cannot be cast to non-null type kotlin.Int");
}
}
if (z) {
for (VmInfo vmInfo : this.mVmInfoList) {
vmInfo.m11485(null);
vmInfo.m11486(false);
}
VMStateInfoAdapter vMStateInfoAdapter = new VMStateInfoAdapter(this.mVmInfoList, this);
this.mVmAdapter = vMStateInfoAdapter;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.setOnItemClickSettingListener(new VmListFragment$setVMSpanCount$2(this));
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter2);
vMStateInfoAdapter2.setOnItemClickActionListener(new VMStateInfoAdapter.OnItemClickActionListener() {
@Override
public void onItemClickAction(@NotNull View view, int i2) {
y82.m51531(view, bg.aE);
VmListFragment.this.onItemClick(view, i2);
}
});
VMStateInfoAdapter vMStateInfoAdapter3 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter3);
vMStateInfoAdapter3.setOnItemClickPluginToggleListener(new VMStateInfoAdapter.OnItemClickPluginToggleListener() {
@Override
public void onItemClickPluginToggle(@NotNull View view, int i2) {
y82.m51531(view, bg.aE);
VmListFragment.this.onItemClick(view, i2);
}
});
VMStateInfoAdapter vMStateInfoAdapter4 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter4);
vMStateInfoAdapter4.setOnItemClickShortcutListener(new VMStateInfoAdapter.OnItemClickShortcutListener() {
@Override
public void onItemClickShortcut(@NotNull View view, int i2, int i3, @Nullable String str) {
y82.m51531(view, bg.aE);
VmListFragment.this.launchApp(i2, str);
}
});
VMStateInfoAdapter vMStateInfoAdapter5 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter5);
vMStateInfoAdapter5.setOnItemClickAddShortcutListener(new VMStateInfoAdapter.OnItemClickAddShortcutListener() {
@Override
public void onItemClickAddShortcut(@NotNull View view) {
y82.m51531(view, bg.aE);
}
});
VMStateInfoAdapter vMStateInfoAdapter6 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter6);
vMStateInfoAdapter6.setOnItemDoubleClickSurfaceListener(new VMStateInfoAdapter.OnItemDoubleClickSurfaceListener() {
@Override
public void onItemDoubleClickSurface(@NotNull RecyclerView.ViewHolder viewHolder) {
y82.m51531(viewHolder, "holder");
VmListFragment.this.clickEnter(viewHolder.getBindingAdapterPosition());
}
});
VMStateInfoAdapter vMStateInfoAdapter7 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter7);
vMStateInfoAdapter7.setOnItemClickStorageCleanListener(new VMStateInfoAdapter.CleanGarbageListener() {
@Override
public void cleanGarbage(@Nullable Integer num) {
if (num == null || VmListFragment.this.getActivity() == null) {
return;
}
q56.m37308(xy.f41555, "list");
CleanDialog m13167 = CleanDialog.f10102.m13167(num.intValue());
FragmentActivity activity = VmListFragment.this.getActivity();
y82.m51521(activity);
FragmentManager supportFragmentManager = activity.getSupportFragmentManager();
y82.m51530(supportFragmentManager, "activity!!.supportFragmentManager");
m13167.show(supportFragmentManager, CleanDialog.f10103);
}
});
VMStateInfoAdapter vMStateInfoAdapter8 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter8);
vMStateInfoAdapter8.setOnItemClickMenuListener(new VMStateInfoAdapter.OnItemClickMenuListener() {
@Override
public void onItemClickMenuEnter(@NotNull View view, @NotNull RecyclerView.ViewHolder viewHolder) {
y82.m51531(view, bg.aE);
y82.m51531(viewHolder, "holder");
VmListFragment.this.onItemClick(view, viewHolder.getBindingAdapterPosition());
}
@Override
public void onItemClickMenuSetting(@NotNull View view, @NotNull RecyclerView.ViewHolder viewHolder) {
y82.m51531(view, bg.aE);
y82.m51531(viewHolder, "holder");
VmListFragment.this.onItemClick(view, viewHolder.getBindingAdapterPosition());
}
@Override
public void onItemClickMenuShutDown(@NotNull View view, @NotNull RecyclerView.ViewHolder viewHolder) {
y82.m51531(view, bg.aE);
y82.m51531(viewHolder, "holder");
VmListFragment.this.onItemClick(view, viewHolder.getBindingAdapterPosition());
}
});
RecyclerView recyclerView12 = this.rvVmList;
y82.m51521(recyclerView12);
recyclerView12.setAdapter(this.mVmAdapter);
} else {
VMStateInfoAdapter vMStateInfoAdapter9 = this.mVmAdapter;
if (vMStateInfoAdapter9 != null) {
vMStateInfoAdapter9.notifyDataSetChanged();
}
}
RecyclerView recyclerView13 = this.rvVmList;
y82.m51521(recyclerView13);
recyclerView13.setTag(Integer.valueOf(i));
}
private final void setVmListTouch() {
final AtomicReference atomicReference = new AtomicReference(Float.valueOf(0.0f));
RecyclerView recyclerView = this.rvVmList;
if (recyclerView != null) {
recyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10594setVmListTouch$lambda18;
m10594setVmListTouch$lambda18 = VmListFragment.m10594setVmListTouch$lambda18(VmListFragment.this, atomicReference, view, motionEvent);
return m10594setVmListTouch$lambda18;
}
});
}
}
public static final boolean m10594setVmListTouch$lambda18(VmListFragment vmListFragment, AtomicReference atomicReference, View view, MotionEvent motionEvent) {
RecyclerView recyclerView;
y82.m51531(vmListFragment, "this$0");
y82.m51531(atomicReference, "$startX");
y82.m51531(view, bg.aE);
y82.m51531(motionEvent, NotificationCompat.CATEGORY_EVENT);
RecyclerView.ViewHolder visibleViewHolder = vmListFragment.getVisibleViewHolder();
Integer valueOf = visibleViewHolder != null ? Integer.valueOf(visibleViewHolder.getLayoutPosition()) : null;
y82.m51521(valueOf);
int intValue = valueOf.intValue();
if (motionEvent.getAction() == 0) {
atomicReference.set(Float.valueOf(motionEvent.getX()));
}
if (motionEvent.getAction() == 1) {
float x = motionEvent.getX();
Object obj = atomicReference.get();
y82.m51530(obj, "startX.get()");
if (Math.abs(x - ((Number) obj).floatValue()) < 30.0f) {
if (motionEvent.getX() > view.getWidth() / 2) {
RecyclerView recyclerView2 = vmListFragment.rvVmList;
if (recyclerView2 != null) {
recyclerView2.smoothScrollToPosition(intValue + 1);
return false;
}
return false;
}
int i = intValue - 1;
if (i < 0 || (recyclerView = vmListFragment.rvVmList) == null) {
return false;
}
recyclerView.smoothScrollToPosition(i);
return false;
}
return false;
}
return false;
}
private final void showActivationDialog() {
C7528.C7530 c7530 = C7528.f45774;
if (!c7530.m55859() || c7530.m55853().mo51027() || c7530.m55858()) {
return;
}
q56.m37309(xy.f41618);
Context requireContext = requireContext();
y82.m51530(requireContext, "requireContext()");
String string = getString(R.string.android_12_activation_dialog);
String string2 = getString(R.string.next_time);
String string3 = getString(R.string.active_now);
dc6 dc6Var = dc6.f13598;
AndroidAssistantDialog androidAssistantDialog = new AndroidAssistantDialog(requireContext, string, string2, string3, dc6Var.m16936().decodeString(jw2.f22229, ""), dc6Var.m16936().decodeString(jw2.f22221, ""), "", false);
androidAssistantDialog.setBtnClickListener(new VmListFragment$showActivationDialog$1(androidAssistantDialog));
new mx6.C4131(requireContext()).m31944(androidAssistantDialog).m7981();
c7530.m55849();
}
private final void showAllVmUpdateDialog() {
Log.i(TAG, "showAllVmUpdateDialog");
this.isUpdateViewShowing = true;
InterceptKetEventLayout interceptKetEventLayout = this.mUpdateView;
if (interceptKetEventLayout != null) {
if6.m24979(interceptKetEventLayout);
InterceptKetEventLayout interceptKetEventLayout2 = this.mUpdateView;
y82.m51521(interceptKetEventLayout2);
interceptKetEventLayout2.setInterceptPredicate(this.callback);
return;
}
View inflate = View.inflate(requireActivity(), R.layout.dialog_vm_all_update, null);
y82.m51523(inflate, "null cannot be cast to non-null type com.vmos.commonuilibrary.InterceptKetEventLayout");
this.mUpdateView = (InterceptKetEventLayout) inflate;
final ArrayMap arrayMap = new ArrayMap(6);
final ArrayMap arrayMap2 = new ArrayMap(6);
for (VmInfo vmInfo : this.mVmInfoList) {
RomUpdateResultBean obtainRomUpdateBeanByLocalVmId = obtainRomUpdateBeanByLocalVmId(vmInfo.m11460());
if (obtainRomUpdateBeanByLocalVmId != null) {
arrayMap.put(obtainRomUpdateBeanByLocalVmId, vmInfo);
}
}
InterceptKetEventLayout interceptKetEventLayout3 = this.mUpdateView;
y82.m51521(interceptKetEventLayout3);
final LinearLayout linearLayout = (LinearLayout) interceptKetEventLayout3.findViewById(R.id.ll_select_vm_to_update);
InterceptKetEventLayout interceptKetEventLayout4 = this.mUpdateView;
y82.m51521(interceptKetEventLayout4);
final TextView textView = (TextView) interceptKetEventLayout4.findViewById(R.id.tv_select_all);
InterceptKetEventLayout interceptKetEventLayout5 = this.mUpdateView;
y82.m51521(interceptKetEventLayout5);
final TextView textView2 = (TextView) interceptKetEventLayout5.findViewById(R.id.tv_cancel);
InterceptKetEventLayout interceptKetEventLayout6 = this.mUpdateView;
y82.m51521(interceptKetEventLayout6);
final TextView textView3 = (TextView) interceptKetEventLayout6.findViewById(R.id.tv_update);
InterceptKetEventLayout interceptKetEventLayout7 = this.mUpdateView;
y82.m51521(interceptKetEventLayout7);
ScrollView scrollView = (ScrollView) interceptKetEventLayout7.findViewById(R.id.sc_content);
this.callback = new InterceptKetEventLayout.InterfaceC1366() {
@Override
public final boolean mo8647(KeyEvent keyEvent) {
boolean m10595showAllVmUpdateDialog$lambda10;
m10595showAllVmUpdateDialog$lambda10 = VmListFragment.m10595showAllVmUpdateDialog$lambda10(VmListFragment.this, textView2, keyEvent);
return m10595showAllVmUpdateDialog$lambda10;
}
};
View.OnClickListener onClickListener = new View.OnClickListener() {
@Override
public final void onClick(View view) {
VmListFragment.m10596showAllVmUpdateDialog$lambda11(VmListFragment.this, arrayMap2, arrayMap, linearLayout, textView3, textView, textView2, view);
}
};
int i = 4;
if (arrayMap.size() > 4) {
ViewGroup.LayoutParams layoutParams = scrollView.getLayoutParams();
layoutParams.height = 600;
scrollView.setLayoutParams(layoutParams);
}
int size = arrayMap.size();
int i2 = 0;
while (i2 < size) {
VmInfo vmInfo2 = (VmInfo) arrayMap.get(arrayMap.keyAt(i2));
TextView textView4 = new TextView(requireActivity());
textView4.setId(this.SELECT_SINGLE_VM_TO_UPDATE);
textView4.setTag(Integer.valueOf(i2));
y82.m51521(vmInfo2);
textView4.setText(vmInfo2.m11433());
textView4.setTextColor(-7499367);
textView4.setTextSize(12.0f);
textView4.setGravity(16);
textView4.setCompoundDrawablesWithIntrinsicBounds(bm4.m3642(R.mipmap.ic_common_unselected_radio), (Drawable) null, (Drawable) null, (Drawable) null);
textView4.setCompoundDrawablePadding(ey4.m19869(i));
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -2);
layoutParams2.topMargin = ey4.m19869(16);
linearLayout.addView(textView4, -1, layoutParams2);
textView4.setOnClickListener(onClickListener);
i2++;
i = 4;
}
InterceptKetEventLayout interceptKetEventLayout8 = this.mUpdateView;
y82.m51521(interceptKetEventLayout8);
interceptKetEventLayout8.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10597showAllVmUpdateDialog$lambda12;
m10597showAllVmUpdateDialog$lambda12 = VmListFragment.m10597showAllVmUpdateDialog$lambda12(VmListFragment.this, textView2, view, motionEvent);
return m10597showAllVmUpdateDialog$lambda12;
}
});
InterceptKetEventLayout interceptKetEventLayout9 = this.mUpdateView;
y82.m51521(interceptKetEventLayout9);
interceptKetEventLayout9.findViewById(R.id.cl_update_all_vm_root).setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10598showAllVmUpdateDialog$lambda13;
m10598showAllVmUpdateDialog$lambda13 = VmListFragment.m10598showAllVmUpdateDialog$lambda13(view, motionEvent);
return m10598showAllVmUpdateDialog$lambda13;
}
});
textView.setOnClickListener(onClickListener);
InterceptKetEventLayout interceptKetEventLayout10 = this.mUpdateView;
y82.m51521(interceptKetEventLayout10);
interceptKetEventLayout10.findViewById(R.id.tv_cancel).setOnClickListener(onClickListener);
textView3.setEnabled(false);
textView3.setOnClickListener(onClickListener);
View findViewById = requireActivity().findViewById(16908290);
y82.m51523(findViewById, "null cannot be cast to non-null type android.view.ViewGroup");
((ViewGroup) findViewById).addView(this.mUpdateView);
if6.m24979(this.mUpdateView);
InterceptKetEventLayout interceptKetEventLayout11 = this.mUpdateView;
y82.m51521(interceptKetEventLayout11);
interceptKetEventLayout11.setInterceptPredicate(this.callback);
}
public static final boolean m10595showAllVmUpdateDialog$lambda10(VmListFragment vmListFragment, TextView textView, KeyEvent keyEvent) {
y82.m51531(vmListFragment, "this$0");
y82.m51530(textView, "tvCancel");
vmListFragment.doHide(textView);
return true;
}
public static final void m10596showAllVmUpdateDialog$lambda11(VmListFragment vmListFragment, ArrayMap arrayMap, ArrayMap arrayMap2, LinearLayout linearLayout, TextView textView, TextView textView2, TextView textView3, View view) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(arrayMap, "$readyToUpdateVmMap");
y82.m51531(arrayMap2, "$canUpdateVmMap");
int id = view.getId();
if (id == R.id.tv_cancel) {
y82.m51530(view, bg.aE);
vmListFragment.doHide(view);
return;
}
if (id == R.id.tv_select_all) {
arrayMap.clear();
arrayMap.putAll(arrayMap2);
for (int i = 0; i < linearLayout.getChildCount(); i++) {
View childAt = linearLayout.getChildAt(i);
y82.m51523(childAt, "null cannot be cast to non-null type android.widget.TextView");
((TextView) childAt).setCompoundDrawablesWithIntrinsicBounds(bm4.m3642(R.mipmap.ic_common_selected_radio), (Drawable) null, (Drawable) null, (Drawable) null);
}
textView.setEnabled(true);
textView.setTextColor(bm4.m3643(R.color.common_pro_blue));
} else if (id == vmListFragment.SELECT_SINGLE_VM_TO_UPDATE) {
Object tag = view.getTag();
y82.m51523(tag, "null cannot be cast to non-null type kotlin.Int");
int intValue = ((Integer) tag).intValue();
y82.m51523(view, "null cannot be cast to non-null type android.widget.TextView");
TextView textView4 = (TextView) view;
if (arrayMap.containsKey(arrayMap2.keyAt(intValue))) {
textView4.setCompoundDrawablesWithIntrinsicBounds(bm4.m3642(R.mipmap.ic_common_unselected_radio), (Drawable) null, (Drawable) null, (Drawable) null);
arrayMap.remove(arrayMap2.keyAt(intValue));
textView2.setCompoundDrawablesWithIntrinsicBounds(bm4.m3642(R.mipmap.ic_common_unselected_radio), (Drawable) null, (Drawable) null, (Drawable) null);
} else {
textView4.setCompoundDrawablesWithIntrinsicBounds(bm4.m3642(R.mipmap.ic_common_selected_radio), (Drawable) null, (Drawable) null, (Drawable) null);
arrayMap.put(arrayMap2.keyAt(intValue), arrayMap2.get(arrayMap2.keyAt(intValue)));
}
textView.setEnabled(arrayMap.size() != 0);
textView.setTextColor(arrayMap.size() != 0 ? bm4.m3643(R.color.common_pro_blue) : -4737097);
} else if (id == R.id.tv_update) {
InterceptKetEventLayout interceptKetEventLayout = vmListFragment.mUpdateView;
y82.m51521(interceptKetEventLayout);
View findViewById = interceptKetEventLayout.findViewById(R.id.tv_title);
y82.m51523(findViewById, "null cannot be cast to non-null type android.widget.TextView");
((TextView) findViewById).setText(R.string.update_vm);
textView.setVisibility(8);
textView3.setText(R.string.go_back);
textView3.setTag(HIDE_TAG);
Log.i(TAG, "click update btn");
y82.m51530(linearLayout, "llSelect");
y82.m51530(textView3, "tvCancel");
vmListFragment.doUpdateAll(arrayMap, linearLayout, textView3);
}
}
public static final boolean m10597showAllVmUpdateDialog$lambda12(VmListFragment vmListFragment, TextView textView, View view, MotionEvent motionEvent) {
y82.m51531(vmListFragment, "this$0");
y82.m51530(textView, "tvCancel");
vmListFragment.doHide(textView);
return true;
}
public static final boolean m10598showAllVmUpdateDialog$lambda13(View view, MotionEvent motionEvent) {
return true;
}
public final void showJoinVipDialogByAddVm(View view) {
if (C7305.m55293().m55304()) {
showJoinVipDialogByAddVmChina();
} else {
showJoinVipDialogByAddVmForeign(view);
}
}
private final void showJoinVipDialogByAddVmChina() {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
cc3 cc3Var = new cc3(requireActivity);
cc3Var.m4804(bm4.m3636(R.string.dialog_getvip_add_vm));
cc3Var.m4790(dc3.f13586);
cc3Var.m4785(1);
cc3Var.show();
}
private final void showJoinVipDialogByAddVmForeign(final View view) {
dc3.m16920(requireActivity(), view, new lg6() {
@Override
public void bottomButton(@NotNull View$OnClickListenerC1406 view$OnClickListenerC1406) {
y82.m51531(view$OnClickListenerC1406, "dialog");
this.requireActivity().startActivityForResult(new Intent(this.requireActivity(), GetFreeVipActivity.class), cn1.f3399);
view$OnClickListenerC1406.m8768();
}
@Override
public void leftButton(@NotNull View$OnClickListenerC1406 view$OnClickListenerC1406) {
y82.m51531(view$OnClickListenerC1406, "dialog");
view$OnClickListenerC1406.m8768();
}
@Override
public void rightButton(@NotNull View$OnClickListenerC1406 view$OnClickListenerC1406, @NotNull String str) {
y82.m51531(view$OnClickListenerC1406, "dialog");
y82.m51531(str, "source");
view$OnClickListenerC1406.m8768();
AccountHelper accountHelper = AccountHelper.get();
View view2 = view;
final VmListFragment vmListFragment = this;
accountHelper.getChargeChannel(view2, new xm1() {
@Override
public void chargeWithCode() {
ActiveVipActivity.startForResult(VmListFragment.this);
}
@Override
public void chargeWithGood() {
VipEmailDetailActivity.startForResult(VmListFragment.this, 1);
}
});
}
}, dc3.f13586).m8762(bm4.m3636(R.string.dialog_getvip_add_vm), 14).m8764(17).m8757();
}
private final void showLVMNavPopWindow(final View view) {
View inflate = LayoutInflater.from(requireContext()).inflate(R.layout.popupwindow_vm_list_nav_menu, (ViewGroup) null, false);
final PopupWindow popupWindow = new PopupWindow(view, -2, view.getHeight() * 3);
popupWindow.setFocusable(true);
popupWindow.setBackgroundDrawable(new ColorDrawable(0));
inflate.findViewById(R.id.tv_pop_add_vm).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
VmListFragment.m10599showLVMNavPopWindow$lambda21(VmListFragment.this, view, popupWindow, view2);
}
});
inflate.findViewById(R.id.tv_pop_vm_setting).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
VmListFragment.m10600showLVMNavPopWindow$lambda22(VmListFragment.this, popupWindow, view2);
}
});
inflate.findViewById(R.id.tv_pop_shutdown_vm).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
VmListFragment.m10601showLVMNavPopWindow$lambda23(VmListFragment.this, popupWindow, view2);
}
});
inflate.findViewById(R.id.tv_pop_exit).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
VmListFragment.m10602showLVMNavPopWindow$lambda24(VmListFragment.this, popupWindow, view2);
}
});
popupWindow.setOutsideTouchable(true);
popupWindow.setContentView(inflate);
popupWindow.showAsDropDown(view, view.getWidth() / 2, -5);
}
public static final void m10599showLVMNavPopWindow$lambda21(VmListFragment vmListFragment, View view, PopupWindow popupWindow, View view2) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(view, "$view");
y82.m51531(popupWindow, "$navPop");
TrackUtils.m14937(uj4.f36683, 0, null, 6, null);
vmListFragment.checkoutVipCount(view);
popupWindow.dismiss();
}
public static final void m10600showLVMNavPopWindow$lambda22(VmListFragment vmListFragment, PopupWindow popupWindow, View view) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(popupWindow, "$navPop");
TrackUtils.m14937(uj4.f36685, 0, null, 6, null);
vmListFragment.navVMSetting();
popupWindow.dismiss();
}
public static final void m10601showLVMNavPopWindow$lambda23(VmListFragment vmListFragment, PopupWindow popupWindow, View view) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(popupWindow, "$navPop");
TrackUtils.m14937(uj4.f36686, 0, null, 6, null);
vmListFragment.navShutdownVM();
popupWindow.dismiss();
}
public static final void m10602showLVMNavPopWindow$lambda24(VmListFragment vmListFragment, PopupWindow popupWindow, View view) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(popupWindow, "$navPop");
TrackUtils.m14937(uj4.f36690, 0, null, 6, null);
vmListFragment.navExitMode();
popupWindow.dismiss();
}
private final void showPenetrateGuideStep1() {
C0884 c0884 = new C0884();
C0884 m6025 = c0884.m6041(this.navImg).m6028(v21.f37423).m6022(250).m6025(10);
String m3636 = bm4.m3636(R.string.click_to_menu);
y82.m51530(m3636, "getString(R.string.click_to_menu)");
m6025.m6034(new PenetrateGuide(m3636, 1)).m6036(new C0884.InterfaceC0886() {
@Override
public void onDismiss() {
VmListFragment.this.showPenetrateGuideStep2();
}
@Override
public void onShown() {
dc6.f13598.m16936().encode(w14.f38897, false);
}
});
c0884.m6026().m6018(requireActivity());
}
public static final boolean m10603showVmListNav$lambda19(VmListFragment vmListFragment, View view, MotionEvent motionEvent) {
y82.m51531(vmListFragment, "this$0");
y82.m51531(motionEvent, NotificationCompat.CATEGORY_EVENT);
RecyclerView recyclerView = vmListFragment.navList;
y82.m51521(recyclerView);
View findChildViewUnder = recyclerView.findChildViewUnder(motionEvent.getX(), motionEvent.getY());
if (findChildViewUnder == null) {
if (motionEvent.getX() > ey4.m19877() / 2) {
RecyclerView recyclerView2 = vmListFragment.navList;
y82.m51521(recyclerView2);
findChildViewUnder = recyclerView2.findChildViewUnder(motionEvent.getX() + 50, motionEvent.getY());
} else {
RecyclerView recyclerView3 = vmListFragment.navList;
y82.m51521(recyclerView3);
findChildViewUnder = recyclerView3.findChildViewUnder(motionEvent.getX() - 50, motionEvent.getY());
}
}
try {
RecyclerView recyclerView4 = vmListFragment.navList;
y82.m51521(recyclerView4);
y82.m51521(findChildViewUnder);
RecyclerView.ViewHolder findContainingViewHolder = recyclerView4.findContainingViewHolder(findChildViewUnder);
Objects.requireNonNull(findContainingViewHolder);
View view2 = findContainingViewHolder.itemView;
if (view2 != null) {
view2.onTouchEvent(motionEvent);
}
} catch (Exception e) {
Log.e(TAG, "navList Touch Error Msg = " + e.getMessage(), e);
}
return true;
}
public static final void m10604showVmListNav$lambda20(VmListFragment vmListFragment) {
y82.m51531(vmListFragment, "this$0");
if (C7397.m55533(vmListFragment.mNavList)) {
return;
}
vmListFragment.notifyNavAdapter();
int visibleViewHolderLayoutPosition = vmListFragment.getVisibleViewHolderLayoutPosition();
if (visibleViewHolderLayoutPosition >= 0) {
RecyclerView recyclerView = vmListFragment.navList;
y82.m51521(recyclerView);
RecyclerView.ViewHolder findViewHolderForLayoutPosition = recyclerView.findViewHolderForLayoutPosition(0);
RecyclerView recyclerView2 = vmListFragment.navList;
y82.m51521(recyclerView2);
RecyclerView recyclerView3 = vmListFragment.navList;
y82.m51521(recyclerView3);
recyclerView3.smoothScrollToPosition(visibleViewHolderLayoutPosition + ((recyclerView2.getWidth() / vmListFragment.getItemViewWidth(findViewHolderForLayoutPosition)) / 2));
}
}
private final void showVmUpdateDialog(final VmInfo vmInfo, final RomUpdateResultBean romUpdateResultBean) {
final File file;
boolean z = !romUpdateResultBean.m11783().m11803();
String str = C7305.f45341.getApplicationInfo().dataDir;
Log.i(TAG, "showVmUpdateDialog FullUpdate is " + z);
if (z) {
file = new File(str, dy.f14342 + romUpdateResultBean.m11781() + romUpdateResultBean.m11783().m11793());
} else {
file = new File(str, dy.f14349 + SystemClock.uptimeMillis());
}
String m4761 = cc1.m4761(romUpdateResultBean.m11783().m11797() * 1024);
String m11798 = romUpdateResultBean.m11783().m11799() == null ? romUpdateResultBean.m11783().m11798() : romUpdateResultBean.m11783().m11799();
View$OnClickListenerC1398 m8739 = View$OnClickListenerC1398.m8726(this.vTop).m8739(true);
StringBuilder sb = new StringBuilder();
y82.m51521(vmInfo);
sb.append(vmInfo.m11433());
sb.append(bm4.m3636(R.string.rename_vm_13));
m8739.m8731(sb.toString()).m8732(np5.m33317("\n " + bm4.m3636(R.string.rename_vm_14) + romUpdateResultBean.m11783().m11796() + "\n " + bm4.m3636(R.string.rename_vm_15) + m4761 + "\n ")).m8729(romUpdateResultBean.m11783().m11800()).m8730(romUpdateResultBean.m11783().m11791()).m8740(m11798, file.getAbsolutePath(), romUpdateResultBean.m11783().m11792(), romUpdateResultBean.m11783().m11794()).m8738(new View$OnClickListenerC1398.InterfaceC1401() {
@Override
public void onFileDownloadSuccess(@NotNull View$OnClickListenerC1398 view$OnClickListenerC1398) {
y82.m51531(view$OnClickListenerC1398, "dialog");
VmListFragment.this.fileDownloadSuccess(view$OnClickListenerC1398, vmInfo, romUpdateResultBean, file);
}
@Override
public void onViewClick(@NotNull View view, @NotNull View$OnClickListenerC1398 view$OnClickListenerC1398) {
y82.m51531(view, bg.aE);
y82.m51531(view$OnClickListenerC1398, "dialog");
if (view.getId() == R.id.tv_update_action_next_time) {
view$OnClickListenerC1398.m8735();
} else {
view.getId();
}
}
}).m8733();
}
private final void startVmReenter(int i, boolean z) {
rg4.C5014 c5014 = new rg4.C5014();
try {
c5014.f32325 = this.mVmInfoList.get(i);
VmInfo m48630 = wg6.m48603().m48630(this.mVmInfoList.get(i).m11460());
if (m48630 != null && m48630.m11467() != null) {
((VmInfo) c5014.f32325).m11422(m48630.m11467());
}
} catch (Exception e) {
Log.e(TAG, "start vm ", e);
}
T t = c5014.f32325;
if (t != 0 && ((VmInfo) t).m11475() != null) {
RomUpdateResultBean obtainRomUpdateBeanByLocalVmId = obtainRomUpdateBeanByLocalVmId(((VmInfo) c5014.f32325).m11460());
if (!((VmInfo) c5014.f32325).m11475().m11697() && obtainRomUpdateBeanByLocalVmId != null && obtainRomUpdateBeanByLocalVmId.m11783().m11800()) {
showVmUpdateDialog((VmInfo) c5014.f32325, obtainRomUpdateBeanByLocalVmId);
return;
}
Log.d(TAG, "startVm33: " + ((VmInfo) c5014.f32325).m11460());
((VmInfo) c5014.f32325).m11460();
if (((VmInfo) c5014.f32325).m11475() != null && ((VmInfo) c5014.f32325).m11475().m11682() == 3 && AccountHelper.get().notLogin()) {
if (C7305.m55293().m55304()) {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
new LoginProcedureController(requireActivity).doLogin(new LoginEntranceArg(LoginEntranceArg.CAUSE_START_THIRD_ROM_NEED_LOGIN, LoginEntranceArg.PAGE_VM_LIST_FRAGMENT_VIEW, null));
return;
}
LoginEmailActivity.startForResult(requireActivity(), true);
return;
}
LifecycleOwner viewLifecycleOwner = getViewLifecycleOwner();
y82.m51530(viewLifecycleOwner, "viewLifecycleOwner");
c8.m4680(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), hn0.m23855(), null, new VmListFragment$startVmReenter$1(this, c5014, z, null), 2, null);
return;
}
Log.w(TAG, "start vm get error");
}
private final void toggleAddVMMenuVisibility() {
FragmentVmListBinding fragmentVmListBinding = this.binding;
if (fragmentVmListBinding == null) {
y82.m51533("binding");
fragmentVmListBinding = null;
}
cg6.m5095(fragmentVmListBinding.f9132, getNeedShowAddVmRedDot());
FragmentActivity requireActivity = requireActivity();
y82.m51523(requireActivity, "null cannot be cast to non-null type com.vmos.pro.activities.main.MainActivity");
ConstraintLayout constraintLayout = this.vTop;
y82.m51521(constraintLayout);
((MainActivity) requireActivity).toggleAddVMMenuVisibility(constraintLayout.getHeight() + ey4.m19866());
}
private final void toggleMenuVisibility() {
PopupWindow popupWindow = this.mMenuPW;
y82.m51521(popupWindow);
if (popupWindow.isShowing()) {
PopupWindow popupWindow2 = this.mMenuPW;
y82.m51521(popupWindow2);
popupWindow2.dismiss();
return;
}
ImageView imageView = this.ivMenu;
y82.m51521(imageView);
imageView.setImageResource(R.drawable.ic_set_title_close);
PopupWindow popupWindow3 = this.mMenuPW;
y82.m51521(popupWindow3);
popupWindow3.showAsDropDown(this.ivMenu);
}
private final void toggleSwcVmListModeView() {
controlOperationEventEntranceVisibility();
int spanCount = getSpanCount();
if (spanCount == 1) {
ImageView imageView = this.ivSwcVmListSortMode;
y82.m51521(imageView);
imageView.setImageResource(R.drawable.ic_vm_list_single_column);
} else if (spanCount == 2) {
ImageView imageView2 = this.ivSwcVmListSortMode;
y82.m51521(imageView2);
imageView2.setImageResource(R.drawable.ic_vm_list_double_column);
} else if (spanCount != 3) {
} else {
ImageView imageView3 = this.ivSwcVmListSortMode;
y82.m51521(imageView3);
imageView3.setImageResource(R.drawable.ic_vm_list_triple_column);
}
}
private final void toggleThroughVM() {
StringBuilder sb = new StringBuilder();
sb.append("(boolean) (ivThroughVm.getTag()) = ");
ImageView imageView = this.ivThroughVm;
y82.m51521(imageView);
Object tag = imageView.getTag();
y82.m51523(tag, "null cannot be cast to non-null type kotlin.Boolean");
sb.append(((Boolean) tag).booleanValue());
Log.d(TAG, sb.toString());
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
if (vMStateInfoAdapter != null && vMStateInfoAdapter.getItemCount() == 0) {
Log.w(TAG, "item count is 0");
return;
}
dc6 dc6Var = dc6.f13598;
boolean decodeBool = dc6Var.m16936().decodeBool(w14.f38940, false);
boolean decodeBool2 = dc6Var.m16936().decodeBool(w14.f38912, false);
if (!decodeBool && !decodeBool2) {
ImageView imageView2 = this.ivThroughVm;
y82.m51521(imageView2);
Object tag2 = imageView2.getTag();
y82.m51523(tag2, "null cannot be cast to non-null type kotlin.Boolean");
boolean z = !((Boolean) tag2).booleanValue();
dc6Var.m16936().encode("IS_FLOATING_BALL_THROUGH", z);
VmThroughViewModel vmThroughViewModel = this.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.valueOf(z));
return;
}
Log.w(TAG, "showGuideDownloadRom is " + decodeBool + " showDeepGuide is " + decodeBool2);
}
public final void updateRomInfoAfterDownload(VmInfo vmInfo, RomUpdateResultBean romUpdateResultBean, File file) {
if (vmInfo != null && romUpdateResultBean != null) {
Log.i(TAG, "updateRomInfoAfterDownload downloadFile : " + file.getName());
List<RomUpdateResultBean> list = this.mRomUpdateList;
y82.m51521(list);
list.remove(romUpdateResultBean);
toggleMenuRedDot(C7397.m55544(this.mRomUpdateList));
boolean updateRom = RomUpdateManager.INSTANCE.updateRom(vmInfo.m11460(), romUpdateResultBean, file);
Log.i(TAG, "updateRom result " + updateRom);
return;
}
Log.e(TAG, "updateRomInfoAfterDownload param is invalid");
}
public final void updateView(int i) {
int m48610 = wg6.m48603().m48610();
if (m48610 <= 0) {
bh6 bh6Var = bh6.INSTANCE;
Context requireContext = requireContext();
y82.m51530(requireContext, "requireContext()");
bh6Var.m3410(requireContext);
}
VmInfo m48630 = wg6.m48603().m48630(i);
boolean z = false;
if (m48630 != null && m48630.m11435() == 0) {
z = true;
}
if (z) {
bh6.INSTANCE.m3412(wg6.m48603().m48624(m48630.m11460()));
}
StringBuilder sb = new StringBuilder();
sb.append("onEventMessageReceive : ");
sb.append(m48630 != null ? Integer.valueOf(m48630.m11435()) : null);
sb.append(xn1.C6417.f41213);
sb.append(m48630 != null ? Integer.valueOf(m48630.m11460()) : null);
sb.append(" running count ");
sb.append(m48610);
Log.i(TAG, sb.toString());
RecyclerView recyclerView = this.rvVmList;
if (recyclerView != null) {
recyclerView.post(new Runnable() {
@Override
public final void run() {
VmListFragment.m10605updateView$lambda25(VmListFragment.this);
}
});
}
}
public static final void m10605updateView$lambda25(VmListFragment vmListFragment) {
y82.m51531(vmListFragment, "this$0");
List<VmInfo> m48605 = wg6.m48603().m48605();
y82.m51530(m48605, "get().allVmInfo");
vmListFragment.notifyExistVmInfoView(m48605);
}
public final void updateViewByIndex(final int i) {
if (wg6.m48603().m48610() <= 0) {
bh6 bh6Var = bh6.INSTANCE;
Context requireContext = requireContext();
y82.m51530(requireContext, "requireContext()");
bh6Var.m3410(requireContext);
}
RecyclerView recyclerView = this.rvVmList;
if (recyclerView != null) {
recyclerView.post(new Runnable() {
@Override
public final void run() {
VmListFragment.m10606updateViewByIndex$lambda26(VmListFragment.this, i);
}
});
}
}
public static final void m10606updateViewByIndex$lambda26(VmListFragment vmListFragment, int i) {
y82.m51531(vmListFragment, "this$0");
vmListFragment.notifyExistVmInfoViewByIndex(i);
}
private final boolean vmInfoEquals(VmInfo vmInfo, VmInfo vmInfo2) {
return vmInfo.m11460() == vmInfo2.m11460();
}
private final int vmInfoIndexOf(List<? extends VmInfo> list, VmInfo vmInfo) {
if (!C7397.m55533(list) && vmInfo != null) {
y82.m51521(list);
int size = list.size();
for (int i = 0; i < size; i++) {
if (vmInfoEquals(list.get(i), vmInfo)) {
return i;
}
}
}
return -1;
}
@Override
public void afterOnVmListSorted() {
P p = this.mPresenter;
y82.m51521(p);
((VmListContract.Presenter) p).checkAllVmUpdates(false);
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
List<VmInfo> data = vMStateInfoAdapter.getData();
y82.m51530(data, "mVmAdapter!!.data");
this.mVmInfoList = data;
notifyExistVmInfoView();
}
@Override
public void clickEnter(int i) {
if (canEnterVm()) {
startVmReenter(i, false);
}
}
@Override
public void dismissBlur() {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
if (requireActivity instanceof MainActivity) {
((MainActivity) requireActivity).dismissBlur();
}
}
public final void downloadRomWhenGuide() {
RelativeLayout relativeLayout = this.rlGuideLayoutNoExternalSize;
y82.m51521(relativeLayout);
relativeLayout.setVisibility(8);
ConstraintLayout constraintLayout = this.rlGuideLayout;
y82.m51521(constraintLayout);
constraintLayout.setVisibility(0);
ConstraintLayout constraintLayout2 = this.rlGuideLayout;
y82.m51521(constraintLayout2);
constraintLayout2.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10580downloadRomWhenGuide$lambda4;
m10580downloadRomWhenGuide$lambda4 = VmListFragment.m10580downloadRomWhenGuide$lambda4(view, motionEvent);
return m10580downloadRomWhenGuide$lambda4;
}
});
P p = this.mPresenter;
y82.m51521(p);
((VmListContract.Presenter) p).downloadRomWhenGuide(this.mRomInfo);
}
@Override
public int findFirstCompletelyVisibleItemPosition() {
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
if (layoutManager instanceof LinearLayoutManager) {
return ((LinearLayoutManager) layoutManager).findFirstCompletelyVisibleItemPosition();
}
return -1;
}
@Nullable
public final View getIndicatorIndex() {
return this.indicatorIndex;
}
public final long getLastBackPressedTime() {
return this.lastBackPressedTime;
}
@Override
public int getLayoutId() {
return R.layout.fragment_vm_list;
}
public final boolean getShowRedDot() {
return this.showRedDot;
}
@Override
public int getSpanCount() {
return this.spanCount;
}
@Nullable
public final RecyclerView.ViewHolder getVisibleViewHolder() {
ViewPagerSnapHelper viewPagerSnapHelper = this.mSnapHelper;
if (viewPagerSnapHelper == null) {
return null;
}
y82.m51521(viewPagerSnapHelper);
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
View findSnapView = viewPagerSnapHelper.findSnapView(recyclerView.getLayoutManager());
if (findSnapView == null) {
return null;
}
RecyclerView recyclerView2 = this.rvVmList;
y82.m51521(recyclerView2);
return recyclerView2.findContainingViewHolder(findSnapView);
}
public final int getVisibleViewHolderLayoutPosition() {
RecyclerView.ViewHolder visibleViewHolder = getVisibleViewHolder();
if (visibleViewHolder != null) {
return visibleViewHolder.getLayoutPosition();
}
return -1;
}
@Override
public void guideDownloadProgress(int i) {
Log.i(TAG, "guideDownloadProgress :" + i);
ProgressBar progressBar = this.progressBar;
y82.m51521(progressBar);
progressBar.setProgress(i);
TextView textView = this.mTvProgress;
y82.m51521(textView);
StringBuilder sb = new StringBuilder();
sb.append(i);
sb.append('%');
textView.setText(sb.toString());
}
@Override
public void guideDownloadSuccess(@Nullable RomInfo romInfo) {
Log.i(TAG, "guideDownloadSuccess");
this.mRomInfo = romInfo;
if (romInfo == null) {
Log.i(TAG, "guideDownloadSuccess mRomInfo is null");
} else if (b16.m2508().m2515()) {
Log.i(TAG, "isBackground");
this.canStartRendererActivity = true;
} else {
preStartVM();
}
}
@Override
@SuppressLint({"NotifyDataSetChanged"})
public void hideDeleteVmView(final int i) {
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
recyclerView.post(new Runnable() {
@Override
public final void run() {
VmListFragment.m10581hideDeleteVmView$lambda9(VmListFragment.this, i);
}
});
}
public final void inflate() {
if (jp5.m27402(wg6.m48603().m48631())) {
String decodeString = dc6.f13598.m16929().decodeString(ku.f23772);
if (!jp5.m27402(decodeString)) {
Object m30150 = lq1.m30150(decodeString, GuideBannerBean.class);
y82.m51530(m30150, "fromJson(jsonData, GuideBannerBean::class.java)");
inflateAndSetGuideData((GuideBannerBean) m30150);
return;
}
getGuidePictureList();
}
}
public final void initNavView() {
this.clNav = (LinearLayout) findViewById(R.id.cl_nav);
this.navImg = (ImageView) findViewById(R.id.iv_nav);
this.navList = (RecyclerView) findViewById(R.id.rl_vm_list_nav);
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(requireContext());
linearLayoutManager.setOrientation(0);
RecyclerView recyclerView = this.navList;
if (recyclerView != null) {
recyclerView.setLayoutManager(linearLayoutManager);
}
RecyclerView recyclerView2 = this.navList;
if (recyclerView2 != null) {
recyclerView2.addItemDecoration(new VmListBottomAdapter.VmListBottomItemDecoration());
}
}
public final void launchApp(int i, @Nullable String str) {
VmInfo vmInfo = (VmInfo) C7397.m55550(this.mVmInfoList, i);
boolean z = false;
if (vmInfo != null && vmInfo.m11435() == 0) {
z = true;
}
if (z) {
hj6.m23623().m23671(str);
startVmReenter(i, true);
}
}
public final void loadNavData() {
if (C7397.m55533(this.mNavList)) {
this.mNavList = new ArrayList();
}
List<Boolean> list = this.mNavList;
y82.m51521(list);
list.clear();
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
Integer valueOf = vMStateInfoAdapter != null ? Integer.valueOf(vMStateInfoAdapter.getItemCount()) : null;
y82.m51521(valueOf);
int intValue = valueOf.intValue();
for (int i = 0; i < intValue; i++) {
List<Boolean> list2 = this.mNavList;
y82.m51521(list2);
list2.add(Boolean.FALSE);
}
int visibleViewHolderLayoutPosition = getVisibleViewHolderLayoutPosition();
if (visibleViewHolderLayoutPosition >= 0) {
List<Boolean> list3 = this.mNavList;
y82.m51521(list3);
if (visibleViewHolderLayoutPosition >= list3.size()) {
visibleViewHolderLayoutPosition--;
}
List<Boolean> list4 = this.mNavList;
y82.m51521(list4);
if (list4.size() > 0) {
List<Boolean> list5 = this.mNavList;
y82.m51521(list5);
list5.set(visibleViewHolderLayoutPosition, Boolean.TRUE);
}
} else {
List<Boolean> list6 = this.mNavList;
if (list6 != null) {
y82.m51521(list6);
if (list6.size() >= 1) {
List<Boolean> list7 = this.mNavList;
y82.m51521(list7);
list7.set(0, Boolean.TRUE);
}
}
}
if (this.navAdapter != null) {
notifyNavAdapter();
}
}
public final void navExitMode() {
VmInfo vmInfo = (VmInfo) C7397.m55550(this.mVmInfoList, getVisibleViewHolderLayoutPosition());
if (vmInfo != null) {
bh6 bh6Var = bh6.INSTANCE;
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
bh6Var.m3409(requireActivity, vmInfo.m11460());
updateView(vmInfo.m11460());
}
setVMSpanCount(getSpanCount());
VmThroughViewModel vmThroughViewModel = this.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.FALSE);
}
@Override
public void notifyExistVmInfoView(@NotNull List<VmInfo> list) {
y82.m51531(list, "curVmInfoList");
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
if (vMStateInfoAdapter == null || this.rvVmList == null) {
return;
}
this.mVmInfoList = list;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.setData(list);
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
if (vMStateInfoAdapter2 != null) {
vMStateInfoAdapter2.notifyDataSetChanged();
}
loadNavData();
VMStateInfoAdapter vMStateInfoAdapter3 = this.mVmAdapter;
if (vMStateInfoAdapter3 != null && vMStateInfoAdapter3.getItemCount() == 0) {
FrameLayout frameLayout = this.flAddVm;
y82.m51521(frameLayout);
frameLayout.setVisibility(0);
VmThroughViewModel vmThroughViewModel = this.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.FALSE);
} else {
FrameLayout frameLayout2 = this.flAddVm;
y82.m51521(frameLayout2);
frameLayout2.setVisibility(8);
}
controlOperationEventEntranceVisibility();
}
@Override
public void onActivityResult(int i, int i2, @Nullable Intent intent) {
super.onActivityResult(i, i2, intent);
if (i2 == 123 && i == 2754) {
if (intent == null) {
reorderAddVmLocalActToFront();
return;
}
ky3 ky3Var = (ky3) mj.m31355(intent.getSerializableExtra(ku.f23912), ky3.class);
if (ky3Var == null) {
return;
}
VmInfo m48630 = wg6.m48603().m48630(this.targetPosition);
PluginHelper pluginHelper = new PluginHelper();
ky3 ky3Var2 = ky3.ROOT;
if (ky3Var == ky3Var2) {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
ImageView imageView = this.ivMenu;
y82.m51521(imageView);
y82.m51521(m48630);
pluginHelper.installOrUnInstallPlugin(requireActivity, imageView, ky3Var2, m48630, false, true);
} else {
FragmentActivity requireActivity2 = requireActivity();
y82.m51530(requireActivity2, "requireActivity()");
ImageView imageView2 = this.ivMenu;
y82.m51521(imageView2);
ky3 ky3Var3 = ky3.XPOSED;
y82.m51521(m48630);
pluginHelper.installOrUnInstallPlugin(requireActivity2, imageView2, ky3Var3, m48630, false, true);
}
}
if (i2 == -1) {
if (i == 100) {
processLogin();
} else if (i == 104 || i == 109) {
reorderAddVmLocalActToFront();
} else if (i == 116) {
if (intent == null) {
return;
}
PluginHelper pluginHelper2 = new PluginHelper();
VmInfo m486302 = wg6.m48603().m48630(this.targetPosition);
FragmentActivity requireActivity3 = requireActivity();
y82.m51530(requireActivity3, "requireActivity()");
ImageView imageView3 = this.ivMenu;
y82.m51521(imageView3);
ky3 ky3Var4 = ky3.ROOT;
y82.m51521(m486302);
pluginHelper2.installOrUnInstallPlugin(requireActivity3, imageView3, ky3Var4, m486302, false, false);
} else if (i == 117 && intent != null) {
PluginHelper pluginHelper3 = new PluginHelper();
VmInfo m486303 = wg6.m48603().m48630(this.targetPosition);
FragmentActivity requireActivity4 = requireActivity();
y82.m51530(requireActivity4, "requireActivity()");
ImageView imageView4 = this.ivMenu;
y82.m51521(imageView4);
ky3 ky3Var5 = ky3.XPOSED;
y82.m51521(m486303);
pluginHelper3.installOrUnInstallPlugin(requireActivity4, imageView4, ky3Var5, m486303, false, false);
}
}
}
public final boolean onBackPressed() {
try {
VmInfo vmInfo = wg6.m48603().m48605().get(getVisibleViewHolderLayoutPosition());
ma6 m30942 = ma6.m30942();
Integer valueOf = vmInfo != null ? Integer.valueOf(vmInfo.m11460()) : null;
y82.m51521(valueOf);
va6 m30953 = m30942.m30953(valueOf.intValue());
if (vmInfo.m11435() == 3) {
Boolean valueOf2 = m30953 != null ? Boolean.valueOf(m30953.m46639()) : null;
y82.m51521(valueOf2);
if (valueOf2.booleanValue()) {
m30953.m46698(k51.f22751, 1);
m30953.m46680(4);
return true;
}
}
Log.i(TAG, "onBackPressed: 2");
if (this.lastBackPressedTime + 2000 > SystemClock.uptimeMillis()) {
requireActivity().moveTaskToBack(true);
return false;
}
ToastUtils.m6432(R.string.vmlist_back_press);
this.lastBackPressedTime = SystemClock.uptimeMillis();
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
@Override
public void onClick(@NotNull View view) {
boolean z;
String str;
y82.m51531(view, bg.aE);
int id = view.getId();
if (id == R.id.tv_auto_guide_download_retry_button) {
setAutoGuideRetryBtnVisibility(false);
downloadRomWhenGuide();
return;
}
FragmentVmListBinding fragmentVmListBinding = null;
if (id == R.id.iv_vm_menu_switcher) {
TrackUtils.m14937(uj4.f36672, 0, null, 6, null);
toggleMenuVisibility();
} else if (id == R.id.iv_switch_vm_list_sort_mode) {
String str2 = "vmosHomeViewType" + getSpanCount();
dc6 dc6Var = dc6.f13598;
long j = dc6Var.m16936().getLong(str2, 0L);
String str3 = "111-2-4";
if (j == 0) {
dc6Var.m16936().putLong(str2, System.currentTimeMillis());
} else {
int spanCount = getSpanCount();
if (spanCount != 0) {
str = spanCount != 1 ? uj4.f36743 : uj4.f36726;
} else {
str = "111-2-4";
}
TrackUtils.m14948(str, 0, Long.valueOf(j), null, 10, null);
dc6Var.m16936().remove(str2);
}
int spanCount2 = getSpanCount();
if (spanCount2 == 0) {
str3 = uj4.f36720;
} else if (spanCount2 != 1) {
str3 = uj4.f36728;
}
TrackUtils.m14937(str3, 0, null, 6, null);
if (getSpanCount() == 3) {
setSpanCount(1);
} else {
setSpanCount(getSpanCount() + 1);
}
Log.i(TAG, "mSpanCount" + getSpanCount());
toggleSwcVmListModeView();
dc6Var.m16936().encode(w14.f38943, getSpanCount());
refreshVMListUI();
} else if (id == R.id.iv_switch_event_through_vm) {
TrackUtils.m14937(uj4.f36670, 0, null, 6, null);
toggleThroughVM();
} else if (id == R.id.iv_vm_list_add) {
TrackUtils.m14937(uj4.f36665, 0, null, 6, null);
if (ro2.m39673()) {
if (y82.m51536("1", dc6.f13598.m16936().decodeString(jw2.f22224))) {
toggleAddVMMenuVisibility();
} else {
checkoutVipCount(view);
}
setNeedShowAddVmRedDot(false);
FragmentVmListBinding fragmentVmListBinding2 = this.binding;
if (fragmentVmListBinding2 == null) {
y82.m51533("binding");
} else {
fragmentVmListBinding = fragmentVmListBinding2;
}
cg6.m5095(fragmentVmListBinding.f9132, getNeedShowAddVmRedDot());
return;
}
checkoutVipCount(view);
} else if (id == R.id.tv_vm_list_add_local_vm) {
TrackUtils.m14937(uj4.f36667, 0, null, 6, null);
hideAddVMMenuView();
checkoutVipCount(view);
} else if (id == R.id.tv_vm_list_add_cloud_vm) {
dc6 dc6Var2 = dc6.f13598;
dc6Var2.m16929().putBoolean(ku.f23842, false);
TrackUtils.m14937(uj4.f36668, 0, null, 6, null);
WebViewActivity.m14839(requireContext(), getString(R.string.vmos_cloud_vm), dc6Var2.m16936().decodeString(jw2.f22223));
hideAddVMMenuView();
} else if (id == R.id.fl_add_vm) {
TrackUtils.m14937("105-2-1", 0, null, 6, null);
if (y82.m51536("1", dc6.f13598.m16936().decodeString(jw2.f22224))) {
toggleAddVMMenuVisibility();
} else {
reorderAddVmLocalActToFront();
}
} else if (id == R.id.cl_vm_list_menu_check_all_vm_update) {
TrackUtils.m14937(uj4.f36675, 0, null, 6, null);
P p = this.mPresenter;
y82.m51521(p);
((VmListContract.Presenter) p).checkAllVmUpdates(true);
PopupWindow popupWindow = this.mMenuPW;
y82.m51521(popupWindow);
popupWindow.dismiss();
} else if (id == R.id.tv_vm_list_menu_close_all_vm) {
TrackUtils.m14937(uj4.f36673, 0, null, 6, null);
c8.m4680(LifecycleOwnerKt.getLifecycleScope(this), hn0.m23853(), null, new VmListFragment$onClick$1(this, null), 2, null);
PopupWindow popupWindow2 = this.mMenuPW;
y82.m51521(popupWindow2);
popupWindow2.dismiss();
} else if (id == R.id.v_outside) {
PopupWindow popupWindow3 = this.mMenuPW;
y82.m51521(popupWindow3);
popupWindow3.dismiss();
} else if (id == R.id.btn_check_update_detail) {
if6.m24972(this.clUpdateHintRoot);
showAllVmUpdateDialog();
} else if (id == R.id.iv_em_register) {
startActivity(new Intent(getContext(), ForeignAcitivtyDetail.class));
} else {
FragmentVmListBinding fragmentVmListBinding3 = this.binding;
if (fragmentVmListBinding3 == null) {
y82.m51533("binding");
fragmentVmListBinding3 = null;
}
if (id != fragmentVmListBinding3.f9142.getId()) {
FragmentVmListBinding fragmentVmListBinding4 = this.binding;
if (fragmentVmListBinding4 == null) {
y82.m51533("binding");
fragmentVmListBinding4 = null;
}
if (id != fragmentVmListBinding4.f9143.getId()) {
z = false;
if (!z) {
startActivity(new Intent(getContext(), OperationEventActivity.class));
return;
}
FragmentVmListBinding fragmentVmListBinding5 = this.binding;
if (fragmentVmListBinding5 == null) {
y82.m51533("binding");
fragmentVmListBinding5 = null;
}
if (id == fragmentVmListBinding5.f9135.getId()) {
OperationEventConfigHelper.Companion.setUserCloseBannerOnce(true);
controlOperationEventEntranceVisibility();
return;
} else if (id == R.id.iv_nav) {
TrackUtils.m14937(uj4.f36682, 0, null, 6, null);
showLVMNavPopWindow(view);
return;
} else {
return;
}
}
}
z = true;
if (!z) {
}
}
}
public final void onCompleteRom(@NotNull final File file, @NotNull final RomUpdateResultBean romUpdateResultBean, @NotNull final TextView textView, @NotNull final ProgressBar progressBar, @NotNull final ArrayMap<RomUpdateResultBean, VmInfo> arrayMap, @Nullable final VmInfo vmInfo, @NotNull final TextView textView2) {
y82.m51531(file, "downloadFile");
y82.m51531(romUpdateResultBean, "resultBean");
y82.m51531(textView, "tvProgress");
y82.m51531(progressBar, "pb");
y82.m51531(arrayMap, "map");
y82.m51531(textView2, "tv");
Log.i(TAG, "complete rom check md5");
s03.m40357(file, romUpdateResultBean.m11783().m11792(), romUpdateResultBean.m11783().m11794(), new s03.InterfaceC5133() {
@Override
public final void onMD5Calculated(boolean z) {
VmListFragment.m10587onCompleteRom$lambda15(VmListFragment.this, file, textView, progressBar, vmInfo, romUpdateResultBean, arrayMap, textView2, z);
}
});
}
@Override
public void onCreate(@Nullable Bundle bundle) {
super.onCreate(bundle);
lo1.m30077().m55899(this).mo28899(jj6.f21840).mo28899(jj6.f21837).mo28899(jj6.f21836).mo28900();
P p = this.mPresenter;
y82.m51521(p);
((VmListContract.Presenter) p).checkAllVmUpdates(false);
}
@Override
public void onDestroy() {
P p = this.mPresenter;
y82.m51521(p);
((VmListContract.Presenter) p).releaseEventBus();
PluginHelper pluginHelper = this.pluginHelper;
if (pluginHelper != null) {
pluginHelper.registerEventBus();
}
super.onDestroy();
m41.m30681().m30692(this);
lo1.m30077().m55900().m30692(this);
}
public final void onErrorRom(@NotNull ArrayMap<RomUpdateResultBean, VmInfo> arrayMap, @NotNull RomUpdateResultBean romUpdateResultBean, @NotNull final TextView textView, @Nullable File file, @Nullable Throwable th) {
y82.m51531(arrayMap, "map");
y82.m51531(romUpdateResultBean, "resultBean");
y82.m51531(textView, "tvProgress");
arrayMap.remove(romUpdateResultBean);
Activity m6715 = C0974.m6715();
if (m6715 != null) {
Log.i(TAG, "top Activity not null");
m6715.runOnUiThread(new Runnable() {
@Override
public final void run() {
VmListFragment.m10588onErrorRom$lambda14(textView);
}
});
}
cc1.m4768(file);
cc1.m4768(new File(file, ku.f23896));
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onEventMainThread(@NotNull pt2 pt2Var) {
y82.m51531(pt2Var, NotificationCompat.CATEGORY_EVENT);
if (pt2Var.f30209) {
ImageView imageView = this.ivEmailRegister;
y82.m51521(imageView);
imageView.setVisibility(0);
return;
}
ImageView imageView2 = this.ivEmailRegister;
y82.m51521(imageView2);
imageView2.setVisibility(8);
}
@Override
@RequiresApi(25)
public void onEventMessageReceive(@Nullable f51 f51Var) {
String m20116;
if (f51Var == null || (m20116 = f51Var.m20116()) == null) {
return;
}
int hashCode = m20116.hashCode();
if (hashCode == -349908182) {
if (m20116.equals(jj6.f21837)) {
showCommonLoadingDialog(bm4.m3636(R.string.deleting));
LifecycleOwner viewLifecycleOwner = getViewLifecycleOwner();
y82.m51530(viewLifecycleOwner, "viewLifecycleOwner");
c8.m4680(LifecycleOwnerKt.getLifecycleScope(viewLifecycleOwner), hn0.m23853(), null, new VmListFragment$onEventMessageReceive$1(f51Var, this, null), 2, null);
}
} else if (hashCode != 417729156) {
if (hashCode == 432310215 && m20116.equals(jj6.f21836)) {
getVmSettingsViewModel().resetSettingsByVmId(f51Var.m20125("VM_ID_KEY", 0));
}
} else if (m20116.equals(jj6.f21840)) {
int m20125 = f51Var.m20125("VM_ID_KEY", 0);
if (!f51Var.m20098(jj6.f21839, false)) {
bh6.INSTANCE.m3412(m20125);
}
updateView(m20125);
}
}
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
public final void onEventPresentGuideAnimation(@NotNull c24 c24Var) {
y82.m51531(c24Var, "ev");
ImageView imageView = this.guideAnimationCoverViews.get(c24Var.m4416());
if (imageView == null) {
return;
}
m41.m30681().m30701(new we3(R.id.vm_list_page));
new C6997().m54234(imageView);
m41.m30681().m30690(c24Var);
}
@Override
public void onItemClick(@NotNull View view, final int i) {
y82.m51531(view, bg.aE);
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
final VmInfo item = vMStateInfoAdapter != null ? vMStateInfoAdapter.getItem(i) : null;
if (item != null && item.m11475() != null) {
this.pluginHelper = new PluginHelper();
this.targetPosition = i;
switch (view.getId()) {
case R.id.iv_vm_action:
TrackUtils.m14942(uj4.f36756, item.m11460(), 0, 4, null);
startVmReenter(i, false);
return;
case R.id.ll_menu_enter:
if (canEnterVm()) {
startVmReenter(i, false);
return;
}
return;
case R.id.ll_menu_settings:
case R.id.tv_pop_settings:
TrackUtils.m14942("113-1-1", item.m11460(), 0, 4, null);
SetInfoListener.m13324().m13329(item);
c75.m4625().m4647(requireActivity());
c75.m4625().m4641(item.m11460(), item.m11435());
return;
case R.id.ll_menu_shut_down:
VmInfo m48630 = wg6.m48603().m48630(item.m11460());
if (m48630 != null) {
m48630.m11441(0);
m48630.m11482(0);
wg6.m48603().m48615(m48630);
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
if (vMStateInfoAdapter2 != null) {
y82.m51521(vMStateInfoAdapter2);
vMStateInfoAdapter2.updateItemChanged(m48630.m11460());
}
}
c8.m4680(LifecycleOwnerKt.getLifecycleScope(this), hn0.m23853(), null, new VmListFragment$onItemClick$2(item, this, null), 2, null);
ij6.m25106(2, item.m11460());
return;
case R.id.tv_pop_backup:
TrackUtils.m14942(uj4.f36769, item.m11460(), 0, 4, null);
if (item.m11475() != null && item.m11475().m11682() == 3) {
oz5.m35336(bm4.m3636(R.string.third_rom_can_not_back_up));
return;
} else {
BackupsRomActivity.getGotoActivity(requireActivity(), item.m11460());
return;
}
case R.id.tv_pop_rename:
TrackUtils.m14942(uj4.f36768, item.m11460(), 0, 4, null);
try {
RenameVmDialog.make(requireActivity(), item.m11433()).setListener(new RenameVmDialog.OnNewVmNameComingListener() {
@Override
public final void onNewVmNameComing(String str) {
VmListFragment.m10591onItemClick$lambda7(VmListFragment.this, i, item, str);
}
}).show();
return;
} catch (Exception e) {
e.printStackTrace();
return;
}
case R.id.tv_pop_shortcut:
TrackUtils.m14942(uj4.f36763, item.m11460(), 0, 4, null);
fa5.m20328(requireActivity(), item.m11433(), new fa5.InterfaceC2805() {
@Override
public final void mo20331(String str) {
VmListFragment.m10592onItemClick$lambda8(VmListFragment.this, item, str);
}
}).m20330();
return;
case R.id.vm_toggle_gs:
if (PluginHelper.Companion.isPluginInstalled(item.m11460(), ky3.ROOT)) {
TrackUtils.m14942("113-7", item.m11460(), 0, 4, null);
} else {
TrackUtils.m14942(uj4.f36749, item.m11460(), 0, 4, null);
}
PluginHelper pluginHelper = this.pluginHelper;
if (pluginHelper != null) {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
pluginHelper.installOrUnInstallPlugin(requireActivity, view, ky3.GOOGLE_SERVICE, item, false, true);
return;
}
return;
case R.id.vm_toggle_root:
PluginHelper.Companion companion = PluginHelper.Companion;
int m11460 = item.m11460();
ky3 ky3Var = ky3.ROOT;
if (companion.isPluginInstalled(m11460, ky3Var)) {
TrackUtils.m14942("113-3", item.m11460(), 0, 4, null);
} else {
TrackUtils.m14942(uj4.f36744, item.m11460(), 0, 4, null);
}
PluginHelper pluginHelper2 = this.pluginHelper;
if (pluginHelper2 != null) {
FragmentActivity requireActivity2 = requireActivity();
y82.m51530(requireActivity2, "requireActivity()");
pluginHelper2.installOrUnInstallPlugin(requireActivity2, view, ky3Var, item, false, true);
return;
}
return;
case R.id.vm_toggle_xp:
if (PluginHelper.Companion.isPluginInstalled(item.m11460(), ky3.ROOT)) {
TrackUtils.m14942("113-5", item.m11460(), 0, 4, null);
} else {
TrackUtils.m14942(uj4.f36747, item.m11460(), 0, 4, null);
}
PluginHelper pluginHelper3 = this.pluginHelper;
if (pluginHelper3 != null) {
FragmentActivity requireActivity3 = requireActivity();
y82.m51530(requireActivity3, "requireActivity()");
pluginHelper3.installOrUnInstallPlugin(requireActivity3, view, ky3.XPOSED, item, false, true);
return;
}
return;
default:
return;
}
}
ts5.f35593.m43620(bm4.m3636(R.string.vm_info_error_please_reopen_app));
}
@Override
public void onResume() {
super.onResume();
ey4.m19871(requireActivity().getWindow(), true, false);
reloadTopViewHolder();
if (dc6.f13598.m16936().decodeBool(w14.f38940, false) && this.canStartRendererActivity) {
guideDownloadSuccess(this.mRomInfo);
}
}
@Override
public void onRomUpdateResultGotten(boolean z, @NotNull List<RomUpdateResultBean> list) {
y82.m51531(list, "updateResultBeans");
this.mRomUpdateList = list;
assignLocalVmIdToRomUpdateResultList();
boolean m55544 = C7397.m55544(list);
toggleMenuRedDot(m55544);
if (z) {
if (m55544) {
showAllVmUpdateDialog();
} else {
C7305.m55293().m55300(bm4.m3636(R.string.vmlist_toast_all_alread_update));
}
}
}
@Override
public void onViewCreated(@NotNull View view, @Nullable Bundle bundle) {
y82.m51531(view, "view");
super.onViewCreated(view, bundle);
showActivationDialog();
}
public final void reloadTopViewHolder() {
ViewPagerSnapHelper viewPagerSnapHelper = this.mSnapHelper;
if (viewPagerSnapHelper == null) {
return;
}
y82.m51521(viewPagerSnapHelper);
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
View findSnapView = viewPagerSnapHelper.findSnapView(recyclerView.getLayoutManager());
if (findSnapView == null) {
return;
}
RecyclerView recyclerView2 = this.rvVmList;
y82.m51521(recyclerView2);
RecyclerView.ViewHolder findContainingViewHolder = recyclerView2.findContainingViewHolder(findSnapView);
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.notifyStartStateAnim(findContainingViewHolder);
}
public final void reorderAddVmLocalActToFront() {
Intent intent = new Intent(getContext(), AddVmActivityKt.class);
intent.addFlags(131072);
startActivity(intent);
}
@Override
public void setAutoGuideRetryBtnVisibility(boolean z) {
int i = z ? 0 : 8;
TextView textView = this.tvAutoGuideDownloadRetry;
y82.m51521(textView);
textView.setVisibility(i);
TextView textView2 = this.tvAutoGuideDownloadRetry;
if (textView2 != null) {
textView2.setOnClickListener(this);
}
}
public final void setIndicatorIndex(@Nullable View view) {
this.indicatorIndex = view;
}
public final void setLastBackPressedTime(long j) {
this.lastBackPressedTime = j;
}
public final void setName(int i, @Nullable String str) {
VmInfo vmInfo = this.mVmInfoList.get(i);
vmInfo.m11440(str);
wg6.m48603().m48615(vmInfo);
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
if (vMStateInfoAdapter != null) {
vMStateInfoAdapter.notifyDataSetChanged();
}
}
public final void setShowRedDot(boolean z) {
this.showRedDot = z;
}
public void setSpanCount(int i) {
this.spanCount = i;
}
@Override
public void setUp(@NotNull View view) {
boolean z;
y82.m51531(view, "contentView");
initBinding(view);
initGuideAnimationCoverView();
if (!m41.m30681().m30700(this)) {
m41.m30681().m30687(this);
}
List<VmInfo> m48605 = wg6.m48603().m48605();
y82.m51530(m48605, "get().allVmInfo");
this.mVmInfoList = m48605;
ArrayList arrayList = new ArrayList();
this.viewModel = (VmThroughViewModel) new ViewModelProvider(this, VmThroughViewModelFactory.f12839.m15806()).get(VmThroughViewModel.class);
Iterator<VmInfo> it = this.mVmInfoList.iterator();
while (true) {
z = false;
if (!it.hasNext()) {
break;
}
VmInfo next = it.next();
ShortsCutBean shortsCutBean = new ShortsCutBean();
shortsCutBean.m11172(next.m11460());
shortsCutBean.m11168(next.m11433());
shortsCutBean.m11175(0);
shortsCutBean.m11174(Boolean.TRUE);
arrayList.add(shortsCutBean);
}
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
u95.m44345(requireActivity, arrayList);
C7305.m55293().m55299().postDelayed(new Runnable() {
@Override
public final void run() {
VmListFragment.m10593setUp$lambda0(VmListFragment.this);
}
}, 500L);
ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(R.id.tb_top);
this.vTop = constraintLayout;
ViewGroup.LayoutParams layoutParams = constraintLayout != null ? constraintLayout.getLayoutParams() : null;
y82.m51523(layoutParams, "null cannot be cast to non-null type androidx.constraintlayout.widget.ConstraintLayout.LayoutParams");
((ConstraintLayout.LayoutParams) layoutParams).setMargins(0, ey4.m19866(), 0, 0);
this.ivAddVm = (ImageView) findViewById(R.id.iv_vm_list_add);
dc6 dc6Var = dc6.f13598;
setNeedShowAddVmRedDot(dc6Var.m16929().getBoolean(ku.f23844, true));
FragmentVmListBinding fragmentVmListBinding = this.binding;
if (fragmentVmListBinding == null) {
y82.m51533("binding");
fragmentVmListBinding = null;
}
cg6.m5095(fragmentVmListBinding.f9132, getNeedShowAddVmRedDot());
ImageView imageView = (ImageView) findViewById(R.id.iv_em_register);
this.ivEmailRegister = imageView;
cg6.m5095(imageView, !C7305.m55293().m55304() && AccountHelper.get().notLogin());
this.ivSwcVmListSortMode = (ImageView) findViewById(R.id.iv_switch_vm_list_sort_mode);
ImageView imageView2 = (ImageView) findViewById(R.id.iv_switch_event_through_vm);
this.ivThroughVm = imageView2;
if (imageView2 != null) {
imageView2.setOnClickListener(this);
}
ImageView imageView3 = this.ivThroughVm;
if (imageView3 != null) {
imageView3.setTag(Boolean.FALSE);
}
this.ivMenu = (ImageView) findViewById(R.id.iv_vm_menu_switcher);
FragmentVmListBinding fragmentVmListBinding2 = this.binding;
if (fragmentVmListBinding2 == null) {
y82.m51533("binding");
fragmentVmListBinding2 = null;
}
fragmentVmListBinding2.f9142.setOnClickListener(this);
FragmentVmListBinding fragmentVmListBinding3 = this.binding;
if (fragmentVmListBinding3 == null) {
y82.m51533("binding");
fragmentVmListBinding3 = null;
}
fragmentVmListBinding3.f9143.setOnClickListener(this);
FragmentVmListBinding fragmentVmListBinding4 = this.binding;
if (fragmentVmListBinding4 == null) {
y82.m51533("binding");
fragmentVmListBinding4 = null;
}
fragmentVmListBinding4.f9135.setOnClickListener(this);
this.clUpdateHintRoot = (ConstraintLayout) findViewById(R.id.cl_update_hint_root);
this.tvUpdateHint = (TextView) findViewById(R.id.tv_vm_update_hint);
this.btnCheckUpdateDetail = (Button) findViewById(R.id.btn_check_update_detail);
initNavView();
this.rvVmList = (RecyclerView) findViewById(R.id.rv_vm_list);
this.flAddVm = (FrameLayout) findViewById(R.id.fl_add_vm);
this.viewStub = (ViewStub) findViewById(R.id.vm_guide_stub);
this.mLLI = (LinearLayout) findViewById(R.id.ll_indicator);
FrameLayout frameLayout = this.flAddVm;
if (frameLayout != null) {
frameLayout.setOnClickListener(this);
}
ImageView imageView4 = this.ivAddVm;
if (imageView4 != null) {
imageView4.setOnClickListener(this);
}
ImageView imageView5 = this.ivEmailRegister;
if (imageView5 != null) {
imageView5.setOnClickListener(this);
}
ImageView imageView6 = this.ivMenu;
if (imageView6 != null) {
imageView6.setOnClickListener(this);
}
ImageView imageView7 = this.ivSwcVmListSortMode;
if (imageView7 != null) {
imageView7.setOnClickListener(this);
}
Button button = this.btnCheckUpdateDetail;
if (button != null) {
button.setOnClickListener(this);
}
setSpanCount(dc6Var.m16936().decodeInt(w14.f38943, 1));
if (getSpanCount() < 1) {
setSpanCount(1);
}
toggleSwcVmListModeView();
showExistVmInfoView();
FrameLayout frameLayout2 = this.flAddVm;
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
if (vMStateInfoAdapter != null && vMStateInfoAdapter.getItemCount() == 0) {
z = true;
}
cg6.m5095(frameLayout2, z);
this.mMenuPW = new PopupWindow(View.inflate(requireActivity(), R.layout.popip_window_vm_menu, null), -1, -2);
initMenu();
this.mRomInfo = (RomInfo) mj.m31355(requireArguments().getSerializable(ku.f23796), RomInfo.class);
Log.e(TAG, "RomInfo = " + this.mRomInfo);
RomInfo romInfo = this.mRomInfo;
if (romInfo != null) {
y82.m51521(romInfo);
if (romInfo.m11683() != null) {
inflate();
}
}
initViewModel();
}
@Override
public void showBlur() {
FragmentActivity requireActivity = requireActivity();
y82.m51530(requireActivity, "requireActivity()");
if (requireActivity instanceof MainActivity) {
((MainActivity) requireActivity).showBlur();
}
}
@Override
public void showExistVmInfoView() {
refreshVMListUI();
}
public final void showPenetrateGuideStep2() {
C0884 c0884 = new C0884();
C0884 m6025 = c0884.m6041(this.navList).m6028(v21.f37423).m6022(50).m6025(20);
String m3636 = bm4.m3636(R.string.through_vm_1);
y82.m51530(m3636, "getString(R.string.through_vm_1)");
m6025.m6034(new PenetrateGuide(m3636, 2)).m6036(new C0884.InterfaceC0886() {
@Override
public void onDismiss() {
VmListFragment.this.showPenetrateGuideStep3();
}
@Override
public void onShown() {
}
});
c0884.m6026().m6018(requireActivity());
}
public final void showPenetrateGuideStep3() {
C0884 c0884 = new C0884();
ViewPagerSnapHelper viewPagerSnapHelper = this.mSnapHelper;
y82.m51521(viewPagerSnapHelper);
RecyclerView recyclerView = this.rvVmList;
y82.m51521(recyclerView);
View findSnapView = viewPagerSnapHelper.findSnapView(recyclerView.getLayoutManager());
if (findSnapView == null) {
return;
}
RecyclerView recyclerView2 = this.rvVmList;
y82.m51521(recyclerView2);
RecyclerView.ViewHolder findContainingViewHolder = recyclerView2.findContainingViewHolder(findSnapView);
y82.m51521(findContainingViewHolder);
C0884 m6025 = c0884.m6041(findContainingViewHolder.itemView).m6028(v21.f37423).m6022(50).m6025(20);
String m3636 = bm4.m3636(R.string.through_vm_2);
y82.m51530(m3636, "getString(R.string.through_vm_2)");
m6025.m6034(new PenetrateGuide(m3636, 3));
c0884.m6026().m6018(requireActivity());
}
public final void showVmListNav() {
ConstraintLayout constraintLayout = this.vTop;
y82.m51521(constraintLayout);
constraintLayout.setVisibility(8);
LinearLayout linearLayout = this.clNav;
y82.m51521(linearLayout);
linearLayout.setVisibility(0);
ArrayList arrayList = new ArrayList();
this.mNavList = arrayList;
VmListBottomAdapter vmListBottomAdapter = new VmListBottomAdapter(arrayList);
this.navAdapter = vmListBottomAdapter;
y82.m51521(vmListBottomAdapter);
vmListBottomAdapter.setItemClickListener(new VmListBottomAdapter.NavItemClickListener() {
@Override
public void onClick(int i) {
Log.i("VMOS-VmListFragment", "onClick: position -> " + i);
RecyclerView recyclerView = VmListFragment.this.rvVmList;
y82.m51521(recyclerView);
recyclerView.smoothScrollToPosition(i);
}
@Override
public void onTouch(@NotNull View view, @NotNull MotionEvent motionEvent) {
y82.m51531(view, bg.aE);
y82.m51531(motionEvent, NotificationCompat.CATEGORY_EVENT);
RecyclerView recyclerView = VmListFragment.this.rvVmList;
y82.m51521(recyclerView);
recyclerView.onTouchEvent(motionEvent);
}
});
RecyclerView recyclerView = this.navList;
y82.m51521(recyclerView);
recyclerView.setOnTouchListener(new View.OnTouchListener() {
@Override
public final boolean onTouch(View view, MotionEvent motionEvent) {
boolean m10603showVmListNav$lambda19;
m10603showVmListNav$lambda19 = VmListFragment.m10603showVmListNav$lambda19(VmListFragment.this, view, motionEvent);
return m10603showVmListNav$lambda19;
}
});
RecyclerView recyclerView2 = this.navList;
y82.m51521(recyclerView2);
recyclerView2.setAdapter(this.navAdapter);
ImageView imageView = this.navImg;
y82.m51521(imageView);
imageView.setOnClickListener(this);
RecyclerView recyclerView3 = this.rvVmList;
y82.m51521(recyclerView3);
ViewGroup.LayoutParams layoutParams = recyclerView3.getLayoutParams();
if (layoutParams instanceof ConstraintLayout.LayoutParams) {
((ConstraintLayout.LayoutParams) layoutParams).setMargins(0, ey4.m19866(), 0, 0);
}
if (this.mSnapHelper == null) {
return;
}
loadNavData();
RecyclerView recyclerView4 = this.navList;
y82.m51521(recyclerView4);
recyclerView4.post(new Runnable() {
@Override
public final void run() {
VmListFragment.m10604showVmListNav$lambda20(VmListFragment.this);
}
});
}
public final void startVmById(int i) {
for (VmInfo vmInfo : this.mVmInfoList) {
if (vmInfo.m11460() == i) {
startVmReenter(vmInfoIndexOf(this.mVmInfoList, vmInfo), false);
return;
}
}
}
@Override
public void toggleMenuRedDot(boolean z) {
this.showRedDot = z;
ImageView imageView = this.ivMenu;
y82.m51521(imageView);
imageView.setImageResource(z ? R.mipmap.ic_common_menu_with_red_dot : R.drawable.ic_vmos_por_menu);
ImageView imageView2 = this.ivCheckUpdateRedDot;
y82.m51521(imageView2);
imageView2.setVisibility(z ? 0 : 4);
}
@Override
public void warnRedirect2Permission() {
if (!aa5.m687() || dc6.f13598.m16936().decodeBool(w14.f38902, false)) {
return;
}
View$OnClickListenerC1394.m8712(this.ivMenu, new View$OnClickListenerC1394.InterfaceC1397() {
@Override
public void onDetailClick() {
VmListFragment.this.startActivity(new Intent(VmListFragment.this.requireActivity(), WebViewActivity.class).putExtra("title", bm4.m3636(R.string.create_shortcut)).putExtra("url", "http://www.vmos.cn/~preview/cn/tutorial/202007311555.htm"));
}
@Override
public void onPositiveBtnClick(boolean z) {
if (z) {
dc6.f13598.m16936().encode(w14.f38902, true);
}
}
}).m8713();
}
@Override
@NotNull
public VmListContract.Presenter createPresenter() {
return new VmListPresenter();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onEventMainThread(@NotNull final ei4 ei4Var) {
y82.m51531(ei4Var, NotificationCompat.CATEGORY_EVENT);
if (this.mVmAdapter == null || getSpanCount() != 1) {
return;
}
Observable.just(Integer.valueOf(ei4Var.m19131())).map(new Function() {
@Override
public final Object apply(Object obj) {
Integer m10589onEventMainThread$lambda5;
m10589onEventMainThread$lambda5 = VmListFragment.m10589onEventMainThread$lambda5(VmListFragment.this, ei4Var, (Integer) obj);
return m10589onEventMainThread$lambda5;
}
}).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Consumer() {
@Override
public final void accept(Object obj) {
VmListFragment.m10590onEventMainThread$lambda6(VmListFragment.this, ((Integer) obj).intValue());
}
});
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onEventMainThread(@Nullable C8158 c8158) {
if (this.mVmAdapter == null || getSpanCount() != 1) {
return;
}
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
y82.m51521(c8158);
vMStateInfoAdapter.notifyLazyLoadStateInfo(c8158);
}
@Override
public void notifyExistVmInfoView() {
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
if (vMStateInfoAdapter == null || this.rvVmList == null) {
return;
}
if (vMStateInfoAdapter != null) {
vMStateInfoAdapter.notifyDataSetChanged();
}
loadNavData();
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
if (vMStateInfoAdapter2 != null && vMStateInfoAdapter2.getItemCount() == 0) {
cg6.m5094(this.flAddVm, 0);
VmThroughViewModel vmThroughViewModel = this.viewModel;
y82.m51521(vmThroughViewModel);
vmThroughViewModel.m15800().setValue(Boolean.FALSE);
} else {
cg6.m5094(this.flAddVm, 8);
}
controlOperationEventEntranceVisibility();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public final void onEventMainThread(@Nullable C8147 c8147) {
if (this.mVmAdapter == null || getSpanCount() != 1) {
return;
}
VMStateInfoAdapter vMStateInfoAdapter = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter);
vMStateInfoAdapter.setData(wg6.m48603().m48605());
VMStateInfoAdapter vMStateInfoAdapter2 = this.mVmAdapter;
y82.m51521(vMStateInfoAdapter2);
y82.m51521(c8147);
vMStateInfoAdapter2.notifyLazyLoadStateInfo(c8147);
}
}