I am building a board where the power input can come from a battery or an adapter. So, I used a 3-polled DC jack and the schematic depicted below. My aim is that when a plug is connected to the jack, the Battery GND signal will be disconnected. When the plug is taken out again, the Battery GND is connected again and the circuit contiunes getting power. Does the circuit in the schemtic work?