package com.ss.android.ugc.effectmanager.common.cache;

import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.ss.android.ugc.effectmanager.EffectConfiguration;
import com.ss.android.ugc.effectmanager.common.cachemanager.FileICache;
import com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache;
import com.ss.android.ugc.effectmanager.common.cachemanager.common.IAllowListRule;
import com.ss.android.ugc.effectmanager.common.listener.IMonitorService;
import com.ss.android.ugc.effectmanager.common.logger.EPLog;
import com.ss.android.ugc.effectmanager.common.monitor.EPMonitor;
import com.ss.android.ugc.effectmanager.common.monitor.MonitorTrace;
import com.ss.android.ugc.effectmanager.common.utils.EventJsonBuilder;
import com.ss.android.ugc.effectmanager.common.utils.FileUtils;
import com.ss.android.ugc.effectmanager.effect.model.Effect;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class OldEffectDiskLruCache extends FileICache implements IAllowListRule {
    public static OldEffectDiskLruCache INSTANCE;
    public static List<String> mBRAllowList = Arrays.asList(new String[]{"52310", "42494", "22435", "52308", "22428", "29412", "23202", "85256", "51522", "51092", "45973", "40781"});
    public static String mCountry;
    public static ArrayList<String> mDraftDIRAllowList;
    public static List<String> mRUAllowList = Arrays.asList(new String[]{"52352", "42504", "50593", "249501", "22146", "166469", "221655", "234650", "240739", "203226"});
    public final int MAX_CACHE_SIZE = 838860800;
    public EffectConfiguration mConfiguration;
    public DiskLruCache mDiskLruCache;
    public File mEffectDir;
    public EffectIdMapFile mEffectIdFile;
    public IMonitorService mMonitorService;

    static {
        Covode.recordClassIndex(125252);
    }

    private synchronized void checkInit() {
        File file;
        MethodCollector.i(9055);
        DiskLruCache diskLruCache = this.mDiskLruCache;
        if ((diskLruCache == null || !diskLruCache.isValid()) && (file = this.mEffectDir) != null) {
            try {
                this.mDiskLruCache = DiskLruCache.open(file, 0, 1, 838860800, this);
            } catch (IOException e) {
                RuntimeException runtimeException = new RuntimeException(e);
                MethodCollector.o(9055);
                throw runtimeException;
            }
        }
        if (this.mEffectIdFile == null && this.mEffectDir != null) {
            this.mEffectIdFile = new EffectIdMapFile(this.mEffectDir);
        }
        MethodCollector.o(9055);
    }

    public synchronized void resetLruCache() {
        MethodCollector.i(9057);
        if (this.mEffectDir == null) {
            MethodCollector.o(9057);
            return;
        }
        if (!FileUtils.INSTANCE.checkFileExists(new File(this.mEffectDir, "journal").getPath())) {
            try {
                this.mDiskLruCache = DiskLruCache.open(this.mEffectDir, 0, 1, 838860800, this);
                MethodCollector.o(9057);
            } catch (IOException e) {
                RuntimeException runtimeException = new RuntimeException(e);
                MethodCollector.o(9057);
                throw runtimeException;
            }
        } else {
            MethodCollector.o(9057);
        }
    }

    public String queryToValue(String str) {
        checkInit();
        return super.queryToValue(str);
    }

    public void readKeyInMemory(String str) {
        if (this.mDiskLruCache != null) {
            try {
                this.mDiskLruCache.readKeyInMemory(DiskLruCache.toDiskLruCacheKey(str));
            } catch (Exception unused) {
            }
        }
    }

    public OldEffectDiskLruCache(File file) {
        super(file.getAbsolutePath());
        this.mEffectDir = file;
        if (Looper.getMainLooper() != Looper.myLooper()) {
            checkInit();
        }
    }

    public boolean has(String str) {
        checkInit();
        if (!this.mDiskLruCache.has(str)) {
            return false;
        }
        if (super.has(str)) {
            return true;
        }
        try {
            this.mDiskLruCache.remove(str);
            return false;
        } catch (IOException unused) {
            return false;
        }
    }

    public boolean remove(String str) {
        checkInit();
        try {
            this.mDiskLruCache.remove(DiskLruCache.toDiskLruCacheKey(new File(str).getName()));
        } catch (Exception unused) {
        }
        return super.remove(str);
    }

    public void removeEffect(Effect effect) {
        checkInit();
        remove(effect.getUnzipPath());
        remove(effect.getZipPath());
    }

    public OldEffectDiskLruCache(EffectConfiguration effectConfiguration) {
        super(effectConfiguration.getEffectDir().getAbsolutePath());
        this.mConfiguration = effectConfiguration;
        this.mEffectDir = effectConfiguration.getEffectDir();
        this.mMonitorService = effectConfiguration.getMonitorService();
        if (Looper.getMainLooper() != Looper.myLooper()) {
            checkInit();
        }
    }

    public static OldEffectDiskLruCache getInstance(EffectConfiguration effectConfiguration) {
        MethodCollector.i(8872);
        if (INSTANCE == null) {
            synchronized (OldEffectDiskLruCache.class) {
                try {
                    if (INSTANCE == null) {
                        mCountry = effectConfiguration.getRegion();
                        mDraftDIRAllowList = effectConfiguration.getDraftList();
                        INSTANCE = new OldEffectDiskLruCache(effectConfiguration);
                    }
                } catch (Throwable th) {
                    MethodCollector.o(8872);
                    throw th;
                }
            }
        }
        OldEffectDiskLruCache oldEffectDiskLruCache = INSTANCE;
        MethodCollector.o(8872);
        return oldEffectDiskLruCache;
    }

    private boolean isCountry(String str) {
        EPLog.d("OldEffectDiskLruCache", "isCountry:" + str + " now:" + mCountry);
        if (TextUtils.isEmpty(str) || !str.equals(mCountry)) {
            return false;
        }
        return true;
    }

    public boolean isAllowed(String str) {
        if (TextUtils.isEmpty(str)) {
            return false;
        }
        EPLog.i("OldEffectDiskLruCache", "allowlist：".concat(String.valueOf(str)));
        if (isCountry("BR") && mBRAllowList.contains(this.mEffectIdFile.getEffectId(str))) {
            EPLog.i("cleaneffect", "allowlist：BR");
            return true;
        } else if (!isCountry("RU") || !mRUAllowList.contains(this.mEffectIdFile.getEffectId(str))) {
            ArrayList<String> arrayList = mDraftDIRAllowList;
            if (arrayList == null || !arrayList.contains(str)) {
                return false;
            }
            EPLog.d("OldEffectDiskLruCache", "allowlist：draft");
            return true;
        } else {
            EPLog.i("OldEffectDiskLruCache", "allowlist：RU");
            return true;
        }
    }

    public long save(String str, InputStream inputStream) {
        checkInit();
        return super.save(str, inputStream);
    }

    public long save(String str, String str2) {
        checkInit();
        return super.save(str, str2);
    }

    public void unzipEffectToDisk(Effect effect, MonitorTrace monitorTrace) {
        checkInit();
        MonitorTrace monitorTrace2 = monitorTrace;
        EPMonitor.traceStep(monitorTrace2, "OldEffectDiskLruCache#unzipEffectToDisk::unzip begin, from " + effect.getZipPath() + " to " + effect.getUnzipPath());
        String unzipPath = effect.getUnzipPath();
        String addPathSuffix = FileUtils.INSTANCE.addPathSuffix(effect.getUnzipPath(), "_tmp");
        try {
            FileUtils.INSTANCE.removeDir(addPathSuffix);
            FileUtils.INSTANCE.unZip(effect.getZipPath(), addPathSuffix);
            EPMonitor.traceStep(monitorTrace2, "OldEffectDiskLruCache#unzipEffectToDisk::unzip to temp dir " + addPathSuffix + " success");
            if (!new File(addPathSuffix, "effect_platform_tag.tag").createNewFile()) {
                EPLog.e("OldEffectDiskLruCache", "create effect platform tag file failed!");
            }
            FileUtils.INSTANCE.rename(addPathSuffix, unzipPath, true, true);
            EPMonitor.traceStep(monitorTrace2, "OldEffectDiskLruCache#unzipEffectToDisk:: rename from " + addPathSuffix + " to " + unzipPath);
            this.mDiskLruCache.addEntryToCache(new File(effect.getUnzipPath()).getName());
            this.mEffectIdFile.writeEffectId(effect.getId(), effect.getEffectId());
            String[] split = effect.getZipPath().split(File.separator);
            this.mDiskLruCache.remove(split[split.length - 1]);
            EPMonitor.traceStep(monitorTrace2, "OldEffectDiskLruCache#unzipEffectToDisk::unzip success!!");
            IMonitorService iMonitorService = this.mMonitorService;
            if (iMonitorService != null) {
                EventJsonBuilder newBuilder = EventJsonBuilder.newBuilder();
                newBuilder.addValuePair("effect_id", effect.getEffectId());
                newBuilder.addValuePair("effect_name", effect.getName());
                newBuilder.addValuePair("app_id", this.mConfiguration.getAppID());
                newBuilder.addValuePair("access_key", this.mConfiguration.getAccessKey());
                newBuilder.addValuePair("effect_platform_type", 0);
                iMonitorService.monitorStatusRate("effect_resource_unzip_success_rate", 0, newBuilder.build());
            }
        } catch (Exception e) {
            FileUtils.INSTANCE.removeDir(addPathSuffix);
            FileUtils.INSTANCE.removeDir(effect.getUnzipPath());
            EPLog.e("OldEffectDiskLruCache", "unzip effect " + effect.getZipPath() + " to " + effect.getUnzipPath() + " failed.", e);
            StringBuilder sb = new StringBuilder("OldEffectDiskLruCache#unzipEffectToDisk::unzip failed, cause = ");
            sb.append(e.getMessage());
            EPMonitor.traceStep(monitorTrace2, sb.toString());
            IMonitorService iMonitorService2 = this.mMonitorService;
            if (iMonitorService2 != null) {
                EventJsonBuilder newBuilder2 = EventJsonBuilder.newBuilder();
                newBuilder2.addValuePair("effect_id", effect.getEffectId());
                newBuilder2.addValuePair("effect_name", effect.getName());
                newBuilder2.addValuePair("app_id", this.mConfiguration.getAppID());
                newBuilder2.addValuePair("access_key", this.mConfiguration.getAccessKey());
                newBuilder2.addValuePair("error_msg", Log.getStackTraceString(e));
                newBuilder2.addValuePair("effect_platform_type", 0);
                iMonitorService2.monitorStatusRate("effect_resource_unzip_success_rate", 1, newBuilder2.build());
            }
            throw e;
        }
    }

    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v0, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v2, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v3, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v5, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v6, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v7, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v8, resolved type: java.io.OutputStream} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v10, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v11, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v12, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v13, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v14, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX DEBUG: Multi-variable search result rejected for TypeSearchVarInfo{r4v15, resolved type: com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor} */
    /* JADX WARNING: type inference failed for: r4v1, types: [java.io.Closeable] */
    /* JADX WARNING: type inference failed for: r4v4 */
    /* JADX WARNING: type inference failed for: r4v9 */
    /* JADX WARNING: type inference failed for: r4v16 */
    /* JADX WARNING: Code restructure failed: missing block: B:34:0x0112, code lost:
        r2 = e;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:35:0x0113, code lost:
        r7 = null;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:39:0x012e, code lost:
        r4.abortUnlessCommitted();
     */
    /* JADX WARNING: Code restructure failed: missing block: B:44:0x013f, code lost:
        r1 = th;
        r4 = r4;
     */
    /* JADX WARNING: Failed to process nested try/catch */
    /* JADX WARNING: Multi-variable type inference failed */
    /* JADX WARNING: Removed duplicated region for block: B:39:0x012e A[Catch:{ all -> 0x013c }] */
    /* JADX WARNING: Removed duplicated region for block: B:44:0x013f A[ExcHandler: all (th java.lang.Throwable), PHI: r4 
      PHI: (r4v2 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor) = (r4v0 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor), (r4v0 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor), (r4v0 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor), (r4v12 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor), (r4v14 com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor) binds: [B:1:0x008b, B:29:0x00ee, B:5:0x0094, B:24:0x00d7, B:25:?] A[DONT_GENERATE, DONT_INLINE], Splitter:B:1:0x008b] */
    /* JADX WARNING: Unknown variable types count: 1 */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void writeEffectZipToDisk(com.ss.android.ugc.effectmanager.effect.model.Effect r17, java.io.InputStream r18, long r19, com.ss.android.ugc.effectmanager.common.download.DownloadListener r21) {
        /*
            r16 = this;
            r6 = r16
            r0 = 9061(0x2365, float:1.2697E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.i(r0)
            r16.checkInit()
            r2 = r17
            java.lang.String r10 = r2.getId()
            java.lang.String r9 = r2.getEffectId()
            java.lang.String r0 = r2.getId()
            java.lang.String r3 = com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache.toDiskLruCacheKey(r0)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            java.io.File r0 = r6.mEffectDir
            java.lang.String r0 = r0.getPath()
            r1.append(r0)
            java.lang.String r0 = java.io.File.separator
            r1.append(r0)
            r1.append(r3)
            java.lang.String r0 = r1.toString()
            r2.setUnzipPath(r0)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            r1.append(r3)
            java.lang.String r0 = ".zip"
            r1.append(r0)
            java.lang.String r0 = r1.toString()
            java.lang.String r7 = com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache.toDiskLruCacheKey(r0)
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r1.<init>()
            java.io.File r0 = r6.mEffectDir
            java.lang.String r0 = r0.getPath()
            r1.append(r0)
            java.lang.String r0 = java.io.File.separator
            r1.append(r0)
            r1.append(r7)
            java.lang.String r0 = r1.toString()
            r2.setZipPath(r0)
            java.lang.StringBuilder r2 = new java.lang.StringBuilder
            java.lang.String r0 = " writeEffectZipToDisk:key:"
            r2.<init>(r0)
            r2.append(r7)
            java.lang.String r0 = " contentLength:"
            r2.append(r0)
            r0 = r19
            r2.append(r0)
            java.lang.String r2 = r2.toString()
            java.lang.String r5 = "OldEffectDiskLruCache"
            com.ss.android.ugc.effectmanager.common.logger.EPLog.d(r5, r2)
            r4 = 0
            r3 = r18
            com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache r2 = r6.mDiskLruCache     // Catch:{ Exception -> 0x0112, all -> 0x013f }
            com.ss.android.ugc.effectmanager.common.cachemanager.common.DiskLruCache$Editor r6 = r2.edit(r7)     // Catch:{ Exception -> 0x0112, all -> 0x013f }
            if (r6 == 0) goto L_0x00ec
            r7 = 0
            java.io.OutputStream r4 = r6.newOutputStream(r7)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            r2 = 8192(0x2000, float:1.14794E-41)
            byte[] r11 = new byte[r2]     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            r14 = 0
            r12 = 0
        L_0x00a0:
            int r2 = r3.read(r11)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            if (r2 <= 0) goto L_0x00c9
            r4.write(r11, r7, r2)     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            long r7 = (long) r2     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            long r7 = r7 + r12
            r12 = r21
            if (r12 == 0) goto L_0x00c4
            int r2 = (r7 > r0 ? 1 : (r7 == r0 ? 0 : -1))
            if (r2 >= 0) goto L_0x00c4
            int r2 = (r0 > r14 ? 1 : (r0 == r14 ? 0 : -1))
            if (r2 <= 0) goto L_0x00c4
            float r13 = (float) r7     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            r2 = 1065353216(0x3f800000, float:1.0)
            float r13 = r13 * r2
            float r2 = (float) r0     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            float r13 = r13 / r2
            r2 = 1120403456(0x42c80000, float:100.0)
            float r13 = r13 * r2
            int r2 = (int) r13     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            r12.onProgress(r2, r0)     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
        L_0x00c4:
            r12 = r7
            r7 = 0
            r2 = r16
            goto L_0x00a0
        L_0x00c9:
            r6.commit()     // Catch:{ Exception -> 0x00d1, all -> 0x00cd }
            goto L_0x00d5
        L_0x00cd:
            r1 = move-exception
            r0 = r16
            goto L_0x0140
        L_0x00d1:
            r2 = move-exception
            r0 = r16
            goto L_0x010f
        L_0x00d5:
            r0 = r16
            com.ss.android.ugc.effectmanager.common.cache.EffectIdMapFile r0 = r0.mEffectIdFile     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            r0.writeEffectId(r10, r9)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            com.ss.android.ugc.effectmanager.common.utils.FileUtils r0 = com.ss.android.ugc.effectmanager.common.utils.FileUtils.INSTANCE
            r0.closeQuietly(r3)
            com.ss.android.ugc.effectmanager.common.utils.FileUtils r0 = com.ss.android.ugc.effectmanager.common.utils.FileUtils.INSTANCE
            r0.closeQuietly(r4)
            r0 = 9061(0x2365, float:1.2697E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r0)
            return
        L_0x00ec:
            java.lang.String r1 = "writeEffectZipToDisk fail! editor return null with key: "
            java.lang.String r0 = java.lang.String.valueOf(r7)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            java.lang.String r0 = r1.concat(r0)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            com.ss.android.ugc.effectmanager.common.logger.EPLog.e(r5, r0)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            java.lang.RuntimeException r2 = new java.lang.RuntimeException     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            java.lang.String r1 = "editor return null with key: "
            java.lang.String r0 = java.lang.String.valueOf(r7)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            java.lang.String r0 = r1.concat(r0)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            r2.<init>(r0)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            r0 = 9061(0x2365, float:1.2697E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r0)     // Catch:{ Exception -> 0x010e, all -> 0x013f }
            throw r2     // Catch:{ Exception -> 0x010e, all -> 0x013f }
        L_0x010e:
            r2 = move-exception
        L_0x010f:
            r7 = r4
            r4 = r6
            goto L_0x0114
        L_0x0112:
            r2 = move-exception
            r7 = r4
        L_0x0114:
            java.lang.StringBuilder r1 = new java.lang.StringBuilder     // Catch:{ all -> 0x013c }
            java.lang.String r0 = "writeEffectZipToDisk e:"
            r1.<init>(r0)     // Catch:{ all -> 0x013c }
            java.lang.String r0 = r2.toString()     // Catch:{ all -> 0x013c }
            r1.append(r0)     // Catch:{ all -> 0x013c }
            java.lang.String r0 = r1.toString()     // Catch:{ all -> 0x013c }
            com.ss.android.ugc.effectmanager.common.logger.EPLog.e(r5, r0)     // Catch:{ all -> 0x013c }
            X.0HH.LIZ(r2)     // Catch:{ all -> 0x013c }
            if (r4 == 0) goto L_0x0131
            r4.abortUnlessCommitted()     // Catch:{ all -> 0x013c }
        L_0x0131:
            java.lang.RuntimeException r1 = new java.lang.RuntimeException     // Catch:{ all -> 0x013c }
            r1.<init>(r2)     // Catch:{ all -> 0x013c }
            r0 = 9061(0x2365, float:1.2697E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r0)     // Catch:{ all -> 0x013c }
            throw r1     // Catch:{ all -> 0x013c }
        L_0x013c:
            r1 = move-exception
            r4 = r7
            goto L_0x0140
        L_0x013f:
            r1 = move-exception
        L_0x0140:
            com.ss.android.ugc.effectmanager.common.utils.FileUtils r0 = com.ss.android.ugc.effectmanager.common.utils.FileUtils.INSTANCE
            r0.closeQuietly(r3)
            com.ss.android.ugc.effectmanager.common.utils.FileUtils r0 = com.ss.android.ugc.effectmanager.common.utils.FileUtils.INSTANCE
            r0.closeQuietly(r4)
            r0 = 9061(0x2365, float:1.2697E-41)
            com.bytedance.frameworks.apm.trace.MethodCollector.o(r0)
            throw r1
        */
        throw new UnsupportedOperationException("Method not decompiled: com.ss.android.ugc.effectmanager.common.cache.OldEffectDiskLruCache.writeEffectZipToDisk(com.ss.android.ugc.effectmanager.effect.model.Effect, java.io.InputStream, long, com.ss.android.ugc.effectmanager.common.download.DownloadListener):void");
    }
}
