Electronic device for reducing occurrence of unintended user input and operation method for the same
In an electronic device and a method of operating an electronic device according to various embodiments, the electronic device may include: a foldable housing, including a hinge, a first housing connected to the hinge and including a first surface facing a first direction and a second surface facing a second direction opposite the first direction, and a second housing connected to the hinge, including a third surface facing a third direction and a fourth surface facing a fourth direction opposite the third direction, the second housing configured to be foldable with respect to the first housing about the hinge, wherein the first surface faces the third surface in a folded state of the electronic device; a display extending from the first surface to the third surface to provide the first surface and the third surface and including a touch controller configured to control a receiving function of an input on the display; a processor disposed inside the first or second housing and operatively coupled to the display; and a memory operatively connected to the processor, wherein the memory may store instructions that, when executed, cause the processor to control the electronic device to: detect the occurrence of changing an angle between the first housing and the second housing; receive a touch interrupt produced based on an input on the display; identify characteristics of the input in response to detecting the change in the angle; and determine whether to cancel the touch event corresponding to the input based on the characteristics of the input.
1. An electronic device comprising:
a foldable housing comprising
a hinge,
a first housing connected to the hinge and comprising a first surface facing a first direction and a second surface facing a second direction opposite the first direction, and
a second housing connected to the hinge, comprising a third surface facing a third direction and a fourth surface facing a fourth direction opposite the third direction, and configured to be foldable with respect to the first housing about the hinge,
wherein the first surface faces the third surface in a folded state of the electronic device;
a display extending from the first surface to the third surface to provide the first surface and the third surface and comprising a touch controller configured to control a receiving function of an input on the display;
a processor disposed inside the first housing or the second housing and operatively coupled to the display; and
a memory operatively connected to the processor,
wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
detect changing an angle between the first housing and the second housing;
receive a touch interrupt produced based on an input on the display;
identify the characteristics of the input in response to detecting the change in the angle; and
determine whether to cancel the touch event corresponding to the input, based on the characteristics of the input.
2. The electronic device of claim 1 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
determine whether the input is produced due to the change of the angle between the first housing and the second housing; and
cancel the touch event corresponding to the input based on the determination result.
3. The electronic device of claim 1 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: process the touch event corresponding to the input received after the change of the angle is terminated in response to identifying that the change of the angle is terminated.
4. The electronic device of claim 3 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: control the touch controller to not produce an interrupt corresponding to the input based on the input being received and in response to identifying that the amount of change in the angle is equal to or greater than a predetermined value.
5. The electronic device of claim 1 , wherein the electronic device further comprises a sensor configured to sense an angle between the first housing and the second housing, and
wherein the memory is configured to store instructions that, when executed, cause the processor to control the sensor to transmit an angle event for the change in the angle to the processor or to the touch controller.
6. The electronic device of claim 1 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: control the touch controller to change a sampling rate for sensing the input in response to detecting the change in the angle.
7. The electronic device of claim 6 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to change the sampling rate of the touch controller based on a period in which a sensor for detecting an angle between the first housing structure and the second housing structure detects the angle.
8. An electronic device comprising:
a foldable housing comprising
a hinge,
a first housing connected to the hinge and comprising a first surface facing a first direction and a second surface facing a second direction opposite the first direction, and
a second housing connected to the hinge, comprising a third surface facing a third direction and a fourth surface facing a fourth direction opposite the third direction, and configured to be foldable with respect to the first housing about the hinge structure,
wherein the first surface faces the third surface in a folded state of the electronic device;
a first display extending from the first surface to the third surface to provide the first surface and the third surface and comprising a first touch controller configured to control a receiving function of an input on the first display;
a second display providing the second surface or the fourth surface and comprising a second touch controller configured to control a receiving function of an input on the second display;
a processor disposed inside the first housing or second housing and operatively coupled to the first display and the second display; and
a memory operatively connected to the processor,
wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
detect changing of an angle between the first housing and the second housing;
identify the characteristics of the input in response to detecting the change of the angle; and
determine whether to cancel the touch event corresponding to the input based on the characteristics of the input.
9. The electronic device of claim 8 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
switch the first display to an inactive state and switch the second display to an active state in response to identifying that the change of the angle is terminated; and
process a touch event corresponding to an input on the second display after the change of the angle is terminated.
10. The electronic device of claim 8 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
determine whether the input is produced due to the change of the angle between the first housing and the second housing; and
cancel the touch event corresponding to the input based on the determination result.
11. The electronic device of claim 8 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: control the first touch controller to not produce an interrupt corresponding to the input based on the input being received and in response to identifying that the change in the angle is equal to or greater than a predetermined value.
12. The electronic device of claim 8 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: control the first touch controller to change a sampling rate for sensing the input in response to detecting the change in the angle.
13. The electronic device of claim 12 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to: change the sampling rate of the first touch controller based on a period in which a sensor for detecting an angle between the first housing and the second housing detects the angle.
14. The electronic device of claim 8 , wherein the memory is configured to store instructions that, when executed, cause the processor to control the electronic device to:
receive a touch interrupt produced based on an input on the second display while the first display is in an inactive state and the second display is in an active state;
detect whether an event of change in the angle between the first housing and the second housing occurs; and
cancel the touch event corresponding to the input in response to detecting the change in the angle.
15. A method of operating an electronic device, the method comprising:
detecting whether an event of changing an angle between a first housing connected to a hinge and including a first surface facing a first direction and a second surface facing a second direction opposite the first direction, and a second housing connected to the hinge and including a third surface facing a third direction and a fourth surface facing a fourth direction opposite the third direction, the second housing configured to be foldable with respect to the first housing about the hinge, occurs;
receiving a touch interrupt produced based on input on a display;
identifying characteristics of the input in response to detecting a change in the angle; and
determining whether to cancel the touch event corresponding to the input based on the characteristics of the user input.
16. The method of claim 15 , further comprising:
determining whether the input is produced due to the change of the angle between the first housing and the second housing; and
cancelling the touch event corresponding to the input based on the determination result.
17. The method of claim 15 , further comprising, based on the input being received, in response to identifying that the amount of change in the angle is equal to or greater than a predetermined value, controlling a touch controller to not produce an interrupt corresponding to the input.
18. The method of claim 17 , further comprising transmitting an angle event for the change in the angle to a processor or the touch controller by a sensor for detecting an angle between the first housing and the second housing.
19. The method of claim 15 , further comprising, in response to detecting the occurrence of the change in the angle, controlling the touch controller to change a sampling rate for sensing the input.
20. The method of claim 19 , wherein the controlling the touch controller comprises changing the sampling rate of the touch controller based on a period in which a sensor for detecting an angle between the first housing and the second housing detects the angle.