Which phone does the gesture control function operate on when the Buds are connected to two phones?

If the earphones are outputting sound from a specific mobile device, the press control will operate that device. If the earphones are not playing back sound, the control will be directed to the last connected device or the device that last emitted sound through the earphones.