CN113377474A - Screen protection display method and related device - Google Patents

Screen protection display method and related device Download PDF

Info

Publication number
CN113377474A
CN113377474A CN202110650156.4A CN202110650156A CN113377474A CN 113377474 A CN113377474 A CN 113377474A CN 202110650156 A CN202110650156 A CN 202110650156A CN 113377474 A CN113377474 A CN 113377474A
Authority
CN
China
Prior art keywords
time
timestamp
screen saver
android system
audio
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.)
Granted
Application number
CN202110650156.4A
Other languages
Chinese (zh)
Other versions
CN113377474B (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.)
Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Original Assignee
Hunan Happly Sunshine Interactive Entertainment Media 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 Hunan Happly Sunshine Interactive Entertainment Media Co Ltd filed Critical Hunan Happly Sunshine Interactive Entertainment Media Co Ltd
Priority to CN202110650156.4A priority Critical patent/CN113377474B/en
Publication of CN113377474A publication Critical patent/CN113377474A/en
Application granted granted Critical
Publication of CN113377474B publication Critical patent/CN113377474B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/453Help systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • 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
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The application discloses a screen saver display method and a related device, wherein the screen saver display method firstly starts a first timer when an android system meets a first preset condition, and sets a default time interval as a preset delay time, then when the android system meets a screen saver display condition, a key trigger timestamp and an audio state timestamp are acquired, and finally whether a user operates and uses equipment is judged based on the current timestamp of the android system, the key trigger timestamp and the audio state timestamp, and the screen saver display state is controlled based on a judgment result.

Description

