Skip to content

fix(lockscreen): scheduled call takes over lock screen on Android 14+ - #37

Merged
gryphus-lab merged 1 commit into
mainfrom
fix/lockscreen-full-screen-intent
Nov 20, 2026
Merged

gryphus-lab merged 1 commit into
mainfrom
fix/lockscreen-full-screen-intent

Conversation

@gryphus-lab

Copy link
Copy Markdown
Owner

Problem

A scheduled call arriving while the screen is locked only showed up in the notification bar - not the full-screen caller UI.

Not a regression from the recent PRs

#31-#36 were all build-classpath pins, the Gradle wrapper, and an icon vector - none touched the lock-screen / full-screen-intent path. This is a pre-existing gap that Android 14's stricter policy exposes.

Root cause

The lock-screen path is the high-priority full-screen-intent (FSI) notification posted by CallSimulationService. On Android 14+ (API 34), USE_FULL_SCREEN_INTENT is no longer granted at install time to non-dialer/alarm apps - it is a user-revocable special access (NotificationManager.canUseFullScreenIntent()). When it isn't held, the system silently demotes the FSI to a shade/heads-up notification - exactly the "only the notification bar" symptom. The app only ever requested POST_NOTIFICATIONS.

Fix

  • FullScreenIntentAccess - new pure, unit-tested helper: (sdkInt, canUseFullScreenIntent) -> shouldRequestAccess. Below API 34 it's always false (permission implicit); on 34+ it's true only when not granted.
  • MainActivity - on API 34+, if access is missing, send the user once to Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT (standard for call apps), with a Toast fallback if the screen can't be opened.
  • CallAlarmReceiver - corrected the misleading comments: the FSI grant is the lock-screen mechanism; the direct startActivity is best-effort for the screen-on/unlocked case and may legitimately be blocked over the keyguard.

Tests / verification

  • FullScreenIntentAccessTest (4 cases, all pass): pre-34 never prompts, 34+ prompts only when ungranted, no prompt once granted, gated-SDK constant.
  • Local: testDebugUnitTest green, lintDebug clean, assembleRelease (R8) OK -> CallSimulator-1.4.7-release.apk.
  • Coverage: new logic (FullScreenIntentAccess) is measured and 100% covered; the Android glue lives in the already-sonar.coverage.exclusions-listed MainActivity/CallAlarmReceiver.

fix -> PATCH, 1.4.6 -> 1.4.7.

…heduled calls

A scheduled call arriving on a LOCKED screen was only showing a
notification instead of the full-screen caller UI. Root cause: on
Android 14+ (API 34) USE_FULL_SCREEN_INTENT is a user-revocable special
access; without it the service's full-screen-intent notification is
silently demoted to a shade/heads-up entry. The app only ever requested
POST_NOTIFICATIONS, never the FSI access.

- Add pure, unit-tested FullScreenIntentAccess helper (sdkInt + grant ->
  should-prompt decision).
- MainActivity: on API 34+, if canUseFullScreenIntent() is false, send
  the user once to ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT.
- CallAlarmReceiver: correct the now-misleading comments - the FSI grant
  is the lock-screen mechanism; the direct activity start is best-effort
  for the unlocked case.

Not a regression from #31-#36 (all build-tooling/icon); pre-existing gap.
fix -> PATCH, 1.4.6 -> 1.4.7.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 490ac860-a25f-4ec3-8299-ca329be4706a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@gryphus-lab
gryphus-lab merged commit bed348b into main Nov 20, 2026
8 checks passed
@gryphus-lab
gryphus-lab deleted the fix/lockscreen-full-screen-intent branch November 20, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant