Files
brave-core/android/java
Oliver c3008f29ce [Android] Attempt to fix cut-off background image after app restart (#31704)
Occasionally, users have reported that the NTP (New Tab Page) background
image is partially cut-off after restarting the app.

It now appears likely that this is being caused by the call to
`removeOnGlobalLayoutListener(this)` which results in nothing happening
when the background image needs to be resized.

This commit deletes the line that unregisters the listener and instead
adds code that checks if the measured height/width of the background
image differs from the values in a previous run. If they are different,
we re-fetch the image. We delete the listener when the window goes
away instead.
2025-10-22 20:28:22 +01:00
..