Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 13f1103604 | |||
| 73b7a76ea8 |
@@ -79,8 +79,8 @@ android {
|
|||||||
applicationId "com.ariacockpit"
|
applicationId "com.ariacockpit"
|
||||||
minSdkVersion rootProject.ext.minSdkVersion
|
minSdkVersion rootProject.ext.minSdkVersion
|
||||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||||
versionCode 806
|
versionCode 807
|
||||||
versionName "0.0.8.6"
|
versionName "0.0.8.7"
|
||||||
// Fallback fuer Libraries mit Product Flavors
|
// Fallback fuer Libraries mit Product Flavors
|
||||||
missingDimensionStrategy 'react-native-camera', 'general'
|
missingDimensionStrategy 'react-native-camera', 'general'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "aria-cockpit",
|
"name": "aria-cockpit",
|
||||||
"version": "0.0.8.6",
|
"version": "0.0.8.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
|||||||
@@ -126,13 +126,24 @@ class PhoneCallService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** AudioFocus-Loss = irgendeine andere App hat das Mikro/die Audio-Pipeline
|
/** AudioFocus-Loss = irgendeine andere App hat den Focus uebernommen.
|
||||||
* uebernommen — typisch VoIP-Apps bei eingehendem Anruf, aber auch System-
|
* Das passiert bei VoIP-Anrufen (was wir wollen) ABER auch bei normalen
|
||||||
* Voice-Assistants etc. */
|
* Audio-Playern (anderer Player startet, Notification-Sound, sogar
|
||||||
private _onFocusChanged(type: 'loss' | 'loss_transient' | 'gain'): void {
|
* unsere eigenen Sound-Calls beim Play-Button). Daher checken wir den
|
||||||
|
* AudioMode — nur IN_CALL (2) oder IN_COMMUNICATION (3) zaehlt als Anruf. */
|
||||||
|
private async _onFocusChanged(type: 'loss' | 'loss_transient' | 'gain'): Promise<void> {
|
||||||
if (type === 'loss' || type === 'loss_transient') {
|
if (type === 'loss' || type === 'loss_transient') {
|
||||||
// Schon durch klassischen TelephonyManager pausiert? Dann nichts doppeln.
|
// Schon durch klassischen TelephonyManager pausiert? Dann nichts doppeln.
|
||||||
if (this.lastState === 'ringing' || this.lastState === 'offhook') return;
|
if (this.lastState === 'ringing' || this.lastState === 'offhook') return;
|
||||||
|
// Mode pruefen — nur echte Anrufe behandeln.
|
||||||
|
let mode = -1;
|
||||||
|
try { mode = await (NativeModules.AudioFocus as any)?.getMode?.(); } catch {}
|
||||||
|
if (mode !== 2 && mode !== 3) {
|
||||||
|
// NORMAL-Mode → kein Anruf (Stefan hat z.B. Play-Button gedrueckt
|
||||||
|
// oder Spotify hat sich neu reingedraengelt). Keine Toasts.
|
||||||
|
console.log('[PhoneCall] FOCUS_LOSS ignoriert (AudioMode=%d, kein Call)', mode);
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.interruptedByFocus = true;
|
this.interruptedByFocus = true;
|
||||||
this._haltForCall('Anruf erkannt (VoIP) — ARIA pausiert');
|
this._haltForCall('Anruf erkannt (VoIP) — ARIA pausiert');
|
||||||
// Pollen, weil GAIN nicht zuverlaessig kommt (wir releasen den Focus
|
// Pollen, weil GAIN nicht zuverlaessig kommt (wir releasen den Focus
|
||||||
|
|||||||
Reference in New Issue
Block a user