Enable app op history and fix a bug where history was lost.
We are enabling the appop history - brace yourself. We were computing the last write time based on the last modified timestamp of the first historical file but since we don't write files that have no content the first file may not be there. This change looks up at the timestamp of the history file for the most recent time inteval. Also when persisting history we were diving recursively until all old files are copied to the new state via hard links but failed to take into account that some files for more recent periods may not be present as we don't store empty files. Added some logic to store WTF on disk including stack trace and historical file names on debuggable builds as this is useful to track cases where we nuke history due to a bad state. Test: atest AppOpsTestCases bug:111061782 Change-Id: I545cc02f82b1cf7e3b28858d69518bd3fbf9f3a0
Loading
Please register or sign in to comment