Stop overwriting files
An earlier refactoring to write a test led to the same
file being used for incoming notifications, which meant
the older notifications were lost.
Also fixes some mostly innocuous errors seen in the log when
looking for the root cause of this problem
-USER_ALL notifications weren't being written
-AtomicFile should be closed
-Files cleaned up because device has remained on beyond
timeout should be removed from tracking list
-Don't try to recreate a folder that exists
Test: atest, and monitor created files and notis in history
over an hour or two
Fixes: 158300639
Change-Id: I3eb0e26863d1ab816a67cf509147674b90e2b6f4
3 files changed