Screen protection display method and related device
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a screen saver display method and a related apparatus.
Background
A screen saver, also called a screen saver, is a special function designed to protect a display, and is a function that is displayed in the form of pictures or videos on a display device that a user does not operate and use, and the function has been widely used in smart display devices. The original purpose of the design at that time is to prevent the display from aging and shortening the service life of the display due to the fact that the display displays the same picture for a long time because of unmanned operation of intelligent identification such as a computer, an intelligent television and the like.
At present, screen savers of intelligent equipment based on an Android system are displayed on multiple application layers, namely, the screen savers can be displayed only when screen saver applications are run, and the screen savers can be displayed only when the applications are started, so that negative effects are brought to the use experience of users.
Disclosure of Invention
In order to solve the above technical problems, the present application provides a method and a related device for displaying a screen saver, so as to achieve the purpose of providing a screen saver display method with efficient and simple system functions.
In order to achieve the technical purpose, the embodiment of the application provides the following technical scheme:
a screen saver display method is realized based on an android system and comprises the following steps:
when the android system meets a first preset condition, starting a first timer; the first preset condition comprises that a server side is configured to start a screen saver, and a screen saver switch in the android system is started;
setting the default interval time as a preset delay time;
judging whether the timing time of the first timer is equal to a preset delay time or not, if so, acquiring a key triggering time stamp and an audio state time stamp when the android system meets a screen saver display condition, wherein the key triggering time stamp is a time stamp for recording the time after the system is started when the latest key is triggered, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time stamp of the time after the system is started when the android system stops playing audio and video when the android system does not play audio and video;
and controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, wherein the current timestamp is a timestamp for recording the duration of the android system after the system is started.
Optionally, the controlling the display state of the screen saver based on the current timestamp of the android system, the key trigger timestamp, and the audio state timestamp includes:
when the value of the audio state timestamp is-1, returning to the step of setting a default time interval as a preset delay time length, and when the value of the audio state timestamp is a timestamp of the time length after the audio and video playing is stopped and the system is started, acquiring the maximum value of the audio state timestamp and the key triggering timestamp as a first intermediate value;
judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
Optionally, the method further includes:
and when the android system does not meet the first preset condition, hiding a screen saver setting inlet.
Optionally, the process of determining whether the android system meets the screen saver display condition includes:
judging whether the android system is in sleep or not, if so, returning to the step of setting default interval time as preset delay time;
if not, judging whether the current desktop displays the screen saver or not, if so, returning to the step of setting the default interval time as the preset delay time;
if not, judging whether the current foreground application of the android system meets the display condition, if not, returning to the step of setting the default interval time as the preset delay time, and if so, judging that the android system meets the screen saver display condition.
Optionally, the determining whether the current foreground application of the android system meets the display condition includes:
acquiring a class name of a current foreground application of the android system;
and judging whether the class name belongs to one of class names stored in a preset database, if so, judging that the current foreground application of the android system does not meet the display condition, and if not, judging that the current foreground application of the android system meets the display condition.
A screen saver display system is realized based on an android system and comprises:
the first judgment module is used for starting a first timer when the android system meets a first preset condition; the first preset condition comprises that a server side is configured to start a screen saver, and a screen saver switch in the android system is started;
the delay time module is used for setting the default interval time as a preset delay time;
the second judgment module is used for judging whether the timing time of the first timer is equal to a preset delay time, if so, when the android system meets the screen saver display condition, acquiring a key triggering time stamp and an audio state time stamp, wherein the key triggering time stamp is a time stamp for recording the time length after the system is started when a latest case is triggered, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time stamp of the time length after the system is started when the android system stops playing the audio and video when the audio and video is not played by the android system;
and the screen saver playing module is used for controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, and the current timestamp is a timestamp for recording the duration of the android system after the system is started.
Optionally, the screen saver playing module is specifically configured to, when the value of the audio state timestamp is-1, return to the step of setting the default time interval to be the preset delay time duration, and when the value of the audio state timestamp is a timestamp of a time duration after the system is started when audio and video playing is stopped, obtain a maximum value of the audio state timestamp and the key trigger timestamp as a first intermediate value;
judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
Optionally, the method further includes:
and the hidden setting module is used for hiding the screen saver setting inlet when the android system does not meet the first preset condition.
A screen saver display system comprising: a memory and a processor; wherein the memory has stored therein a program code, and the processor is configured to invoke the program code, and when invoked, implements the screen saver display method of any of the above.
A storage medium having stored therein program code which, when executed, implements a screen saver display method as defined in any one of the preceding claims.
It can be seen from the foregoing technical solutions that the embodiments of the present application provide a method and a related apparatus for displaying a screen saver, wherein, the screen saver display method firstly starts a first timer when the android system meets a first preset condition, and sets a default time interval as a preset delay time, then when the android system meets the screen saver display condition, acquiring a key triggering time stamp and an audio state time stamp, and finally judging whether a user operates and uses equipment or not based on the current time stamp of the android system, the key triggering time stamp and the audio state time stamp, and the display state of the screen saver is controlled based on the judgment result, the whole screen saver display method is realized based on the system function, additional application starting is not needed, the use experience of a user is favorably improved, and the screen saver display method has the characteristics of simple and efficient realization process.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flowchart of a screen saver display method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a screen saver display method according to another embodiment of the present application;
fig. 3 is a schematic flowchart of a screen saver display method according to another embodiment of the present application;
fig. 4 is a schematic diagram of a setting interface of a default time interval according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
An embodiment of the present application provides a screen saver display method, which is implemented based on an android system as shown in fig. 1, and includes:
s101: when the android system meets a first preset condition, starting a first timer; the first preset condition comprises that the server side is configured to start a screen saver, and a screen saver switch in the android system is started.
S102: the default interval time is set to a preset delay time duration.
S103: judging whether the timing time of the first timer is equal to a preset delay time or not, if so, acquiring a key trigger time stamp and an audio state time stamp when the android system meets a screen saver display condition, wherein the key trigger time stamp is a time stamp for recording the time length after the system is started when the key is triggered for the last time, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time length after the system is started when the android system does not play audio and video and stops playing audio and video.
S104: and controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, wherein the current timestamp is a timestamp for recording the duration of the android system after the system is started.
The android device system based on the android system monitors all Key events in the source code PhoneWindowManager.
The Android device system has a sleep WAKE-up mechanism, which is mainly realized through WAKE _ LOCK, and the Android provides five types of WakeLock, namely, PARTIAL _ WAKE _ LOCK, SCREEN _ DIM _ WAKE _ LOCK, SCREEN _ BRIGHT _ WAKE _ LOCK, FULL _ WAKE _ LOCK, and PROXIMITY _ SCREEN _ OFF _ WAKE _ LOCK. When an audio application is playing audio, a LOCK with TAG as Audio mix is held in PARTIAL _ WAKE _ LOCK of the system, specifically in an acquireWakeLockInternal method in PowerManagerService.java, and when no audio application is playing audio, the LOCK with TAG as Audio mix is released in releaseWakeLockInternal in PowerManagerService.java, namely the LOCK with TAG as Audio mix is not held; when the system needs to enter a sleep state, the goToSleepInternal method in powermanager service.
Based on the method, if the user operates the android device, if the button is triggered certainly, the method of InterfacetKeyBeforeDispatching of PhoneWindowManager.
If the user watches videos, listens to music or has scene behaviors such as audios and videos, a TAG (TAG) is a lock of the AudioMix in wake _ lock; if the device has entered the sleep state, it will execute into the goToSleepInternal method in powermanager service. For the three types of scenes, the judgment can be made by setting the attribute values. For example, when the user has a key trigger, set sys.mgtv.keyence.time (i.e., the key trigger timestamp) as the current system elapsedRealtime (i.e., the timestamp of the time after the system is started); when there is a lock with TAG as Audio mix in wake _ lock of the system (judged in acquireWakeLockInternal), setting the attribute value of sys.mgtv.wakeLock.time (namely the audio state timestamp) as-1, and when there is no lock with TAG as Audio mix in wake _ lock of the system (judged in releaseWakeLockInternal), setting the attribute value of sys.mgtv.wakeLock.time as stopping playing audio and video, setting the attribute value of elapsedRealtime of the current system (namely the timestamp of the time length after starting the system); when the system enters the sleep state (judged in the goToSleepInternal method in powermanager service. java), the attribute value of sys. Nor should a screensaver be presented when the value of the attribute value of sys.
The screen saver display method provided by the embodiment of the application is realized based on the logic, namely, the embodiment provides the screen saver display method realized based on the system function, the user does not need to additionally start the application, the use experience of the user is favorably improved, and the screen saver display method has the characteristics of simple and efficient realization process and is favorable for assisting in advertisement operation.
A description is given below of a possible implementation procedure of each step of the screen saver display method provided in the embodiment of the present application.
Optionally, as shown in fig. 2, the controlling a display state of a screen saver based on the current timestamp of the android system, the key trigger timestamp, and the audio state timestamp includes:
s1041: when the value of the audio state timestamp is-1, returning to the step of setting a default time interval as a preset delay time length, and when the value of the audio state timestamp is a timestamp of the time length after the audio and video playing is stopped and the system is started, acquiring the maximum value of the audio state timestamp and the key triggering timestamp as a first intermediate value;
s1042: judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
In this embodiment, the method polls at specific intervals whether a screensaver should be presented by using a first timer. When the display condition of the screen saver is not met, timing is restarted, the timing duration is calculated according to the attribute value of sys.mgtv.keyervent.time and the attribute value of sys.mgtv.wakelock.time in the display condition of the screen saver, and a specific algorithm is combined to ensure that the value of the timing duration of each occurrence of the screen saver from the time of the last condition allowing the display of the screen saver is the specific time (for example, the screen saver can be displayed every 10 minutes); in the scenario that the screen saver has been displayed, the timing duration is calculated according to the attribute value of sys.
Optionally, referring to fig. 3, the method for displaying a screen saver further includes:
s105: and when the android system does not meet the first preset condition, hiding a screen saver setting inlet.
The process of judging whether the android system meets the screen saver display condition comprises the following steps:
judging whether the android system is in sleep or not, if so, returning to the step of setting default interval time as preset delay time;
if not, judging whether the current desktop displays the screen saver or not, if so, returning to the step of setting the default interval time as the preset delay time;
if not, judging whether the current foreground application of the android system meets the display condition, if not, returning to the step of setting the default interval time as the preset delay time, and if so, judging that the android system meets the screen saver display condition.
Wherein, the judging whether the current foreground application of the android system meets the display condition comprises:
acquiring a class name of a current foreground application of the android system;
and judging whether the class name belongs to one of class names stored in a preset database, if so, judging that the current foreground application of the android system does not meet the display condition, and if not, judging that the current foreground application of the android system meets the display condition.
Specifically, whether the android system is dormant can be judged through the specific value of the attribute value of sys.
The default interval time may be set by a user via a similar interface as shown in fig. 4, and the following specific usage scenario is introduced assuming the default interval is 10 minutes.
Scene one: after the system is started, a user does not perform any operation (including key pressing, voice and the like), at the moment, a polling timer of a screen saver starting time interval starts to display the screen saver after set 10 minutes, before the screen saver is displayed, whether the system is dormant or not is judged (the attribute value of sys. mgtv. sleep. time is-1, the system is already dormant), if the system is not dormant, the screen saver can be displayed, otherwise, the screen saver cannot be displayed;
scene two: after the system is started, a user starts playing a sound/video through the operation of a key or a voice instruction and the like, in a playing scene, a polling timer of a screen saver starting time interval still works, and the delay time of each time is set to be 10 minutes, and a screen saver module judges whether the sound/video is currently played or not according to the attribute value of sys.mgtv.wakelock.time (the attribute value of sys.mgtv.wakelock.time is-1, which indicates that the sound/video is being played); if the screen saver is not played (the attribute value of sys. mgtv. wakelock. time is the current system elapsedRealtime, namely the timestamp of the time after the system is started), the preset delay time of the first timer at this time is the default interval time for starting the screen saver (current _ time-wake _ lock _ time), wherein the default interval time for starting the screen saver (namely the default interval time) refers to 10 minutes set by the user;
scene three: after the system is started, a user starts playing audio/video through the operation of a key or a voice instruction and the like, after the audio/video playing is finished (the attribute value of sys. mgtv. wakelock. time is the current system elapsedRealtime), the user performs the key operation (the attribute value of sys. mgtv. keyent. time is the last system key elapsedRealtime), when a polling timer of a screen saver time interval reaches a timing point, the next timing time length is obtained again, the time length is the default screen saver starting interval time- (current _ time-key _ event _ time), wherein the default screen saver starting interval time is 10 minutes set by the user;
scene four: in the display process of the screen saver (the foreground process of the system is the application of the screen saver module), a polling timer which defaults to 30 seconds continuously runs, when a scene of system dormancy (attribute value of sys. mgtv. sleep. time is-1) occurs, when the first timer of the polling reaches a delay time point, the duration of the next delay time point is 30- (current _ time-sleep _ time), and the value is certainly a value larger than 0.
Before the screen saver is displayed, a judgment is made about some special scenes (for example, whether a picture is currently displayed by using a file manager or other applications, which is judged by acquiring a foreground process of the current system), and the screen saver is not allowed to be displayed in the scenes.
When the user selects to close the screen saver function, the timer is correspondingly closed (namely, the timing message of the timer is removed); when the user selects another option (e.g., the set time period is 3 minutes), the first timer immediately adjusts the default timed polling time period to 3 minutes, the "default interval" is correspondingly adjusted to 3 minutes, and so on.
When the user has a key operation behavior, the screen saver module can immediately hide the screen saver, and meanwhile, the first timer can still work.
The following describes a screen saver display system provided by an embodiment of the present application, and the screen saver display system described below and the screen saver display method described above may be referred to in correspondence.
Correspondingly, this application embodiment still provides a screen saver display system, realizes based on the android system, screen saver display system includes:
the first judgment module is used for starting a first timer when the android system meets a first preset condition; the first preset condition comprises that a server side is configured to start a screen saver, and a screen saver switch in the android system is started;
the delay time module is used for setting the default interval time as a preset delay time;
the second judgment module is used for judging whether the timing time of the first timer is equal to a preset delay time, if so, when the android system meets the screen saver display condition, acquiring a key triggering time stamp and an audio state time stamp, wherein the key triggering time stamp is a time stamp for recording the time length after the system is started when a latest case is triggered, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time stamp of the time length after the system is started when the android system stops playing the audio and video when the audio and video is not played by the android system;
and the screen saver playing module is used for controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, and the current timestamp is a timestamp for recording the duration of the android system after the system is started.
Optionally, the screen saver playing module is specifically configured to, when the value of the audio state timestamp is-1, return to the step of setting the default time interval to be the preset delay time duration, and when the value of the audio state timestamp is a timestamp of a time duration after the system is started when audio and video playing is stopped, obtain a maximum value of the audio state timestamp and the key trigger timestamp as a first intermediate value;
judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
Optionally, the method further includes:
and the hidden setting module is used for hiding the screen saver setting inlet when the android system does not meet the first preset condition.
Correspondingly, the embodiment of the present application further provides a screen saver display system, including: a memory and a processor; wherein, the memory stores program codes, the processor is used for calling the program codes, and the program codes realize the screen saver display method of any embodiment when being called.
Correspondingly, an embodiment of the present application further provides a storage medium, where the storage medium stores a program code, and the program code implements the screen saver display method according to any of the above embodiments when executed.
To sum up, the embodiment of the application provides a screen saver display method and a related device, wherein the screen saver display method firstly starts a first timer when an android system meets a first preset condition, sets a default time interval as a preset delay time, then when the android system meets a screen saver display condition, acquires a key trigger timestamp and an audio state timestamp, finally judges whether a user operates and uses equipment based on the current timestamp of the android system, the key trigger timestamp and the audio state timestamp, and controls a screen saver display state based on a judgment result.
Features described in the embodiments in the present specification may be replaced with or combined with each other, each embodiment is described with a focus on differences from other embodiments, and the same and similar portions among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A screen saver display method is realized based on an android system and comprises the following steps:
when the android system meets a first preset condition, starting a first timer; the first preset condition comprises that a server side is configured to start a screen saver, and a screen saver switch in the android system is started;
setting the default interval time as a preset delay time;
judging whether the timing time of the first timer is equal to a preset delay time or not, if so, acquiring a key triggering time stamp and an audio state time stamp when the android system meets a screen saver display condition, wherein the key triggering time stamp is a time stamp for recording the time after the system is started when the latest key is triggered, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time stamp of the time after the system is started when the android system stops playing audio and video when the android system does not play audio and video;
and controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, wherein the current timestamp is a timestamp for recording the duration of the android system after the system is started.
2. The method of claim 1, wherein controlling a screen saver display state based on the android system's current timestamp, the key trigger timestamp, and the audio state timestamp comprises:
when the value of the audio state timestamp is-1, returning to the step of setting a default time interval as a preset delay time length, and when the value of the audio state timestamp is a timestamp of the time length after the audio and video playing is stopped and the system is started, acquiring the maximum value of the audio state timestamp and the key triggering timestamp as a first intermediate value;
judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
3. The method of claim 1, further comprising:
and when the android system does not meet the first preset condition, hiding a screen saver setting inlet.
4. The method according to claim 1, wherein the process of determining whether the android system meets a screen saver display condition comprises:
judging whether the android system is in sleep or not, if so, returning to the step of setting default interval time as preset delay time;
if not, judging whether the current desktop displays the screen saver or not, if so, returning to the step of setting the default interval time as the preset delay time;
if not, judging whether the current foreground application of the android system meets the display condition, if not, returning to the step of setting the default interval time as the preset delay time, and if so, judging that the android system meets the screen saver display condition.
5. The method of claim 4, wherein the determining whether the current foreground application of the android system satisfies a presentation condition comprises:
acquiring a class name of a current foreground application of the android system;
and judging whether the class name belongs to one of class names stored in a preset database, if so, judging that the current foreground application of the android system does not meet the display condition, and if not, judging that the current foreground application of the android system meets the display condition.
6. A screen saver display system, realized based on an android system, the screen saver display system comprising:
the first judgment module is used for starting a first timer when the android system meets a first preset condition; the first preset condition comprises that a server side is configured to start a screen saver, and a screen saver switch in the android system is started;
the delay time module is used for setting the default interval time as a preset delay time;
the second judgment module is used for judging whether the timing time of the first timer is equal to a preset delay time, if so, when the android system meets the screen saver display condition, acquiring a key triggering time stamp and an audio state time stamp, wherein the key triggering time stamp is a time stamp for recording the time length after the system is started when a latest case is triggered, the audio state time stamp is-1 when the android system plays audio and video, and the time stamp is the time stamp of the time length after the system is started when the android system stops playing the audio and video when the audio and video is not played by the android system;
and the screen saver playing module is used for controlling the display state of the screen saver based on the current timestamp of the android system, the key triggering timestamp and the audio state timestamp, and the current timestamp is a timestamp for recording the duration of the android system after the system is started.
7. The system according to claim 6, wherein the screen saver playing module is specifically configured to, when the value of the audio state timestamp is-1, return to the step of setting the default time interval to the preset delay time, and when the value of the audio state timestamp is a timestamp of a time after the system is started when audio and video playing is stopped, obtain a maximum value of the audio state timestamp and the key triggering timestamp as a first intermediate value;
judging whether the difference value between the current timestamp and the first intermediate value is greater than or equal to the preset delay time length or not, if so, sending a broadcast showing a screen saver to a desktop of the android system, returning to the step of setting default interval time as the preset delay time length, if not, adjusting the preset delay time length according to a first preset formula, and returning to the step of judging whether the timing time of the first timer is equal to the preset delay time length or not;
the first preset formula includes: and N is equal to CD (current _ time-M), wherein N represents a value of the adjusted preset delay time, CD represents the default time interval, current _ time represents the current timestamp, and M represents the first intermediate value.
8. The system of claim 6, further comprising:
and the hidden setting module is used for hiding the screen saver setting inlet when the android system does not meet the first preset condition.
9. A screen saver display system comprising: a memory and a processor; wherein the memory has stored therein program code, and the processor is configured to invoke the program code, which when invoked, implements the screen saver display method of any of claims 1-5.
10. A storage medium having stored therein program code which, when executed, implements a screen saver display method according to any of claims 1 to 5.
CN202110650156.4A 2021-06-10 2021-06-10 Screen saver display method and related device Active CN113377474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110650156.4A CN113377474B (en) 2021-06-10 2021-06-10 Screen saver display method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110650156.4A CN113377474B (en) 2021-06-10 2021-06-10 Screen saver display method and related device

