Make timestamps of notification related events a bit more accurate.

Instead of using the timestamps at which the events are about to be
reported, generate the timestamps closer to when the events are
triggered.

Bug: 206518114
Test: atest services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
Test: atest services/tests/uiservicestests/src/com/android/server/notification/NotificationPermissionMigrationTest.java
Test: atest ./tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java

Change-Id: I8efbca5a166d3e96defd8091b55c619750583b51
3 files changed