Notification panel constraint#2150
Closed
keymapper-ai wants to merge 43 commits into
Closed
Conversation
…d 13+ Adds ic_launcher_monochrome.xml using evenOdd fill paths derived from the existing foreground icon so the DPad and keyboard shapes are recognisable in a single colour. Updates all adaptive-icon XML files (release, debug, ci) to reference the new monochrome layer.
Add two new constraints — "Notification panel is showing" and "Notification panel is not showing" — that allow key maps to be conditional on whether the Android status bar / notification shade is expanded. Detection is implemented via the AccessibilityService window list: a TYPE_SYSTEM window whose root node belongs to com.android.systemui and is visible to the user is treated as evidence that the notification shade is expanded. This is a best-effort heuristic; accuracy may vary across OEMs and Android versions, as acknowledged in issue discussion.
…me-icon Add monochrome icon.
fix: Support email string formatting fix
Move the debugging section (GetEvent button) inside the `warningState is Understood` conditional so it is only visible after the user acknowledges the expert mode warning, preventing the bypass via the debug screen. Also add a defensive guard in ExpertModeViewModel.onGetEventClick() that returns early if the warning has not been acknowledged.
…ug-screen-on-expert-warning Expert mode warning can be bypassed by going via expert mode debug screen
…t be found because there are many different package names out there Closes #2156
…guard Fix Direct Boot accessibility startup
# Conflicts: # CHANGELOG.md
… setting screen When the system bridge is connected (expert mode), the choose setting screen now queries the Settings ContentProvider directly through a new getAllSettings() AIDL method instead of falling back to the restricted ContentProvider query from the app process. The system bridge runs with shell/root privileges, giving it access to all settings rows that the app process cannot see. A queryCompat helper is added to IContentProviderUtils to handle the version-dependent IContentProvider.query() signatures across API 29–34+. When the system bridge is not connected, the existing ContentResolver query is used as a fallback.
…-list-expert-mode Listing settings for modify setting action should use `settings list` for expert mode users
ktlint requires imports to be in lexicographic order; Notifications and NotificationsOff were appended after StopCircle instead of their correct position between MobileOff and PlayArrow.
Add three new constraints to check the current ringer mode: Ring, Vibrate, and Silent. These appear in the Phone category of the constraint picker. - Add RINGER_MODE_NORMAL, RINGER_MODE_VIBRATE, RINGER_MODE_SILENT to ConstraintId - Add corresponding ConstraintData sealed objects and entity mapping - Add ringerModeFlow to VolumeAdapter, implemented via BroadcastReceiver for AudioManager.RINGER_MODE_CHANGED_ACTION in AndroidVolumeAdapter - Wire VolumeAdapter into LazyConstraintSnapshot and DetectConstraintsUseCase - Add RINGER_MODE to ConstraintDependency - Add UI strings, icons, and titles - Update TestConstraintSnapshot with ringerMode field
…a class Use ConstraintData.RingerMode(val ringerMode: RingerMode) instead of three separate data objects (RingerModeNormal/Vibrate/Silent), following the OrientationCustom pattern. Entity backward compatibility is preserved via the existing three entity type strings.
…erMode field Replace three separate data objects (RingerModeNormal, RingerModeVibrate, RingerModeSilent) with one data class ConstraintData.RingerMode(ringerMode: SystemRingerMode), following the OrientationCustom pattern. DB entity backward compatibility is preserved via three separate entity type strings. Add @serializable to RingerMode enum for kotlinx.serialization support. Fix exhaustive when expressions in ChooseConstraintViewModel and KeyMapConstraintsComparator.
…ode-constraints #2163 feat: add ringer mode constraints (Ring, Vibrate, Silent)
Add two new constraints — "Notification panel is showing" and "Notification panel is not showing" — that allow key maps to be conditional on whether the Android status bar / notification shade is expanded. Detection is implemented via the AccessibilityService window list: a TYPE_SYSTEM window whose root node belongs to com.android.systemui and is visible to the user is treated as evidence that the notification shade is expanded. This is a best-effort heuristic; accuracy may vary across OEMs and Android versions, as acknowledged in issue discussion.
ktlint requires imports to be in lexicographic order; Notifications and NotificationsOff were appended after StopCircle instead of their correct position between MobileOff and PlayArrow.
…anel-constraint' into claude/issue-1980-notification-panel-constraint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1980
Summary
BaseAccessibilityServicevia thegetWindows()API: the service checks whether anyTYPE_SYSTEMaccessibility window has a root node belonging tocom.android.systemuiand visible to the user. This fires on everyTYPE_WINDOWS_CHANGEDaccessibility event.isNotificationShadeExpanded: Flow<Boolean>onIAccessibilityService, integrated intoLazyConstraintSnapshot, and wired up as a newNOTIFICATION_PANEL_STATEdependency.Notifications/NotificationsOff), entity constants, mapper, comparator, andTestConstraintSnapshotall updated to cover the new entries.Known limitations / areas for human review
TYPE_SYSTEMwindows fromcom.android.systemuithat cause a false positive even when the shade is collapsed. Manual testing on target devices is recommended.onDependencyChanged(NOTIFICATION_PANEL_STATE)path is wired up but, like other dependencies, is currently only exercised if a caller subscribes to it.Test plan
Generated by Claude Code