Publications (2)

Publication Number Publication Date
CN113377474A true CN113377474A (en) 2021-09-10
CN113377474B CN113377474B (en) 2023-06-13

Family

ID=77573826

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110650156.4A Active CN113377474B (en) 2021-06-10 2021-06-10 Screen saver display method and related device

Country Status (1)

Country Link
CN (1) CN113377474B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402424A (en) * 2010-09-08 2012-04-04 鸿富锦精密工业(深圳)有限公司 Screen protection system and method
US20130277353A1 (en) * 2012-04-23 2013-10-24 Dacor, Inc. Android controlled oven
CN107484022A (en) * 2017-08-07 2017-12-15 四川长虹电器股份有限公司 The method that system overall situation screen protection is realized in Android intelligent television
CN107608724A (en) * 2017-09-26 2018-01-19 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable recording medium for managing application program
CN111836115A (en) * 2020-07-02 2020-10-27 海信视像科技股份有限公司 Screen saver display method, screen saver skipping method and display device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402424A (en) * 2010-09-08 2012-04-04 鸿富锦精密工业(深圳)有限公司 Screen protection system and method
US20130277353A1 (en) * 2012-04-23 2013-10-24 Dacor, Inc. Android controlled oven
CN107484022A (en) * 2017-08-07 2017-12-15 四川长虹电器股份有限公司 The method that system overall situation screen protection is realized in Android intelligent television
CN107608724A (en) * 2017-09-26 2018-01-19 深圳市金立通信设备有限公司 A kind of method, terminal and computer-readable recording medium for managing application program
CN111836115A (en) * 2020-07-02 2020-10-27 海信视像科技股份有限公司 Screen saver display method, screen saver skipping method and display device

