Remove exact listener alarms when uid gets cached
Listener alarms are only meant to be used within the duration of a valid lifecycle. Once the app goes out of lifecycle, it can be killed arbitrarily and the alarm will be removed. Therefore, no apps should be relying on receiving an alarm after they go out of lifecycle. Besides, apps can be frozen when they end up in the cached state. This breaks the alarm delivery guarantees for listener based exact alarms. So even though dropping the alarm while the app is frozen can cause inconsistencies in the app's view of the world, this is now done explicitly as per the contract of the listener exact alarm APIs: Exact alarms expecting a callback on a listener will now be dropped as soon as the app goes into cached state. This is done to ensure consistency and reliability of behavior. Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest Test: atest FrameworksMockingServicesTests:AppStateTrackerTest Bug: 265195908 Change-Id: If95a0aa7416c4233b244144b353e471322c303a2
Loading
Please register or sign in to comment