Switching method of touch feedback function, electronic equipment and readable medium
By providing the touch feedback function on and off during screen recording, users can control whether the display screen displays touch marks, solving the problem that the touch feedback function cannot be turned off during screen recording, improving user experience and automatically adjusting the function status according to preferences.
Patent Information
- Application Number
- CN202310851306.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-01-14
AI Technical Summary
During the recording process, the user cannot effectively control the touch feedback function, resulting in the display screen continuously displaying touch marks during the recording video, interfering with the user experience.
A switching method for touch feedback function is provided. By displaying a specific interface during screen recording, the user can turn the touch feedback function on or off through the operation control and record the user preference settings to automatically control the status of the function during the next screen recording.
It realizes that during screen recording, users can independently select whether to display touch feedback, reduce interference, improve user experience, and automatically adjust the display according to user preferences when playing screen recording video.
Smart Images

Figure CN119316517A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of screen recording technology, and in particular to a touch feedback function switching method, electronic device, computer program product and computer-readable storage medium. Background Art
[0002] Electronic devices are usually equipped with screen recording applications. When a user opens the screen recording application, the screen recording application performs screen recording. During the screen recording, the display screen of the mobile phone will display the user's touch position in real time in the form of a display mark (such as a white dot). In addition, after the screen recording is completed, the display screen of the mobile phone will also display the mark during the playback of the recorded video. Summary of the invention
[0003] The present application provides a touch feedback function switching method, electronic device, computer program product and computer-readable storage medium, which can turn the touch feedback function on or off during screen recording.
[0004] In order to achieve the above objectives, this application provides the following technical solutions:
[0005] In a first aspect, the present application provides a method for switching a touch feedback function, comprising: an electronic device displays a first interface during screen recording, the first interface including a first control in a first state; in response to a first touch operation on the first interface, the first interface displays a touch feedback mark corresponding to the position of the first touch operation; in response to the first operation on the first control, the first control changes to a second state; when the first control is in the second state, when a second touch operation on the first interface is received, the touch feedback mark is not displayed in the first interface.
[0006] It can be seen from the above content that: during screen recording, the electronic device displays a first interface, the user inputs a first touch operation on the first interface, and the first interface displays a touch feedback mark corresponding to the position of the first touch operation, so that the touch feedback function is turned on; the user performs a first operation on the first control, the first control is in a second state, the user inputs a second touch operation on the first interface, and the touch feedback mark is not displayed in the first interface, so that the touch feedback function is turned off, and the user realizes turning on or off the touch feedback function during screen recording by operating the first control.
[0007] In one possible embodiment, the switching method of the touch feedback function also includes: in response to a second operation, the electronic device starts playing a first playback screen in the screen recording video, and the first playback screen includes a touch feedback mark; in response to a third operation for progress jump, the electronic device plays a second playback screen of the screen recording video, and the second playback screen does not include a touch feedback mark; wherein the first playback screen is a screen before the progress corresponding to a target time in the screen recording video, and the second playback screen is a screen after the progress corresponding to the target time in the screen recording video, and the target time is the time when the electronic device receives the first operation during the screen recording process.
[0008] In the above possible implementation, the first operation is the user's operation on the first control, which is used to turn off the touch feedback function. During the playback of the screen recording video, the picture before the moment of the first operation may include a touch feedback mark, and the picture after the moment of the second operation does not include a touch feedback mark.
[0009] In a possible implementation, after the first control changes to the second state in response to an operation on the first control, the method further includes: the electronic device recording the second state of the first control in the user's preference setting for the touch feedback function.
[0010] In the above possible implementation, the user's preference setting for the touch function is the basis for automatically turning off or turning on the touch feedback function when the electronic device starts the screen recording application next time. After the user switches the first control to the second state to turn off the touch feedback function, the electronic device records the second state of the first control in the user's preference setting for the touch feedback function, and the electronic device can automatically turn off the touch feedback function after the screen recording application is started next time.
[0011] In a possible implementation, the method for switching the touch feedback function also includes: the electronic device obtains the user's preference setting for the touch feedback function in response to the operation of starting screen recording again, and the user's preference setting for the touch feedback function is to turn off the touch feedback function; the electronic device displays a third interface during the screen recording process; when a third touch operation on the third interface is received, the third interface does not display a touch feedback mark.
[0012] In the above possible implementation manner, the user's preference for the touch feedback function is set to turn off the touch feedback function. In this way, after the electronic device starts the screen recording operation again, the electronic device automatically turns off the touch feedback function. In this way, the third interface is displayed during the screen recording process, and the user performs a third touch operation on the third interface, and the third interface does not display the touch feedback mark.
[0013] In a possible implementation, the first control has a corresponding state parameter, and in response to an operation on the first control, after the first control changes to the second state, the electronic device writes the state parameter of the first control in the second state into the touch feedback function configuration item to turn off the touch feedback function. After the user operates the first control, the electronic device writes the state parameter of the first control into the touch feedback function configuration item, so as to turn off the touch feedback function in response to the user operation.
[0014] In one possible implementation, the electronic device writes the state parameters of the first control in the second state into a touch feedback function configuration item to turn off the touch feedback function, including: the electronic device sets the state parameters of the first control in the second state to the value of the touch feedback function variable; the electronic device writes the value of the touch feedback function variable into the touch feedback function configuration item to turn off the touch feedback function.
[0015] In a possible implementation, the method for switching the touch feedback function on and off further includes: the electronic device receives a fourth operation to end screen recording; and the electronic device responds to the fourth operation, ends screen recording and controls the touch feedback function to remain off.
[0016] In the above possible implementation manner, after the screen recording is completed, the electronic device controls the touch feedback function to remain off, so that in other scenarios, when the user inputs a touch operation to the display screen, the display screen does not display a touch feedback mark.
[0017] In a possible implementation, controlling the touch feedback function to remain turned off includes: writing a state parameter of the first control in the second state into a touch feedback function configuration item.
[0018] In a possible implementation, before the electronic device displays the first interface during screen recording, it also includes: the electronic device receives an operation to start screen recording; the electronic device responds to the operation to start screen recording, starts screen recording and displays a pop-up window, and the pop-up window includes a first button; the electronic device displays the first interface during screen recording, including: the electronic device responds to the operation of the first button, and displays the first interface. The first button is a functional control that controls the electronic device to display the first control.
[0019] In a possible implementation, before the electronic device displays the first interface during screen recording, it also includes: the electronic device obtains the user's preference setting for the touch feedback function in response to the operation of starting screen recording, and the user's preference setting for the touch feedback function is to turn on the touch feedback function.
[0020] In one possible implementation, before the electronic device displays the first interface during screen recording, it also includes: the electronic device responds to the operation of starting screen recording, does not obtain the user's preference setting for the user's touch feedback function, and the touch feedback function is turned on according to the default value, and the default value corresponds to the first control being in the first state.
[0021] In the above possible implementation manner, when the electronic device starts screen recording, the user's preference setting for the touch feedback function is not obtained, indicating that the electronic device is starting the screen recording application for the first time, and the electronic device turns on the touch feedback function with the default value.
[0022] In a possible implementation, the method for turning on and off the touch feedback function further includes: the electronic device turning on the touch feedback function according to a user's preference setting for the touch feedback function.
[0023] In one possible implementation, the electronic device obtains the user's preference settings for the touch feedback function in response to the operation of starting screen recording, including: the electronic device obtains the key-value pairs corresponding to the user's preference settings for the touch feedback function from the storage object in response to the operation of starting screen recording.
[0024] In a possible implementation, the electronic device fails to obtain the user's preference setting for the touch feedback function in response to starting the screen recording operation, including: the electronic device fails to query the key-value pair corresponding to the user's preference setting for the touch feedback function in the storage object.
[0025] In a possible implementation, the user's preference settings for the touch feedback function are used as backup data for a cloning replacement scenario. When the electronic device is cloned and replaced, the user's preference settings for the touch feedback are migrated from the old device to the new device.
[0026] In this possible implementation, the user's preference setting for the touch feedback function is used as backup data for the cloning replacement scenario, which can ensure that after the electronic device is cloned and replaced, the new device can continue to retain the user's switch preference for the touch feedback function on the old device.
[0027] In a second aspect, the present application provides an electronic device comprising: one or more processors, a memory and a display screen; the memory and the display screen are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the switch method of the touch feedback function as described in any one of the first aspects.
[0028] In a third aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed, is specifically used to implement a switch method for a touch feedback function as described in any one of the first aspects.
[0029] In a fourth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computer executes the method for switching the touch feedback function as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is the interface diagram of the mobile phone recording the user operation after the screen recording function is started;
[0031] Figure 2 This is an interface diagram of a mobile phone recording a user operation after the touch feedback function of the screen recording application is turned off according to an embodiment of the present application;
[0032] Figure 3 This is an interface diagram of a mobile phone playing a screen recording video provided in an embodiment of the present application;
[0033] Figure 4 After the screen recording function is started according to the embodiment of the present application, the touch feedback function of the screen recording application is in a closed state;
[0034] Figure 5 This is an interface diagram of the machine replacement cloning scenario provided in an embodiment of the present application;
[0035] Figure 6 A hardware structure diagram of an electronic device provided in an embodiment of the present application;
[0036] Figure 7 A flow chart of a method for turning on and off a touch feedback function provided in an embodiment of the present application;
[0037] Figure 8 Another flow chart of a method for switching on and off a touch feedback function provided in an embodiment of the present application;
[0038] Fig. 9 A software framework diagram of an electronic device provided in an embodiment of the present application;
[0039] Fig.10 A signaling diagram of a method for switching a touch feedback function provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0041] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0042] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.
[0043] Screen recording, or screen recording, is used to record the changes in the display content of an electronic device over a period of time (including user operations and video playback, etc.), and convert the recorded content into a screen recording video. Electronic devices are usually equipped with a screen recording application. When the user opens the screen recording application, the screen recording application performs screen recording.
[0044] Figure 1 Taking a mobile phone as an example, the following interface diagram of the screen recording scene is shown. Figure 1As shown in (a), the mobile phone starts the screen recording application, and a pop-up window 101 of the screen recording application is displayed on the top of the mobile phone. The pop-up window 101 displays a microphone on / off button, an end button of screen recording, and a screen recording time. The user can turn the microphone on and off by clicking the microphone on / off button, and can also end the screen recording by clicking the end button of screen recording.
[0045] During screen recording, the mobile phone display screen can display the user's touch track in real time in the form of display marks. And after the screen recording is completed, the mobile phone display screen can also display the mark during the playback of the screen recording video. For example, Figure 1 As shown in (a), 10 seconds after the user starts recording the screen, the user performs a touch operation on a blank area of the mobile phone display screen, and the mobile phone display screen displays a white dot mark 102 at the location touched by the user. Figure 1 As shown in (b), when the screen recording video is played to the 10th second, the mobile phone display screen also displays a white dot mark 102 at the position touched by the user.
[0046] Figure 1 The demonstrated mobile phone records the user's touch position during screen recording, and the function of the mobile phone display screen displaying a mark at the touch position in real time is usually called a touch feedback function (or a display touch screen operation function, etc.). The touch feedback function of electronic devices such as mobile phones is usually turned on by default. In this way, the electronic device starts screen recording, and during the screen recording, the user inputs operations such as clicking and sliding on the touch screen, and the display screen can display a mark at the user's touch position. However, the mark displayed on the display screen during screen recording may cause interference to the user.
[0047] Based on this, an embodiment of the present application provides a method for switching a touch feedback function, which can enable the user to turn off or on the touch feedback function during screen recording, and can also record the user's preference settings for turning off or on the touch feedback function, so that the touch feedback function can be automatically turned off or on according to the user's preference settings the next time the user opens the screen recording application.
[0048] The following takes a mobile phone as an example, combined with Figure 2 This section describes how to turn off or on the touch feedback function during screen recording.
[0049] The user inputs an operation to start screen recording, such as Figure 2 As shown in (a), the user double-clicks the screen with two knuckles, and the phone responds to the user's operation, such as Figure 2 As shown in (b), the interface of the mobile phone to start the screen recording application is shown. Exemplarily, a pop-up window 101 of the screen recording application is displayed at the top of the mobile phone, and the pop-up window 101 includes: a microphone on / off button, an end button for screen recording, a screen recording time, and more buttons 103.
[0050] During screen recording, users can Figure 2As shown in (b), click the more button 103. In response to the user clicking the control 103, the mobile phone displays the following Figure 2 The interface shown in (c) includes a pop-up window 104, which is located at the upper layer of the display interface of the display screen and includes a switch button 105 for the touch feedback function. The user can turn on and off the touch feedback function of the screen recording by clicking the switch button 105.
[0051] In some embodiments, Figure 2 The switch button 105 shown in (c) is in the on state. In this way, when the user inputs the operation of touching the display screen during the screen recording, the display screen can synchronously display a mark at the user's touch position. For example, Figure 2 As shown in (f), 8 seconds after the user started screen recording, the user performed a touch operation on a blank area of the mobile phone display, and a white dot mark was displayed on the mobile phone display at the position touched by the user.
[0052] The user can click the switch button 105 to turn off the touch feedback function. Figure 2 As shown in (c), the switch button 105 is clicked, and the dot in the switch button 105 moves from the right side of the waist-shaped frame to the left side, the waist-shaped frame is grayed out, and the switch button 105 is in the off state, as shown in FIG. Figure 2 As shown in (d) in the figure. During the screen recording, when the user inputs the operation of touching the display screen, the display screen will not synchronously display a mark at the user's touch position. For example, after the user operates the switch button 105 to turn off the touch feedback function, as shown in Figure 2 As shown in (e), 12 seconds after the user started screen recording, the user performed a touch operation on a blank area of the mobile phone display. The mobile phone display did not display a white dot mark at the location where the user touched.
[0053] Of course, the display form of the switch button 105 in the switch state is not limited to Figure 2 Way of display.
[0054] In one possible implementation, the user Figure 2 Clicking a blank area of the interface shown in (c) does not change the state of the on / off button of the touch feedback function, and the pop-up window 104 may disappear. Alternatively, the pop-up window 104 may automatically disappear after being displayed for a period of time. Figure 2 When a blank area of the interface is clicked on in the interface shown in (d), the state of the switch button of the touch feedback function does not change, and the pop-up window 104 may disappear. Alternatively, the pop-up window 104 may disappear automatically after being displayed for a period of time.
[0055] After the user finishes screen recording, during the playback of the recorded video, when the touch feedback function is turned on, the phone's display screen may display a mark. When the touch feedback function is turned off, the phone's display screen will not display a mark.
[0056] like Figure 3 As shown in (a), the user clicks the end button of the screen recording to end the screen recording, and the mobile phone can Figure 3 As shown in (b), the screen recording video is played. At the 8th second of the screen recording video, the mobile phone display screen displays a white dot mark 102. Because the user operates the switch button to turn off the touch feedback function at the 11th second after turning on the screen recording, the screen recording video is played at the 12th second, and the mobile phone display screen does not display a white dot mark at the user touch position indicated by the dotted box 106.
[0057] like Figure 3 As shown in (a), the user clicks the end button of the screen recording to end the screen recording, and the mobile phone can save the screen recording video. The user can find the screen recording video in the gallery application and control the playback of the screen recording video. The interface of the mobile phone to play the screen recording video can be as follows: Figure 3 As shown in (b), (c) and (d).
[0058] The setting method of the switch button of the touch feedback function is not limited to Figure 2 In some embodiments, the pop-up window 103 may include a switch button for a touch feedback function.
[0059] In some embodiments, the more button 103 in the pop-up window 101 of the screen recording application may also include switch buttons for other functions of the screen recording application. In a scenario where the more button 103 includes switch buttons for multiple functions of the screen recording application, the user clicks the more button 103. The mobile phone may display the multiple functions included in the more button 103 in the form of a pop-up window or a submenu, and after the user selects a function, the mobile phone displays the switch button for the function selected by the user.
[0060] User Figure 2 As shown in (c), after turning off the touch feedback function by turning off the switch button 105, the mobile phone records the switch button 105 in the off state as the user's preference setting for the touch feedback function based on the user's turning off the touch feedback function, that is, the mobile phone records the user's turning off the touch feedback function as its preference.
[0061] In some embodiments, the user performs multiple operations of turning the switch button 105 on and off, and finally turns on the switch button 105. The mobile phone can record the state of the touch feedback function after the user last operates the switch button 105 as the preference, that is, records turning on the touch feedback function as the preference. The mobile phone can also record the state of the touch feedback function after each operation of the switch button 105 by the user as the preference, and the preference setting recorded later can overwrite the preference setting recorded previously.
[0062] In some embodiments, the user does not operate the switch button 105, and the switch button 105 remains in the on state. The mobile phone may not record the user's preference setting for the touch feedback function, or may record the user's preference setting for touch feedback to turn on the touch feedback function.
[0063] The next time the user starts recording the screen, the phone can automatically turn on or off the touch feedback function based on the user's preference for the touch feedback function. Figure 4 The user's preference for the touch feedback function is set to turn off the touch feedback function. The mobile phone starts the screen recording application again and automatically turns off the touch feedback function for introduction.
[0064] The user opens the screen recording app again, and the phone Figure 4 As shown in (a), the screen displays a pop-up window of the screen recording application. Figure 4 As shown in (a), click the more button 103 to check the on / off status of the touch feedback function, and the mobile phone display screen is as shown in FIG. Figure 4 As shown in (b), a pop-up window 104 is displayed, and the switch button 105 of the touch feedback function is in the off state.
[0065] In some embodiments, the user's preference settings for the touch feedback function can be used as backup data for the screen recording application. When performing a device cloning operation between an old device and a new device, the user's preference settings for the touch feedback function can be migrated from the old device to the new device.
[0066] Figure 5 This shows the process of finding the backup data of the screen recording application of the old device in the device replacement and cloning scenario. Figure 5 After the new and old devices are connected, the old device displays Figure 5 (b) shows the data that can be migrated to the new device. Users can Figure 5 In the interface shown in (b), select the data to be migrated to the new device. Figure 5 As shown in (b), click the system setting item 107, and the mobile phone displays multiple system-level applications included in the system setting, for example, Figure 5 (c) shows several system-level applications. Figure 5 As shown in (c), after selecting the screen recording application (i.e., the screen recording application), the backup data of the screen recording application of the old device can be migrated to the new device. Figure 5 In the interface shown in (c), the alarm clock, SMS device and calendar settings are unchecked, and Figure 5As shown in (b), music, documents, and notes are also unselected, so the backup data of music, documents, and notes from the old device, as well as the backup data of alarms, text messages, and calendars in the old device's system settings will not be migrated to the new device.
[0067] After the user opens the screen recording application on the new device, the new device uses the user's preferences for the touch feedback function recorded on the old device to automatically turn on or off the touch feedback function.
[0068] The touch feedback function switch method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablet computers, personal digital assistants (PDA), desktops, laptops, notebook computers, ultra-mobile personal computers (UMPC), handheld computers, netbooks and wearable devices.
[0069] Take mobile phones as an example. Figure 6 This is an example of the composition of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device 100 may include a processor 110, an internal memory 120, a camera 130, a display screen 140, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, and the like.
[0070] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100. In other embodiments, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0071] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a smart sensor hub and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0072] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0073] The internal memory 120 may be used to store computer executable program codes, where the executable program codes include instructions.
[0074] In some embodiments, the internal memory 120 stores instructions for executing a method for switching the touch feedback function. The processor 110 can execute the instructions stored in the internal memory 120 to enable the user to turn off or on the touch feedback function during screen recording, and can also record the user's preference setting for turning off or on the touch feedback function, and automatically turn off or on the touch feedback function according to the user's preference setting when the user starts the screen recording application next time.
[0075] The electronic device implements the display function through a GPU, a display screen 140, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 140 and the application processor. The GPU is used for image rendering by performing mathematical and geometric calculations. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0076] The display screen 140 is used to display images, video interfaces, etc. In some embodiments, the electronic device may include 1 or N display screens 140 , where N is a positive integer greater than 1.
[0077] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0078] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic device 100. Wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to electronic device 100.
[0079] The electronic device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0080] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The speaker 170A, also known as the "speaker", is used to convert audio electrical signals into sound signals. The electronic device can listen to music or listen to hands-free calls through the speaker 170A. The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device answers a call or voice message, the voice can be answered by placing the receiver 170B close to the human ear. The microphone 170C, also known as the "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by placing the human mouth close to the microphone 170C to input the sound signal into the microphone 170C. The headphone interface 170D is used to connect wired headphones. The earphone interface 170D may be a USB interface, or a 3.5 mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0081] In the sensor module 180, the pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 140, the electronic device detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device can also calculate the touch position based on the detection signal of the pressure sensor 180A.
[0082] The touch sensor 180B is also called a "touch control device". The touch sensor 180B can be set on the display screen 140. The touch sensor 180B and the display screen 140 form a touch screen, also called a "touch control screen". The touch sensor 180B is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 140.
[0083] The acceleration sensor 180C can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, it can detect the magnitude and direction of gravity, and can also be used to identify the posture of the electronic device. The gyroscope sensor 180D can be used to determine the motion posture of the electronic device.
[0084] The touch feedback function switching method provided in the embodiment of the present application is as follows: Figure 7 As shown, including:
[0085] S101. The electronic device starts screen recording in response to a user's operation of starting screen recording.
[0086] In some embodiments, the user's operation of starting screen recording may include: inputting a specific operation on the display screen (such as Figure 2 Double-clicking the screen with two knuckles as shown in (a) above), touching specific controls on the display, pressing specific physical buttons, inputting voice, and performing air gestures, etc.
[0087] The user inputs an operation to start the screen recording application, and the electronic device responds to the user's operation and starts the screen recording function. The display screen of the electronic device displays a pop-up window of the screen recording application. For example, Figure 2 (b) shows that an electronic device opens a screen recording application, and the display screen displays a pop-up window interface of the screen recording application.
[0088] S102: The electronic device obtains a user's preference setting for a touch feedback function.
[0089] The screen recording application of the electronic device is configured with SharedPreferences. SharedPreferences can be called storage objects, storage tools, etc. It can be understood as a lightweight storage tool, which usually adopts a storage structure in the form of Key-Value key-value pairs.
[0090] The user's preference setting for the touch feedback function, referred to as the user's preference setting, can be stored in SharedPreferences in the form of a key-value pair. In some embodiments, Key is a keyword indicating the touch feedback function, and Value is a value indicating the user's preference setting for the touch feedback function. Exemplarily, Value is 1, indicating that the user's preference setting for the touch feedback function is to turn off the touch feedback function, and Value is 0, indicating that the user's preference setting for the touch feedback function is to turn on the touch feedback function.
[0091] When the screen recording application is opened by the user, the electronic device first queries and reads the user's preference settings for touch feedback recorded in SharedPreferences.
[0092] S103: The electronic device detects whether the user has a preference setting for a touch feedback function.
[0093] In some embodiments, the electronic device queries whether the key-value pairs corresponding to the user's preference settings for the touch feedback function are stored in SharedPreferences, so that the electronic device can detect whether the user's preference settings exist.
[0094] In one possible implementation, the electronic device may query whether the showstouch-Key is stored in SharedPreferences. If the electronic device finds the showstouch-key, it means that the user's preference setting for the touch feedback function exists, and the electronic device reads the Value corresponding to the showstouch-key. If the electronic device finds that the showstouch-Key is not stored in SharedPreferences, it means that the user's preference setting for the touch feedback function does not exist.
[0095] If the electronic device detects that the user's preference setting for the touch feedback function exists, step S104 is executed; if the electronic device detects that the user's preference setting for the touch feedback function does not exist, step S105 is executed.
[0096] It should be noted that after the electronic device has installed a new version of the screen recording application, the user can Figure 2 Perform the operation shown in (a) to open the screen recording application, and Figure 2 As shown in (b) and (c), the touch feedback function is turned on or off by clicking the switch button 105. The electronic device uses the key-value pair format to record the user's operation of turning on or off the touch feedback function in the SharedPreferences configured by the screen recording application.
[0097] The new version of the screen recording application can be understood as: a version that allows users to turn off or on the touch feedback function during screen recording, and can also record the user's preference settings for turning off or on the touch feedback function. The next time the screen recording application is opened, the touch feedback function will be automatically turned off or on according to the user's preference settings for the touch feedback function.
[0098] Alternatively, in a scenario of device cloning, the electronic device is a new device, and the SharedPreferences of the screen recording application of the old device records the user's preference settings for the touch feedback function. After the new device and the old device are cloned and replaced, the electronic device also records the user's preference settings for the touch feedback function. In some embodiments, the SharedPreferences of the screen recording application of the electronic device records the user's preference settings for the touch feedback function.
[0099] The electronic device detects that the user's preference setting for the touch feedback function does not exist in the following three situations:
[0100] 1. The user opens the new version of the screen recording application for the first time on the electronic device, and the electronic device has not been cloned;
[0101] 2. The electronic device has been cloned, but the old device has not recorded the user's preference for the touch feedback function;
[0102] 3. The electronic device has performed a cloning operation, but the user did not select the backup data of the screen recording of the old device during the cloning operation, resulting in the backup data of the screen recording not being migrated.
[0103] S104: The electronic device sets the value of the first variable according to the user's preference setting for the touch feedback function.
[0104] In some embodiments, the first variable is isShow, i.e., a variable indicating a touch feedback function, and the value of the first variable includes true and false. If the user's preference is set to turn off the touch feedback function, the electronic device sets the value of the first variable to false; otherwise, if the user's preference is set to turn on the touch feedback function, the electronic device sets the value of the first variable to true.
[0105] In one possible implementation, the Value corresponding to the showtouch-Key for indicating the user's preference setting for the touch feedback function is 1, and the electronic device sets the value of the first variable to false; the Value corresponding to the showtouch-Key is 0, and the electronic device sets the value of the first variable to true. Of course, 1 and 0 are exemplary values.
[0106] S105: The electronic device sets the first variable to a value corresponding to enabling a touch feedback function.
[0107] When the electronic device detects that the user's preference setting for the touch feedback function does not exist, the electronic device may set the value of the first variable to a default value. In some embodiments, the default value of the first variable is used to instruct the user to turn on the touch feedback function. Of course, the default value of the first variable may also be used to instruct the user to turn off the touch feedback function, and the default value is not specifically limited.
[0108] After the electronic device executes step S104 and step S105, the electronic device executes step S106.
[0109] S106: The electronic device writes the value of the first variable into the configuration item.
[0110] The electronic device uses the value of the first variable to write a corresponding value in the configuration item. The configuration item is used to control whether the electronic device displays the user's touch position in the form of a mark. In some embodiments, the configuration item can control whether the electronic device displays the user's touch position in the form of a display mark in a variety of application scenarios, and the application scenario is not limited to the screen recording scenario. In some embodiments, the configuration item is the configuration item show_touches in Settings.System.
[0111] In some embodiments, the electronic device recognizes that the value of the first variable is a first value, the electronic device writes the first value in the configuration item, the first value of the first variable indicates that the user's preference is set to turn off the touch feedback function, and the first value of the configuration item indicates that the electronic device does not display the user's touch position; the electronic device recognizes that the value of the first variable is a second value, the electronic device writes the second value in the configuration item, the second value of the first variable indicates that the user's preference is set to turn on the touch feedback function, and the second value of the configuration item indicates that the electronic device displays the user's touch position in the form of a display mark.
[0112] In one possible implementation, a first value is written into the configuration item, exemplarily false, and the electronic device does not display the user's touch position, that is, the electronic device does not display a mark on the display screen; a second value is written into the configuration item, exemplarily true, and the electronic device displays the user's touch position in the form of a mark.
[0113] In some embodiments, the electronic device may not execute steps S104 to S106. After the electronic device executes step S103, if the user has a preference setting for the touch feedback function, the electronic device uses the user's preference setting for the touch feedback function to set the write value of the configuration item; if the user has a preference setting for the touch feedback function, the write value of the configuration item is set to instruct the electronic device to display the user's touch position in the form of a display mark.
[0114] like Figure 2 As shown, during screen recording, the electronic device can also input operations to turn off or on the touch feedback function.
[0115] A touch feedback function switching method provided in another embodiment of the present application can enable an electronic device to turn off or on the touch feedback function in response to a user's input operation during screen recording.
[0116] like Figure 8 As shown, the touch feedback function switching method provided in this embodiment includes:
[0117] S201. During screen recording, the electronic device receives an operation of a user clicking a switch button.
[0118] The switch button is used to control the touch feedback function to be turned on or off. The switch button can have two states, the first state indicates turning on the touch feedback function, which can also be called the on state, and the second state indicates turning off the touch feedback function, which can also be called the off state.
[0119] For example, Figure 2 As shown in (a) to (c), the screen recording application is activated, and the electronic device displays a pop-up window 101 of the screen recording application. The user can control the electronic device to display a switch button by clicking the more button 103.
[0120] S202: The electronic device changes the state of the switch button in response to the user clicking the switch button.
[0121] The user clicks the switch button, and the state of the switch button can change. In this way, the electronic device detects the user's click operation on the switch button, and the electronic device detects the user's click operation on the switch button, and changes the state of the switch button in response to the click operation.
[0122] In some embodiments, the switch button is in a first state, and when the user clicks the switch button, the electronic device may switch the switch button to a second state, and the display screen of the electronic device displays that the switch button is in the second state; similarly, when the switch button is in the second state, and when the user clicks the switch button, the electronic device switches the switch button to a first state, and the display screen of the electronic device displays that the switch button is in the first state.
[0123] For example, Figure 2 The switch button 105 shown in (c) can be understood as the first state. When the user clicks the switch button 105, the dot in the switch button 105 moves from the right side of the waist-shaped frame to the left side, and the waist-shaped frame turns gray. Figure 2 As shown in (d), the switch button 105 is in the second state.
[0124] In this step, the user operates the switch button, the electronic device changes the state of the switch button, and displays the changed state on the display screen, which can prompt the user whether the touch feedback function of the screen recording application is turned on or off.
[0125] After the electronic device changes the state of the switch button in response to the user clicking the switch button, it can also execute step S203 and step S204. There is no restriction on the execution order of step S203 and step S204. In some embodiments, the electronic device can execute step S203 and step S204 in parallel.
[0126] S203: The electronic device saves the state of the switch button as the user's preference setting for the touch feedback function.
[0127] As described in the aforementioned step S102, after the user clicks the switch button 105 to turn on or off the touch feedback function, the electronic device records the user's operation of turning on or off the touch feedback function in the form of a Key-Value pair.
[0128] The electronic device saves the state of the switch button as the user's preference setting. In some embodiments, the electronic device stores it in the SharedPreferences of the screen recording application in the form of a key-value pair.
[0129] In some embodiments, the electronic device creates a key-value pair for the user's preference settings for the touch feedback function in the SharedPreferences of the screen recording application, and writes a value in the Value of the key-value pair, which corresponds to the state of the switch button, or the value corresponds to the state of the switch button.
[0130] Exemplarily, the state of the switch button is to turn off the touch feedback function, and the corresponding value of the state of the switch button is 1, then Value writes the value 1; the state of the switch button is to turn on the touch feedback function, and the corresponding value of the state of the switch button is 0, then Value writes the value 0.
[0131] As described in the aforementioned step S102, the user's preference setting for the touch feedback function also serves as a basis for the electronic device to turn on or off the touch feedback function the next time the user starts the screen recording application.
[0132] S204: The electronic device writes the value corresponding to the state of the switch button into the configuration item.
[0133] When the user operates the switch button 105, the electronic device also needs to turn on or off the touch feedback function in response to the operation. In this way, the electronic device uses the state of the switch button to write a value in the configuration item. During screen recording, the electronic device uses the value of the configuration item to control whether to display a mark on the display screen, or to display the user's touch position in the form of a display mark.
[0134] In some embodiments, such as the content of the aforementioned step S106, the configuration item is used to control whether the electronic device displays the user's touch position in the form of a mark. In some embodiments, the configuration item is the configuration item show_touches in Settings.System.
[0135] In one possible implementation, the state of the switch button is to turn off the touch feedback function, the corresponding value of the state of the switch button is 1, the configuration item is written with a first value, exemplarily false, and the electronic device does not display the user's touch position, that is, the electronic device does not display a mark on the display screen; the state of the switch button is to turn on the touch feedback function, the corresponding value of the state of the switch button is 0, the configuration item is written with a second value, exemplarily true, and the electronic device displays the user's touch position in the form of a mark.
[0136] Electronic equipment in Figure 6 The hardware components shown also have operating systems running on them. operating system, operating system, Operating system, etc. Applications such as screen recording applications can be installed and run on the operating system.
[0137] Fig. 9 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application.
[0138] The layered architecture divides the operating system of the electronic device into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system of the electronic device is the Android system. The Android system can be divided into five layers, from top to bottom, namely the application (APP) layer, the application framework layer (abbreviated as FWK), the system library, the hardware abstraction layer (HAL) and the kernel layer.
[0139] The application layer can include a series of application packages. Fig. 9 As shown, the application package may include applications such as camera, calendar, map, WLAN, music, short message, gallery, call, navigation, screen recording (or screen recording) and video.
[0140] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0141] like Fig. 9As shown, the application framework layer may include window management services, content providers, phone managers, resource managers, notification managers, view systems, Settings.System, InputSettingsObserver, and NativeInputManager, etc.
[0142] The window management service is used to manage window programs. The window management service can implement window addition, deletion, display and hiding control, etc. The content provider is used to store and obtain data and make the data accessible to applications. The data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The phone manager is used to provide communication functions for electronic devices. For example, the management of call status (including connected, hung up, etc.). The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The notification manager enables applications to display notification information in the status bar. The notification manager can also be a notification that appears in the top status bar of the system in the form of a chart or scroll bar text. The view system can be used to build applications. The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0143] In some embodiments, Settings.System is a database of settings applications of electronic devices, which can provide a variety of system-level settings and functions. Settings.System includes multiple configuration items, each of which corresponds to a system-level setting or function. The written value of the configuration item can be used to control whether the electronic device executes or configures the system-level setting or function; the written value of the configuration item can be modified.
[0144] In some embodiments, Settings.System includes a configuration item show_touches, and the written value of the configuration item is used to control whether the electronic device displays the user's touch position in the form of a display mark.
[0145] In some embodiments, InputSettingsObserver may monitor the configuration item show_touches of Settings.System, and upon detecting a change in the value of show_touches, call its own updateShowTouches() function, which may call the function setShowTouches(bool enabled) of NativeInputManager.
[0146] In some embodiments, the function setShowTouches(bool enabled) of NativeInputManager can execute the following two processes: 1. Write the value of the configuration item show_touches of Settings.System into mLocked.showTouches, where mLocked is a variable of NativeInputManager, which can be understood as: InputReaderConfiguration object used to store temporary configuration items, and mLocked.showTouches is a configuration item used to store the corresponding value of whether the touch feedback function is turned on, that is, used to control whether the electronic device displays the user's touch position in the form of a display mark.
[0147] 2. Call the requestRefreshConfiguration function to request the system library module to refresh the configuration, that is, to update the value stored in mLocked.showTouches to the system library module.
[0148] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system. In some embodiments of the present application, the application cold start can be run in the Android runtime, and the Android runtime obtains the optimized file status parameters of the application. Then, the Android runtime can determine whether the optimized file is outdated due to system upgrades through the optimized file status parameters, and return the judgment result to the application management module.
[0149] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0150] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0151] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), InputReader, TouchInputMapper, and 2D graphics engine (such as SGL).
[0152] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media library supports playback and recording of multiple common audio and video formats, as well as static image files. The media library can support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing. The 2D graphics engine is a drawing engine for 2D drawing.
[0153] In some embodiments, InputReader includes a function requestRefreshConfiguration. After the function requestRefreshConfiguration of InputReader is called by the function setShowTouches(bool enabled) of NativeInputManager, InputReader can call the function getReaderConfiguration(&mConfig) to read the value of mLocked.showTouches of NativeInputManager, write the value of mLocked.showTouches to mConfig.showTouches, and the value of mConfig.showTouches is updated. mConfig.showTouches is a configuration item of InputReader.
[0154] In some embodiments, TouchInputMapper is used to control interface drawing. TouchInputMapper determines whether to draw a mark according to the value of mConfig.showTouches by calling the updateSpots function. For example, if the value of mConfig.showTouches is true, the mark is drawn, and if the value of mConfig.showTouches is false, the mark is not drawn.
[0155] The kernel layer is a layer between hardware and software. The kernel layer includes at least a display driver, a camera driver, a sensor driver, and an audio driver. In some embodiments, the display driver is used to control the display screen to display images. The sensor driver is used to control the operation of multiple sensors, such as controlling the operation of an acceleration sensor, a gyroscope sensor, a pressure sensor, and a touch sensor. The audio driver is used to cache audio data input by the user, and the camera driver is used to control the operation of the camera.
[0156] It should be noted that although the embodiments of the present application are based on The system is used as an example, but the basic principles are also applicable to Electronic devices with other operating systems.
[0157] The following describes a method for switching the touch feedback function provided in an embodiment of the present application in conjunction with a module in a software structure of an electronic device.
[0158] like Fig.10 As shown, the touch feedback function switching method provided in the embodiment of the present application includes:
[0159] S301, the user starts screen recording.
[0160] As described in the aforementioned step S101, the user can start the screen recording application to enable the screen recording function by inputting specific operations on the display screen (such as double-clicking the screen with two knuckles), touching specific controls on the display screen, pressing specific physical buttons, inputting voice, and performing air gestures.
[0161] S302: The screen recording UI requests the user's preference settings for touch feedback from SharedPreferences.
[0162] UI stands for User Interface. Screen recording UI can be understood as the graphical user interface of the screen recording application displayed on the display screen. When the user starts the screen recording application, the screen recording UI responds to the user's operation and first requests the user's preference settings for touch feedback from SharedPreferences.
[0163] As described in the above step S102, SharedPreferences is a storage object or storage tool of the screen recording application, which records the setting information of various functions of the screen recording application in the form of key-value pairs. SharedPreferences records the user's preference settings for the touch feedback function.
[0164] In some embodiments, the screen recording UI requests the user's preference settings for touch feedback from SharedPreferences, which can be understood as the screen recording UI sending a request to SharedPreferences to read the user's preference settings for touch feedback.
[0165] S303 . SharedPreferences feeds back the user's preference settings for the touch feedback function to the screen recording UI.
[0166] SharedPreferences responds to the screen recording UI and queries whether it stores the key-value pairs corresponding to the user's preference settings for the touch feedback function. If the key-value pairs corresponding to the user's preference settings for the touch feedback function are found, the key-value pairs of the user's preference settings for the touch feedback function are fed back to the screen recording UI.
[0167] In some embodiments, if SharedPreferences does not query the key-value pair corresponding to the user's preference setting for the touch feedback function, it will feedback the unqueried result information to the screen recording UI, or no feedback message will be given to the screen recording UI.
[0168] S304: The screen recording UI writes the value of the touch feedback preference setting into the configuration item.
[0169] The value of the user's preference setting for the touch feedback function can be understood as the Value value in the key-value pair corresponding to the user's preference setting for the touch feedback function, which indicates whether the user prefers to turn on or off the touch feedback function. The screen recording UI writes this value to the configuration item show_touches in Settings.System to control whether the touch feedback function is turned on or off according to the user's preference.
[0170] In some embodiments, the screen recording UI sets the value of the first variable to the value of the touch feedback preference setting, and the screen recording UI writes the value of the first variable to the configuration item. The specific implementation content of the screen recording UI can be found in the above-mentioned steps S104 and S106, which will not be repeated here.
[0171] In some other embodiments, if the screen recording UI does not receive feedback information from SharedPreferences within a period of time, or receives unqueried result information from SharedPreferences, the screen recording UI writes the default value into the configuration item. The specific implementation content of the screen recording UI can be found in the above-mentioned steps S105 and S106, which will not be repeated here.
[0172] S305. InputSettingsObserver monitors the value of the configuration item of Settings.System.
[0173] Settings.System is a module of the application framework layer. The value of the configuration item show_touches is used to control whether the touch feedback function is turned on or off.
[0174] InputSettingsObserver is a module of the application framework layer, which can be used to monitor the value of the configuration item of Settings.System to determine whether the value of the configuration item of Settings.System has changed. If the configuration item of Settings.System is written with a value, InputSettingsObserver determines whether the value of the configuration item of Settings.System has changed.
[0175] S306. InputSettingsObserver detects that the value of the configuration item has changed, and calls the function setShowTouches(bool enabled).
[0176] As in the aforementioned step S304, the screen recording UI writes the value of the touch feedback preference setting to the configuration item, and the InputSettingsObserver can detect the change in the value of the configuration item. After the InputSettingsObserver detects the change in the value of the configuration item, it can call its own updateShowTouches() function to call the NativeInputManager function setShowTouches(bool enabled) to run.
[0177] NativeInputManager, as described in the aforementioned software structure, is a module of the application framework layer.
[0178] In some embodiments, the function setShowTouches(bool enabled) of NativeInputManager is called and executed, and the following steps S307 and S308 may be executed. In addition, the execution order of steps S307 and S308 is not limited to Fig.10 shown.
[0179] S307. NativeInputManager writes the value of the configuration item into mLocked.showTouches.
[0180] In some embodiments, NativeInputManager writes the value of the configuration item show_touches of Settings.System into mLocked.showTouches. mLocked.showTouches can be understood as a configuration item of NativeInputManager, which is used to store the corresponding value of whether the touch feedback function is enabled.
[0181] mLocked.showTouches is written with the first value, exemplarily false, the touch feedback function is turned off, and the electronic device does not display the user's touch position, that is, the electronic device does not display a mark on the display screen; mLocked.showTouches is written with the second value, exemplarily true, the touch feedback function is turned on, and the electronic device displays the user's touch position in the form of a mark.
[0182] S308. NativeInputManager calls the requestRefreshConfiguration function of InputReader.
[0183] NativeInputManager calls the requestRefreshConfiguration function of InputReader to update the value of mLocked.showTouches to the configuration item of the module in the system library. As shown in the above software structure, InputReader is a module of the system library.
[0184] NativeInputManager calls the requestRefreshConfiguration function of InputReader to execute the following steps S309 and S310.
[0185] S309. InputReader reads the value of mLocked.showTouches.
[0186] In some embodiments, InputReader may call the function getReaderConfiguration(&mConfig) to read the value of mLocked.showTouches of NativeInputManager.
[0187] S310. InputReader writes the read value into mConfig.showTouches.
[0188] After InputReader reads the value of mLocked.showTouches, it writes the value of mLocked.showTouches into mConfig.showTouches, and the value of mConfig.showTouches is updated. mConfig.showTouches can be understood as a configuration item.
[0189] In some embodiments, if the value of mLocked.showTouches is false, false is written into mConfig.showTouches; if the value of mLocked.showTouches is true, true is written into mConfig.showTouches.
[0190] S311. TouchInputMapper determines whether to draw a marker according to the value of mConfig.showTouches.
[0191] As described in the above software structure, TouchInputMapper is a module of the system library, which is used to control the interface drawing. TouchInputMapper determines whether to draw the mark according to the value of mConfig.showTouches.
[0192] In some embodiments, if the value of mConfig.showTouches is true, the TouchInputMapper draws a mark (such as a white dot); if the value of mConfig.showTouches is false, the TouchInputMapper does not draw a mark (such as a white dot).
[0193] It should be noted that the execution of steps S305 to S311 by multiple functional modules of the electronic device can be understood as: the electronic device uses the user's preference settings for touch feedback to set the write value of the configuration item to control the electronic device to turn on or off the touch feedback function using the value of the configuration item.
[0194] S312. During screen recording, the user clicks the "Show touch operation" switch button.
[0195] The "Show touch operation" switch button is a switch button that turns the touch feedback function on or off. Figure 2 (c) and Figure 2 The switch button 105 shown in (d) above.
[0196] User Figure 2 As shown in (b) and (c) above, or as Figure 4 As shown in (a) and (b), when the more button 103 is clicked, the screen recording UI displays a pop-up window 104 , which includes a switch button 105 .
[0197] The user clicks the switch button 105 , and the screen recording UI can receive the user's click operation on the switch button 105 . The screen recording UI can also change the state of the switch button 102 according to the user's click operation on the switch button 105 .
[0198] For the specific implementation process of this step, please refer to the contents of the aforementioned steps S201 and S202, which will not be repeated here.
[0199] S313. The screen recording UI transmits the state of the switch button to the control Switch.
[0200] In response to the user clicking the switch button 105 , the screen recording UI transmits the state of the switch button to the control Switch.
[0201] The control Switch, also known as the control switch, can be understood as Figure 2The switch button 105 shown in (c) and (d) in FIG. 106 . After the control Switch receives the state of the switch button, the following steps S308 and S309 may be executed.
[0202] Step S308 and step S309 are not limited to Fig. 9 As shown in the execution order, in some embodiments, step S308 and step S309 can be executed in parallel, or the control Switch executes step S309 first and then step S308.
[0203] S314. The control Switch uses the state of the switch button as a preference setting for touch feedback and saves it in the form of a key-value pair.
[0204] For the specific implementation process of this step, please refer to the content of the aforementioned step S203, which will not be repeated here.
[0205] S315. The control Switch writes the value corresponding to the state of the switch button into the configuration item of Settings.System.
[0206] In some embodiments, the control Switch writes the value corresponding to the state of the switch button to the configuration item show_touches of Settings.System.
[0207] For the specific implementation process of this step, please refer to the content of the aforementioned step S204, which will not be repeated here.
[0208] S316. InputSettingsObserver monitors the value of the configuration item of Settings.System.
[0209] The control Switch writes the value corresponding to the state of the switch button to the configuration item show_touches of Settings.System, and the value of the configuration item show_touches of Settings.System changes.
[0210] S317. InputSettingsObserver detects that the value of the configuration item has changed, and calls the function setShowTouches(bool enabled).
[0211] It can be understood that the value written to the configuration item show_touches of Settings.System is the same as the original value of the configuration item, which can also be understood as the value of the configuration item show_touches changing.
[0212] In some embodiments, the function setShowTouches(bool enabled) of NativeInputManager is called and executed, and the following steps S318 and S319 may be executed. In addition, the execution order of steps S318 and S319 is not limited to Fig.10 shown.
[0213] S318. NativeInputManager writes the value of the configuration item to mLocked.showTouches.
[0214] The specific implementation method of step S318 can refer to the content of the aforementioned step S307, which will not be repeated here.
[0215] S319, NativeInputManager calls the requestRefreshConfiguration function of InputReader.
[0216] For the specific implementation of step S319, please refer to the content of the aforementioned step S308, which will not be repeated here.
[0217] S320. InputReader reads the value of mLocked.showTouches.
[0218] The specific implementation method of step S320 can refer to the content of the aforementioned step S309, which will not be repeated here.
[0219] S321. InputReader writes the read value to mConfig.showTouches.
[0220] The specific implementation method of step S321 can refer to the content of the aforementioned step S310, which will not be repeated here.
[0221] S322. TouchInputMapper determines whether to draw a marker according to the value of mConfig.showTouches.
[0222] The specific implementation method of step S322 can refer to the content of the aforementioned step S311, which will not be repeated here.
[0223] It should be noted that the execution of steps S316 to S322 by multiple functional modules of the electronic device can be understood as: after the user operates the switch button, the electronic device uses the state parameters of the switch button to set the write value of the configuration item to control the electronic device to turn on or off the touch feedback function according to the value of the configuration item.
[0224] S323: The user ends screen recording.
[0225] The user can input specific operations on the display (such as double-clicking the screen with two knuckles), touch specific controls on the display (such as Figure 2 The screen recording end button shown in (a) above), pressing a specific physical button, inputting voice, and performing air gestures, etc., can end the screen recording and control the screen recording application to exit.
[0226] S324. The screen recording UI writes the shutdown value to the configuration item of Settings.System.
[0227] The screen recording UI can detect the user input to end the screen recording operation. On the one hand, the screen recording UI does not display the pop-up window 101 of the screen recording application. On the other hand, the screen recording UI writes the shutdown value to the configuration item of Settings.System. The shutdown value refers to the value of turning off the touch feedback function, which is exemplarily false.
[0228] In some embodiments, the configuration item show_touches of Settings.System is used to control whether the display screen of the electronic device displays the user's touch position in the form of a display mark in various application scenarios. It is understandable that the value of the configuration item show_touches of Settings.System is to turn on the touch feedback function. Even if the electronic device does not start the screen recording application and performs screen recording, the electronic device can display a mark on the display screen as long as the user touches the display screen when displaying the interface of other applications. This can cause great interference to the user.
[0229] If the user uses the operation of the aforementioned step S306 to control the switch button to turn on the touch feedback function, Settings.System executes step S310, and then the value of turning on the touch feedback function can be written into the configuration item show_touches. In this way, the screen recording UI can detect the user's input to end the screen recording operation, and write the closing value into the configuration item of Settings.System, so as to avoid the interference caused by the electronic device still displaying the mark in other application scenarios.
[0230] S325. InputSettingsObserver monitors the value of the configuration item of Settings.System.
[0231] The configuration item is written with a shutdown value, and the electronic device can turn off the touch feedback function. The electronic device does not display the user's touch position, that is, the electronic device does not display a mark on the display screen.
[0232] S326. InputSettingsObserver detects that the value of the configuration item has changed, and calls the function setShowTouches(bool enabled).
[0233] If InputSettingsObserver detects that the configuration item of Settings.System is written to a closed value, InputSettingsObserver detects that the value of the configuration item of Settings.System has changed.
[0234] S327. NativeInputManager writes the value of the configuration item to mLocked.showTouches.
[0235] The configuration item of Settings.System is written to the off value (used to turn off the touch feedback function), and NativeInputManager writes the value of the configuration item to mLocked.showTouches, then NativeInputManager writes the off value to mLocked.showTouches.
[0236] In some embodiments, the off value is false and NativeInputManager writes false to mLocked.showTouches.
[0237] S328. NativeInputManager calls the requestRefreshConfiguration function of InputReader.
[0238] NativeInputManager calls the requestRefreshConfiguration function of InputReader to execute the following steps S329 and S330.
[0239] S329. InputReader reads the value of mLocked.showTouches.
[0240] In some embodiments, the value of mLocked.showTouches is false, and InputReader reads false.
[0241] S330. InputReader writes the read value to mConfig.showTouches.
[0242] In some embodiments, InputReader writes false to the configuration item mConfig.showTouches.
[0243] S331. TouchInputMapper does not draw the marker according to the value of mConfig.showTouches.
[0244] If the value of mConfig.showTouches is false, TouchInputMapper does not draw the mark. In this way, after the screen recording is completed, the user inputs a touch operation on the display screen of the electronic device, and the display screen does not display the mark.
[0245] It should be noted that the execution of steps S325 to S331 by multiple functional modules of the electronic device can be understood as: after the user finishes screen recording, the electronic device uses the corresponding value setting of the configuration item to turn off the touch feedback function to control the electronic device to turn off the touch feedback function.
[0246] Another embodiment of the present application further provides a computer-readable storage medium, which stores instructions, and when the computer-readable storage medium is executed on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
[0247] The computer-readable storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0248] Another embodiment of the present application further provides a computer program product including instructions. When the computer program product is run on a computer or a processor, the computer or the processor executes one or more steps in any of the above methods.
Claims
1. A method for switching a touch feedback function, characterized in that: include: The electronic device displays a first interface during screen recording, wherein the first interface includes a first control in a first state; In response to a first touch operation on the first interface, the first interface displays a touch feedback mark corresponding to a position of the first touch operation; In response to a first operation on the first control, the first control changes to a second state; When the first control is in the second state, when a second touch operation on the first interface is received, no touch feedback mark is displayed in the first interface.
2. The touch feedback function switch method according to claim 1, characterized in that: Also includes: In response to the second operation, the electronic device starts playing a first playback screen in the screen recording video, where the first playback screen includes the touch feedback mark; In response to a third operation for performing a progress jump, the electronic device plays a second playback screen of the screen recording video, wherein the second playback screen does not include the touch feedback mark; Among them, the first playback screen is the screen before the progress corresponding to the target time in the screen recording video, and the second playback screen is the screen after the progress corresponding to the target time in the screen recording video, and the target time is the time when the electronic device receives the first operation during the screen recording process.
3. The touch feedback function switch method according to claim 1 or 2, characterized in that: After the first control changes to the second state in response to the operation on the first control, the method further includes: The electronic device records the second state of the first control in the user's preference setting for the touch feedback function.
4. The touch feedback function switch method according to claim 3, characterized in that: Also includes: In response to the operation of starting screen recording again, the electronic device obtains the user's preference setting for the touch feedback function, and the user's preference setting for the touch feedback function is to turn off the touch feedback function; The electronic device displays a third interface during screen recording; When a third touch operation on the third interface is received, the third interface does not display the touch feedback mark.
5. The touch feedback function switch method according to any one of claims 1 to 4, characterized in that: The first control has a corresponding state parameter, and after the first control changes to the second state in response to the operation on the first control, the method further includes: The electronic device writes the state parameter of the first control in the second state into a touch feedback function configuration item to turn off the touch feedback function.
6. The touch feedback function switch method according to claim 5, characterized in that: The electronic device writes the state parameter of the first control in the second state into the touch feedback function configuration item to turn off the touch feedback function, including: The electronic device sets the state parameter of the first control in the second state as the value of the touch feedback function variable; The electronic device writes the value of the touch feedback function variable into the touch feedback function configuration item to turn off the touch feedback function.
7. The touch feedback function switch method according to any one of claims 1 to 6, characterized in that: Also includes: The electronic device receives a fourth operation of ending screen recording; In response to the fourth operation, the electronic device ends screen recording and controls the touch feedback function to remain turned off.
8. The touch feedback function switch method according to claim 7, characterized in that: The control touch feedback function remains disabled, including: The state parameters of the first control in the second state are written into the touch feedback function configuration item.
9. The touch feedback function switch method according to any one of claims 1 to 8, characterized in that: Before the electronic device displays the first interface during screen recording, the method further includes: The electronic device receives an operation to start screen recording; In response to the operation of starting screen recording, the electronic device starts screen recording and displays a pop-up window, wherein the pop-up window includes a first button; The electronic device displays the first interface during screen recording, including: the electronic device displays the first interface in response to an operation on the first button.
10. The touch feedback function switch method according to any one of claims 1 to 8, characterized in that: Before the electronic device displays the first interface during the screen recording process, the electronic device further includes: In response to the operation of starting screen recording, the electronic device obtains a user preference setting for a touch feedback function, where the user preference setting for the touch feedback function is to start the touch feedback function.
11. The touch feedback function switching method according to any one of claims 1 to 8, characterized in that: Before the electronic device displays the first interface during the screen recording process, the electronic device further includes: In response to the operation of starting screen recording, the electronic device does not obtain the user's preference setting for the user's touch feedback function, and the touch feedback function is turned on according to a default value, and the default value corresponds to the first state of the first control.
12. The touch feedback function switch method according to claim 10, characterized in that: Also includes: The electronic device enables the touch feedback function according to the user's preference setting for the touch feedback function.
13. The touch feedback function switch method according to claim 10, characterized in that: The electronic device obtains the user's preference setting for the touch feedback function in response to the operation of starting screen recording, including: In response to the operation of starting screen recording, the electronic device obtains a key-value pair corresponding to the user's preference setting for the touch feedback function from the storage object.
14. The touch feedback function switch method according to claim 11, characterized in that: The electronic device fails to obtain the user's preference setting for the user touch feedback function in response to the operation of starting screen recording, including: The electronic device does not search for a key-value pair corresponding to the user's preference setting for the touch feedback function in the storage object.
15. The touch feedback function switch method according to claim 3, characterized in that: The user's preference setting for the touch feedback function is used as backup data for a cloning replacement scenario. When the electronic device performs a cloning replacement operation, the user's preference setting for the touch feedback is migrated from the old device to the new device.
16. An electronic device, characterized in that: include: one or more processors, memory, and display screens; The memory and the display screen are coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the switch method of the touch feedback function as described in any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the switch method of the touch feedback function as described in any one of claims 1 to 15.
