Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e655f02 authored by James Hawkins's avatar James Hawkins
Browse files

bootstat: Gate boot time metrics logging on an encrypted device being decrypted.

This prevents double-counting boot metrics for encrypted devices.

Bug: 27454346
Change-Id: If63dd421e4f91a01b43d730d59896544a26d138a
parent ad5dc479
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -3,10 +3,13 @@
on post-fs-data
on post-fs-data
    mkdir /data/misc/bootstat 0700 root root
    mkdir /data/misc/bootstat 0700 root root


# This marker, boot animation stopped, is considered the point at which the
# The first marker, boot animation stopped, is considered the point at which
# the user may interact with the device, so it is a good proxy for the boot
# the user may interact with the device, so it is a good proxy for the boot
# complete signal.
# complete signal.
on property:init.svc.bootanim=stopped
#
# The second marker ensures an encrypted device is decrypted before logging
# boot time data.
on property:init.svc.bootanim=stopped && property:vold.decrypt=trigger_restart_framework
    # Record boot_complete timing event.
    # Record boot_complete timing event.
    exec - root root -- /system/bin/bootstat -r boot_complete
    exec - root root -- /system/bin/bootstat -r boot_complete