* 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>
130 lines
4.4 KiB
Java
130 lines
4.4 KiB
Java
package androidx.work.impl.constraints.trackers;
|
|
|
|
import android.content.Intent;
|
|
import android.content.IntentFilter;
|
|
import androidx.annotation.RestrictTo;
|
|
import androidx.work.Logger;
|
|
|
|
@RestrictTo
|
|
/* loaded from: classes.dex */
|
|
public class BatteryChargingTracker extends BroadcastReceiverConstraintTracker<Boolean> {
|
|
public static final String i = Logger.e("BatteryChrgTracker");
|
|
|
|
@Override // androidx.work.impl.constraints.trackers.ConstraintTracker
|
|
public final Object a() {
|
|
Intent registerReceiver = this.b.registerReceiver(null, new IntentFilter("android.intent.action.BATTERY_CHANGED"));
|
|
boolean z = false;
|
|
if (registerReceiver == null) {
|
|
Logger.c().b(i, "getInitialState - null intent received", new Throwable[0]);
|
|
return null;
|
|
}
|
|
int intExtra = registerReceiver.getIntExtra("status", -1);
|
|
if (intExtra == 2 || intExtra == 5) {
|
|
z = true;
|
|
}
|
|
return Boolean.valueOf(z);
|
|
}
|
|
|
|
@Override // androidx.work.impl.constraints.trackers.BroadcastReceiverConstraintTracker
|
|
public final IntentFilter f() {
|
|
IntentFilter intentFilter = new IntentFilter();
|
|
intentFilter.addAction("android.os.action.CHARGING");
|
|
intentFilter.addAction("android.os.action.DISCHARGING");
|
|
return intentFilter;
|
|
}
|
|
|
|
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
|
|
/* JADX WARN: Code restructure failed: missing block: B:27:0x004a, code lost:
|
|
|
|
if (r6.equals("android.intent.action.ACTION_POWER_DISCONNECTED") == false) goto L7;
|
|
*/
|
|
@Override // androidx.work.impl.constraints.trackers.BroadcastReceiverConstraintTracker
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final void g(android.content.Intent r6) {
|
|
/*
|
|
r5 = this;
|
|
java.lang.String r6 = r6.getAction()
|
|
if (r6 != 0) goto L7
|
|
goto L50
|
|
L7:
|
|
androidx.work.Logger r0 = androidx.work.Logger.c()
|
|
java.lang.String r1 = "Received "
|
|
java.lang.String r1 = r1.concat(r6)
|
|
r2 = 0
|
|
java.lang.Throwable[] r3 = new java.lang.Throwable[r2]
|
|
java.lang.String r4 = androidx.work.impl.constraints.trackers.BatteryChargingTracker.i
|
|
r0.a(r4, r1, r3)
|
|
int r0 = r6.hashCode()
|
|
r1 = -1
|
|
switch(r0) {
|
|
case -1886648615: goto L44;
|
|
case -54942926: goto L39;
|
|
case 948344062: goto L2e;
|
|
case 1019184907: goto L23;
|
|
default: goto L21;
|
|
}
|
|
L21:
|
|
r2 = r1
|
|
goto L4d
|
|
L23:
|
|
java.lang.String r0 = "android.intent.action.ACTION_POWER_CONNECTED"
|
|
boolean r6 = r6.equals(r0)
|
|
if (r6 != 0) goto L2c
|
|
goto L21
|
|
L2c:
|
|
r2 = 3
|
|
goto L4d
|
|
L2e:
|
|
java.lang.String r0 = "android.os.action.CHARGING"
|
|
boolean r6 = r6.equals(r0)
|
|
if (r6 != 0) goto L37
|
|
goto L21
|
|
L37:
|
|
r2 = 2
|
|
goto L4d
|
|
L39:
|
|
java.lang.String r0 = "android.os.action.DISCHARGING"
|
|
boolean r6 = r6.equals(r0)
|
|
if (r6 != 0) goto L42
|
|
goto L21
|
|
L42:
|
|
r2 = 1
|
|
goto L4d
|
|
L44:
|
|
java.lang.String r0 = "android.intent.action.ACTION_POWER_DISCONNECTED"
|
|
boolean r6 = r6.equals(r0)
|
|
if (r6 != 0) goto L4d
|
|
goto L21
|
|
L4d:
|
|
switch(r2) {
|
|
case 0: goto L63;
|
|
case 1: goto L5d;
|
|
case 2: goto L57;
|
|
case 3: goto L51;
|
|
default: goto L50;
|
|
}
|
|
L50:
|
|
return
|
|
L51:
|
|
java.lang.Boolean r6 = java.lang.Boolean.TRUE
|
|
r5.c(r6)
|
|
return
|
|
L57:
|
|
java.lang.Boolean r6 = java.lang.Boolean.TRUE
|
|
r5.c(r6)
|
|
return
|
|
L5d:
|
|
java.lang.Boolean r6 = java.lang.Boolean.FALSE
|
|
r5.c(r6)
|
|
return
|
|
L63:
|
|
java.lang.Boolean r6 = java.lang.Boolean.FALSE
|
|
r5.c(r6)
|
|
return
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.work.impl.constraints.trackers.BatteryChargingTracker.g(android.content.Intent):void");
|
|
}
|
|
}
|