Reapply "Clear dream settings when package uninstalled"
This includes some additional null-checking to avoid the
NullPointerException which caused the change to be reverted. This also
wraps the fix in a flag which can be rolled out and verified slowly.
This reverts commit 089a8e885b82c14f754e5a37bef931f05c692786.
Bug: 338210427
Test: manually on device by setting 3P screensaver and then uninstalling
Flag: android.service.dreams.cleanup_dream_settings_on_uninstall
Change-Id: Ic8c1111420c6fc8ff0244032721bbb34ac5a0fab
2 files changed