Files
rr3-apk/decompiled/sources/com/google/android/gms/common/util/ProcessUtils.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

75 lines
2.6 KiB
Java

package com.google.android.gms.common.util;
import android.app.Application;
import android.os.Build;
import android.os.Process;
import android.os.StrictMode;
import androidx.annotation.Nullable;
import com.google.android.gms.common.annotation.KeepForSdk;
import com.google.android.gms.common.internal.Preconditions;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
@KeepForSdk
/* loaded from: classes2.dex */
public class ProcessUtils {
private static String zza;
private static int zzb;
private ProcessUtils() {
}
@Nullable
@KeepForSdk
public static String getMyProcessName() {
BufferedReader bufferedReader;
String processName;
if (zza == null) {
if (Build.VERSION.SDK_INT >= 28) {
processName = Application.getProcessName();
zza = processName;
} else {
int i = zzb;
if (i == 0) {
i = Process.myPid();
zzb = i;
}
String str = null;
str = null;
str = null;
BufferedReader bufferedReader2 = null;
if (i > 0) {
try {
String str2 = "/proc/" + i + "/cmdline";
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
try {
bufferedReader = new BufferedReader(new FileReader(str2));
try {
String readLine = bufferedReader.readLine();
Preconditions.checkNotNull(readLine);
str = readLine.trim();
} catch (IOException unused) {
} catch (Throwable th) {
th = th;
bufferedReader2 = bufferedReader;
IOUtils.closeQuietly(bufferedReader2);
throw th;
}
} finally {
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
} catch (IOException unused2) {
bufferedReader = null;
} catch (Throwable th2) {
th = th2;
}
IOUtils.closeQuietly(bufferedReader);
}
zza = str;
}
}
return zza;
}
}