Skip to content
Commit 8b08e82d authored by Yuri Lin's avatar Yuri Lin
Browse files

Add method to remove file from history based on matching file path.

NotificationHistoryDatabase sometimes attempts to read a file that doesn't exist; this happens because scheduled history file deletions (for files >24h old) weren't correctly removing AtomicFiles from the mHistoryFiles list due to using the built in LinkedList remove() method. The new method explictly removes the first file in history matching the file path deleted, rather than attempting to use AtomicFile equality.

Test: atest NotificationHistoryDatabaseTest; manually verified that NotiHistoryDatabase stopped erroring
Fixes: 185257041
Change-Id: I56c4a3293166a84e29920afe5549171becdaa496
parent a6d011d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment