Skip to content

DarQ v2.2.2 - Android 14 Modernization & Security Update

Choose a tag to compare

@Arora-Sir Arora-Sir released this 26 May 15:29

Summary:
This major release modernizes the DarQ application for Android 14 (API 34). It resolves several critical crashes on modern devices (such as the Samsung S24 Ultra), removes Google Play Protect installation blockers, and implements strict security hardening for broadcast receivers.

🛡️ Security Enhancements

  • Hardened Broadcast Receivers: Updated UpdateDownloadBottomSheetViewModel.kt to explicitly require the Context.RECEIVER_EXPORTED flag on Android 13+ (API 33+). This enforces Android 14's strict intent resolution rules for DownloadManager broadcasts, preventing malicious spoofing and SecurityException crashes.

⚙️ Framework Compatibility & Stability (Android 14/15)

  • Binder Crashes: Fixed AbstractMethodError by updating IProcessObserver.aidl to include the newer onProcessStarted and onProcessStateChanged methods. Implemented missing methods in DarqService.kt with strict Java signature matching.
  • Service Connection: Fixed IllegalStateException: Already resumed in DarqServiceConnectionProvider. Refactored the service binder to use suspendCancellableCoroutine, added atomic isActive checks, and implemented invokeOnCancellation to safely unbind on timeouts.

🚀 SDK Modernization (API 34)

  • Target SDK Bump: Updated compileSdkVersion and targetSdkVersion to 34 in the app and systemstubs modules.
  • Foreground Services: Added FOREGROUND_SERVICE_SPECIAL_USE permission and defined android:foregroundServiceType="specialUse" for all background services to comply with Android 14 requirements.
  • PendingIntent Mutability: Fixed a fatal crash on Android 12+ by adding PendingIntent.FLAG_IMMUTABLE to all PendingIntents in BootForegroundService.kt.
  • Notifications: Added POST_NOTIFICATIONS to the manifest and implemented a runtime permission request on app launch for Android 13+.

🛠️ Build System & Dependency Fixes

  • Xposed API: Added the official Xposed repository (https://api.xposed.info/) to build.gradle to resolve missing dependencies and allow successful builds.
  • AGP Warnings: Added explicit namespace declarations in build.gradle files and safely suppressed the AGP 7.4.2 unsupported compileSdk warning in gradle.properties to maintain Java 11 build compatibility.

🔄 Update Checker Logic

  • Version Checking: Replaced strict inequality version checking with semantic version comparison (isNewerVersion). The app will no longer block users with an "Update Available" screen when running a local version that is newer than the GitHub release.
  • Version Bump: Updated version to 2.2.2 (versionCode 23).