Merge "Move DeviceIdle to the JS apex"