Merge "Checks if there is a device state override active to determine if the device should be put to sleep or not" into tm-dev