Does a device use battery or mains power when plugged in?

A post was split to a new topic: Any reason this problem isn’t a dying battery?