Patent ID: 8594720

Claim:
An electronic device provided with a wireless communication function, comprising: a wireless communication section to wirelessly communicate with a predetermined external device; a first controlling section to cause the wireless communication section to establish a wireless connection with the predetermined external device to be in a condition communicable with each other; a condition detective section to detect whether the electronic device is in a used condition or in an unused condition; a second controlling section to shift the electronic device to a power-saving mode where a predetermined function is stopped, when the condition detective section detects the unused condition for a predetermined period of time; and a third controlling section to cancel the power-saving mode when the condition detective section detects the used condition after having shifted to the power-saving mode, wherein the second controlling section cuts off the wireless connection if the wireless connection still has not been cut off when the second controlling section shifts the electronic device to the power-saving mode; and the third controlling section changes a connecting processing for causing the first controlling section to establish the wireless connection after the power-saving mode was canceled, based on condition of the wireless connection from a time of detecting the last used condition by the condition detective section to a time of shifting to the power-saving mode.