Delay tryToRebind if application exit reason is LMK
Live Wallpaper should fallback to Default Wallpaper only when there is
an issue with Live Wallpaper. For any other reason if the application
exits for example Live Wallpaper is exited because of LMK and fallback
happened to Default WallPaper, which is not expected behavior.
This change will check if application exit reason is LMK and device is
on running on low memory then will try to rebind after 10 seconds. If
the device is running on sufficient memory then we will try to avoid
repeated rebinds, we are restricting with retries rebind count as 3 and
if lmk situation is not improved during the 3 trials and live wallpaper
is not set, then set the default image wallpaper.
Bug: 266364123
Test: Manual - Fill the RAM using a memory fill application.
Change-Id: I6dd2daccfdb1bd3f1c8f6ca245ab2d0aee373b56
1 file changed