zeroclaw/clients/android/app/proguard-rules.pro
Preventnetworkhacking a5348b60c0 fix(android): Address CodeRabbit HIGH and MEDIUM severity issues
HIGH severity fixes:
- SettingsRepository: Add IOException handling for DataStore corruption
- BootReceiver: Remove double pendingResult.finish() call
- ShareHandler: Add text/uri-list MIME type routing
- ZeroClawTileService: Add API 34+ PendingIntent overload for startActivityAndCollapse
- proguard-rules.pro: Remove dangerous Kotlin Intrinsics null check stripping

MEDIUM severity fixes:
- SettingsScreen: Refresh isOptimized state on lifecycle resume
- HeartbeatWorker: Enforce 15-min minimum, use UPDATE policy for config changes
- ZeroClawApp: Add settings change listener to update heartbeat schedule

Formatting:
- Remove trailing whitespace from all Kotlin files

Also adds PR_DESCRIPTION_UPDATE.md with required sections:
- Validation Evidence
- Security Impact
- Privacy and Data Hygiene
- Rollback Plan
2026-02-27 11:46:38 -08:00

68 lines
1.9 KiB
Prolog

# ZeroClaw Android ProGuard Rules
# Goal: Smallest possible APK
# ============================================
# KEEP NATIVE BRIDGE
# ============================================
-keep class ai.zeroclaw.android.bridge.** { *; }
-keepclassmembers class ai.zeroclaw.android.bridge.** { *; }
# Keep JNI methods
-keepclasseswithmembernames class * {
native <methods>;
}
# ============================================
# KEEP DATA CLASSES
# ============================================
-keep class ai.zeroclaw.android.data.** { *; }
-keepclassmembers class ai.zeroclaw.android.data.** { *; }
# ============================================
# KOTLIN SERIALIZATION
# ============================================
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt
-keepclassmembers class kotlinx.serialization.json.** {
*** Companion;
}
-keepclasseswithmembers class kotlinx.serialization.json.** {
kotlinx.serialization.KSerializer serializer(...);
}
# ============================================
# AGGRESSIVE OPTIMIZATIONS
# ============================================
# Remove logging in release
-assumenosideeffects class android.util.Log {
public static int v(...);
public static int d(...);
public static int i(...);
}
# KEEP Kotlin null checks - stripping them hides bugs and causes crashes
# (Previously removed; CodeRabbit HIGH severity fix)
# -assumenosideeffects class kotlin.jvm.internal.Intrinsics { ... }
# Optimize enums
-optimizations !code/simplification/enum*
# Remove unused Compose stuff
-dontwarn androidx.compose.**
# ============================================
# SIZE OPTIMIZATIONS
# ============================================
# Merge classes where possible
-repackageclasses ''
-allowaccessmodification
# Remove unused code paths
-optimizationpasses 5
# Don't keep attributes we don't need
-keepattributes SourceFile,LineNumberTable # Keep for crash reports
-renamesourcefileattribute SourceFile