Request microphone permission on first visible Android entry
android-ci / android-arm64 (push) Successful in 17m30s
android-ci / android-arm64 (push) Successful in 17m30s
This commit is contained in:
1 parent
fb2a38da27
commit
6e5c831940
3 files changed
+43
No files matched your search
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Ask for Android microphone permission on first visible app entry, without starting capture or voice
|
||||||
|
transmission. Already-granted access and prior denials do not trigger automatic repeat prompts;
|
||||||
|
explicit microphone actions retain the existing permission flow and offline smoke remains isolated.
|
||||||
- Publish acknowledged connection/capture snapshots before waking callers. Reset mute/deafen output
|
- Publish acknowledged connection/capture snapshots before waking callers. Reset mute/deafen output
|
||||||
epochs and queued PCM in place instead of reopening every device; reject stale binding generations
|
epochs and queued PCM in place instead of reopening every device; reject stale binding generations
|
||||||
and voice frames crossing playback boundaries.
|
and voice frames crossing playback boundaries.
|
||||||
|
|||||||
@@ -499,6 +499,30 @@ Updated **2026-11-11**. Windows baseline remains `05e8d34bcf0e24a44f76e65220293c
|
|||||||
cannot block/restore live capture. Permission ACK checked against original transmission revision;
|
cannot block/restore live capture. Permission ACK checked against original transmission revision;
|
||||||
late grant cannot undo privacy revocation. Added real isolated runtime/core/worker regressions,
|
late grant cannot undo privacy revocation. Added real isolated runtime/core/worker regressions,
|
||||||
no actual network/device activation in tests. Full CI execution pending for these local fixes.
|
no actual network/device activation in tests. Full CI execution pending for these local fixes.
|
||||||
|
- Owner now confirms real two-way voice works in channel on APK4911 AFTER long delay and several
|
||||||
|
mic/full-mute/private-test actions. This is first owner-reported bidirectional Android runtime proof,
|
||||||
|
not reliable cold-start or lifecycle acceptance. Cannot distinguish elapsed time from a restoring
|
||||||
|
action without ordered boundary evidence. Keep delayed-start/mute recovery tasks open.
|
||||||
|
- Read-only package SHA256 still1cfdc368a09ba4726db8746bbc1c70d3ef8f53ae6e6dcf47fc3fe3f767deba3f:
|
||||||
|
installed4911/c7fdac5, NOT new mute-fix fb2a38d. Screenshot android-voice-working-delayed-start.png
|
||||||
|
shows channel cs and Listening-resumed status; audio success comes from owner testimony, not image.
|
||||||
|
Working call left untouched: no mute, launch, reconnect, microphone action or installation.
|
||||||
|
- fb2a38da2749bc6eb17ab40bc136a4b92e7ac615 run4912/job5508 SUCCESS: catalog4,timestamp3,DSP15,
|
||||||
|
native audio138,capture transitions10,manager7,core23 passed/1ignored. Includes three real Worker/
|
||||||
|
binding mute_lifecycle cases, real isolated runtime mute/private-exit/permission cases and synchronous
|
||||||
|
ACK-waker snapshot regression. Full Android APK verified; no physical recovery pass inferred.
|
||||||
|
- Owner explicitly selected install-now after warning working4911 call would be interrupted and
|
||||||
|
test data may be removed for signature mismatch.4912 download active. Next owner scenario: connect
|
||||||
|
and speak WITHOUT Record test or mute toggles first, to separate cold-start from manual recovery.
|
||||||
|
- APK4912 downloaded, all6 hashes verified, SHA256
|
||||||
|
39fed222e48e37cb2520b0bfffe0538ab6273473deb95f47064b2ce5ce6b15fe. Authorized disposable replacement
|
||||||
|
succeeded; launched. Owner confirms RX now works immediately on entering chat (no warm-up actions).
|
||||||
|
Owner identifies permission dialog only appearing on first mic unmute and requests it at app entry.
|
||||||
|
- Implemented Android-only first-visible-launch microphone permission request through existing Activity
|
||||||
|
permission serialization/result path. Persistent requested marker prevents automatic re-prompt after
|
||||||
|
denial; granted state suppresses prompts; explicit mic action may still request later. Smoke extras
|
||||||
|
skip automatic OS dialogs. Permission grant alone does not start capture/transmission. CI/device proof
|
||||||
|
pending; no desktop permission/startup change.
|
||||||
|
|
||||||
|
|
||||||
## First Android APK build
|
## First Android APK build
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ public final class TeamsPeachActivity extends NativeActivity {
|
|||||||
super.onResume(); resumed = true; PlatformBridge.activity = new java.lang.ref.WeakReference<>(this); CaptureBridge.bindActivity(this);
|
super.onResume(); resumed = true; PlatformBridge.activity = new java.lang.ref.WeakReference<>(this); CaptureBridge.bindActivity(this);
|
||||||
PlatformBridge.nativeEvent(generation, 0, true); reportConfiguration();
|
PlatformBridge.nativeEvent(generation, 0, true); reportConfiguration();
|
||||||
for (int i = 0; i < 3; i++) PlatformBridge.nativePermission(0, i, PlatformBridge.granted(i));
|
for (int i = 0; i < 3; i++) PlatformBridge.nativePermission(0, i, PlatformBridge.granted(i));
|
||||||
|
getWindow().getDecorView().post(this::requestStartupMicrophonePermission);
|
||||||
}
|
}
|
||||||
@Override protected void onPause() {
|
@Override protected void onPause() {
|
||||||
resumed = false; CaptureBridge.unbindActivity(this);
|
resumed = false; CaptureBridge.unbindActivity(this);
|
||||||
@@ -172,10 +173,25 @@ public final class TeamsPeachActivity extends NativeActivity {
|
|||||||
try { PlatformBridge.nativePick(id, SafGrant.acquire(getApplicationContext(), data.getData(), data.getFlags(), pickingDirectory, pickingNewDocument), null); }
|
try { PlatformBridge.nativePick(id, SafGrant.acquire(getApplicationContext(), data.getData(), data.getFlags(), pickingDirectory, pickingNewDocument), null); }
|
||||||
catch (Exception error) { PlatformBridge.nativePick(id, null, "document_grant_denied"); }
|
catch (Exception error) { PlatformBridge.nativePick(id, null, "document_grant_denied"); }
|
||||||
}
|
}
|
||||||
|
private void requestStartupMicrophonePermission() {
|
||||||
|
if (PlatformBridge.visible() != this || permissionRequest != 0 || isInPictureInPictureMode()) return;
|
||||||
|
Intent intent = getIntent();
|
||||||
|
// Offline harness runs must never open OS permission dialogs.
|
||||||
|
if (BuildConfig.TEST_HARNESS && intent != null && (intent.hasExtra("teamspeach.smoke")
|
||||||
|
|| intent.hasExtra("teamspeach.profile") || intent.hasExtra("teamspeach.out"))) return;
|
||||||
|
if (PlatformBridge.granted(0) || getSharedPreferences("permission_prompts", MODE_PRIVATE)
|
||||||
|
.getBoolean("microphone_requested", false)) return;
|
||||||
|
// Negative IDs are observer-only: report permission state, not a core request ACK.
|
||||||
|
// Granting permission here never opens AudioRecord or enables transmission.
|
||||||
|
permission(-1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void permission(long id, int permission) {
|
void permission(long id, int permission) {
|
||||||
if (permissionRequest != 0) { PlatformBridge.nativeText(id, null, "permission_request_busy"); return; }
|
if (permissionRequest != 0) { PlatformBridge.nativeText(id, null, "permission_request_busy"); return; }
|
||||||
if(permission==2 && Build.VERSION.SDK_INT<33){PlatformBridge.nativePermission(id,permission,PlatformBridge.granted(permission));return;}
|
if(permission==2 && Build.VERSION.SDK_INT<33){PlatformBridge.nativePermission(id,permission,PlatformBridge.granted(permission));return;}
|
||||||
if (PlatformBridge.granted(permission)) { PlatformBridge.nativePermission(id, permission, true); return; }
|
if (PlatformBridge.granted(permission)) { PlatformBridge.nativePermission(id, permission, true); return; }
|
||||||
|
if (permission == 0) getSharedPreferences("permission_prompts", MODE_PRIVATE)
|
||||||
|
.edit().putBoolean("microphone_requested", true).apply();
|
||||||
permissionRequest = id; requestedPermission = permission;
|
permissionRequest = id; requestedPermission = permission;
|
||||||
try { requestPermissions(new String[]{PlatformBridge.permissionName(permission)}, PERMISSION); }
|
try { requestPermissions(new String[]{PlatformBridge.permissionName(permission)}, PERMISSION); }
|
||||||
catch (RuntimeException error) { permissionRequest=0; PlatformBridge.nativeText(id,null,"permission_request_unavailable"); }
|
catch (RuntimeException error) { permissionRequest=0; PlatformBridge.nativeText(id,null,"permission_request_unavailable"); }
|
||||||
|
|||||||
Reference in new issue
Block a user