China will "take action" if US threatens security