Grab a partial wakelock when doing fstrim
Fstrim can take a while, so grab a wakelock so it finishes now,
not when the user picks up the device and wakes it back up.
This change does not protect against multiple calls to fstrim
before the first one completes. When the first one completes, it
will release the wakelock, and the device will go to sleep.
However, normal usage is this will not be invoked by the framework
more than once a day, so this should not be an issue.
1 file changed