- JNI bridge with 8 extern functions (init, startCall, stopCall, setMute, setSpeaker, getStats, forceProfile, destroy) with panic catching - Kotlin engine layer: WzpEngine JNI wrapper, WzpCallback interface, CallStats data class with JSON deserialization - Jetpack Compose UI: InCallScreen with quality indicator (green/yellow/red), mute/speaker/hangup buttons, stats overlay, duration timer - CallActivity with RECORD_AUDIO permission handling, Material3 theme - CallService foreground service with WakeLock, WiFi lock, notification - AudioRouteManager for speaker/earpiece/Bluetooth SCO switching - AEC wired into CallEncoder pipeline: AEC → AGC → denoise → silence → encode - AEC farend reference fed from decode path to encode path in pipeline - Engine exposes set_aec_enabled/set_agc_enabled via AtomicBool flags Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
39 lines
1.0 KiB
Kotlin
39 lines
1.0 KiB
Kotlin
package com.wzp
|
|
|
|
import android.app.Application
|
|
import android.app.NotificationChannel
|
|
import android.app.NotificationManager
|
|
import android.os.Build
|
|
|
|
/**
|
|
* Application entry point for WarzonePhone.
|
|
*
|
|
* Creates the notification channel required for the foreground [com.wzp.service.CallService].
|
|
*/
|
|
class WzpApplication : Application() {
|
|
|
|
override fun onCreate() {
|
|
super.onCreate()
|
|
createNotificationChannel()
|
|
}
|
|
|
|
private fun createNotificationChannel() {
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
val channel = NotificationChannel(
|
|
CHANNEL_ID,
|
|
"Active Call",
|
|
NotificationManager.IMPORTANCE_LOW
|
|
).apply {
|
|
description = "Shown while a VoIP call is in progress"
|
|
setShowBadge(false)
|
|
}
|
|
val nm = getSystemService(NotificationManager::class.java)
|
|
nm.createNotificationChannel(channel)
|
|
}
|
|
}
|
|
|
|
companion object {
|
|
const val CHANNEL_ID = "wzp_call_channel"
|
|
}
|
|
}
|