正在查看: 万能钥匙 v1.1.23 应用的 FinAppManager.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 FinAppManager.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.finogeeks.lib.applet.client;
import android.app.Application;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import androidx.annotation.StringRes;
import com.finogeeks.lib.applet.R;
import com.finogeeks.lib.applet.appletdir.AppletStoreDirProvider;
import com.finogeeks.lib.applet.appletdir.AppletTempDirProvider;
import com.finogeeks.lib.applet.appletdir.AppletUsrDirProvider;
import com.finogeeks.lib.applet.d.filestore.StoreManager;
import com.finogeeks.lib.applet.d.filestore.a;
import com.finogeeks.lib.applet.db.entity.FinApplet;
import com.finogeeks.lib.applet.db.entity.UsedApplet;
import com.finogeeks.lib.applet.i.framework.FrameworkUtils;
import com.finogeeks.lib.applet.i.report.PrivateReporter;
import com.finogeeks.lib.applet.i.sdk.b;
import com.finogeeks.lib.applet.interfaces.FinCallback;
import com.finogeeks.lib.applet.ipc.FinAppAIDLRouter;
import com.finogeeks.lib.applet.ipc.FinAppProcess;
import com.finogeeks.lib.applet.ipc.FinAppProcessPool;
import com.finogeeks.lib.applet.ipc.f;
import com.finogeeks.lib.applet.main.FinAppletInfoDecryptor;
import com.finogeeks.lib.applet.main.IntentsKt;
import com.finogeeks.lib.applet.model.AppletDownLoadInfo;
import com.finogeeks.lib.applet.model.CheckLicenseResult;
import com.finogeeks.lib.applet.model.Error;
import com.finogeeks.lib.applet.model.FinAppUnzippedInfo;
import com.finogeeks.lib.applet.model.StartAppletDecryptInfo;
import com.finogeeks.lib.applet.modules.callback.FinSimpleCallback;
import com.finogeeks.lib.applet.modules.common.CommonKt;
import com.finogeeks.lib.applet.modules.common.LicenseConfigManager;
import com.finogeeks.lib.applet.modules.ext.ContextKt;
import com.finogeeks.lib.applet.modules.ext.q;
import com.finogeeks.lib.applet.modules.ext.s;
import com.finogeeks.lib.applet.modules.favorite.resp.FavoriteAppletListResp;
import com.finogeeks.lib.applet.modules.log.FLog;
import com.finogeeks.lib.applet.modules.log.FLogCommonTag;
import com.finogeeks.lib.applet.modules.store.FinAppletType;
import com.finogeeks.lib.applet.modules.store.FinStores;
import com.finogeeks.lib.applet.modules.store.IFinStore;
import com.finogeeks.lib.applet.modules.subscaleview.ImageEditeActivity;
import com.finogeeks.lib.applet.rest.api.AppletApi;
import com.finogeeks.lib.applet.rest.model.ApiError;
import com.finogeeks.lib.applet.rest.model.ApiResponse;
import com.finogeeks.lib.applet.rest.model.FrameworkInfo;
import com.finogeeks.lib.applet.sdk.api.FinFilePathType;
import com.finogeeks.lib.applet.sdk.api.IExtensionApiManager;
import com.finogeeks.lib.applet.sdk.api.request.DecryptFinAppletRequest;
import com.finogeeks.lib.applet.sdk.api.request.IFinAppletRequest;
import com.finogeeks.lib.applet.sdk.api.request.LocalFinAppletRequest;
import com.finogeeks.lib.applet.sdk.api.request.LocalInterfaceFinAppletRequest;
import com.finogeeks.lib.applet.sdk.api.request.QrCodeFinAppletRequest;
import com.finogeeks.lib.applet.sdk.api.request.RemoteFinAppletRequest;
import com.finogeeks.lib.applet.sdk.component.ComponentCallback;
import com.finogeeks.lib.applet.sdk.model.FavoriteAppletListRequest;
import com.finogeeks.lib.applet.sdk.model.FetchBindAppletInfo;
import com.finogeeks.lib.applet.sdk.model.FetchBindAppletRequest;
import com.finogeeks.lib.applet.sdk.model.FetchBindAppletResponse;
import com.finogeeks.lib.applet.sdk.model.ParsedAppletInfo;
import com.finogeeks.lib.applet.sdk.model.Performance;
import com.finogeeks.lib.applet.sdk.model.SearchAppletRequest;
import com.finogeeks.lib.applet.sdk.model.SearchAppletResponse;
import com.finogeeks.lib.applet.sdk.model.StartAppletDecryptRequest;
import com.finogeeks.lib.applet.sync.d;
import com.finogeeks.lib.applet.utils.FinClipSDKCoreUtil;
import com.finogeeks.lib.applet.utils.a0;
import com.finogeeks.lib.applet.utils.a1;
import com.finogeeks.lib.applet.utils.d1;
import com.finogeeks.lib.applet.utils.o0;
import com.finogeeks.lib.applet.utils.r;
import hh0.l;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArraySet;
import kotlin.Metadata;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.n;
import kotlin.jvm.internal.y;
import lg0.h;
import lg0.i;
import mg0.o;
import mg0.p;
import mg0.x;
import tj0.t;
@Metadata(d1 = {"\u0000Ð\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\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\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0010\n\u0002\u0010 \n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010%\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0000\u0018\u0000 Ë\u00012\u00020\u0001:\u0002Ë\u0001B\u0017\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0004¢\u0006\u0004\b\u0006\u0010\u0007J;\u0010\u0011\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\n2\u000e\b\u0002\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0004\b\u0011\u0010\u0012J7\u0010\u0013\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\n2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0004\b\u0013\u0010\u0012J/\u0010\u0015\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u00142\u000e\b\u0002\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\fH\u0002¢\u0006\u0004\b\u0015\u0010\u0016J-\u0010\u0018\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u00172\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\fH\u0002¢\u0006\u0004\b\u0018\u0010\u0019J9\u0010\u001b\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u001a2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0004\b\u001b\u0010\u001cJ7\u0010\u001e\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u001d2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0004\b\u001e\u0010\u001fJ9\u0010$\u001a\u00020#2\u0006\u0010\t\u001a\u00020\b2\b\u0010!\u001a\u0004\u0018\u00010 2\b\u0010\"\u001a\u0004\u0018\u00010 2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\fH\u0002¢\u0006\u0004\b$\u0010%Jy\u00102\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\b\u0010'\u001a\u0004\u0018\u00010&2\u0006\u0010(\u001a\u00020 2\u0006\u0010*\u001a\u00020)2\u0006\u0010+\u001a\u00020 2\u0006\u0010,\u001a\u00020 2\u0006\u0010-\u001a\u00020)2\b\b\u0001\u0010.\u001a\u00020)2\u0006\u0010/\u001a\u00020#2\u0006\u00100\u001a\u00020#2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\u0006\u00101\u001a\u00020#H\u0002¢\u0006\u0004\b2\u00103JI\u00106\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010-\u001a\u00020)2\b\b\u0001\u00104\u001a\u00020)2\b\b\u0001\u00105\u001a\u00020)2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\fH\u0002¢\u0006\u0004\b6\u00107J7\u00108\u001a\u00020\u00102\u0006\u0010(\u001a\u00020 2\u0006\u0010*\u001a\u00020)2\u0006\u0010+\u001a\u00020 2\u0006\u0010,\u001a\u00020 2\u0006\u0010.\u001a\u00020 H\u0002¢\u0006\u0004\b8\u00109J\u001f\u0010<\u001a\u00020\u00102\u000e\u0010;\u001a\n\u0012\u0004\u0012\u00020 \u0018\u00010:H\u0002¢\u0006\u0004\b<\u0010=J\r\u0010>\u001a\u00020\u0010¢\u0006\u0004\b>\u0010?J\r\u0010@\u001a\u00020\u0010¢\u0006\u0004\b@\u0010?J\u000f\u0010A\u001a\u00020\u0010H\u0007¢\u0006\u0004\bA\u0010?J=\u0010C\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020B2\u0012\b\u0002\u0010\r\u001a\f\u0012\u0006\u0012\u0004\u0018\u00010 \u0018\u00010\f2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u000e¢\u0006\u0004\bC\u0010DJ\u001d\u0010E\u001a\u00020\u00102\u0006\u0010!\u001a\u00020 2\u0006\u0010(\u001a\u00020 ¢\u0006\u0004\bE\u0010FJ\u0015\u0010G\u001a\u00020\u00102\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bG\u0010HJ%\u0010J\u001a\u00020\u00102\u0006\u0010\"\u001a\u00020 2\u0006\u0010-\u001a\u00020)2\u0006\u0010I\u001a\u00020 ¢\u0006\u0004\bJ\u0010KJ=\u0010N\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010M\u001a\u00020L2\u0006\u0010/\u001a\u00020#2\u0006\u00100\u001a\u00020#2\u000e\b\u0002\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f¢\u0006\u0004\bN\u0010OJ?\u0010Q\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010P\u001a\u00020L2\b\b\u0002\u0010/\u001a\u00020#2\b\b\u0002\u00100\u001a\u00020#2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f¢\u0006\u0004\bQ\u0010OJ\u001f\u0010R\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bR\u0010SJ\u001f\u0010W\u001a\u0004\u0018\u00010 2\u0006\u0010T\u001a\u00020 2\u0006\u0010V\u001a\u00020U¢\u0006\u0004\bW\u0010XJ'\u0010Z\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010Y\u001a\u00020 ¢\u0006\u0004\bZ\u0010[J'\u0010\\\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010Y\u001a\u00020 ¢\u0006\u0004\b\\\u0010[J/\u0010\\\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010Y\u001a\u00020 2\u0006\u0010^\u001a\u00020]¢\u0006\u0004\b\\\u0010_J\u001f\u0010`\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\b`\u0010SJ'\u0010`\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010^\u001a\u00020]¢\u0006\u0004\b`\u0010aJ\u001f\u0010b\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bb\u0010SJ'\u0010b\u001a\u0004\u0018\u00010 2\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\"\u001a\u00020 2\u0006\u0010c\u001a\u00020]¢\u0006\u0004\bb\u0010aJ\u0013\u0010e\u001a\b\u0012\u0004\u0012\u00020d0:¢\u0006\u0004\be\u0010fJ\u001f\u0010g\u001a\u0004\u0018\u00010d2\u0006\u0010\"\u001a\u00020 2\u0006\u0010+\u001a\u00020]¢\u0006\u0004\bg\u0010hJ\u0017\u0010i\u001a\u0004\u0018\u00010d2\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bi\u0010jJ\u0015\u0010k\u001a\u00020#2\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bk\u0010lJ\u0015\u0010m\u001a\u00020\u00102\u0006\u0010\"\u001a\u00020 ¢\u0006\u0004\bm\u0010HJ\r\u0010n\u001a\u00020\u0010¢\u0006\u0004\bn\u0010?J'\u0010p\u001a\u0004\u0018\u00010L2\u0006\u0010\"\u001a\u00020 2\u0006\u0010+\u001a\u00020]2\u0006\u0010o\u001a\u00020#¢\u0006\u0004\bp\u0010qJ#\u0010u\u001a\u00020\u00102\u0006\u0010s\u001a\u00020r2\f\u0010\r\u001a\b\u0012\u0004\u0012\u00020t0\f¢\u0006\u0004\bu\u0010vJ#\u0010z\u001a\u00020\u00102\u0006\u0010x\u001a\u00020w2\f\u0010\r\u001a\b\u0012\u0004\u0012\u00020y0\f¢\u0006\u0004\bz\u0010{J$\u0010\u007f\u001a\u00020\u00102\u0006\u0010}\u001a\u00020|2\f\u0010\r\u001a\b\u0012\u0004\u0012\u00020~0\f¢\u0006\u0005\b\u007f\u0010\u0080\u0001J4\u0010\u0085\u0001\u001a\u00020\u00102\u0007\u0010\u0081\u0001\u001a\u00020 2\u0007\u0010\u0082\u0001\u001a\u00020 2\u0010\u0010\r\u001a\f\u0012\u0007\u0012\u0005\u0018\u00010\u0084\u00010\u0083\u0001¢\u0006\u0006\b\u0085\u0001\u0010\u0086\u0001JE\u0010\u0088\u0001\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0007\u0010\u0082\u0001\u001a\u00020 2\f\u0010;\u001a\b\u0012\u0004\u0012\u00020 0:2\u0014\u0010\r\u001a\u0010\u0012\u000b\u0012\t\u0012\u0005\u0012\u00030\u0087\u00010:0\u0083\u0001¢\u0006\u0006\b\u0088\u0001\u0010\u0089\u0001JN\u0010\u0088\u0001\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0007\u0010\u0082\u0001\u001a\u00020 2\f\u0010;\u001a\b\u0012\u0004\u0012\u00020 0:2\u0007\u0010\u008a\u0001\u001a\u00020#2\u0014\u0010\r\u001a\u0010\u0012\u000b\u0012\t\u0012\u0005\u0012\u00030\u0087\u00010:0\u0083\u0001¢\u0006\u0006\b\u0088\u0001\u0010\u008b\u0001Jk\u0010\u008f\u0001\u001a\u00020#2\u0006\u0010\t\u001a\u00020\b2\b\u0010\"\u001a\u0004\u0018\u00010 2\t\u0010\u008c\u0001\u001a\u0004\u0018\u00010)2\b\u0010+\u001a\u0004\u0018\u00010 2\n\u0010\u008e\u0001\u001a\u0005\u0018\u00010\u008d\u00012\u0006\u0010/\u001a\u00020#2\u0006\u00100\u001a\u00020#2\f\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\u0006\u00101\u001a\u00020#H\u0002¢\u0006\u0006\b\u008f\u0001\u0010\u0090\u0001J-\u0010\u0095\u0001\u001a\u00020\u00102\u0007\u0010\u0082\u0001\u001a\u00020 2\u0007\u0010\u0091\u0001\u001a\u00020#2\u0007\u0010\r\u001a\u00030\u0092\u0001H\u0000¢\u0006\u0006\b\u0093\u0001\u0010\u0094\u0001JR\u0010\u0098\u0001\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u001d2\b\u0010\u0097\u0001\u001a\u00030\u0096\u00012\b\u0010\u008e\u0001\u001a\u00030\u008d\u00012\u000e\b\u0002\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0006\b\u0098\u0001\u0010\u0099\u0001JR\u0010\u009a\u0001\u001a\u00020\u00102\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\u001d2\b\u0010\u0097\u0001\u001a\u00030\u0096\u00012\b\u0010\u008e\u0001\u001a\u00030\u008d\u00012\u000e\b\u0002\u0010\r\u001a\b\u0012\u0002\b\u0003\u0018\u00010\f2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0002¢\u0006\u0006\b\u009a\u0001\u0010\u0099\u0001R \u0010\u009c\u0001\u001a\t\u0012\u0004\u0012\u00020 0\u009b\u00018\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u009c\u0001\u0010\u009d\u0001R!\u0010£\u0001\u001a\u00030\u009e\u00018BX\u0082\u0084\u0002¢\u0006\u0010\n\u0006\b\u009f\u0001\u0010 \u0001\u001a\u0006\b¡\u0001\u0010¢\u0001R!\u0010¨\u0001\u001a\u00030¤\u00018BX\u0082\u0084\u0002¢\u0006\u0010\n\u0006\b¥\u0001\u0010 \u0001\u001a\u0006\b¦\u0001\u0010§\u0001R*\u0010ª\u0001\u001a\u0015\u0012\u0004\u0012\u00020 \u0012\n\u0012\b\u0012\u0002\b\u0003\u0018\u00010\f0©\u00018\u0002X\u0082\u0004¢\u0006\b\n\u0006\bª\u0001\u0010«\u0001R2\u0010±\u0001\u001a\u0014\u0012\u0004\u0012\u00020d0¬\u0001j\t\u0012\u0004\u0012\u00020d`\u00ad\u00018BX\u0082\u0084\u0002¢\u0006\u0010\n\u0006\b®\u0001\u0010 \u0001\u001a\u0006\b¯\u0001\u0010°\u0001R!\u0010¶\u0001\u001a\u00030²\u00018BX\u0082\u0084\u0002¢\u0006\u0010\n\u0006\b³\u0001\u0010 \u0001\u001a\u0006\b´\u0001\u0010µ\u0001R\u0015\u0010\u0003\u001a\u00020\u00028\u0002X\u0082\u0004¢\u0006\u0007\n\u0005\b\u0003\u0010·\u0001R\u0015\u0010\u0005\u001a\u00020\u00048\u0002X\u0082\u0004¢\u0006\u0007\n\u0005\b\u0005\u0010¸\u0001R\u0018\u0010¼\u0001\u001a\u00030¹\u00018BX\u0082\u0004¢\u0006\b\u001a\u0006\bº\u0001\u0010»\u0001R\u0018\u0010À\u0001\u001a\u00030½\u00018BX\u0082\u0004¢\u0006\b\u001a\u0006\b¾\u0001\u0010¿\u0001R\u0018\u0010Ä\u0001\u001a\u00030Á\u00018BX\u0082\u0004¢\u0006\b\u001a\u0006\bÂ\u0001\u0010Ã\u0001R\u0018\u0010È\u0001\u001a\u00030Å\u00018BX\u0082\u0004¢\u0006\b\u001a\u0006\bÆ\u0001\u0010Ç\u0001R\u001e\u0010\u008e\u0001\u001a\u0005\u0018\u00010\u008d\u0001*\u00020\n8BX\u0082\u0004¢\u0006\b\u001a\u0006\bÉ\u0001\u0010Ê\u0001¨\u0006Ì\u0001"}, d2 = {"Lcom/finogeeks/lib/applet/client/FinAppManager;", "", "Landroid/app/Application;", "application", "Lcom/finogeeks/lib/applet/client/FinAppConfig;", "finAppConfig", "<init>", "(Landroid/app/Application;Lcom/finogeeks/lib/applet/client/FinAppConfig;)V", "Landroid/content/Context;", "context", "Lcom/finogeeks/lib/applet/sdk/api/request/RemoteFinAppletRequest;", FLogCommonTag.REQUEST, "Lcom/finogeeks/lib/applet/interfaces/FinCallback;", "callback", "Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;", "componentCallback", "Llg0/e0;", "dispatchToRemote", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/RemoteFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;)V", "dispatchToRemoteWithPreload", "Lcom/finogeeks/lib/applet/sdk/api/request/LocalInterfaceFinAppletRequest;", "dispatchToLocalInterface", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/LocalInterfaceFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "Lcom/finogeeks/lib/applet/sdk/api/request/LocalFinAppletRequest;", "dispatchToLocal", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/LocalFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "Lcom/finogeeks/lib/applet/sdk/api/request/QrCodeFinAppletRequest;", "dispatchToQrCode", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/QrCodeFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;)V", "Lcom/finogeeks/lib/applet/sdk/api/request/DecryptFinAppletRequest;", "dispatchToDecrypt", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/DecryptFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;)V", "", "codeId", "appId", "", "checkStartAppInterval", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)Z", "Lcom/finogeeks/lib/applet/client/FinStoreConfig;", "finStoreConfig", "appletId", "", "appletSequence", "appType", "apiUrl", "errCode", "desc", "isSingleTask", "isSingleProcess", "isComponent", "doOnAppletStartFail", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/client/FinStoreConfig;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;IIZZLcom/finogeeks/lib/applet/interfaces/FinCallback;Z)V", "titleRes", "messageRes", "doOnTrailAppletStartFail", "(Landroid/content/Context;Ljava/lang/String;IIILcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "recordAppletStartFailEvent", "(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "", "appIds", "deleteAppletSharedPrefs", "(Ljava/util/List;)V", "checkLicenseConfigWhenInit", "()V", "checkPrivateApmReportWhenInit", "intervalCheckForUpdates", "Lcom/finogeeks/lib/applet/sdk/api/request/IFinAppletRequest;", "startApplet", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/IFinAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;)V", "updateAppletId", "(Ljava/lang/String;Ljava/lang/String;)V", "onAppletInitComplete", "(Ljava/lang/String;)V", "errMsg", "onAppletLoadFail", "(Ljava/lang/String;ILjava/lang/String;)V", "Lcom/finogeeks/lib/applet/client/FinAppInfo;", "finAppInfo", "startTrialAppDirectly", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/client/FinAppInfo;ZZLcom/finogeeks/lib/applet/interfaces/FinCallback;)V", Performance.EntryName.APP_INFO, "startAppletInAssets", "getAppletSourcePath", "(Landroid/content/Context;Ljava/lang/String;)Ljava/lang/String;", ImageEditeActivity.EXTRA_FILE_PATH, "Lcom/finogeeks/lib/applet/sdk/api/FinFilePathType;", "pathType", "generateFinFilePath", "(Ljava/lang/String;Lcom/finogeeks/lib/applet/sdk/api/FinFilePathType;)Ljava/lang/String;", "finFilePath", "getFinFileAbsolutePathCanNoExist", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "getFinFileAbsolutePath", "Lcom/finogeeks/lib/applet/modules/store/FinAppletType;", "finAppletType", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/store/FinAppletType;)Ljava/lang/String;", "getAppletTempPath", "(Landroid/content/Context;Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/store/FinAppletType;)Ljava/lang/String;", "getAppletUserDataPath", "appletType", "Lcom/finogeeks/lib/applet/db/entity/FinApplet;", "getUsedApplets", "()Ljava/util/List;", "getApplet", "(Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/store/FinAppletType;)Lcom/finogeeks/lib/applet/db/entity/FinApplet;", "getUsedApplet", "(Ljava/lang/String;)Lcom/finogeeks/lib/applet/db/entity/FinApplet;", "isUsedApplet", "(Ljava/lang/String;)Z", "removeUsedApplet", "clearApplets", "forceReload", "getAppInfo", "(Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/store/FinAppletType;Z)Lcom/finogeeks/lib/applet/client/FinAppInfo;", "Lcom/finogeeks/lib/applet/sdk/model/SearchAppletRequest;", "searchAppletRequest", "Lcom/finogeeks/lib/applet/sdk/model/SearchAppletResponse;", "searchApplets", "(Lcom/finogeeks/lib/applet/sdk/model/SearchAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "Lcom/finogeeks/lib/applet/sdk/model/FetchBindAppletRequest;", "fetchBindAppletRequest", "Lcom/finogeeks/lib/applet/sdk/model/FetchBindAppletResponse;", "getBindApplets", "(Lcom/finogeeks/lib/applet/sdk/model/FetchBindAppletRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "Lcom/finogeeks/lib/applet/sdk/model/FavoriteAppletListRequest;", "favoriteAppletListRequest", "Lcom/finogeeks/lib/applet/modules/favorite/resp/FavoriteAppletListResp;", "getFavoriteApplets", "(Lcom/finogeeks/lib/applet/sdk/model/FavoriteAppletListRequest;Lcom/finogeeks/lib/applet/interfaces/FinCallback;)V", "qrCode", "apiServer", "Lcom/finogeeks/lib/applet/modules/callback/FinSimpleCallback;", "Lcom/finogeeks/lib/applet/sdk/model/ParsedAppletInfo;", "parseAppletInfoFromWXQrCode", "(Ljava/lang/String;Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/callback/FinSimpleCallback;)V", "Lcom/finogeeks/lib/applet/model/AppletDownLoadInfo;", "downloadApplets", "(Landroid/content/Context;Ljava/lang/String;Ljava/util/List;Lcom/finogeeks/lib/applet/modules/callback/FinSimpleCallback;)V", "isBatchDownloadApplets", "(Landroid/content/Context;Ljava/lang/String;Ljava/util/List;ZLcom/finogeeks/lib/applet/modules/callback/FinSimpleCallback;)V", "sequence", "Lcom/finogeeks/lib/applet/modules/store/IFinStore;", "finStore", "checkBeforeStartApp", "(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/String;Lcom/finogeeks/lib/applet/modules/store/IFinStore;ZZLcom/finogeeks/lib/applet/interfaces/FinCallback;Z)Z", "isOfflineApplet", "Lcom/finogeeks/lib/applet/ipc/IApiCallback;", "checkLicenseConfig$finapplet_release", "(Ljava/lang/String;ZLcom/finogeeks/lib/applet/ipc/IApiCallback;)V", "checkLicenseConfig", "Lcom/finogeeks/lib/applet/model/StartAppletDecryptInfo;", "decryptInfo", "dispatchToTrial", "(Landroid/content/Context;Lcom/finogeeks/lib/applet/sdk/api/request/DecryptFinAppletRequest;Lcom/finogeeks/lib/applet/model/StartAppletDecryptInfo;Lcom/finogeeks/lib/applet/modules/store/IFinStore;Lcom/finogeeks/lib/applet/interfaces/FinCallback;Lcom/finogeeks/lib/applet/sdk/component/ComponentCallback;)V", "dispatchToTrialFromManager", "Ljava/util/concurrent/CopyOnWriteArraySet;", "loadingApplets", "Ljava/util/concurrent/CopyOnWriteArraySet;", "Lcom/finogeeks/lib/applet/modules/store/FinStores;", "finStores$delegate", "Llg0/h;", "getFinStores", "()Lcom/finogeeks/lib/applet/modules/store/FinStores;", "finStores", "Lcom/finogeeks/lib/applet/db/filestore/UsedAppletStore;", "usedAppletStore$delegate", "getUsedAppletStore", "()Lcom/finogeeks/lib/applet/db/filestore/UsedAppletStore;", "usedAppletStore", "", "appletCallbacks", "Ljava/util/Map;", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "finAppletComparator$delegate", "getFinAppletComparator", "()Ljava/util/Comparator;", "finAppletComparator", "Lcom/finogeeks/lib/applet/main/FinAppletInfoDecryptor;", "finAppletInfoDecryptor$delegate", "getFinAppletInfoDecryptor", "()Lcom/finogeeks/lib/applet/main/FinAppletInfoDecryptor;", "finAppletInfoDecryptor", "Landroid/app/Application;", "Lcom/finogeeks/lib/applet/client/FinAppConfig;", "Lcom/finogeeks/lib/applet/db/filestore/AppletExtInfoStore;", "getAppletExtInfoStore", "()Lcom/finogeeks/lib/applet/db/filestore/AppletExtInfoStore;", "appletExtInfoStore", "Lcom/finogeeks/lib/applet/db/filestore/AppletStore;", "getAppletStore", "()Lcom/finogeeks/lib/applet/db/filestore/AppletStore;", "appletStore", "Lcom/finogeeks/lib/applet/db/filestore/PrivacySettingStore;", "getPrivacySettingStore", "()Lcom/finogeeks/lib/applet/db/filestore/PrivacySettingStore;", "privacySettingStore", "Lcom/finogeeks/lib/applet/db/filestore/StoreManager;", "getStoreManager", "()Lcom/finogeeks/lib/applet/db/filestore/StoreManager;", "storeManager", "getFinStore", "(Lcom/finogeeks/lib/applet/sdk/api/request/RemoteFinAppletRequest;)Lcom/finogeeks/lib/applet/modules/store/IFinStore;", "Companion", "finapplet_release"}, k = 1, mv = {1, 4, 0})
public final class FinAppManager {
static final l[] $$delegatedProperties = {g0.j(new y(g0.b(FinAppManager.class), "finStores", "getFinStores()Lcom/finogeeks/lib/applet/modules/store/FinStores;")), g0.j(new y(g0.b(FinAppManager.class), "usedAppletStore", "getUsedAppletStore()Lcom/finogeeks/lib/applet/db/filestore/UsedAppletStore;")), g0.j(new y(g0.b(FinAppManager.class), "finAppletComparator", "getFinAppletComparator()Ljava/util/Comparator;")), g0.j(new y(g0.b(FinAppManager.class), "finAppletInfoDecryptor", "getFinAppletInfoDecryptor()Lcom/finogeeks/lib/applet/main/FinAppletInfoDecryptor;"))};
private static final String TAG = "FinAppManager";
private final Map<String, FinCallback<?>> appletCallbacks;
private final Application application;
private final FinAppConfig finAppConfig;
private final h finAppletComparator;
private final h finAppletInfoDecryptor;
private final h finStores;
private CopyOnWriteArraySet<String> loadingApplets;
private final h usedAppletStore;
@Metadata(bv = {1, 0, 3}, k = 3, mv = {1, 1, 16})
public final class WhenMappings {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[FinFilePathType.values().length];
$EnumSwitchMapping$0 = iArr;
iArr[FinFilePathType.USR.ordinal()] = 1;
iArr[FinFilePathType.TMP.ordinal()] = 2;
iArr[FinFilePathType.STORE.ordinal()] = 3;
}
}
public FinAppManager(Application application, FinAppConfig finAppConfig) {
n.j(application, "application");
n.j(finAppConfig, "finAppConfig");
this.application = application;
this.finAppConfig = finAppConfig;
this.loadingApplets = new CopyOnWriteArraySet<>();
this.finStores = i.a(new FinAppManager$finStores$2(this));
this.usedAppletStore = i.a(new FinAppManager$usedAppletStore$2(this));
this.appletCallbacks = new LinkedHashMap();
this.finAppletComparator = i.a(FinAppManager$finAppletComparator$2.INSTANCE);
this.finAppletInfoDecryptor = i.a(new FinAppManager$finAppletInfoDecryptor$2(this));
}
private final boolean checkBeforeStartApp(Context context, String str, Integer num, String str2, IFinStore iFinStore, boolean z10, boolean z11, FinCallback<?> finCallback, boolean z12) {
FinAppConfig finAppConfig;
if ((iFinStore == null || (finAppConfig = iFinStore.d()) == null) && (finAppConfig = FinAppClient.INSTANCE.getFinAppConfig()) == null) {
n.t();
}
if (Build.VERSION.SDK_INT < finAppConfig.getMinAndroidSdkVersion()) {
int i = R.string.fin_applet_min_sdk_version_error;
ContextKt.toastOnUiThread(context, s.a(ContextKt.getLocalResString(context, i, new Object[0]), null, 1, null));
if (finCallback != null) {
finCallback.onError(10006, s.a(ContextKt.getLocalResString(context, i, new Object[0]), null, 1, null));
}
return false;
}
if (iFinStore == null || b.a.b(context, iFinStore.b(), this.finAppConfig.getInitConfigVerifyHandler(), this.finAppConfig.getFinkey())) {
return true;
}
doOnAppletStartFail(context, iFinStore.b(), s.g(str), q.a((int) num, -1).intValue(), s.g(str2), iFinStore.b().getApiServer(), Error.ErrorCodeSDKInitFail, R.string.fin_applet_sdk_init_fail, z10, z11, finCallback, z12);
return false;
}
private final boolean checkStartAppInterval(Context context, String codeId, String appId, FinCallback<?> callback) {
final String str;
FinAppProcess a;
if (codeId != null) {
str = codeId;
} else {
if (appId == null) {
n.t();
}
str = appId;
}
if (!this.loadingApplets.contains(str)) {
this.loadingApplets.add(str);
d1.a().postDelayed(new Runnable() {
@Override
public final void run() {
CopyOnWriteArraySet copyOnWriteArraySet;
CopyOnWriteArraySet copyOnWriteArraySet2;
copyOnWriteArraySet = FinAppManager.this.loadingApplets;
copyOnWriteArraySet.remove(str);
StringBuilder sb = new StringBuilder();
sb.append("loadingApplets : ");
copyOnWriteArraySet2 = FinAppManager.this.loadingApplets;
sb.append(copyOnWriteArraySet2);
FLog.d$default("FinAppManager", sb.toString(), null, 4, null);
}
}, 2000L);
return true;
}
if (codeId != null) {
a = FinAppProcessPool.d.c(codeId);
} else {
FinAppProcessPool finAppProcessPool = FinAppProcessPool.d;
if (appId == null) {
n.t();
}
a = finAppProcessPool.a(appId);
}
String a2 = a != null ? o0.a(context, a.getProcessId()) : null;
if (a2 != null && a2.length() != 0) {
return true;
}
if (callback != null) {
callback.onError(Error.ErrorCodeAppletStarting, s.a(ContextKt.getLocalResString(context, R.string.fin_applet_error_code_applet_starting, new Object[0]), null, 1, null));
}
return false;
}
private final void deleteAppletSharedPrefs(List<String> appIds) {
File file;
if (appIds == null || appIds.isEmpty()) {
return;
}
boolean z10 = Build.VERSION.SDK_INT >= 24;
if (z10) {
file = new File(this.application.getDataDir(), "shared_prefs");
} else {
File cacheDir = this.application.getCacheDir();
n.e(cacheDir, "application.cacheDir");
file = new File(cacheDir.getParentFile(), "shared_prefs");
}
File[] listFiles = file.listFiles();
ArrayList<File> arrayList = null;
if (listFiles != null) {
ArrayList arrayList2 = new ArrayList();
for (File file2 : listFiles) {
if (!(appIds instanceof Collection) || !appIds.isEmpty()) {
Iterator<T> it = appIds.iterator();
while (true) {
if (it.hasNext()) {
String str = (String) it.next();
n.e(file2, "guessPrefsFile");
String name = file2.getName();
n.e(name, "guessPrefsFile.name");
if (t.L(name, str, false, 2, (Object) null)) {
arrayList2.add(file2);
break;
}
}
}
}
}
arrayList = arrayList2;
}
if (arrayList != null) {
for (File file3 : arrayList) {
n.e(file3, "it");
String name2 = file3.getName();
n.e(name2, "it.name");
String D = t.D(name2, ".xml", "", true);
this.application.getSharedPreferences(D, 4).edit().clear().apply();
if (z10) {
this.application.deleteSharedPreferences(D);
} else {
file3.delete();
}
}
}
}
public final void dispatchToDecrypt(android.content.Context r21, com.finogeeks.lib.applet.sdk.api.request.DecryptFinAppletRequest r22, com.finogeeks.lib.applet.interfaces.FinCallback<?> r23, com.finogeeks.lib.applet.sdk.component.ComponentCallback r24) {
throw new UnsupportedOperationException("Method not decompiled: com.finogeeks.lib.applet.client.FinAppManager.dispatchToDecrypt(android.content.Context, com.finogeeks.lib.applet.sdk.api.request.DecryptFinAppletRequest, com.finogeeks.lib.applet.interfaces.FinCallback, com.finogeeks.lib.applet.sdk.component.ComponentCallback):void");
}
private final void dispatchToLocal(Context context, LocalFinAppletRequest request, FinCallback<?> callback) {
FinAppUnzippedInfo e;
FinAppInfo finAppInfo$finapplet_release = request.toFinAppInfo$finapplet_release();
String appId = finAppInfo$finapplet_release.getAppId();
int sequence = finAppInfo$finapplet_release.getSequence();
String appType = finAppInfo$finapplet_release.getAppType();
if (appType == null || appType.length() == 0) {
finAppInfo$finapplet_release.setAppType("release");
}
String appType2 = finAppInfo$finapplet_release.getAppType();
boolean isSingleTask = request.isSingleTask();
boolean isSingleProcess = request.isSingleProcess();
List<String> appApiWhiteList = request.getAppApiWhiteList();
LocalFinAppletRequest.AppletStartConfig applet = request.getApplet();
Boolean valueOf = applet != null ? Boolean.valueOf(applet.getAppletUseCache()) : null;
boolean frameworkUseCache = request.getFrameworkUseCache();
LocalFinAppletRequest.AppletStartConfig applet2 = request.getApplet();
String appletPath = applet2 != null ? applet2.getAppletPath() : null;
String frameworkPath = request.getFrameworkPath();
LocalFinAppletRequest.AppletStartConfig applet3 = request.getApplet();
String appletPassword = applet3 != null ? applet3.getAppletPassword() : null;
FinAppClient finAppClient = FinAppClient.INSTANCE;
IExtensionApiManager extensionApiManager = finAppClient.getExtensionApiManager();
n.e(appId, "appId");
extensionApiManager.setLocalAppletApiWhiteList(appId, appApiWhiteList);
finAppClient.getExtensionWebApiManager().setLocalAppletApiWhiteList(appId, appApiWhiteList);
final FinAppManager$dispatchToLocal$1 finAppManager$dispatchToLocal$1 = new FinAppManager$dispatchToLocal$1(this, context, appId, sequence, appType2, isSingleTask, isSingleProcess, callback);
String apiServer = request.getApiServer();
IFinStore a = (apiServer == null || apiServer.length() == 0) ? getFinStores().a() : getFinStores().a(request.getApiServer());
if (a == null) {
finAppManager$dispatchToLocal$1.invoke(Error.ErrorCodeAppApiServerMismatched, R.string.fin_applet_applet_api_server_mismatched_message);
return;
}
if (!b.a.a(context, a.b(), this.finAppConfig.getInitConfigVerifyHandler(), this.finAppConfig.getFinkey())) {
finAppManager$dispatchToLocal$1.invoke(Error.ErrorCodeOfflineAppKeyInvalid, R.string.fin_applet_error_code_offline_app_key_invalid);
return;
}
if (checkBeforeStartApp(context, appId, Integer.valueOf(sequence), appType2, null, isSingleTask, isSingleProcess, callback, false) && checkStartAppInterval(context, null, appId, callback)) {
String sdkKey = this.finAppConfig.getSdkKey();
n.e(sdkKey, "finAppConfig.sdkKey");
String sdkSecret = this.finAppConfig.getSdkSecret();
n.e(sdkSecret, "finAppConfig.sdkSecret");
String apiPrefix = this.finAppConfig.getApiPrefix();
n.e(apiPrefix, "finAppConfig.apiPrefix");
String sdkFingerprint = this.finAppConfig.getSdkFingerprint();
n.e(sdkFingerprint, "finAppConfig.sdkFingerprint");
finAppInfo$finapplet_release.setFinStoreConfig(new FinStoreConfig(sdkKey, sdkSecret, FinStoreConfig.LOCAL_FIN_STORE_NAME, FinStoreConfig.LOCAL_FIN_STORE_NAME, apiPrefix, sdkFingerprint, FinAppConfig.ENCRYPTION_TYPE_MD5, false, false, 384, null));
final FinAppManager$dispatchToLocal$2 finAppManager$dispatchToLocal$2 = new FinAppManager$dispatchToLocal$2(this, callback, appId, context, finAppInfo$finapplet_release, appApiWhiteList, isSingleTask, isSingleProcess);
final String str = appletPath;
final FinAppManager$dispatchToLocal$3 finAppManager$dispatchToLocal$3 = new FinAppManager$dispatchToLocal$3(this, str, finAppManager$dispatchToLocal$1, frameworkPath, finAppInfo$finapplet_release, context, appId, appletPassword, valueOf, finAppManager$dispatchToLocal$2);
FinAppProcessPool finAppProcessPool = FinAppProcessPool.d;
String appId2 = finAppInfo$finapplet_release.getAppId();
n.e(appId2, "appInfo.appId");
if (finAppProcessPool.a(appId2) == null && (e = a1.e(context, finAppInfo$finapplet_release.getFinStoreConfig().getStoreName(), finAppInfo$finapplet_release.getFrameworkVersion(), finAppInfo$finapplet_release.getAppId())) != null) {
File a2 = a1.a(context, finAppInfo$finapplet_release.getFinStoreConfig().getStoreName(), finAppInfo$finapplet_release.getFrameworkVersion(), finAppInfo$finapplet_release.getAppId());
if (a2.exists() && !TextUtils.equals(finAppInfo$finapplet_release.getAppVersion(), e.getAppVersion())) {
n.e(a2, "miniAppDir");
r.b(a2.getPath());
}
}
if (!frameworkUseCache || !a1.q(context, FinStoreConfig.LOCAL_FIN_STORE_NAME_MD5, FrameworkInfo.FRAMEWORK_EMPTY_VERSION)) {
d.a(context, frameworkPath, new d.a() {
@Override
public final void onResult(boolean z10) {
if (!z10) {
finAppManager$dispatchToLocal$1.invoke(Error.ErrorCodeOfflineFrameworkUnZipError, R.string.fin_applet_offline_framework_unzip_failed);
} else if (str == null) {
finAppManager$dispatchToLocal$2.m213invoke();
} else {
finAppManager$dispatchToLocal$3.m214invoke();
}
}
});
} else if (str == null) {
finAppManager$dispatchToLocal$2.m213invoke();
} else {
finAppManager$dispatchToLocal$3.m214invoke();
}
}
}
private final void dispatchToLocalInterface(Context context, LocalInterfaceFinAppletRequest request, FinCallback<?> callback) {
String appId = request.getAppId();
boolean isSingleTask = request.isSingleTask();
boolean isSingleProcess = request.isSingleProcess();
String apiServer = request.getApiServer();
FinAppInfo finAppInfo$finapplet_release = request.toFinAppInfo$finapplet_release();
String appType = finAppInfo$finapplet_release.getAppType();
IFinStore a = apiServer.length() > 0 ? getFinStores().a(apiServer) : getFinStores().a();
if (a == null) {
n.e(appType, "appType");
doOnAppletStartFail(context, null, appId, -1, appType, apiServer, Error.ErrorCodeAppApiServerMismatched, R.string.fin_applet_applet_api_server_mismatched_message, isSingleTask, isSingleProcess, callback, false);
return;
}
if (!b.a.a(context, a.b(), this.finAppConfig.getInitConfigVerifyHandler(), this.finAppConfig.getFinkey())) {
n.e(appType, "appType");
doOnAppletStartFail(context, null, appId, -1, appType, "", Error.ErrorCodeOfflineAppKeyInvalid, R.string.fin_applet_error_code_offline_app_key_invalid, isSingleTask, isSingleProcess, callback, false);
return;
}
IFinStore iFinStore = a;
if (checkBeforeStartApp(context, appId, null, appType, iFinStore, isSingleTask, isSingleProcess, callback, false) && checkStartAppInterval(context, null, appId, callback)) {
this.appletCallbacks.put(appId, callback);
FinAppAIDLRouter finAppAIDLRouter = FinAppAIDLRouter.h;
finAppInfo$finapplet_release.setFinStoreConfig(iFinStore.b());
FinAppAIDLRouter.a(finAppAIDLRouter, context, finAppInfo$finapplet_release, (List) null, (Error) null, request.isSingleTask(), request.isSingleProcess(), callback, (ComponentCallback) null, 140, (Object) null);
}
}
public static void dispatchToLocalInterface$default(FinAppManager finAppManager, Context context, LocalInterfaceFinAppletRequest localInterfaceFinAppletRequest, FinCallback finCallback, int i, Object obj) {
if ((i & 4) != 0) {
finCallback = null;
}
finAppManager.dispatchToLocalInterface(context, localInterfaceFinAppletRequest, finCallback);
}
private final void dispatchToQrCode(final Context context, final QrCodeFinAppletRequest request, final FinCallback<?> callback, final ComponentCallback componentCallback) {
final String qrCode = request.getQrCode();
FinAppConfig finAppConfig = FinAppClient.INSTANCE.getFinAppConfig();
getFinAppletInfoDecryptor().a(context, qrCode, finAppConfig != null ? finAppConfig.getFinStoreConfigs() : null, new FinSimpleCallback<StartAppletDecryptRequest>() {
@Override
public void onError(int code, String error) {
FinCallback finCallback = callback;
if (finCallback != null) {
finCallback.onError(code, error);
}
}
@Override
public void onSuccess(StartAppletDecryptRequest result) {
n.j(result, "result");
FinAppManager finAppManager = FinAppManager.this;
Context context2 = context;
DecryptFinAppletRequest decryptFinAppletRequest = new DecryptFinAppletRequest(result.getInfo(), qrCode);
decryptFinAppletRequest.setProcessMode(request.getProcessMode());
decryptFinAppletRequest.setTaskMode(request.getTaskMode());
decryptFinAppletRequest.setSchemes(request.getSchemes());
decryptFinAppletRequest.setHideMiniProgramCloseButton(request.getHideMiniProgramCloseButton());
decryptFinAppletRequest.setHideMiniProgramMoreButton(request.getHideMiniProgramMoreButton());
decryptFinAppletRequest.setFrom(request.getFrom());
decryptFinAppletRequest.setAppTitle(request.getAppTitle());
decryptFinAppletRequest.setAppAvatar(request.getAppAvatar());
decryptFinAppletRequest.setReLaunchMode(request.getReLaunchMode());
decryptFinAppletRequest.setDisableTbs(request.getDisableTbs());
decryptFinAppletRequest.set_componentAllowLoadApplet(request.get_componentAllowLoadApplet());
if (request.getThemeStyle() != null) {
Integer themeStyle = request.getThemeStyle();
if (themeStyle == null) {
n.t();
}
decryptFinAppletRequest.setThemeStyle(themeStyle.intValue());
}
finAppManager.dispatchToDecrypt(context2, decryptFinAppletRequest, callback, componentCallback);
}
});
}
public static void dispatchToQrCode$default(FinAppManager finAppManager, Context context, QrCodeFinAppletRequest qrCodeFinAppletRequest, FinCallback finCallback, ComponentCallback componentCallback, int i, Object obj) {
if ((i & 8) != 0) {
componentCallback = null;
}
finAppManager.dispatchToQrCode(context, qrCodeFinAppletRequest, finCallback, componentCallback);
}
public final void dispatchToRemote(Context context, RemoteFinAppletRequest request, FinCallback<?> callback, ComponentCallback componentCallback) {
boolean z10 = componentCallback != null;
String appId = request.getAppId();
int intValue = q.a((int) request.getSequence(), -1).intValue();
boolean isSingleTask = request.isSingleTask();
boolean isSingleProcess = request.isSingleProcess();
String apiServer = request.getApiServer();
FinAppInfo finAppInfo$finapplet_release = request.toFinAppInfo$finapplet_release();
String appType = finAppInfo$finapplet_release.getAppType();
IFinStore finStore = getFinStore(request);
if (finStore == null) {
int intValue2 = q.a((int) Integer.valueOf(intValue), -1).intValue();
n.e(appType, "appType");
doOnAppletStartFail(context, null, appId, intValue2, appType, apiServer, Error.ErrorCodeAppApiServerMismatched, R.string.fin_applet_applet_api_server_mismatched_message, isSingleTask, isSingleProcess, callback, z10);
} else if (checkBeforeStartApp(context, appId, Integer.valueOf(intValue), appType, finStore, isSingleTask, isSingleProcess, callback, z10) && checkStartAppInterval(context, null, appId, callback)) {
this.appletCallbacks.put(appId, callback);
n.e(appType, "appType");
finStore.a(context, appId, appId, intValue, appType, R.string.fin_applet_app_id_is_invalid, new FinAppManager$dispatchToRemote$1(context, finAppInfo$finapplet_release, finStore, request, callback, componentCallback));
}
}
public static void dispatchToRemote$default(FinAppManager finAppManager, Context context, RemoteFinAppletRequest remoteFinAppletRequest, FinCallback finCallback, ComponentCallback componentCallback, int i, Object obj) {
if ((i & 4) != 0) {
finCallback = null;
}
if ((i & 8) != 0) {
componentCallback = null;
}
finAppManager.dispatchToRemote(context, remoteFinAppletRequest, finCallback, componentCallback);
}
private final void dispatchToRemoteWithPreload(Context context, RemoteFinAppletRequest request, FinCallback<?> callback, ComponentCallback componentCallback) {
String appId = request.getAppId();
Integer sequence = request.getSequence();
String str = q.a(sequence, 0) ? "release" : "review";
boolean isSingleTask = request.isSingleTask();
boolean isSingleProcess = request.isSingleProcess();
String apiServer = request.getApiServer();
if (apiServer.length() == 0) {
List<FinStoreConfig> finStoreConfigs = this.finAppConfig.getFinStoreConfigs();
n.e(finStoreConfigs, "finAppConfig.finStoreConfigs");
FinStoreConfig finStoreConfig = (FinStoreConfig) x.m0(finStoreConfigs);
if (finStoreConfig == null || (apiServer = finStoreConfig.getApiServer()) == null) {
apiServer = "";
}
}
String str2 = apiServer;
IFinStore finStore = getFinStore(request);
if (finStore == null) {
doOnAppletStartFail(context, null, appId, q.a((int) sequence, -1).intValue(), str, str2, Error.ErrorCodeAppApiServerMismatched, R.string.fin_applet_applet_api_server_mismatched_message, isSingleTask, isSingleProcess, callback, componentCallback != null);
return;
}
String offlineLibraryPath = request.getOfflineLibraryPath();
String offlineAppletPath = request.getOfflineAppletPath();
if (offlineLibraryPath == null) {
n.t();
}
finStore.a(context, str2, offlineLibraryPath, new FinAppManager$dispatchToRemoteWithPreload$1(this, finStore, context, appId, offlineAppletPath, request, callback, componentCallback));
}
private final void dispatchToTrial(Context context, DecryptFinAppletRequest decryptFinAppletRequest, StartAppletDecryptInfo startAppletDecryptInfo, IFinStore iFinStore, FinCallback<?> finCallback, ComponentCallback componentCallback) {
String g = s.g(startAppletDecryptInfo.getAppId());
FinAppInfo finAppInfo$finapplet_release = decryptFinAppletRequest.toFinAppInfo$finapplet_release();
finAppInfo$finapplet_release.setFinStoreConfig(iFinStore.b());
String g2 = s.g(startAppletDecryptInfo.getCodeId());
int intValue = q.a((int) startAppletDecryptInfo.getSequence(), -1).intValue();
String type = startAppletDecryptInfo.getType();
if (type == null) {
n.t();
}
iFinStore.a(context, g, g2, intValue, type, R.string.fin_applet_code_id_is_invalid, new FinAppManager$dispatchToTrial$1(this, componentCallback, context, finAppInfo$finapplet_release, decryptFinAppletRequest, finCallback, g, iFinStore, g2, startAppletDecryptInfo));
}
public static void dispatchToTrial$default(FinAppManager finAppManager, Context context, DecryptFinAppletRequest decryptFinAppletRequest, StartAppletDecryptInfo startAppletDecryptInfo, IFinStore iFinStore, FinCallback finCallback, ComponentCallback componentCallback, int i, Object obj) {
if ((i & 16) != 0) {
finCallback = null;
}
if ((i & 32) != 0) {
componentCallback = null;
}
finAppManager.dispatchToTrial(context, decryptFinAppletRequest, startAppletDecryptInfo, iFinStore, finCallback, componentCallback);
}
private final void dispatchToTrialFromManager(Context context, DecryptFinAppletRequest decryptFinAppletRequest, StartAppletDecryptInfo startAppletDecryptInfo, IFinStore iFinStore, FinCallback<?> finCallback, ComponentCallback componentCallback) {
String g = s.g(startAppletDecryptInfo.getAppId());
String g2 = s.g(startAppletDecryptInfo.getCodeId());
int intValue = q.a((int) startAppletDecryptInfo.getSequence(), -1).intValue();
String type = startAppletDecryptInfo.getType();
if (type == null) {
n.t();
}
iFinStore.a(context, g, g2, intValue, type, R.string.fin_applet_code_id_is_invalid, new FinAppManager$dispatchToTrialFromManager$1(context, decryptFinAppletRequest, iFinStore, finCallback, componentCallback));
}
public static void dispatchToTrialFromManager$default(FinAppManager finAppManager, Context context, DecryptFinAppletRequest decryptFinAppletRequest, StartAppletDecryptInfo startAppletDecryptInfo, IFinStore iFinStore, FinCallback finCallback, ComponentCallback componentCallback, int i, Object obj) {
if ((i & 16) != 0) {
finCallback = null;
}
if ((i & 32) != 0) {
componentCallback = null;
}
finAppManager.dispatchToTrialFromManager(context, decryptFinAppletRequest, startAppletDecryptInfo, iFinStore, finCallback, componentCallback);
}
public final void doOnAppletStartFail(Context context, FinStoreConfig finStoreConfig, String appletId, int appletSequence, String appType, String apiUrl, int errCode, @StringRes int desc, boolean isSingleTask, boolean isSingleProcess, FinCallback<?> callback, boolean isComponent) {
int i;
String str;
String b = s.b(ContextKt.getLocalResString(context, desc, new Object[0]), this.finAppConfig.getAppletText());
if (callback != null) {
callback.onError(errCode, b);
}
if (isComponent) {
i = appletSequence;
str = appType;
} else {
FinAppInfo finAppInfo = new FinAppInfo();
finAppInfo.setAppId(t.y(appletId) ? "undefined" : appletId);
str = appType;
finAppInfo.setAppType(str);
i = appletSequence;
finAppInfo.setSequence(i);
finAppInfo.setFinStoreConfig(finStoreConfig != null ? finStoreConfig : new FinStoreConfig("", "", apiUrl, apiUrl, "", "", "", false, false, 256, null));
FinAppAIDLRouter.a(FinAppAIDLRouter.h, context, finAppInfo, (List) null, new Error(errCode, "", b), isSingleTask, isSingleProcess, callback, (ComponentCallback) null, 132, (Object) null);
}
recordAppletStartFailEvent(appletId, q.a((int) Integer.valueOf(i), -1).intValue(), str, apiUrl, b);
}
private final void doOnTrailAppletStartFail(Context context, String appId, int errCode, @StringRes int titleRes, @StringRes int messageRes, FinCallback<?> callback) {
String string = context.getString(titleRes);
n.e(string, "context.getString(titleRes)");
String b = s.b(string, this.finAppConfig.getAppletText());
String string2 = context.getString(messageRes);
n.e(string2, "context.getString(messageRes)");
String b2 = s.b(string2, this.finAppConfig.getAppletText());
if (callback != null) {
callback.onError(errCode, b2);
}
IntentsKt.a(context, appId, new Error(errCode, b, b2));
}
private final a getAppletExtInfoStore() {
return getStoreManager().a();
}
public final com.finogeeks.lib.applet.d.filestore.b getAppletStore() {
return getStoreManager().b();
}
private final Comparator<FinApplet> getFinAppletComparator() {
h hVar = this.finAppletComparator;
l lVar = $$delegatedProperties[2];
return (Comparator) hVar.getValue();
}
private final FinAppletInfoDecryptor getFinAppletInfoDecryptor() {
h hVar = this.finAppletInfoDecryptor;
l lVar = $$delegatedProperties[3];
return (FinAppletInfoDecryptor) hVar.getValue();
}
private final IFinStore getFinStore(RemoteFinAppletRequest remoteFinAppletRequest) {
return remoteFinAppletRequest.getApiServer().length() > 0 ? getFinStores().a(remoteFinAppletRequest.getApiServer()) : getFinStores().a();
}
public final FinStores getFinStores() {
h hVar = this.finStores;
l lVar = $$delegatedProperties[0];
return (FinStores) hVar.getValue();
}
private final com.finogeeks.lib.applet.d.filestore.h getPrivacySettingStore() {
return getStoreManager().c();
}
public final StoreManager getStoreManager() {
return StoreManager.n.a(this.application, false);
}
private final com.finogeeks.lib.applet.d.filestore.n getUsedAppletStore() {
h hVar = this.usedAppletStore;
l lVar = $$delegatedProperties[1];
return (com.finogeeks.lib.applet.d.filestore.n) hVar.getValue();
}
private final void recordAppletStartFailEvent(String appletId, int appletSequence, String appType, String apiUrl, String desc) {
if (n.d(appType, "release")) {
CommonKt.getEventRecorder().a(appletId, "", appletSequence, false, "", "", apiUrl, desc, System.currentTimeMillis());
}
}
public static void startApplet$default(FinAppManager finAppManager, Context context, IFinAppletRequest iFinAppletRequest, FinCallback finCallback, ComponentCallback componentCallback, int i, Object obj) {
if ((i & 4) != 0) {
finCallback = null;
}
if ((i & 8) != 0) {
componentCallback = null;
}
finAppManager.startApplet(context, iFinAppletRequest, finCallback, componentCallback);
}
public static void startAppletInAssets$default(FinAppManager finAppManager, Context context, FinAppInfo finAppInfo, boolean z10, boolean z11, FinCallback finCallback, int i, Object obj) {
if ((i & 4) != 0) {
z10 = false;
}
if ((i & 8) != 0) {
z11 = false;
}
finAppManager.startAppletInAssets(context, finAppInfo, z10, z11, finCallback);
}
public static void startTrialAppDirectly$default(FinAppManager finAppManager, Context context, FinAppInfo finAppInfo, boolean z10, boolean z11, FinCallback finCallback, int i, Object obj) {
if ((i & 16) != 0) {
finCallback = null;
}
finAppManager.startTrialAppDirectly(context, finAppInfo, z10, z11, finCallback);
}
public final void checkLicenseConfig$finapplet_release(String str, boolean z10, final f fVar) {
n.j(str, "apiServer");
n.j(fVar, "callback");
if (z10) {
return;
}
final CheckLicenseResult checkLicenseResult = new CheckLicenseResult();
IFinStore a = getFinStores().a(str);
if (a == null) {
return;
}
final LicenseConfigManager a2 = a.a();
a2.a(new LicenseConfigManager.b() {
@Override
public void onFinished(boolean localLicenseExists, boolean isRemote) {
FinStores finStores;
if (isRemote && !localLicenseExists) {
checkLicenseResult.setLicenseRequestSuccess(false);
fVar.onSuccess(CommonKt.getGSon().toJson(checkLicenseResult));
return;
}
checkLicenseResult.setApiUrlValid(a2.e());
if (a2.a() && !a2.d()) {
checkLicenseResult.setAndroidDeviceEnable(false);
}
if (a2.a() && !a2.f()) {
checkLicenseResult.setDeviceAllowed(false);
}
CheckLicenseResult checkLicenseResult2 = checkLicenseResult;
finStores = FinAppManager.this.getFinStores();
checkLicenseResult2.setAppStoreNumValid(finStores.c());
fVar.onSuccess(CommonKt.getGSon().toJson(checkLicenseResult));
}
});
}
public final void checkLicenseConfigWhenInit() {
Iterator<T> it = getFinStores().b().iterator();
while (it.hasNext()) {
LicenseConfigManager.a(((IFinStore) it.next()).a(), null, 1, null);
}
}
public final void checkPrivateApmReportWhenInit() {
Iterator<T> it = getFinStores().b().iterator();
while (it.hasNext()) {
new PrivateReporter(this.application, this.finAppConfig, (IFinStore) it.next()).b();
}
}
public final void clearApplets() {
new com.finogeeks.lib.applet.rest.cookiejar.persistence.b(this.application).a();
List<FinApplet> e = getAppletStore().e();
if (e == null) {
e = p.j();
}
ArrayList arrayList = new ArrayList();
Iterator<T> it = e.iterator();
while (it.hasNext()) {
String id2 = ((FinApplet) it.next()).getId();
if (id2 != null) {
arrayList.add(id2);
}
}
deleteAppletSharedPrefs(x.a0(arrayList));
r.b(a1.c(this.application));
getAppletStore().a();
getPrivacySettingStore().a();
getUsedAppletStore().f();
getAppletExtInfoStore().a();
}
public final void downloadApplets(Context context, String apiServer, List<String> appIds, FinSimpleCallback<List<AppletDownLoadInfo>> callback) {
n.j(context, "context");
n.j(apiServer, "apiServer");
n.j(appIds, "appIds");
n.j(callback, "callback");
downloadApplets(context, apiServer, appIds, true, callback);
}
public final void downloadApplets(Context context, String apiServer, List<String> appIds, boolean isBatchDownloadApplets, FinSimpleCallback<List<AppletDownLoadInfo>> callback) {
n.j(context, "context");
n.j(apiServer, "apiServer");
n.j(appIds, "appIds");
n.j(callback, "callback");
IFinStore a = getFinStores().a(apiServer);
if (a == null) {
callback.onError(Error.ErrorCodeAppApiServerMismatched, s.a(ContextKt.getLocalResString(context, R.string.fin_applet_applet_api_server_mismatched_message, new Object[0]), null, 1, null));
return;
}
FrameworkUtils frameworkUtils = FrameworkUtils.a;
String storeName = a.b().getStoreName();
n.e(storeName, "finStore.finStoreConfig.storeName");
if (frameworkUtils.a(context, storeName) != null) {
a.a(context, appIds, isBatchDownloadApplets, callback);
} else {
com.finogeeks.lib.applet.modules.ext.d.a(this, null, new FinAppManager$downloadApplets$1(a, context, appIds, isBatchDownloadApplets, callback), 1, null);
}
}
public final String generateFinFilePath(String filePath, FinFilePathType pathType) {
n.j(filePath, ImageEditeActivity.EXTRA_FILE_PATH);
n.j(pathType, "pathType");
if (TextUtils.isEmpty(filePath)) {
return null;
}
String a = a0.a(filePath);
String b = s.b(filePath);
int i = WhenMappings.$EnumSwitchMapping$0[pathType.ordinal()];
if (i == 1) {
return "finfile://usr/" + filePath;
}
if (i == 2) {
String str = "finfile://tmp_" + a;
if (b.length() <= 0) {
return str;
}
return str + '.' + b;
}
if (i != 3) {
return filePath;
}
String str2 = "finfile://store_" + a;
if (!s.c((CharSequence) b)) {
return str2;
}
return str2 + '.' + b;
}
public final FinAppInfo getAppInfo(String appId, FinAppletType appType, boolean forceReload) {
n.j(appId, "appId");
n.j(appType, "appType");
FinApplet a = getAppletStore().a(appId, appType, forceReload);
Object obj = null;
if (a == null) {
return null;
}
FinAppInfo finAppInfo = a.toFinAppInfo();
n.e(finAppInfo, "finAppInfo");
List<FinStoreConfig> finStoreConfigs = this.finAppConfig.getFinStoreConfigs();
n.e(finStoreConfigs, "finAppConfig.finStoreConfigs");
Iterator<T> it = finStoreConfigs.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
Object next = it.next();
if (n.d(((FinStoreConfig) next).getApiServer(), a.getApiUrl())) {
obj = next;
break;
}
}
finAppInfo.setFinStoreConfig((FinStoreConfig) obj);
return finAppInfo;
}
public final FinApplet getApplet(String appId, FinAppletType appType) {
n.j(appId, "appId");
n.j(appType, "appType");
return getAppletStore().a(appId, appType, true);
}
public final String getAppletSourcePath(Context context, String appId) {
String finStoreName;
String frameworkVersion;
n.j(context, "context");
n.j(appId, "appId");
FinApplet a = getAppletStore().a(appId, FinAppletType.RELEASE);
FinAppProcess a2 = FinAppProcessPool.d.a(appId);
String str = null;
if (a == null && a2 == null) {
return null;
}
if (a == null || (finStoreName = a.getFinStoreName()) == null) {
finStoreName = a2 != null ? a2.getFinStoreName() : null;
}
String g = s.g(finStoreName);
if (a != null && (frameworkVersion = a.getFrameworkVersion()) != null) {
str = frameworkVersion;
} else if (a2 != null) {
str = a2.getFrameworkVersion();
}
String g2 = s.g(str);
StringBuilder sb = new StringBuilder();
File b = a1.b(context, g, g2, appId);
n.e(b, "StorageUtil.getMiniAppSo… frameworkVersion, appId)");
sb.append(b.getAbsolutePath());
sb.append(File.separator);
return sb.toString();
}
public final String getAppletTempPath(Context context, String appId) {
n.j(context, "context");
n.j(appId, "appId");
return getAppletTempPath(context, appId, FinAppletType.RELEASE);
}
public final String getAppletTempPath(Context context, String appId, FinAppletType finAppletType) {
String finStoreName;
String frameworkVersion;
n.j(context, "context");
n.j(appId, "appId");
n.j(finAppletType, "finAppletType");
FinApplet a = getAppletStore().a(appId, finAppletType);
FinAppProcess a2 = FinAppProcessPool.d.a(appId);
String str = null;
if (a == null && a2 == null) {
return null;
}
if (a == null || (finStoreName = a.getFinStoreName()) == null) {
finStoreName = a2 != null ? a2.getFinStoreName() : null;
}
String g = s.g(finStoreName);
if (a != null && (frameworkVersion = a.getFrameworkVersion()) != null) {
str = frameworkVersion;
} else if (a2 != null) {
str = a2.getFrameworkVersion();
}
return new AppletTempDirProvider(context, g, s.g(str), appId).getDirForWrite().getAbsolutePath() + File.separator;
}
public final String getAppletUserDataPath(Context context, String appId) {
n.j(context, "context");
n.j(appId, "appId");
return getAppletUserDataPath(context, appId, FinAppletType.RELEASE);
}
public final String getAppletUserDataPath(Context context, String appId, FinAppletType appletType) {
String finStoreName;
String frameworkVersion;
n.j(context, "context");
n.j(appId, "appId");
n.j(appletType, "appletType");
FinApplet a = getAppletStore().a(appId, appletType);
FinAppProcess a2 = FinAppProcessPool.d.a(appId);
String str = null;
if (a == null && a2 == null) {
return null;
}
if (a == null || (finStoreName = a.getFinStoreName()) == null) {
finStoreName = a2 != null ? a2.getFinStoreName() : null;
}
String g = s.g(finStoreName);
if (a != null && (frameworkVersion = a.getFrameworkVersion()) != null) {
str = frameworkVersion;
} else if (a2 != null) {
str = a2.getFrameworkVersion();
}
return new AppletUsrDirProvider(context, g, s.g(str), appId).getDirForWrite().getAbsolutePath() + File.separator;
}
public final void getBindApplets(final FetchBindAppletRequest fetchBindAppletRequest, final FinCallback<FetchBindAppletResponse> callback) {
n.j(fetchBindAppletRequest, "fetchBindAppletRequest");
n.j(callback, "callback");
IFinStore a = getFinStores().a(fetchBindAppletRequest.getApiServer());
if (a == null) {
callback.onError(Error.ErrorCodeAppApiServerMismatched, s.b(ContextKt.getLocalResString(this.application, R.string.fin_applet_applet_api_server_mismatched_message, new Object[0]), this.finAppConfig.getAppletText()));
return;
}
AppletApi a2 = com.finogeeks.lib.applet.rest.api.b.a();
String json = CommonKt.getGSon().toJson(a.b());
n.e(json, "gSon.toJson(finStore.finStoreConfig)");
AppletApi.a.a(a2, json, fetchBindAppletRequest.getAppClass(), fetchBindAppletRequest.getAppStatus().ordinal(), fetchBindAppletRequest.getContainForbidden(), fetchBindAppletRequest.getPageNo(), fetchBindAppletRequest.getPageSize(), 0L, null, null, 448, null).a(new com.finogeeks.lib.applet.f.e.d<ApiResponse<FetchBindAppletResponse>>() {
@Override
public void onFailure(com.finogeeks.lib.applet.f.e.b<ApiResponse<FetchBindAppletResponse>> bVar, Throwable th2) {
Application application;
n.j(bVar, "call");
n.j(th2, "t");
FinCallback finCallback = callback;
application = FinAppManager.this.application;
finCallback.onError(Error.ErrorCodeNetworkError, ContextKt.getLocalResString(application, R.string.fin_applet_error_code_net_work_error, new Object[0]));
}
@Override
public void onResponse(com.finogeeks.lib.applet.f.e.b<ApiResponse<FetchBindAppletResponse>> bVar, com.finogeeks.lib.applet.f.e.l<ApiResponse<FetchBindAppletResponse>> lVar) {
Application application;
Application application2;
List<FetchBindAppletInfo> items;
n.j(bVar, "call");
n.j(lVar, "response");
if (!lVar.d()) {
ApiError convert = ApiError.INSTANCE.convert(lVar);
FinCallback finCallback = callback;
application = FinAppManager.this.application;
int errorLocalCode = convert.getErrorLocalCode(application);
application2 = FinAppManager.this.application;
finCallback.onError(errorLocalCode, convert.getErrorMsg(application2));
return;
}
ApiResponse<FetchBindAppletResponse> a3 = lVar.a();
FetchBindAppletResponse data = a3 != null ? a3.getData() : null;
if (data != null && (items = data.getItems()) != null) {
Iterator<T> it = items.iterator();
while (it.hasNext()) {
((FetchBindAppletInfo) it.next()).setApiServer$finapplet_release(fetchBindAppletRequest.getApiServer());
}
}
callback.onSuccess(data);
}
});
}
public final void getFavoriteApplets(FavoriteAppletListRequest favoriteAppletListRequest, FinCallback<FavoriteAppletListResp> callback) {
n.j(favoriteAppletListRequest, "favoriteAppletListRequest");
n.j(callback, "callback");
IFinStore a = getFinStores().a(favoriteAppletListRequest.getApiServer());
if (a == null) {
callback.onError(Error.ErrorCodeAppApiServerMismatched, s.b(ContextKt.getLocalResString(this.application, R.string.fin_applet_applet_api_server_mismatched_message, new Object[0]), this.finAppConfig.getAppletText()));
return;
}
String userId = this.finAppConfig.getUserId();
n.e(userId, "currentUserId");
if (userId.length() == 0) {
callback.onError(Error.ErrorCodeInvalidParam, ContextKt.getLocalResString(this.application, R.string.fin_applet_error_code_invalid_param, "userId"));
return;
}
FinStoreConfig b = a.b();
String str = "";
if (b.getEncryptUserId()) {
String encodeContentBySM = FinClipSDKCoreUtil.b.a().encodeContentBySM(userId);
n.e(encodeContentBySM, "FinClipSDKCoreUtil.getFi…ontentBySM(currentUserId)");
userId = "";
str = encodeContentBySM;
}
AppletApi a2 = com.finogeeks.lib.applet.rest.api.b.a();
String json = CommonKt.getGSon().toJson(b);
n.e(json, "gSon.toJson(finStoreConfig)");
AppletApi.a.a(a2, json, userId, str, favoriteAppletListRequest.getPageNo(), favoriteAppletListRequest.getPageSize(), 0L, (String) null, (String) null, 224, (Object) null).a(new FinAppManager$getFavoriteApplets$1(this, callback, b, userId, str, favoriteAppletListRequest));
}
public final String getFinFileAbsolutePath(Context context, String appId, String finFilePath) {
n.j(context, "context");
n.j(appId, "appId");
n.j(finFilePath, "finFilePath");
return getFinFileAbsolutePath(context, appId, finFilePath, FinAppletType.RELEASE);
}
public final String getFinFileAbsolutePath(Context context, String appId, String finFilePath, FinAppletType finAppletType) {
String substring;
String finStoreName;
String frameworkVersion;
n.j(context, "context");
n.j(appId, "appId");
n.j(finFilePath, "finFilePath");
n.j(finAppletType, "finAppletType");
FLog.d$default(TAG, "getFinFileAbsolutePath finFilePath:" + finFilePath, null, 4, null);
FinApplet a = getAppletStore().a(appId, finAppletType);
FinAppProcess a2 = FinAppProcessPool.d.a(appId);
if (a == null && a2 == null) {
return null;
}
if (!t.L(finFilePath, "finfile://usr/", false, 2, (Object) null) && !t.L(finFilePath, "finfile://tmp_", false, 2, (Object) null) && !t.L(finFilePath, "finfile://store_", false, 2, (Object) null)) {
FLog.d$default(TAG, "getFinFileAbsolutePath finFilePath invalid", null, 4, null);
return null;
}
if (t.L(finFilePath, "finfile://usr/", false, 2, (Object) null)) {
substring = finFilePath.substring(14);
n.e(substring, "(this as java.lang.String).substring(startIndex)");
} else {
substring = finFilePath.substring(10);
n.e(substring, "(this as java.lang.String).substring(startIndex)");
}
FLog.d$default(TAG, "getFinFileAbsolutePath subName:" + substring, null, 4, null);
if (TextUtils.isEmpty(substring)) {
return null;
}
if (a == null || (finStoreName = a.getFinStoreName()) == null) {
finStoreName = a2 != null ? a2.getFinStoreName() : null;
}
String g = s.g(finStoreName);
if (a == null || (frameworkVersion = a.getFrameworkVersion()) == null) {
frameworkVersion = a2 != null ? a2.getFrameworkVersion() : null;
}
String g2 = s.g(frameworkVersion);
String absolutePath = (t.L(finFilePath, "finfile://usr/", false, 2, (Object) null) ? new AppletUsrDirProvider(context, g, g2, appId) : t.L(finFilePath, "finfile://tmp_", false, 2, (Object) null) ? new AppletTempDirProvider(context, g, g2, appId) : new AppletStoreDirProvider(context, g, g2, appId)).getFileCompat(substring).getAbsolutePath();
if (!TextUtils.isEmpty(absolutePath)) {
return absolutePath;
}
FLog.d$default(TAG, "getFinFileAbsolutePath filePath is empty", null, 4, null);
return null;
}
public final String getFinFileAbsolutePathCanNoExist(Context context, String appId, String finFilePath) {
String substring;
String finStoreName;
String frameworkVersion;
String str;
n.j(context, "context");
n.j(appId, "appId");
n.j(finFilePath, "finFilePath");
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist finFilePath:" + finFilePath, null, 4, null);
FinApplet a = getAppletStore().a(appId, FinAppletType.RELEASE);
FinAppProcess a2 = FinAppProcessPool.d.a(appId);
if (a == null && a2 == null) {
return null;
}
if (!t.L(finFilePath, "finfile://usr/", false, 2, (Object) null) && !t.L(finFilePath, "finfile://tmp_", false, 2, (Object) null) && !t.L(finFilePath, "finfile://store_", false, 2, (Object) null)) {
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist finFilePath invalid", null, 4, null);
return null;
}
if (t.L(finFilePath, "finfile://usr/", false, 2, (Object) null)) {
substring = finFilePath.substring(14);
n.e(substring, "(this as java.lang.String).substring(startIndex)");
} else {
substring = finFilePath.substring(10);
n.e(substring, "(this as java.lang.String).substring(startIndex)");
}
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist subName:" + substring, null, 4, null);
if (TextUtils.isEmpty(substring)) {
return null;
}
String c = s.c(finFilePath);
if (c == null || c.length() == 0) {
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist fileName is empty", null, 4, null);
return null;
}
if (a == null || (finStoreName = a.getFinStoreName()) == null) {
finStoreName = a2 != null ? a2.getFinStoreName() : null;
}
String g = s.g(finStoreName);
if (a == null || (frameworkVersion = a.getFrameworkVersion()) == null) {
frameworkVersion = a2 != null ? a2.getFrameworkVersion() : null;
}
String g2 = s.g(frameworkVersion);
if (t.L(finFilePath, "finfile://usr/", false, 2, (Object) null)) {
AppletUsrDirProvider appletUsrDirProvider = new AppletUsrDirProvider(context, g, g2, appId);
StringBuilder sb = new StringBuilder();
String parent = appletUsrDirProvider.getFileCompat(substring).getParent();
if (parent == null) {
n.t();
}
sb.append(parent);
sb.append(File.separator);
str = sb.toString();
File file = new File(str);
if (!file.exists()) {
if (file.mkdirs()) {
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist create dir success", null, 4, null);
} else {
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist create dir fail", null, 4, null);
}
}
} else if (t.L(finFilePath, "finfile://tmp_", false, 2, (Object) null)) {
AppletTempDirProvider appletTempDirProvider = new AppletTempDirProvider(context, g, g2, appId);
StringBuilder sb2 = new StringBuilder();
String parent2 = appletTempDirProvider.getFileCompat(substring).getParent();
if (parent2 == null) {
n.t();
}
sb2.append(parent2);
sb2.append(File.separator);
str = sb2.toString();
} else if (t.L(finFilePath, "finfile://store_", false, 2, (Object) null)) {
AppletStoreDirProvider appletStoreDirProvider = new AppletStoreDirProvider(context, g, g2, appId);
StringBuilder sb3 = new StringBuilder();
String parent3 = appletStoreDirProvider.getFileCompat(substring).getParent();
if (parent3 == null) {
n.t();
}
sb3.append(parent3);
sb3.append(File.separator);
str = sb3.toString();
} else {
str = null;
}
if (TextUtils.isEmpty(str)) {
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist resDir is empty", null, 4, null);
return null;
}
String q = n.q(str, c);
FLog.d$default(TAG, "getFinFileAbsolutePathCanNoExist return " + q, null, 4, null);
return q;
}
public final FinApplet getUsedApplet(String appId) {
n.j(appId, "appId");
FinApplet applet = getApplet(appId, FinAppletType.RELEASE);
if (applet == null || applet.getNumberUsed() <= 0) {
return null;
}
return applet;
}
public final List<FinApplet> getUsedApplets() {
List<UsedApplet> g = getUsedAppletStore().g();
if (g != null) {
ArrayList arrayList = new ArrayList();
for (Object obj : g) {
if (n.d(((UsedApplet) obj).getUserId(), this.finAppConfig.getUserId())) {
arrayList.add(obj);
}
}
ArrayList arrayList2 = new ArrayList();
for (Object obj2 : arrayList) {
if (((UsedApplet) obj2).getNumberUsed() > 0) {
arrayList2.add(obj2);
}
}
ArrayList arrayList3 = new ArrayList();
Iterator it = arrayList2.iterator();
while (it.hasNext()) {
FinApplet a = getAppletStore().a(((UsedApplet) it.next()).getId(), FinAppletType.RELEASE);
if (a != null) {
arrayList3.add(a);
}
}
List<FinApplet> Q0 = x.Q0(arrayList3, getFinAppletComparator());
if (Q0 != null) {
return Q0;
}
}
return p.j();
}
public final void intervalCheckForUpdates() {
Iterator<T> it = getFinStores().b().iterator();
while (it.hasNext()) {
((IFinStore) it.next()).f();
}
}
public final boolean isUsedApplet(String appId) {
n.j(appId, "appId");
FinApplet a = getAppletStore().a(appId, FinAppletType.RELEASE);
return (a != null ? a.getNumberUsed() : 0) > 0;
}
public final void onAppletInitComplete(String appId) {
n.j(appId, "appId");
FinCallback<?> remove = this.appletCallbacks.remove(appId);
if (remove != null) {
remove.onSuccess(null);
}
}
public final void onAppletLoadFail(String appId, int errCode, String errMsg) {
n.j(appId, "appId");
n.j(errMsg, "errMsg");
FinCallback<?> remove = this.appletCallbacks.remove(appId);
if (remove != null) {
remove.onError(errCode, errMsg);
}
}
public final void parseAppletInfoFromWXQrCode(String qrCode, String apiServer, final FinSimpleCallback<ParsedAppletInfo> callback) {
n.j(qrCode, "qrCode");
n.j(apiServer, "apiServer");
n.j(callback, "callback");
IFinStore a = getFinStores().a(apiServer);
if (a == null) {
callback.onError(Error.ErrorCodeAppApiServerMismatched, s.b(ContextKt.getLocalResString(this.application, R.string.fin_applet_applet_api_server_mismatched_message, new Object[0]), this.finAppConfig.getAppletText()));
return;
}
AppletApi a2 = com.finogeeks.lib.applet.rest.api.b.a();
String json = CommonKt.getGSon().toJson(a.b());
n.e(json, "gSon.toJson(finStore.finStoreConfig)");
AppletApi.a.e(a2, json, qrCode, 0L, null, null, 28, null).a(new com.finogeeks.lib.applet.f.e.d<ApiResponse<ParsedAppletInfo>>() {
@Override
public void onFailure(com.finogeeks.lib.applet.f.e.b<ApiResponse<ParsedAppletInfo>> bVar, Throwable th2) {
Application application;
n.j(bVar, "call");
n.j(th2, "t");
FinSimpleCallback finSimpleCallback = callback;
application = FinAppManager.this.application;
finSimpleCallback.onError(Error.ErrorCodeNetworkError, ContextKt.getLocalResString(application, R.string.fin_applet_error_code_net_work_error, new Object[0]));
}
@Override
public void onResponse(com.finogeeks.lib.applet.f.e.b<ApiResponse<ParsedAppletInfo>> bVar, com.finogeeks.lib.applet.f.e.l<ApiResponse<ParsedAppletInfo>> lVar) {
Application application;
Application application2;
n.j(bVar, "call");
n.j(lVar, "response");
if (lVar.d()) {
FinSimpleCallback finSimpleCallback = callback;
ApiResponse<ParsedAppletInfo> a3 = lVar.a();
finSimpleCallback.onSuccess(a3 != null ? a3.getData() : null);
} else {
ApiError convert = ApiError.INSTANCE.convert(lVar);
FinSimpleCallback finSimpleCallback2 = callback;
application = FinAppManager.this.application;
int errorLocalCode = convert.getErrorLocalCode(application);
application2 = FinAppManager.this.application;
finSimpleCallback2.onError(errorLocalCode, convert.getErrorMsg(application2));
}
}
});
}
public final void removeUsedApplet(String appId) {
n.j(appId, "appId");
List<FinApplet> e = getAppletStore().e();
if (e != null) {
ArrayList<FinApplet> arrayList = new ArrayList();
for (Object obj : e) {
if (n.d(((FinApplet) obj).getId(), appId)) {
arrayList.add(obj);
}
}
for (FinApplet finApplet : arrayList) {
String g = s.g(finApplet.getFinStoreName());
File l = a1.l(this.application, g, appId);
n.e(l, "appletDirWithoutFramework");
r.b(l.getAbsolutePath());
File b = a1.b(this.application, g, appId);
n.e(b, "appArchive");
r.b(b.getAbsolutePath());
File a = a1.a(this.application, g, s.g(finApplet.getFrameworkVersion()), appId);
n.e(a, "StorageUtil.getMiniAppDi… appId\n )");
r.b(a.getAbsolutePath());
StoreManager.a aVar = StoreManager.n;
Application application = this.application;
String apiUrl = finApplet.getApiUrl();
n.e(apiUrl, "applet.apiUrl");
aVar.a(application, "backgroundfetch", apiUrl, appId);
Application application2 = this.application;
String apiUrl2 = finApplet.getApiUrl();
n.e(apiUrl2, "applet.apiUrl");
aVar.a(application2, "requestcache", apiUrl2, appId);
}
}
new com.finogeeks.lib.applet.rest.cookiejar.persistence.b(this.application).b(appId);
deleteAppletSharedPrefs(o.d(appId));
getAppletStore().c(appId);
getPrivacySettingStore().c(appId);
getUsedAppletStore().a((ah0.l) new FinAppManager$removeUsedApplet$3(appId));
getAppletExtInfoStore().c(appId);
}
public final void searchApplets(SearchAppletRequest searchAppletRequest, final FinCallback<SearchAppletResponse> callback) {
n.j(searchAppletRequest, "searchAppletRequest");
n.j(callback, "callback");
IFinStore a = getFinStores().a(searchAppletRequest.getApiServer());
if (a == null) {
callback.onError(Error.ErrorCodeAppApiServerMismatched, s.b(ContextKt.getLocalResString(this.application, R.string.fin_applet_applet_api_server_mismatched_message, new Object[0]), this.finAppConfig.getAppletText()));
return;
}
AppletApi a2 = com.finogeeks.lib.applet.rest.api.b.a();
String json = CommonKt.getGSon().toJson(a.b());
n.e(json, "gSon.toJson(finStore.finStoreConfig)");
AppletApi.a.f(a2, json, searchAppletRequest.getText(), 0L, null, null, 28, null).a(new com.finogeeks.lib.applet.f.e.d<ApiResponse<SearchAppletResponse>>() {
@Override
public void onFailure(com.finogeeks.lib.applet.f.e.b<ApiResponse<SearchAppletResponse>> bVar, Throwable th2) {
Application application;
n.j(bVar, "call");
n.j(th2, "t");
FinCallback finCallback = callback;
application = FinAppManager.this.application;
finCallback.onError(Error.ErrorCodeNetworkError, ContextKt.getLocalResString(application, R.string.fin_applet_error_code_net_work_error, new Object[0]));
}
@Override
public void onResponse(com.finogeeks.lib.applet.f.e.b<ApiResponse<SearchAppletResponse>> bVar, com.finogeeks.lib.applet.f.e.l<ApiResponse<SearchAppletResponse>> lVar) {
Application application;
Application application2;
n.j(bVar, "call");
n.j(lVar, "response");
if (lVar.d()) {
FinCallback finCallback = callback;
ApiResponse<SearchAppletResponse> a3 = lVar.a();
if (a3 == null) {
n.t();
}
finCallback.onSuccess(a3.getData());
return;
}
ApiError convert = ApiError.INSTANCE.convert(lVar);
FinCallback finCallback2 = callback;
application = FinAppManager.this.application;
int errorLocalCode = convert.getErrorLocalCode(application);
application2 = FinAppManager.this.application;
finCallback2.onError(errorLocalCode, convert.getErrorMsg(application2));
}
});
}
public final void startApplet(Context context, IFinAppletRequest request, FinCallback<String> callback, ComponentCallback componentCallback) {
n.j(context, "context");
n.j(request, FLogCommonTag.REQUEST);
if (!FinAppClient.INSTANCE.getInitSuccess$finapplet_release()) {
FLog.e$default(TAG, "please initialize SDK before startApplet!", null, 4, null);
if (callback != null) {
callback.onError(Error.ErrorCodeSDKNotInit, ContextKt.getLocalResString(context, R.string.fin_applet_error_code_sdk_not_init, new Object[0]));
return;
}
return;
}
if (request instanceof RemoteFinAppletRequest) {
RemoteFinAppletRequest remoteFinAppletRequest = (RemoteFinAppletRequest) request;
if (s.c((CharSequence) remoteFinAppletRequest.getOfflineLibraryPath()) && s.c((CharSequence) remoteFinAppletRequest.getOfflineAppletPath())) {
dispatchToRemoteWithPreload(context, remoteFinAppletRequest, callback, componentCallback);
return;
} else {
dispatchToRemote(context, remoteFinAppletRequest, callback, componentCallback);
return;
}
}
if (request instanceof LocalInterfaceFinAppletRequest) {
dispatchToLocalInterface(context, (LocalInterfaceFinAppletRequest) request, callback);
return;
}
if (request instanceof LocalFinAppletRequest) {
dispatchToLocal(context, (LocalFinAppletRequest) request, callback);
} else if (request instanceof QrCodeFinAppletRequest) {
dispatchToQrCode(context, (QrCodeFinAppletRequest) request, callback, componentCallback);
} else if (request instanceof DecryptFinAppletRequest) {
dispatchToDecrypt(context, (DecryptFinAppletRequest) request, callback, componentCallback);
}
}
public final void startAppletInAssets(Context context, FinAppInfo appInfo, boolean isSingleTask, boolean isSingleProcess, FinCallback<?> callback) {
n.j(context, "context");
n.j(appInfo, Performance.EntryName.APP_INFO);
if (!n.d(context.getPackageName(), "com.finogeeks.finosprite")) {
throw new UnsupportedOperationException("The current application is not allowed to call startAppletInAssets");
}
if (checkBeforeStartApp(context, appInfo.getAppId(), Integer.valueOf(appInfo.getSequence()), "temporary", null, false, false, callback, false)) {
appInfo.setAppType("temporary");
appInfo.setAppPath("");
appInfo.setAppVersion(FrameworkInfo.FRAMEWORK_EMPTY_VERSION);
appInfo.setFrameworkInfo(new FrameworkInfo(null, null, FrameworkInfo.FRAMEWORK_EMPTY_VERSION, null, null, 0, null, null, 251, null));
appInfo.setMd5(FinStoreConfig.LOCAL_ASSETS_FIN_STORE_NAME);
String sdkKey = this.finAppConfig.getSdkKey();
n.e(sdkKey, "finAppConfig.sdkKey");
String sdkSecret = this.finAppConfig.getSdkSecret();
n.e(sdkSecret, "finAppConfig.sdkSecret");
String apiPrefix = this.finAppConfig.getApiPrefix();
n.e(apiPrefix, "finAppConfig.apiPrefix");
String sdkFingerprint = this.finAppConfig.getSdkFingerprint();
n.e(sdkFingerprint, "finAppConfig.sdkFingerprint");
appInfo.setFinStoreConfig(new FinStoreConfig(sdkKey, sdkSecret, FinStoreConfig.LOCAL_ASSETS_FIN_STORE_NAME, FinStoreConfig.LOCAL_ASSETS_FIN_STORE_NAME, apiPrefix, sdkFingerprint, FinAppConfig.ENCRYPTION_TYPE_MD5, false, false, 384, null));
Map<String, FinCallback<?>> map = this.appletCallbacks;
String appId = appInfo.getAppId();
n.e(appId, "appInfo.appId");
map.put(appId, callback);
FinAppAIDLRouter.a(FinAppAIDLRouter.h, context, appInfo, (List) null, (Error) null, isSingleTask, isSingleProcess, callback, (ComponentCallback) null, 140, (Object) null);
}
}
public final void startTrialAppDirectly(Context context, FinAppInfo finAppInfo, boolean isSingleTask, boolean isSingleProcess, FinCallback<?> callback) {
n.j(context, "context");
n.j(finAppInfo, "finAppInfo");
String apiServer = finAppInfo.getFinStoreConfig().getApiServer();
IFinStore a = getFinStores().a(apiServer);
if (a == null) {
doOnAppletStartFail(context, null, s.g(finAppInfo.getAppId()), q.a((int) Integer.valueOf(finAppInfo.getSequence()), -1).intValue(), "trial", apiServer, Error.ErrorCodeAppApiServerMismatched, R.string.fin_applet_applet_api_server_mismatched_message, isSingleTask, isSingleProcess, null, false);
return;
}
String appId = finAppInfo.getAppId();
n.e(appId, "finAppInfo.appId");
String codeId = finAppInfo.getCodeId();
n.e(codeId, "finAppInfo.codeId");
a.a(context, appId, codeId, q.a((int) Integer.valueOf(finAppInfo.getSequence()), -1).intValue(), "trial", R.string.fin_applet_code_id_is_invalid, new FinAppManager$startTrialAppDirectly$1(context, finAppInfo, isSingleTask, isSingleProcess, callback));
}
public final void updateAppletId(String codeId, String appletId) {
n.j(codeId, "codeId");
n.j(appletId, "appletId");
if (n.d(codeId, appletId)) {
return;
}
Map<String, FinCallback<?>> map = this.appletCallbacks;
map.put(appletId, map.get(codeId));
this.appletCallbacks.remove(codeId);
}
}