CN110572518B - Screen-extinguishing control method, mobile terminal and computer-readable storage medium - Google Patents

Screen-extinguishing control method, mobile terminal and computer-readable storage medium Download PDF

Info

Publication number
CN110572518B
CN110572518B CN201910882599.9A CN201910882599A CN110572518B CN 110572518 B CN110572518 B CN 110572518B CN 201910882599 A CN201910882599 A CN 201910882599A CN 110572518 B CN110572518 B CN 110572518B
Authority
CN
China
Prior art keywords
screen
mobile terminal
user
sensor
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910882599.9A
Other languages
Chinese (zh)
Other versions
CN110572518A (en
Inventor
李红钰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201910882599.9A priority Critical patent/CN110572518B/en
Publication of CN110572518A publication Critical patent/CN110572518A/en
Application granted granted Critical
Publication of CN110572518B publication Critical patent/CN110572518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a screen-extinguishing control method, which comprises the following steps: setting a cache space of a sensor resource; detecting whether the mobile terminal is in network communication; when the network call is in process, detecting whether the operation of actively closing the screen by the user is received; and when receiving the operation of actively closing the screen by the user, suspending the automatic screen-extinguishing function of the mobile terminal, and releasing the sensor resources occupied by the automatic screen-extinguishing function to the cache space. The embodiment of the invention also discloses a mobile terminal and a computer readable storage medium. Therefore, the sensor resources occupied by the automatic screen-extinguishing function can be timely released at the bottom layer, and resources and power consumption are saved.

Description

Screen-extinguishing control method, mobile terminal and computer-readable storage medium
Technical Field
The present invention relates to the field of mobile terminals, and in particular, to a screen-extinguishing control method, a mobile terminal, and a computer readable storage medium.
Background
Currently, some social applications (such as WeChat, QQ, etc.) can provide an automatic screen-extinguishing function when a network call (including video call and voice call) is performed, namely, automatically starting a distance sensor, and automatically extinguishing a mobile terminal when the mobile terminal is detected to be close to the ear of a user. However, if the user clicks the power key to actively close the screen during the network call, the automatic screen-closing function is disabled, but the distance sensor is still turned on, and the distance between the mobile terminal and the ear of the user is continuously detected, so that the resources of the bottom sensor are always occupied, and the waste of resources and power consumption is caused.
Disclosure of Invention
The invention mainly aims to provide a screen-extinguishing control method, a mobile terminal and a computer readable storage medium, and aims to solve the technical problem of sensor resource occupation in the network communication process.
In order to achieve the above object, the present invention provides a screen-extinguishing control method, applied to a mobile terminal, comprising the steps of:
setting a cache space of a sensor resource;
detecting whether the mobile terminal is in network communication;
when the network call is in process, detecting whether the operation of actively closing the screen by the user is received; and
And when receiving the operation of actively closing the screen by the user, suspending the automatic screen-extinguishing function of the mobile terminal, and releasing the sensor resources occupied by the automatic screen-extinguishing function to the cache space.
Optionally, the method further comprises the steps of:
detecting whether an operation of actively starting a screen by a user is received;
and when receiving the operation of actively starting the screen by the user, recovering the automatic screen-extinguishing function, and removing the sensor resources from the cache space.
Optionally, after the step of detecting whether the mobile terminal is in a network call, the method further includes:
When the network call is in progress, the type of the network call is further detected, if the network call is a voice call, the step of detecting whether the operation of actively closing the screen by the user is received is executed, and if the network call is a video call, the flow is ended.
Optionally, the step of setting the buffer space of the sensor resource further includes:
and adding a release interface, a recovery interface and a cache interface in the bottom layer sensor service.
Optionally, the step of suspending the auto-off-screen function of the mobile terminal and releasing the sensor resource occupied by the auto-off-screen function to the buffer space includes:
and calling back to the release interface through the JAVA local interface to release the sensor resource, and writing corresponding sensor resource information into the cache space through the cache interface.
Optionally, the step of recovering the auto-off screen function and removing the sensor resource from the cache space includes:
and calling back to the recovery interface through the JAVA local interface to recover the sensor resource, so as to recover the automatic screen-extinguishing function, and removing the corresponding sensor resource information from the cache space through the cache interface.
In addition, to achieve the above object, the present invention also proposes a mobile terminal including: the screen-extinguishing control system comprises a memory, a processor and a screen-extinguishing control program which is stored in the memory and can run on the processor, wherein the screen-extinguishing control program realizes the steps of the screen-extinguishing control method when being executed by the processor.
Further, in order to achieve the above object, the present invention further provides a computer readable storage medium, on which a screen-extinguishing control program is stored, where the screen-extinguishing control program, when executed by a processor, implements the steps of the screen-extinguishing control method described above.
The screen-extinguishing control method, the mobile terminal and the computer readable storage medium provided by the invention can timely release the sensor resources occupied by the automatic screen-extinguishing function at the bottom layer when a user actively closes the screen in the communication process of using the mobile terminal, so that the resource waste is avoided, the power consumption of the mobile terminal is saved, and the endurance time is prolonged.
Drawings
Fig. 1 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention;
fig. 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in fig. 1;
FIG. 3 is a flowchart of a screen-off control method according to a first embodiment of the present invention;
FIG. 4 is a flowchart of a screen-off control method according to a second embodiment of the present invention;
fig. 5 is a schematic block diagram of a mobile terminal according to a third embodiment of the present invention;
FIG. 6 is a schematic diagram of a screen-extinguishing control system according to a fourth embodiment of the present invention;
fig. 7 is a schematic block diagram of a screen-extinguishing control system according to a fifth embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present invention, and have no specific meaning per se. Thus, "module," "component," or "unit" may be used in combination.
The terminal may be implemented in various forms. For example, the terminals described in the present invention may include mobile terminals such as cell phones, tablet computers, notebook computers, palm computers, personal digital assistants (Personal Digital Assistant, PDA), portable media players (Portable Media Player, PMP), navigation devices, wearable devices, smart bracelets, pedometers, and fixed terminals such as digital TVs, desktop computers, and the like.
The following description will be given taking a mobile terminal as an example, and those skilled in the art will understand that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for a moving purpose.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention, the mobile terminal 100 may include: an RF (Radio Frequency) unit 101, a WiFi module 102, an audio output unit 103, an a/V (audio/video) input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 1 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
The following describes the components of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be used for receiving and transmitting signals during the information receiving or communication process, specifically, after receiving downlink information of the base station, processing the downlink information by the processor 110; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication, global System for Mobile communications), GPRS (General Packet Radio Service ), CDMA2000 (Code Division Multiple Access, CDMA 2000), WCDMA (Wideband Code Division Multiple Access ), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency Division Duplex Long term evolution), and TDD-LTE (Time Division Duplexing-Long Term Evolution, time Division Duplex Long term evolution), etc.
WiFi belongs to a short-distance wireless transmission technology, and a mobile terminal can help a user to send and receive e-mails, browse web pages, access streaming media and the like through the WiFi module 102, so that wireless broadband Internet access is provided for the user. Although fig. 1 shows a WiFi module 102, it is understood that it does not belong to the necessary constitution of a mobile terminal, and can be omitted entirely as required within a range that does not change the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a talk mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 100. The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive an audio or video signal. The a/V input unit 104 may include a graphics processor (Graphics Processing Unit, GPU) 1041 and a microphone 1042, the graphics processor 1041 processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphics processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 can receive sound (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound into audio data. The processed audio (voice) data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting the audio signal.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 1061 and/or the backlight when the mobile terminal 100 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may also be configured in the mobile phone, the detailed description thereof will be omitted.
The display unit 106 is used to display information input by a user or information provided to the user. The display unit 106 may include a display panel 1061, and the display panel 1061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. In particular, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1071 or thereabout by using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends the touch point coordinates to the processor 110, and can receive and execute commands sent from the processor 110. Further, the touch panel 1071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 107 may include other input devices 1072 in addition to the touch panel 1071. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc., as specifically not limited herein.
Further, the touch panel 1071 may overlay the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or thereabout, the touch panel 1071 is transferred to the processor 110 to determine the type of touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of touch event. Although in fig. 1, the touch panel 1071 and the display panel 1061 are two independent components for implementing the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 may be integrated with the display panel 1061 to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 108 serves as an interface through which at least one external device can be connected with the mobile terminal 100. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and an external device.
Memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area that may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 109 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power source 111 (e.g., a battery) for supplying power to the respective components, and preferably, the power source 111 may be logically connected to the processor 110 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based will be described below.
Referring to fig. 2, fig. 2 is a schematic diagram of a communication network system according to an embodiment of the present invention, where the communication network system is an LTE system of a general mobile communication technology, and the LTE system includes a UE (User Equipment) 201, an e-UTRAN (Evolved UMTS Terrestrial Radio Access Network ) 202, an epc (Evolved Packet Core, evolved packet core) 203, and an IP service 204 of an operator that are sequentially connected in communication.
Specifically, the UE201 may be the terminal 100 described above, and will not be described herein.
The E-UTRAN202 includes eNodeB2021 and other eNodeB2022, etc. The eNodeB2021 may be connected with other eNodeB2022 by a backhaul (e.g., an X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide access from the UE201 to the EPC 203.
EPC203 may include MME (Mobility Management Entity ) 2031, hss (Home Subscriber Server, home subscriber server) 2032, other MMEs 2033, SGW (Serving Gate Way) 2034, pgw (PDN Gate Way) 2035 and PCRF (Policy and Charging Rules Function, policy and tariff function entity) 2036, and so on. The MME2031 is a control node that handles signaling between the UE201 and EPC203, providing bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location registers (not shown) and to hold user specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034 and PGW2035 may provide IP address allocation and other functions for UE201, PCRF2036 is a policy and charging control policy decision point for traffic data flows and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem ), or other IP services, etc.
Although the LTE system is described above as an example, it should be understood by those skilled in the art that the present invention is not limited to LTE systems, but may be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and the communication network system, various embodiments of the method of the present invention are provided.
Example 1
As shown in fig. 3, a first embodiment of the present invention proposes a screen-extinguishing control method applied to the mobile terminal, the method comprising the steps of:
s300, setting a cache space of the sensor resource.
Specifically, a global buffer space (bakup sensor) for sensor (sensor) resources with automatic screen-extinguishing function is set in an underlying sensor service (sensor) for temporarily storing the actively released sensor resources.
In addition, a releasing interface and a buffer interface are also needed to be added in the sensor device, and the releasing interface is used for releasing the sensor resources occupied by the auto-screen-extinguishing function in the network communication process. The buffer interface is used for operating the global buffer space and writing sensor resource information occupied by an automatic screen-off function in the network call process (namely, writing the sensor resource information released by the release interface into the buffer space).
S302, detecting whether the mobile terminal is in network communication.
Specifically, by the process or thread names of various network calls, it is possible to determine in the framework whether or not a network call is currently in progress and what kind of network call (voice or video) is in progress, based on the names.
Typically, a user may actively close the screen during a voice call, but may not actively close the screen during a video call. Therefore, in other embodiments, it may further detect what network call is being performed by the mobile terminal (i.e. determine the call type), if the mobile terminal is a voice call, the subsequent steps are performed, otherwise (if the mobile terminal is a video call), the subsequent steps do not need to be performed, and the process ends.
In addition, in other embodiments, it is further required to detect whether the mobile terminal has or turns on an auto-stop function in the call process. When the automatic screen-off function is started, further executing the subsequent steps, otherwise, not executing the subsequent steps, and ending the flow.
It should be noted that, in other cases where the auto-stop function is enabled, for example, when the user dials a phone (not in a network call) using the mobile terminal, if the mobile terminal has and opens the auto-stop function, the processing may be performed similarly to the voice call in the network call, and the subsequent steps may be performed.
S304, in the network communication process, detecting whether the operation of actively closing the screen by the user is received.
Specifically, in the network call process, the user can actively perform the operation of closing the screen in a screen-off mode set by the mobile terminal according to own habits. For example, when the user a uses the WeChat application program to make a voice call, the user a does not need to watch the display screen, actively clicks the power key of the mobile terminal to close the screen, and the mobile terminal receives the operation that the user a actively closes the screen.
S306, when the operation of actively closing the screen by the user is received, the automatic screen-extinguishing function is paused, and the sensor resource is released to the cache space.
Specifically, if it is detected that the mobile terminal is in the process of network communication, and an operation of actively closing the screen by the user is received, the automatic screen-off function is disabled. The mobile terminal can call back to the release interface added in the sensor through the JNI (Java Native Interface, java local interface) to release the sensor resources, and corresponding sensor resource information is written into the cache space through the cache interface during release.
In this embodiment, the mobile terminal may implement the automatic screen-off function in a plurality of manners, so as to correspond to a plurality of different sensors. For example, if the mobile terminal continuously detects the distance between the mobile terminal and the ear of the user through the proximity sensor, and automatically turns off the screen of the mobile terminal when the mobile terminal is detected to be close to the ear of the user, after the user actively turns off the screen, if the proximity sensor is continuously occupied, resources and power consumption are wasted, the proximity sensor resources need to be released, and the released proximity sensor resource information is written into the buffer space.
For another example, if the mobile terminal continuously detects the distance between the mobile terminal and the user by transmitting the millimeter wave signal and receiving the reflected signal through the millimeter wave radar module, and automatically turns off the screen of the mobile terminal when the mobile terminal is detected to be close to the ear of the user, after the user actively turns off the screen, if the user continues to occupy the millimeter wave radar module, resources and power consumption are wasted, resources of the millimeter wave radar module need to be released, and the released resources information of the millimeter wave radar module is written into the buffer space.
The screen-extinguishing control method provided by the embodiment can timely release the sensor resources occupied by the automatic screen-extinguishing function at the bottom layer when the user actively closes the screen in the communication process of the mobile terminal, so that the resource waste is avoided, the power consumption of the mobile terminal is saved, and the endurance time is prolonged.
Example two
As shown in fig. 4, a second embodiment of the present invention proposes a screen-extinguishing control method. In the second embodiment, the steps S400-S406 of the screen-off control method are similar to the steps S300-S306 of the first embodiment, except that the method further includes steps S408-S410.
The method comprises the following steps:
S400, setting a cache space of the sensor resource.
Specifically, a global cache space for the sensor resources with the automatic screen-extinguishing function is set in the bottom layer sensor, and the global cache space is used for temporarily storing the actively released sensor resources.
In addition, a release interface, a recovery interface and a cache interface are also required to be added in the sensordevice. The release interface is used for releasing sensor resources occupied by an automatic screen-off function in the network communication process, and the recovery interface is used for recovering the previously released sensor resources. The buffer interface is used for operating the global buffer space according to the operation type, and writing or removing sensor resource information occupied by an automatic screen-off function in the network call process (namely, writing the sensor resource information released by the release interface into the buffer space or removing the sensor resource information recovered by the recovery interface from the buffer space).
S402, detecting whether the mobile terminal is in network communication.
Specifically, by the process or thread names of various network calls, it is possible to determine in the framework whether or not a network call is currently in progress and what kind of network call (voice or video) is in progress, based on the names.
Typically, a user may actively close the screen during a voice call, but may not actively close the screen during a video call. Therefore, in other embodiments, it may further detect what network call is being performed by the mobile terminal (i.e. determine the call type), if the mobile terminal is a voice call, the subsequent steps are performed, otherwise (if the mobile terminal is a video call), the subsequent steps do not need to be performed, and the process ends.
In addition, in other embodiments, it is further required to detect whether the mobile terminal has or turns on an auto-stop function in the call process. When the automatic screen-off function is started, further executing the subsequent steps, otherwise, not executing the subsequent steps, and ending the flow.
It should be noted that, in other cases where the auto-stop function is enabled, for example, when the user dials a phone (not in a network call) using the mobile terminal, if the mobile terminal has and opens the auto-stop function, the processing may be performed similarly to the voice call in the network call, and the subsequent steps may be performed.
S404, in the network communication process, detecting whether the operation of actively closing the screen by the user is received.
Specifically, in the network call process, the user can actively perform the operation of closing the screen in a screen-off mode set by the mobile terminal according to own habits. For example, when the user a uses the WeChat application program to make a voice call, the user a does not need to watch the display screen, actively clicks the power key of the mobile terminal to close the screen, and the mobile terminal receives the operation that the user a actively closes the screen.
S406, when the operation of actively closing the screen by the user is received, suspending the automatic screen-extinguishing function, and releasing the sensor resource to the cache space.
Specifically, if it is detected that the mobile terminal is in the process of network communication, and an operation of actively closing the screen by the user is received, the automatic screen-off function is disabled. And the mobile terminal can call back to the release interface added in the sensor through the JNI interface to release the sensor resource, and corresponding sensor resource information is written into the cache space through the cache interface during release.
In this embodiment, the mobile terminal may implement the automatic screen-off function in a plurality of manners, so as to correspond to a plurality of different sensors. For example, if the mobile terminal continuously detects the distance between the mobile terminal and the ear of the user through the proximity sensor, and automatically turns off the screen of the mobile terminal when the mobile terminal is detected to be close to the ear of the user, after the user actively turns off the screen, if the proximity sensor is continuously occupied, resources and power consumption are wasted, the proximity sensor resources need to be released, and the released proximity sensor resource information is written into the buffer space.
For another example, if the mobile terminal continuously detects the distance between the mobile terminal and the user by transmitting the millimeter wave signal and receiving the reflected signal through the millimeter wave radar module, and automatically turns off the screen of the mobile terminal when the mobile terminal is detected to be close to the ear of the user, after the user actively turns off the screen, if the user continues to occupy the millimeter wave radar module, resources and power consumption are wasted, resources of the millimeter wave radar module need to be released, and the released resources information of the millimeter wave radar module is written into the buffer space.
S408, detecting whether the operation of actively starting the screen by the user is received.
Specifically, in the network call process, after the user actively closes the screen, sometimes the user needs to actively open the screen again to view information on the screen. Therefore, in the process that the mobile terminal is talking, it is further required to detect whether the user actively opens the screen is received. For example, when the user a uses the WeChat application program to make a voice call, because the user a does not need to watch the screen, actively clicking the power key of the mobile terminal to close the screen, after one minute, the user a needs to watch information on the screen, and actively clicking the power key to open the screen, and the mobile terminal receives the operation that the user a actively opens the screen.
S410, when receiving the operation of actively starting the screen by the user, recovering the automatic screen-extinguishing function, and removing the sensor resources from the cache space.
Specifically, after receiving the operation of actively starting the screen by the user, the mobile terminal needs the automatic screen-extinguishing function again. And the mobile terminal can call back to the recovery interface added in the sensor through the JNI interface to recover the sensor resource, so that the automatic screen-extinguishing function is recovered, and the corresponding sensor resource information is removed from the cache space through the cache interface.
For example, assuming that the mobile terminal implements the auto-close function through a proximity sensor, after receiving an operation of actively turning on a screen by a user, the mobile terminal restores the previously released proximity sensor resource and removes the proximity sensor resource information from the buffer space.
For another example, if the mobile terminal realizes the automatic screen-off function through the millimeter wave radar module, after receiving the operation that the user actively starts the screen, the mobile terminal recovers the previously released millimeter wave radar module resource and removes the millimeter wave radar module resource information from the buffer space.
According to the screen-extinguishing control method, when a user actively closes a screen in the communication process of the mobile terminal, sensor resources occupied by an automatic screen-extinguishing function are released at the bottom layer in time, and the sensor resources of the automatic screen-extinguishing function are recovered after the user actively opens the screen again, so that timely and effective control of the sensor resources is realized, resource waste is avoided, power consumption of the mobile terminal is saved, and endurance time is prolonged.
Example III
As shown in fig. 5, a third embodiment of the present invention proposes a mobile terminal 2. The mobile terminal 2 includes a memory 20, a processor 22 and a screen-rest management system 28.
The memory 20 includes at least one type of readable storage medium for storing program codes and the like of an operating system and various application software installed on the mobile terminal 2, such as a screen-in management system 28. In addition, the memory 20 may be used to temporarily store various types of data that have been output or are to be output.
The processor 22 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 22 is typically used to control the overall operation of the mobile terminal 2. In this embodiment, the processor 22 is configured to execute the program code or process data stored in the memory 20, for example, to execute the screen-in management system 28.
In addition, the mobile terminal 2 further includes common modules such as a screen and a sensor, which are not described herein.
Example IV
As shown in fig. 6, a fourth embodiment of the present invention provides a screen-off control system 28. In this embodiment, the screen-off control system 28 includes:
a setting module 800, configured to set a cache space of the sensor resource.
Specifically, a global cache space for the sensor resources with the automatic screen-extinguishing function is set in the bottom layer sensor, and the global cache space is used for temporarily storing the actively released sensor resources.
In addition, a release interface, a recovery interface and a cache interface are also required to be added in the sensordevice. The release interface is used for releasing sensor resources occupied by an automatic screen-off function in the network communication process, and the recovery interface is used for recovering the previously released sensor resources. The buffer interface is used for operating the global buffer space according to the operation type, and writing or removing sensor resource information occupied by an automatic screen-off function in the network call process (namely, writing the sensor resource information released by the release interface into the buffer space or removing the sensor resource information recovered by the recovery interface from the buffer space).
A detection module 802, configured to detect whether the mobile terminal 2 is performing a network call.
Specifically, by the process or thread names of various network calls, it is possible to determine in the framework whether or not a network call is currently in progress and what kind of network call (voice or video) is in progress, based on the names.
Typically, a user may actively close the screen during a voice call, but may not actively close the screen during a video call. Therefore, in other embodiments, it may be further detected what network call is being performed by the mobile terminal 2 (i.e. determining the call type), if the call is a voice call, the subsequent processing is performed, otherwise (if the call is a video call) the subsequent processing is not required.
In addition, in other embodiments, it is also required to detect whether the mobile terminal 2 has or turns on an auto-stop function during a call. When the automatic screen-off function is started, further processing is carried out, otherwise, the subsequent processing is not needed, and the flow is ended.
It should be noted that, in other cases where the auto-stop function is enabled, for example, when the user uses the mobile terminal 2 to make a call (not in a network call), if the mobile terminal 2 has and opens the auto-stop function, the following processing can be performed similarly to the voice call in the network call.
The detection module 802 is further configured to detect whether an operation of actively closing the screen by the user is received during the network call.
Specifically, during the network call, the user may actively perform the operation of closing the screen in a screen-off manner set by the mobile terminal 2 according to his habit. For example, when the user a uses the micro-letter application program to make a voice call, the user a does not need to watch the display screen and actively clicks the power key of the mobile terminal 2 to close the screen, and the detection module 802 receives the operation that the user a actively closes the screen.
And the releasing module 804 is configured to suspend the auto-screen-off function when receiving an operation of actively closing the screen by the user, and release the sensor resource to the buffer space.
Specifically, if it is detected that the mobile terminal 2 is in the course of a network call, and an operation of actively closing the screen by the user is received, this indicates that the auto-off-screen function has failed at this time. The release module 804 may call back to the release interface added in the sensor through the JNI interface to release the sensor resource, and write the corresponding sensor resource information into the cache space through the cache interface during release.
In this embodiment, the mobile terminal 2 may implement the automatic screen-off function in a plurality of manners, so as to correspond to a plurality of different sensors. For example, assuming that the mobile terminal 2 continuously detects the distance between the mobile terminal 2 and the ear of the user through the proximity sensor, when detecting that the mobile terminal 2 is close to the ear of the user, the mobile terminal 2 is automatically turned off, after the user actively turns off the screen, if the proximity sensor continues to be occupied, resources and power consumption are wasted, the proximity sensor resources need to be released, and the released proximity sensor resource information is written into the buffer space.
For another example, it is assumed that the mobile terminal 2 continuously detects the distance between the mobile terminal 2 and the user by transmitting a millimeter wave signal and receiving a reflected signal through the millimeter wave radar module, and automatically turns off the screen of the mobile terminal when detecting that the mobile terminal 2 is close to the ear of the user, after the user actively turns off the screen, if the user continues to occupy the millimeter wave radar module, resources and power consumption are wasted, resources of the millimeter wave radar module need to be released, and the released resource information of the millimeter wave radar module is written into the buffer space.
The screen-extinguishing control system provided by the embodiment can timely release the sensor resources occupied by the automatic screen-extinguishing function at the bottom layer when the user actively closes the screen in the call process of the mobile terminal 2, so that the resource waste is avoided, the power consumption of the mobile terminal 2 is saved, and the endurance time is increased.
Example five
As shown in fig. 7, a fifth embodiment of the present invention provides a screen-off control system 28. In this embodiment, the screen-off control system 28 further includes a recovery module 806 in addition to the setting module 800, the detection module 802, and the release module 804 in the fourth embodiment. Wherein:
the detection module 802 is further configured to detect whether an operation of actively turning on the screen by the user is received.
Specifically, in the network call process, after the user actively closes the screen, sometimes the user needs to actively open the screen again to view information on the screen. Therefore, it is further necessary to detect whether or not an operation of actively turning on the screen by the user is received during the call of the mobile terminal 2. For example, when the user a uses the micro-letter application program to make a voice call, because the user a does not need to watch the screen, actively clicking the power key of the mobile terminal 2 turns off the screen, and after one minute, the user a needs to watch information on the screen, and actively clicking the power key to turn on the screen, and the detection module 802 receives the operation that the user a actively turns on the screen.
The restoration module 806 is configured to restore an automatic screen-off function when receiving an operation of actively turning on a screen by a user, and remove the sensor resource from the cache space.
Specifically, when receiving the operation of actively turning on the screen by the user, the mobile terminal 2 re-requires the auto-screen-off function at this time. The recovery module 806 may call back to the recovery interface added in the sensor through the JNI interface to recover the sensor resource, thereby recovering the auto-screen-off function, and removing the corresponding sensor resource information from the cache space through the cache interface.
For example, assuming that the mobile terminal 2 implements the auto-off function through a proximity sensor, after receiving an operation that the user actively turns on the screen, the restoration module 806 restores the proximity sensor resource released before and removes the proximity sensor resource information from the buffer space.
For another example, assuming that the mobile terminal 2 implements the automatic screen-off function through a millimeter wave radar module, after receiving an operation that the user actively turns on the screen, the recovery module 806 recovers the previously released millimeter wave radar module resource, and removes the millimeter wave radar module resource information from the buffer space.
The screen-extinguishing control system provided by the embodiment can timely release the sensor resources occupied by the automatic screen-extinguishing function at the bottom layer when the user actively closes the screen in the call process of the mobile terminal 2, and recover the sensor resources of the automatic screen-extinguishing function after the user actively opens the screen again, so that timely and effective control of the sensor resources is realized, resource waste is avoided, power consumption of the mobile terminal 2 is saved, and the duration is prolonged.
Example six
The present invention also provides another embodiment, namely, a computer readable storage medium, where a screen-off control program is stored, where the screen-off control program is executable by at least one processor, so that the at least one processor performs the steps of the screen-off control method as described above.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (5)

1. The screen-extinguishing control method is applied to a mobile terminal and is characterized by comprising the following steps:
setting a cache space of sensor resources aiming at an automatic screen-extinguishing function;
detecting whether the mobile terminal is in network communication;
when the network call is in process, detecting whether the operation of actively closing the screen by the user is received; and
When receiving an operation of actively closing a screen by a user, suspending an automatic screen-extinguishing function of the mobile terminal, and releasing sensor resources occupied by the automatic screen-extinguishing function to the cache space;
detecting whether an operation of actively starting a screen by a user is received;
when receiving an operation of actively starting a screen by a user, recovering the automatic screen-extinguishing function, and removing the sensor resource from the cache space;
the step of setting the cache space of the sensor resource comprises the following steps:
adding a release interface, a recovery interface and a cache interface in the bottom layer sensor service;
the step of suspending the automatic screen-extinguishing function of the mobile terminal and releasing the sensor resources occupied by the automatic screen-extinguishing function to the cache space comprises the following steps:
callback to the release interface through the JAVA local interface to release the sensor resources, and writing corresponding sensor resource information into the cache space through the cache interface;
The step of restoring the auto-off screen function, removing the sensor resource from the cache space, comprises:
and calling back to the recovery interface through the JAVA local interface to recover the sensor resource, so as to recover the automatic screen-extinguishing function, and removing the corresponding sensor resource information from the cache space through the cache interface.
2. The method of on-screen control according to claim 1, further comprising, after the step of detecting whether the mobile terminal is engaged in a network call:
when the network call is in progress, the type of the network call is further detected, if the network call is a voice call, the step of detecting whether the operation of actively closing the screen by the user is received is executed, and if the network call is a video call, the flow is ended.
3. A mobile terminal, the mobile terminal comprising: the screen-extinguishing control program is stored in the memory and can run on the processor, and when being executed by the processor, the screen-extinguishing control program realizes the following steps:
setting a cache space of sensor resources aiming at an automatic screen-extinguishing function;
Detecting whether the mobile terminal is in network communication;
when the network call is in process, detecting whether the operation of actively closing the screen by the user is received; and
When receiving an operation of actively closing a screen by a user, suspending an automatic screen-extinguishing function of the mobile terminal, and releasing sensor resources occupied by the automatic screen-extinguishing function to the cache space;
the screen-off control program when executed by the processor further realizes the steps of:
detecting whether an operation of actively starting a screen by a user is received;
when receiving an operation of actively starting a screen by a user, recovering the automatic screen-extinguishing function, and removing the sensor resource from the cache space;
the step of setting the cache space of the sensor resource comprises the following steps:
adding a release interface, a recovery interface and a cache interface in the bottom layer sensor service;
the step of suspending the automatic screen-extinguishing function of the mobile terminal and releasing the sensor resources occupied by the automatic screen-extinguishing function to the cache space comprises the following steps:
callback to the release interface through the JAVA local interface to release the sensor resources, and writing corresponding sensor resource information into the cache space through the cache interface;
The step of restoring the auto-off screen function, removing the sensor resource from the cache space, comprises:
and calling back to the recovery interface through the JAVA local interface to recover the sensor resource, so as to recover the automatic screen-extinguishing function, and removing the corresponding sensor resource information from the cache space through the cache interface.
4. The mobile terminal of claim 3, wherein the off-screen administration program when executed by the processor further performs the steps of:
when the network call is in progress, the type of the network call is further detected, if the network call is a voice call, the step of detecting whether the operation of actively closing the screen by the user is received is executed, and if the network call is a video call, the flow is ended.
5. A computer readable storage medium, wherein a screen-off control program is stored on the computer readable storage medium, and when executed by a processor, the screen-off control program implements the steps of the screen-off control method according to claim 1 or 2.
CN201910882599.9A 2019-09-18 2019-09-18 Screen-extinguishing control method, mobile terminal and computer-readable storage medium Active CN110572518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910882599.9A CN110572518B (en) 2019-09-18 2019-09-18 Screen-extinguishing control method, mobile terminal and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910882599.9A CN110572518B (en) 2019-09-18 2019-09-18 Screen-extinguishing control method, mobile terminal and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN110572518A CN110572518A (en) 2019-12-13
CN110572518B true CN110572518B (en) 2024-03-22

Family

ID=68780888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910882599.9A Active CN110572518B (en) 2019-09-18 2019-09-18 Screen-extinguishing control method, mobile terminal and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN110572518B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400974B (en) * 2023-06-07 2023-12-22 荣耀终端有限公司 Method for entering long standby mode, electronic device and readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775809A (en) * 2016-11-15 2017-05-31 北京奇虎科技有限公司 A kind of method of mobile terminal internal memory cleaning, device and mobile terminal
CN107133097A (en) * 2017-04-16 2017-09-05 努比亚技术有限公司 Memory Optimize Method and device
CN109195210A (en) * 2018-08-28 2019-01-11 努比亚技术有限公司 A kind of electricity saving method, mobile terminal and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102276023B1 (en) * 2014-09-19 2021-07-12 엘지전자 주식회사 Mobile terminal and movemetn based low power implementing method thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775809A (en) * 2016-11-15 2017-05-31 北京奇虎科技有限公司 A kind of method of mobile terminal internal memory cleaning, device and mobile terminal
CN107133097A (en) * 2017-04-16 2017-09-05 努比亚技术有限公司 Memory Optimize Method and device
CN109195210A (en) * 2018-08-28 2019-01-11 努比亚技术有限公司 A kind of electricity saving method, mobile terminal and computer readable storage medium

Also Published As

Publication number Publication date
CN110572518A (en) 2019-12-13

Similar Documents

Publication Publication Date Title
CN107888768B (en) Unlocking control method, terminal and computer readable storage medium
CN109195213B (en) Mobile terminal screen control method, mobile terminal and computer readable storage medium
CN109766119B (en) Recovery partition upgrade method, terminal and computer readable storage medium
CN109144705B (en) Application management method, mobile terminal and computer readable storage medium
CN109890022B (en) Data transmission control method, mobile terminal and computer readable storage medium
CN110096375B (en) Method and device for sharing data by application programs and computer readable storage medium
CN110187925B (en) Desktop pre-starting control method, device and computer readable storage medium
CN110069167B (en) Touch point cleaning method, mobile terminal and computer readable storage medium
CN108958936B (en) Application program switching method, mobile terminal and computer readable storage medium
CN109584897B (en) Video noise reduction method, mobile terminal and computer readable storage medium
CN112631535A (en) Screen projection reverse control method and device, mobile terminal and storage medium
CN109545120B (en) Screen light sensor adjusting method, mobile terminal and computer readable storage medium
CN109389394B (en) Multi-screen payment control method, equipment and computer readable storage medium
CN111970738B (en) Network switching control method, device and computer readable storage medium
CN110413330B (en) Face unlocking initialization method, equipment and computer readable storage medium
CN110334559B (en) Code scanning identification method, terminal and computer readable storage medium
CN109151201B (en) Anti-addiction method, mobile terminal and computer storage medium
CN109684020B (en) Theme switching method, device and computer readable storage medium
CN110046151B (en) Data cleaning method, server and computer readable storage medium
CN109388947B (en) Background management method, device and computer readable storage medium
CN110572518B (en) Screen-extinguishing control method, mobile terminal and computer-readable storage medium
CN109711850B (en) Secure payment method, device and computer readable storage medium
CN109062688B (en) Memory allocation method, server and mobile terminal
CN110955397A (en) Method for setting frame rate of game terminal, game terminal and storage medium
CN110377458B (en) Data recovery method, mobile terminal and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
TA01 Transfer of patent application right

Effective date of registration: 20220512

Address after: 1801, building 2, Chongwen Park, Nanshan Zhiyuan, No. 3370, Liuxian Avenue, Fuguang community, Taoyuan Street, Nanshan District, Shenzhen, Guangdong 518000

Applicant after: NUBIA TECHNOLOGY Co.,Ltd.

Address before: 518000 6-8 / F, 10-11 / F, 6 / F, 6-10 / F, C zone, Han's innovation building, No. 9018, Beihuan Avenue, high tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: NUBIA TECHNOLOGY Co.,Ltd.

Applicant before: NANCHANG NUBIA TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant