Electronic device comprising:
processing unit including accepting part accepting
processing request from external device and executing process specified by request; secondary battery connected with external power source; and power-source device transitioning to operating state when request is accepted in waiting state, and transitioning to waiting state when
processing unit completes executing process, wherein, in waiting state, power supply from external power source to processing unit is stopped and secondary battery supplies power to accepting part, and in operating state, power is supplied from external power source to processing unit. Power-source device includes controller executing first
charge control operation to cause external power source to charge secondary battery when, in operating state,
voltage of secondary battery is not higher than threshold, and end executing first
charge control operation when transitioning to waiting state, controller updating threshold in response to increase in number of times first
charge control operation is executed.