summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorHui Yu <huiyu@google.com>2018-12-13 12:02:00 -0800
committerHui Yu <huiyu@google.com>2019-01-16 11:13:58 -0800
commitb1d243a51b003066bb64a791af2752435f0efe7c (patch)
tree845fcc8f050e7122d9ae3d473b59358694cb0aa1 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent1960cd48596d0e47e7963e2d66071219b460d554 (diff)
UsageStats DEVICE_SHUTDOWN event.
DEVICE_SHUTDOWN event is used to close all open usage events that do not have matching closing event when device is shut down. For example, ACTIVITY_RESUMED or FOREGROUND_SERVICE_START are open events, the DEVICE_SHUTDOWN event will close the usage session of the open events. At orderly shutdown like selecting Power Off or Restart after pressing power button, a DEVICE_SHUTDOWN event is sent to UsageStats. UsageStats persists UsageStatsDatabase to disk immediately. When power button is pressed for 3.5 seconds (configured by config_veryLongPressTimeout in config.xml). A DEVICE_SHUTDOWN event is sent to UsageStats. UsageStats persists UsageStatsDatabase to disk immediately. This is the mechanism that we do not lose UsageStats data when the device is shut down. When the device boots up, if the last event is not DEVICE_SHUTDOWN, we add a DEVICE_SHUTDOWN with timestamp set to be the last time database file is persisted. This is to handle the case device shutdown abruptly due to power drained or cold temperature. Bug: 111464278 Test: atest UsageStatsTest.java Change-Id: I1e88063ba71d09042d02c6deb9f07d8581a15c30
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions