You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug 1990183 - Prevent using recycled bitmaps for PWA icons. r=android-reviewers,boek
This patch avoids potential crashes caused by using recycled bitmaps when creating shortcuts for Progressive Web Apps (PWAs).
The changes ensure that:
- When creating an icon from the session's content, a check for `isRecycled` is added, and a copy of the bitmap is used to prevent it from being recycled prematurely.
- When building an icon from the web app manifest, it now checks if the fetched bitmap is recycled before use. It also creates a copy to prevent the bitmap from being recycled by the image cache after the shortcut is created.
Differential Revision: https://phabricator.services.mozilla.com/D266887
Copy file name to clipboardExpand all lines: mobile/android/android-components/components/feature/pwa/src/main/java/mozilla/components/feature/pwa/WebAppShortcutManager.kt
+24-7Lines changed: 24 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -146,8 +146,13 @@ class WebAppShortcutManager(
146
146
val icon =if (manifest !=null&& manifest.hasLargeIcons()) {
0 commit comments