主权项 |
1. A method being executed by a processor of a flexible electronic device, the flexible electronic device comprising a flexible display, a plurality of gravity sensors and a proximity sensor, the method comprising:
(a) receiving current position data of two gravity sensors of the flexible electronic device, wherein the two gravity sensors are positioned at opposite sides of the flexible display; (b) calculating a reference angle of each of the opposite sides of the flexible electronic device within a preset period according to the current position data, and determining whether the reference angle of one of the opposite sides of the flexible electronic device exceeds a preset value; (c) receiving a distance between the two gravity sensors from the proximity sensor located at one of the opposite sides of the flexible display, in response to determining that the reference angle of either one of the opposite sides of the flexible electronic device exceeds the preset value; (d) switching the flexible electronic device from a work status to a sleep status, in response to determining that the flexible electronic device is first in the work status and the distance between the opposite sides of the flexible electronic device is less than a first preset distance; or (e) switching the flexible electronic device from the sleep status to the work status, in response to determining that the flexible electronic device is first in the sleep status and the distance between the opposite sides of the flexible electronic device is more than a second preset distance. |