package com.google.firebase.installations; import android.util.Log; import java.io.IOException; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; /* loaded from: classes2.dex */ class b { /* renamed from: a, reason: collision with root package name */ private final FileChannel f5453a; /* renamed from: b, reason: collision with root package name */ private final FileLock f5454b; private b(FileChannel fileChannel, FileLock fileLock) { this.f5453a = fileChannel; this.f5454b = fileLock; } /* JADX WARN: Removed duplicated region for block: B:16:0x0043 A[EXC_TOP_SPLITTER, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:20:0x003c A[EXC_TOP_SPLITTER, SYNTHETIC] */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ static com.google.firebase.installations.b a(android.content.Context r4, java.lang.String r5) { /* r0 = 0 java.io.File r1 = new java.io.File // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 java.io.File r4 = r4.getFilesDir() // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 r1.(r4, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 java.io.RandomAccessFile r4 = new java.io.RandomAccessFile // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 java.lang.String r5 = "rw" r4.(r1, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 java.nio.channels.FileChannel r4 = r4.getChannel() // Catch: java.nio.channels.OverlappingFileLockException -> L2c java.lang.Error -> L2e java.io.IOException -> L30 java.nio.channels.FileLock r5 = r4.lock() // Catch: java.nio.channels.OverlappingFileLockException -> L25 java.lang.Error -> L27 java.io.IOException -> L29 com.google.firebase.installations.b r1 = new com.google.firebase.installations.b // Catch: java.nio.channels.OverlappingFileLockException -> L1f java.lang.Error -> L21 java.io.IOException -> L23 r1.(r4, r5) // Catch: java.nio.channels.OverlappingFileLockException -> L1f java.lang.Error -> L21 java.io.IOException -> L23 return r1 L1f: r1 = move-exception goto L33 L21: r1 = move-exception goto L33 L23: r1 = move-exception goto L33 L25: r1 = move-exception goto L2a L27: r1 = move-exception goto L2a L29: r1 = move-exception L2a: r5 = r0 goto L33 L2c: r1 = move-exception goto L31 L2e: r1 = move-exception goto L31 L30: r1 = move-exception L31: r4 = r0 r5 = r4 L33: java.lang.String r2 = "CrossProcessLock" java.lang.String r3 = "encountered error while creating and acquiring the lock, ignoring" android.util.Log.e(r2, r3, r1) if (r5 == 0) goto L41 r5.release() // Catch: java.io.IOException -> L40 goto L41 L40: L41: if (r4 == 0) goto L46 r4.close() // Catch: java.io.IOException -> L46 L46: return r0 */ throw new UnsupportedOperationException("Method not decompiled: com.google.firebase.installations.b.a(android.content.Context, java.lang.String):com.google.firebase.installations.b"); } void b() { try { this.f5454b.release(); this.f5453a.close(); } catch (IOException e10) { Log.e("CrossProcessLock", "encountered error while releasing, ignoring", e10); } } }