Skip to content

feat(permissions): guide Xiaomi/HyperOS users to enable lock-screen calls (WT-1349)#1411

Draft
SERDUN wants to merge 4 commits into
developfrom
feat/WT-1349-lockscreen-call-permission
Draft

feat(permissions): guide Xiaomi/HyperOS users to enable lock-screen calls (WT-1349)#1411
SERDUN wants to merge 4 commits into
developfrom
feat/WT-1349-lockscreen-call-permission

Conversation

@SERDUN

@SERDUN SERDUN commented Jun 19, 2026

Copy link
Copy Markdown
Member

Problem

On Xiaomi/HyperOS the incoming-call screen does not cover the lock screen, even with all standard permissions granted. The blocker is the OEM capability "Display pop-up windows while running in background" (OP_BACKGROUND_START_ACTIVITY), which is separate from the user-facing "Show on lock screen" toggle and has no public API. See WT-1349.

Change

Drives the existing manufacturer tip from the new callkeep backgroundActivityStart status:

  • The Xiaomi guidance is surfaced only while the capability is actually missing (read via appPermissions.backgroundActivityStartStatus()), so it clears itself once the user enables it and returns to the app (re-checked on resumed).
  • The action button now deep links to the OEM "Other permissions" editor via openBackgroundActivityStartSettings() instead of generic app settings.
  • Xiaomi instructions updated to point at the background pop-up / lock-screen toggles (en/uk/it).

Non-blocking: this uses the dismissible manufacturer-tip path, so it never traps onboarding. No effect on non-Xiaomi devices.

Depends on webtrit_callkeep PR #337 (consumed via the local path dependency on develop).

WT-1349

…alls

On Xiaomi/HyperOS the incoming-call screen cannot cover the lock screen
unless the OEM 'display pop-up windows while running in background'
capability is enabled, which the standard permissions do not cover.

Drive the manufacturer tip from the new callkeep background-activity-start
status: surface it only while the capability is missing (so it clears once
the user enables it and returns), and point the action button at the OEM
'Other permissions' editor via the new deep link. Update Xiaomi instructions
accordingly (en/uk/it).

WT-1349
Comment thread lib/features/permissions/cubit/permissions_cubit.dart
Comment thread lib/data/app_permissions.dart
Comment thread lib/features/permissions/cubit/permissions_cubit.dart
SERDUN added 3 commits June 19, 2026 12:35
checkPermissions() runs fire-and-forget on every resume and emits after several
awaits (now including a platform-channel call). Without an isClosed check the
late emit throws 'Cannot emit new states after calling close' when the screen is
left mid-await. Add the guard, matching initiatePermissionFlow.

WT-1349
_checkManufacturer matched only the literal 'xiaomi', so Redmi/Poco devices
(which report their own manufacturer string) never showed the tip even though
the native layer reports the OEM capability denied. Match xiaomi/redmi/poco by
substring, aligning with PermissionsHelper.isXiaomiFamily.

WT-1349
…ms unreachable

backgroundActivityStart is surfaced via the manufacturer tip, not the
special-permission pipeline (it is not in _specialPermissions). Document the
otherwise-misleading switch arms in SpecialPermission, SpecialPermissionTips and
toSpecialPermissionsSetting so they are not mistaken for a second live entry point.

WT-1349
@SERDUN SERDUN marked this pull request as draft June 23, 2026 12:44
@SERDUN SERDUN added help wanted Extra attention is needed draft Not ready but can be start to review pending labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

draft Not ready but can be start to review help wanted Extra attention is needed pending

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant