# pixel-experiments-recovery.sh waits Perf__experiments_delay_seconds and sets
# vendor.perf.allow_experiments=1, triggering experiments.
service pixel-experiments-recovery /vendor/bin/pixel-experiments-recovery.sh \
    ${vendor.pixel.system.phenotype.Perf__experiments_delay_seconds}
    class main
    user root
    group root system
    oneshot
    disabled

# vendor.pixel.system.phenotype.Perf__xxx properties are set sometime after the
# device is unlocked for the first time. The check for sys.boot_completed is not
# strictly needed, but will prevent surprises if for some reason the property
# is set early.
on property:sys.boot_completed=1 && \
    property:vendor.pixel.system.phenotype.Perf__experiments_delay_seconds=*
    restart pixel-experiments-recovery
