An electronic device (100/200), the electronic device (100/200) comprising: a display, a charging unit for charging a battery, and a controller configured to: detect that an external power source, for charging the battery, is connected to the electronic device (100/200); determine whether the display of the electronic device (100/200) is in an active state or an inactive state; characterised in that the controller is further configured to: if the display of the electronic device (100/200) is in the inactive state, charge the battery using a first charging current based on a charging current from the external power source, wherein a maximum value of the first charging current is adaptively changed based on an allowable heat emission range inside the electronic device while the display is in the inactive state; and if the display of the electronic device (100/200) is in the active state, charge the battery using a second charging current based on the charging current from the external power source, wherein a maximum value of the second charging current is adaptively changed based on another allowable heat emission range inside the electronic device while the display is in the active state; and wherein the maximum value of the second charging current is lower than the maximum value of the first charging current. a display, a charging unit for charging a battery, and a controller configured to: detect that an external power source, for charging the battery, is connected to the electronic device (100/200); determine whether the display of the electronic device (100/200) is in an active state or an inactive state; characterised in that the controller is further configured to: if the display of the electronic device (100/200) is in the inactive state, charge the battery using a first charging current based on a charging current from the external power source, wherein a maximum value of the first charging current is adaptively changed based on an allowable heat emission range inside the electronic device while the display is in the inactive state; and if the display of the electronic device (100/200) is in the active state, charge the battery using a second charging current based on the charging current from the external power source, wherein a maximum value of the second charging current is adaptively changed based on another allowable heat emission range inside the electronic device while the display is in the active state; and wherein the maximum value of the second charging current is lower than the maximum value of the first charging current. detect that an external power source, for charging the battery, is connected to the electronic device (100/200); determine whether the display of the electronic device (100/200) is in an active state or an inactive state; characterised in that the controller is further configured to: if the display of the electronic device (100/200) is in the inactive state, charge the battery using a first charging current based on a charging current from the external power source, wherein a maximum value of the first charging current is adaptively changed based on an allowable heat emission range inside the electronic device while the display is in the inactive state; and if the display of the electronic device (100/200) is in the active state, charge the battery using a second charging current based on the charging current from the external power source, wherein a maximum value of the second charging current is adaptively changed based on another allowable heat emission range inside the electronic device while the display is in the active state; and wherein the maximum value of the second charging current is lower than the maximum value of the first charging current. if the display of the electronic device (100/200) is in the inactive state, charge the battery using a first charging current based on a charging current from the external power source, wherein a maximum value of the first charging current is adaptively changed based on an allowable heat emission range inside the electronic device while the display is in the inactive state; and if the display of the electronic device (100/200) is in the active state, charge the battery using a second charging current based on the charging current from the external power source, wherein a maximum value of the second charging current is adaptively changed based on another allowable heat emission range inside the electronic device while the display is in the active state; and wherein the maximum value of the second charging current is lower than the maximum value of the first charging current.