This was hard to investigate since for me it reproduces only when the build is non-debuggable. I can see the issue in a non-debuggable dev build and I can't see it in a debuggable Nightly build. Think I though found the extra conditions for it: - a non-debuggable build - since it's faster than a debuggable one - the composable toolbar at the bottom - searching through the composable toolbar has the entire home screen content accounting for the keyboard - to ensure the bottom toolbar is shown above the keyboard. The View based toolbar had search happen in a separate screen so the home content would not be touched in any way. What happens (sometimes) is that: - the wallpaper is set to be applied [when the home screen opens ](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#339-344). This starts [a coroutine for applying it "in background" and when done save the name of this wallpaper in memory](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#1384-1393). - since the user tapped the "+" button to start a new search we open the keyboard - very soon after the initial request to apply the wallpaper (but before this finishes) a new request to apply the wallpaper comes from [here](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#1411-1426). This request also gets to apply the wallpaper again (screen can flash sometimes) and for this [it scales the wallpaper to best fit the current screen dimensions](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/ext/Bitmap.kt). This scaling process also considers the keyboard height to avoid the issue from bug 1827107, keyboard which might be shown because the user already entered in search mode. So the screen will appear to be a lot longer leading to the wallpaper being scaled to match.
Bug 2019462 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
This was hard to investigate since for me it reproduces only when the build is non-debuggable. I can see the issue in a non-debuggable dev build and I can't see it in a debuggable Nightly build. Think I though found the extra conditions for it: - a non-debuggable build - since it's faster than a debuggable one - have less/no home screen widgets shown - less functionalities means faster execution of the code - the composable toolbar at the bottom - searching through the composable toolbar has the entire home screen content accounting for the keyboard - to ensure the bottom toolbar is shown above the keyboard. The View based toolbar had search happen in a separate screen so the home content would not be touched in any way. What happens (sometimes) is that: - the wallpaper is set to be applied [when the home screen opens ](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#339-344). This starts [a coroutine for applying it "in background" and when done save the name of this wallpaper in memory](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#1384-1393). - since the user tapped the "+" button to start a new search we open the keyboard - very soon after the initial request to apply the wallpaper (but before this finishes) a new request to apply the wallpaper comes from [here](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt#1411-1426). This request also gets to apply the wallpaper again and for this [it scales the wallpaper to best fit the current screen dimensions](https://searchfox.org/firefox-main/rev/3c52c9c886f7b0423001cef86abfafcf97f2b90a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/ext/Bitmap.kt). This scaling process also considers the keyboard height to avoid the issue from bug 1827107, keyboard which might be shown because the user already entered in search mode. So the screen will appear to be a lot longer leading to the wallpaper being scaled to match. Less/no other widgets on the home screen is a precondition also which leads to less code to execute and higher chances of the two wallpaper set calls to overlap.