[PR #853] [MERGED] Added additional smarts for establishing permission to draw over other apps #50833

Closed
opened 2026-05-01 14:14:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/853
Author: @mpbw2
Created: 4/24/2020
Status: Merged
Merged: 4/24/2020
Merged by: @mpbw2

Base: masterHead: bugfix-overlaywarning


📝 Commits (1)

  • d0ebd2b Added additional smarts for establishing permission to draw over other apps

📊 Changes

1 file changed (+35 additions, -6 deletions)

View changed files

📝 src/Android/Accessibility/AccessibilityHelpers.cs (+35 -6)

📄 Description

It looks like there are a few bugs across a few versions of Android where the right conditions would return false when querying Settings.CanDrawOverlays(..). In addition to that we're now querying the AppOpsManager for a state that describes our system_alert_window access (the Ignored state is apparently based on timing and means we actually can draw, but CanDrawOverlay still returned false in this case. Finally if both of those conditions are still false we attempt to just draw an invisible overlay and catch the failure as proof that we actually don't have the permission, which will then show the toast. (Thankfully this whole thing only happens on the initial focus of a view that we've already established requires an overlay)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/853 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 4/24/2020 **Status:** ✅ Merged **Merged:** 4/24/2020 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfix-overlaywarning` --- ### 📝 Commits (1) - [`d0ebd2b`](https://github.com/bitwarden/android/commit/d0ebd2b91aee7386b0ee4f7dbc224632c37878d9) Added additional smarts for establishing permission to draw over other apps ### 📊 Changes **1 file changed** (+35 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Accessibility/AccessibilityHelpers.cs` (+35 -6) </details> ### 📄 Description It looks like there are a few bugs across a few versions of Android where the right conditions would return `false` when querying `Settings.CanDrawOverlays(..)`. In addition to that we're now querying the `AppOpsManager` for a state that describes our `system_alert_window` access (the `Ignored` state is apparently based on timing and means we actually _can_ draw, but `CanDrawOverlay` still returned `false` in this case. Finally if both of those conditions are still `false` we attempt to just draw an invisible overlay and catch the failure as proof that we actually don't have the permission, which will then show the toast. (Thankfully this whole thing only happens on the initial focus of a view that we've already established requires an overlay) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-01 14:14:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#50833