* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
174 lines
6.4 KiB
Java
174 lines
6.4 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import android.content.Context;
|
|
import android.media.AudioManager;
|
|
import android.os.Build;
|
|
import android.os.Handler;
|
|
import android.os.Looper;
|
|
import j$.util.Objects;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzcd {
|
|
|
|
/* renamed from: a, reason: collision with root package name */
|
|
public final zzgqs f5051a;
|
|
public final Handler b;
|
|
|
|
/* renamed from: c, reason: collision with root package name */
|
|
public zzcc f5052c;
|
|
public zzd d;
|
|
public int f;
|
|
public zzch h;
|
|
public float g = 1.0f;
|
|
public int e = 0;
|
|
|
|
public zzcd(final Context context, Looper looper, zzcc zzccVar) {
|
|
this.f5051a = zzgqw.a(new zzgqs() { // from class: com.google.android.gms.internal.ads.zzcb
|
|
@Override // com.google.android.gms.internal.ads.zzgqs
|
|
public final /* synthetic */ Object zza() {
|
|
return zzcj.a(context);
|
|
}
|
|
});
|
|
this.f5052c = zzccVar;
|
|
this.b = new Handler(looper);
|
|
}
|
|
|
|
public final void a(zzd zzdVar) {
|
|
int i;
|
|
if (!Objects.equals(this.d, zzdVar)) {
|
|
this.d = zzdVar;
|
|
if (zzdVar == null) {
|
|
i = 0;
|
|
} else {
|
|
i = 1;
|
|
}
|
|
this.f = i;
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r8v10, types: [java.lang.Object, com.google.android.gms.internal.ads.zzce] */
|
|
public final int b(int i, boolean z) {
|
|
int requestAudioFocus;
|
|
if (i != 1 && this.f == 1) {
|
|
if (z) {
|
|
if (this.e != 2) {
|
|
if (this.h == null) {
|
|
?? obj = new Object();
|
|
obj.f5075a = zzd.b;
|
|
zzd zzdVar = this.d;
|
|
zzdVar.getClass();
|
|
obj.f5075a = zzdVar;
|
|
AudioManager.OnAudioFocusChangeListener onAudioFocusChangeListener = new AudioManager.OnAudioFocusChangeListener() { // from class: com.google.android.gms.internal.ads.zzca
|
|
@Override // android.media.AudioManager.OnAudioFocusChangeListener
|
|
public final void onAudioFocusChange(int i2) {
|
|
zzcd zzcdVar = zzcd.this;
|
|
zzcdVar.getClass();
|
|
if (i2 != -3 && i2 != -2) {
|
|
if (i2 != -1) {
|
|
if (i2 != 1) {
|
|
a.i(new StringBuilder(String.valueOf(i2).length() + 27), "Unknown focus change type: ", i2, "AudioFocusManager");
|
|
return;
|
|
}
|
|
zzcdVar.e(2);
|
|
zzcc zzccVar = zzcdVar.f5052c;
|
|
if (zzccVar != null) {
|
|
((zzfd) ((zzlc) zzccVar).l.zze(33, 1, 0)).a();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
zzcc zzccVar2 = zzcdVar.f5052c;
|
|
if (zzccVar2 != null) {
|
|
((zzfd) ((zzlc) zzccVar2).l.zze(33, -1, 0)).a();
|
|
}
|
|
zzcdVar.d();
|
|
zzcdVar.e(1);
|
|
return;
|
|
}
|
|
if (i2 != -2) {
|
|
zzcdVar.e(4);
|
|
return;
|
|
}
|
|
zzcc zzccVar3 = zzcdVar.f5052c;
|
|
if (zzccVar3 != null) {
|
|
((zzfd) ((zzlc) zzccVar3).l.zze(33, 0, 0)).a();
|
|
}
|
|
zzcdVar.e(3);
|
|
}
|
|
};
|
|
Handler handler = this.b;
|
|
handler.getClass();
|
|
this.h = new zzch(onAudioFocusChangeListener, handler, obj.f5075a);
|
|
}
|
|
AudioManager audioManager = (AudioManager) this.f5051a.zza();
|
|
zzch zzchVar = this.h;
|
|
if (Build.VERSION.SDK_INT >= 26) {
|
|
Object obj2 = zzchVar.d;
|
|
obj2.getClass();
|
|
requestAudioFocus = audioManager.requestAudioFocus(androidx.privacysandbox.ads.adservices.topics.a.g(obj2));
|
|
} else {
|
|
requestAudioFocus = audioManager.requestAudioFocus(zzchVar.f5144a, 3, 1);
|
|
}
|
|
if (requestAudioFocus == 1) {
|
|
e(2);
|
|
return 1;
|
|
}
|
|
e(1);
|
|
return -1;
|
|
}
|
|
} else {
|
|
int i2 = this.e;
|
|
if (i2 == 1) {
|
|
return -1;
|
|
}
|
|
if (i2 == 3) {
|
|
return 0;
|
|
}
|
|
}
|
|
return 1;
|
|
}
|
|
d();
|
|
e(0);
|
|
return 1;
|
|
}
|
|
|
|
public final void c() {
|
|
this.f5052c = null;
|
|
d();
|
|
e(0);
|
|
}
|
|
|
|
public final void d() {
|
|
int i = this.e;
|
|
if (i != 1 && i != 0 && this.h != null) {
|
|
AudioManager audioManager = (AudioManager) this.f5051a.zza();
|
|
zzch zzchVar = this.h;
|
|
if (Build.VERSION.SDK_INT >= 26) {
|
|
Object obj = zzchVar.d;
|
|
obj.getClass();
|
|
audioManager.abandonAudioFocusRequest(androidx.privacysandbox.ads.adservices.topics.a.g(obj));
|
|
return;
|
|
}
|
|
audioManager.abandonAudioFocus(zzchVar.f5144a);
|
|
}
|
|
}
|
|
|
|
public final void e(int i) {
|
|
float f;
|
|
if (this.e != i) {
|
|
this.e = i;
|
|
if (i == 4) {
|
|
f = 0.2f;
|
|
} else {
|
|
f = 1.0f;
|
|
}
|
|
if (this.g != f) {
|
|
this.g = f;
|
|
zzcc zzccVar = this.f5052c;
|
|
if (zzccVar != null) {
|
|
((zzlc) zzccVar).l.e(34);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|