The input terminal is monitored for voltage collapse, indicating whether or not the power adapter is connected.