Also Published As

Publication number Publication date
CN113377474B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
TWI536793B (en) Application programs starting system and method
KR101033085B1 (en) System and method for arranging and playing a media presentation
CN106686257B (en) A kind of control method of mobile terminal, device and mobile terminal
CN103576834A (en) Power saving control method and electronic device supporting the same
WO2014048326A1 (en) Display method and electronic device
CN112511902B (en) Display screen control method and device of OLED television terminal and OLED television terminal
CN114302238B (en) Display method and display device for prompt information in sound box mode
CN112463237A (en) Screen burning prevention method, device, equipment and storage medium
CN107484022B (en) Method for realizing system global screen saver on Android smart television
WO2020206688A1 (en) Video playback method and apparatus, storage medium and electronic device
CN100571430C (en) A kind of method that realizes starting up progress bar in mobile communication terminal
CN114296669A (en) Display device
CN106598618B (en) Method and system for realizing shutdown advertisement based on android system
CN113377474A (en) Screen protection display method and related device
CN109348295A (en) A method of solution android advertisement video, which opens, broadcasts preceding blank screen
CN105807890A (en) Information display method and device and electronic equipment
CN111556198A (en) Sound effect control method, terminal equipment and storage medium
CN102044201B (en) Device and method for constant brightness display of mobile equipment screen
WO2023078262A1 (en) Application processing method and apparatus, and electronic device
CN116132740A (en) Energy saving method and device for video watching equipment, video watching equipment and readable storage medium
WO2019184142A1 (en) Information prompting method, electronic apparatus, terminal device, and storage medium
CN114327714A (en) Application program control method, device, equipment and medium
CN115017004A (en) Process monitoring method and electronic equipment
CN111880912A (en) Method and device for controlling electronic equipment and electronic equipment
CN113282362A (en) Application program management method, device, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant