Skip to content

fix(call): make full-screen incoming call UI work on Android 14+ - #859

Open
glowinthedark wants to merge 1 commit into
FossifyOrg:mainfrom
glowinthedark:full-screen-ui-perms
Open

fix(call): make full-screen incoming call UI work on Android 14+#859
glowinthedark wants to merge 1 commit into
FossifyOrg:mainfrom
glowinthedark:full-screen-ui-perms

Conversation

@glowinthedark

@glowinthedark glowinthedark commented Jul 29, 2026

Copy link
Copy Markdown

Scope

  • update permission manifests

  • re-ask for USE_FULL_SCREEN_INTENT after the dialer role is granted (previously onCreate-only, so a first-run grant went unasked until the next cold start — the actual cause of missing FSI on Android 14+).

  • Add first-launch Permissions & access screen listing every permission and special access with live granted state and per-item grant flows, including Restricted Settings guidance for sideloaded installs (Android 15 CDD 9.8 restricts the dialer role and overlay permission).

  • Cache caller lookup (was a full contacts-DB scan per call-state change), dedupe the two notification builders, fix deprecated APIs, CI workflow (standalone)

  • add Makefile (runs make help by default)

Details

Root cause of the missing full-screen UI

USE_FULL_SCREEN_INTENT is revoked by on Android 14+. The permission prompt
ran only in MainActivity.onCreate inside the isDefaultDialer() branch, while the
else branch launched the dialer prompt — so a user granting the dialer role from
that same launch was never asked, canUseFullScreenIntent() stayed false, and the
startActivity fallback was silently blocked by BAL. Extracted onDefaultDialerReady()
and invoked it from both onCreate and onActivityResult.

initFragments() moved out of the contacts-permission callback (it only wires the
ViewPager and must not be gated on a permission result).

Permissions & access screen

First-launch screen (also under Settings), 8 entries in Required/Recommended with
icon, rationale, live granted state, and the correct grant flow per item:
dialer role, RequestMultiplePermissions, ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT,
ACTION_MANAGE_OVERLAY_PERMISSION, ROLE_CALL_SCREENING.
Entries absent on the running OS are filtered (notifications <33, FSI <34,
screening <29). State re-read in onResume — special accesses return no result.

Restricted Settings guidance

Android 15 CDD imposes Restricted Settings for the Dialer role and
Display over other apps — the two toggles this app needs. For dideloaded
installs users see them greyed out and are stuck with an "unsafe app" warning. Not OEM-specific (Android 15+), but naming differs: stock says Allow restricted
settings
, ColorOS/OxygenOS say Allow restricted permission.

Collapsible notice with the 5-step unblock flow, an Open app info deep link, and a
Learn more link. Shown only when
API ≥33, a restricted-listed entry is ungranted, and the installer is not an exempt
store. EnhancedConfirmationManager is @SystemApi, so state is inferred from install
source

Performance

  • getCallContact loaded the entire contacts DB on every call-state change
    (onStateChanged + onDetailsChanged). Now cached per handle, bounded, cleared on
    last call removal.
  • Deleted unused numbersToContactIDMap.
  • Removed a double circular-crop per notification refresh (getCallContactAvatar
    already crops).
  • getMyContactsCursor moved off the calling (main) thread.

Cosmetic fixes

  • Screen timed out during calls on all modern Android: FLAG_KEEP_SCREEN_ON was
    only in the API-26 branch; setShowWhenLocked/setTurnScreenOn don't cover it.
  • Makefile: installDebug/installRelease don't exist with product flavors;
    now flavor-qualified + cross-platform JDK discovery (JAVA_HOME → java_home
    /usr/lib/jvm probe → PATH), floor of JDK 17, help goal.
  • Deprecated APIs: 3× Handler(), 2× single-arg getColor/getDrawable,
    AudioRoute.values().
  • Gradle build cache enabled.

Type of change(s)

  • [v] Bug fix
  • [v] Feature / enhancement
  • [v] Infrastructure / tooling (CI, build, deps, tests)

What changed and why

  • Fixed full screen UI not appearing on Android 14+

Checklist

  • [v] I read the contribution guidelines.
  • [v] I manually tested my changes on device/emulator (if applicable).
  • [v] I have self-reviewed my pull request (no typos, formatting errors, etc.).
  • [v] I understand every change in this pull request.

- update permission manifests
- re-ask for USE_FULL_SCREEN_INTENT after the dialer role is granted (previously onCreate-only, so a first-run grant went unasked until the next cold start — the actual cause of missing FSI on Android 14+).

- Add first-launch Permissions & access screen listing every permission and special access with live granted state and per-item grant flows, including Restricted Settings guidance for sideloaded installs (Android 15 CDD 9.8 restricts the dialer role and overlay permission).

- Cache caller lookup (was a full contacts-DB scan per call-state change), dedupe the two notification builders, fix deprecated APIs, CI workflow (standalone)
 - Makefile (runs `make help` by default)
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