CN115941836A - An interface display method, electronic device and storage medium - Google Patents
An interface display method, electronic device and storage medium Download PDFInfo
- Publication number
- CN115941836A CN115941836A CN202211337269.XA CN202211337269A CN115941836A CN 115941836 A CN115941836 A CN 115941836A CN 202211337269 A CN202211337269 A CN 202211337269A CN 115941836 A CN115941836 A CN 115941836A
- Authority
- CN
- China
- Prior art keywords
- wallpaper
- mode
- electronic device
- resources
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000003860 storage Methods 0.000 title claims abstract description 20
- 230000004044 response Effects 0.000 claims description 30
- 230000015654 memory Effects 0.000 claims description 27
- 230000008859 change Effects 0.000 claims description 10
- 230000009471 action Effects 0.000 claims description 2
- 238000007726 management method Methods 0.000 description 45
- 238000004891 communication Methods 0.000 description 37
- 230000006854 communication Effects 0.000 description 37
- 230000006870 function Effects 0.000 description 36
- 230000000694 effects Effects 0.000 description 25
- 238000012545 processing Methods 0.000 description 21
- 230000003068 static effect Effects 0.000 description 20
- 230000008569 process Effects 0.000 description 19
- 230000005236 sound signal Effects 0.000 description 13
- 238000004590 computer program Methods 0.000 description 11
- 238000010295 mobile communication Methods 0.000 description 11
- 210000000988 bone and bone Anatomy 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 229920001621 AMOLED Polymers 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 4
- 238000001514 detection method Methods 0.000 description 4
- 230000007794 irritation Effects 0.000 description 4
- 238000007781 pre-processing Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000010985 leather Substances 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000010009 beating Methods 0.000 description 2
- 230000036772 blood pressure Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000003825 pressing Methods 0.000 description 2
- 239000002096 quantum dot Substances 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 230000007958 sleep Effects 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 240000007594 Oryza sativa Species 0.000 description 1
- 235000007164 Oryza sativa Nutrition 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 208000003464 asthenopia Diseases 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000005059 dormancy Effects 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000036316 preload Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 235000009566 rice Nutrition 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 230000003238 somatosensory effect Effects 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000011269 treatment regimen Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 230000001755 vocal effect Effects 0.000 description 1
Images
Landscapes
- Telephone Function (AREA)
Abstract
Description
技术领域technical field
本申请涉及电子技术领域,特别涉及一种界面显示方法、电子设备及存储介质。The present application relates to the field of electronic technology, and in particular to an interface display method, electronic equipment and a storage medium.
背景技术Background technique
手机等电子设备越来越多的参与人们的生活,当用户在光线较暗的环境中使用手机时,若手机的显示界面中显示的内容较亮,会对用户的眼部造成刺激,容易引起用户的视觉疲劳。手机配置有夜间显示模式,夜间显示模式下显示的亮度与夜间环境更接近,从而能够减小对用户眼睛的刺激。Mobile phones and other electronic devices are more and more involved in people's lives. When a user uses a mobile phone in a dark environment, if the content displayed on the display interface of the mobile phone is bright, it will cause irritation to the user's eyes and easily cause User's visual fatigue. The mobile phone is equipped with a night display mode, and the brightness displayed in the night display mode is closer to the night environment, thereby reducing the irritation to the user's eyes.
目前,手机应用壁纸之后,壁纸的颜色一般是固定的,一些壁纸在夜间显示模式下显示时亮度仍然很高,影响用户体验。At present, after the wallpaper is applied to the mobile phone, the color of the wallpaper is generally fixed, and some wallpapers are still displayed with high brightness in the night display mode, which affects the user experience.
发明内容Contents of the invention
本申请提供了一种界面显示方法、电子设备及存储介质,能够使壁纸适应电子设备的夜间显示模式,提高用户体验。所述技术方案如下:The present application provides an interface display method, an electronic device and a storage medium, which can adapt the wallpaper to the night display mode of the electronic device and improve user experience. Described technical scheme is as follows:
第一方面,本申请实施例提供了一种界面显示方法,由电子设备执行,该方法包括:In the first aspect, the embodiment of the present application provides an interface display method, which is executed by an electronic device, and the method includes:
检测到第一操作,第一操作请求电子设备显示第一壁纸;A first operation is detected, and the first operation requests the electronic device to display a first wallpaper;
响应于第一操作,获取第一壁纸的资源和电子设备当前处于的颜色模式,电子设备的颜色模式包括日间模式和夜间模式,第一壁纸的资源包括基于日间模式的资源和基于夜间模式的资源;In response to the first operation, acquire the resource of the first wallpaper and the color mode that the electronic device is currently in, the color mode of the electronic device includes a day mode and a night mode, and the resource of the first wallpaper includes a resource based on a day mode and a resource based on a night mode H;
根据电子设备当前处于的模式,显示第一壁纸的资源中的一个。According to the current mode of the electronic device, one of the resources of the first wallpaper is displayed.
基于上述技术方案,基于日间模式的资源用于在电子设备的日间模式下显示,基于日间模式的资源显示的亮度与日间环境更接近,基于夜间模式的资源用于在电子设备的夜间模式下显示,基于夜间模式的资源显示的亮度与夜间环境更接近。在检测到请求显示第一壁纸的操作时,电子设备可以获取当前处于的颜色模式,在电子设备当前处于日间模式的情况下,显示基于日间模式的资源,在电子设备当前处于夜间模式的情况下,显示基于夜间模式的资源,从而第一壁纸能够适应电子的夜间模式,在夜间模式下显示第一壁纸时,避免第一壁纸的亮度过高的问题,提高用户体验。Based on the above technical solution, the resources based on the day mode are used for display in the day mode of the electronic device, the brightness displayed by the resources based on the day mode is closer to the daytime environment, and the resources based on the night mode are used for display in the electronic device. Displayed in night mode, the brightness of resource display based on night mode is closer to the night environment. When an operation requesting to display the first wallpaper is detected, the electronic device may acquire the color mode it is currently in, and display resources based on the day mode if the electronic device is currently in the day mode, and display resources based on the day mode if the electronic device is currently in the night mode In some cases, resources based on the night mode are displayed, so that the first wallpaper can adapt to the electronic night mode, and when the first wallpaper is displayed in the night mode, the problem of excessive brightness of the first wallpaper is avoided, and user experience is improved.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,第一操作可以是使电子设备从任一状态切换至显示壁纸的界面的操作,显示壁纸的界面包括桌面、锁屏界面,在一些情况下,显示壁纸的界面还包括灭屏显示(always on display,AOD)界面。第一操作可以是使电子设备从任一应用界面退回到桌面的操作,按压电源键,轻触屏幕,点击一键锁屏控件,指纹解锁、人脸解锁、手势解锁,等。在一些情况下,电子设备具有折叠屏,第一操作可以是将折叠屏从完全折叠状态展开的操作。In combination with the first aspect and the above-mentioned implementation manners, in some implementation manners of the first aspect, the first operation may be an operation of switching the electronic device from any state to an interface displaying wallpapers, and the interface displaying wallpapers includes desktop, lock screen Interface, in some cases, the interface for displaying the wallpaper also includes an always on display (AOD) interface. The first operation may be the operation of returning the electronic device from any application interface to the desktop, pressing the power button, lightly touching the screen, clicking the one-key lock screen control, fingerprint unlocking, face unlocking, gesture unlocking, etc. In some cases, the electronic device has a folding screen, and the first operation may be an operation of unfolding the folding screen from a fully folded state.
电子设备响应于第一操作,获取第一壁纸的资源,以显示第一壁纸的资源中的一个。在第一方面的某些实现方式中,第一壁纸的资源可以是实时获取的,例如,在第一壁纸被设置为电子设备的壁纸之后,电子设备存储第一壁纸的资源标识信息,例如统一资源标识符(Uniform Resource Identifier,URI),响应于第一操作,电子设备根据资源标识信息从互联网获取第一壁纸的资源。In response to the first operation, the electronic device acquires the resources of the first wallpaper to display one of the resources of the first wallpaper. In some implementations of the first aspect, the resource of the first wallpaper may be acquired in real time, for example, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device stores the resource identification information of the first wallpaper, for example, the unified A resource identifier (Uniform Resource Identifier, URI), in response to the first operation, the electronic device obtains the resource of the first wallpaper from the Internet according to the resource identification information.
例如,在第一壁纸设置被为电子设备的壁纸之后,电子设备存储第一壁纸的资源,响应于第一操作,电子设备从存储目录下获取第一壁纸的资源。For example, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device stores the resources of the first wallpaper, and in response to the first operation, the electronic device acquires the resources of the first wallpaper from the storage directory.
在第一方面的某些实现方式中,在第一壁纸被设置为电子设备的壁纸之后,电子设备存储第一壁纸的资源,并对第一壁纸的资源进行预处理,例如,将视频加载到多媒体播放器,若电子设备在设置壁纸时处于日间模式,则将基于日间模式的视频加载到多媒体播放器,若电子设备在设置壁纸时处于夜间模式,则将基于夜间模式的视频加载到多媒体播放器。In some implementation manners of the first aspect, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device stores the resources of the first wallpaper and preprocesses the resources of the first wallpaper, for example, loading the video to Multimedia player, if the electronic device is in daytime mode when the wallpaper is set, then the video based on the daytime mode is loaded to the multimedia player, if the electronic device is in the night mode when the wallpaper is set, then the video based on the night mode is loaded into multimedia player.
在检测到第一操作之后,电子设备响应于第一操作,获取电子设备当前处于的颜色模式,并确定多媒体播放器中加载的资源是基于日间模式的资源还是基于夜间模式的资源;确定电子设备当前处于的颜色模式与多媒体播放器中加载的资源的模式是否一致,在不一致的情况下,获取第一壁纸的资源中的一个,并切换多媒体播放器中加载的资源。After detecting the first operation, the electronic device responds to the first operation, acquires the color mode that the electronic device is currently in, and determines whether the resource loaded in the multimedia player is a resource based on a day mode or a resource based on a night mode; Whether the current color mode of the device is consistent with the mode of the resources loaded in the multimedia player, if not, obtain one of the resources of the first wallpaper, and switch the resources loaded in the multimedia player.
例如,多媒体播放器中加载的资源是基于日间模式的资源,在电子设备当前处于日间模式的情况下,无需再获取第一壁纸的资源。在电子设备当前处于夜间模式的情况下,电子设备获取第一壁纸的资源中的基于夜间模式的资源,将多媒体播放器中加载的资源从基于日间模式的资源更换为基于夜间模式的资源。For example, the resources loaded in the multimedia player are based on the resources of the daytime mode, and when the electronic device is currently in the daytime mode, there is no need to acquire the resources of the first wallpaper. When the electronic device is currently in the night mode, the electronic device acquires the resources based on the night mode among the resources of the first wallpaper, and replaces the resources loaded in the multimedia player from the resources based on the day mode to the resources based on the night mode.
例如,多媒体播放器中加载的资源是基于夜间模式的资源,在电子设备当前处于夜间模式的情况下,无需再获取第一壁纸的资源。在电子设备当前处于日间模式的情况下,电子设备获取第一壁纸的资源中的基于日间模式的资源,将多媒体播放器中加载的资源从基于夜间模式的资源更换为基于日间模式的资源。从而,对于无需再获取第一壁纸的资源的情况,电子设备能够更迅速的响应第一操作,提高电子设备的性能。For example, the resources loaded in the multimedia player are resources based on the night mode, and when the electronic device is currently in the night mode, there is no need to acquire the resources of the first wallpaper. When the electronic device is currently in the daytime mode, the electronic device obtains the resources based on the daytime mode among the resources of the first wallpaper, and replaces the resources loaded in the multimedia player from the resources based on the nighttime mode to those based on the daytime mode. resource. Therefore, the electronic device can respond to the first operation more quickly and improve the performance of the electronic device when it is not necessary to obtain the resource of the first wallpaper.
结合第一方面,在第一方面的某些实现方式中,电子设备当前处于日间模式,上述界面显示方法还包括:在检测到第二操作的情况下,第二操作指示电子设备将颜色模式从日间模式切换为夜间模式,将显示的第一壁纸的资源从基于日间模式的资源切换为基于夜间模式的资源。With reference to the first aspect, in some implementations of the first aspect, the electronic device is currently in the daytime mode, and the above interface display method further includes: when the second operation is detected, the second operation instructs the electronic device to change the color mode to Switching from day mode to night mode switches the resource of the first wallpaper displayed from a day mode based resource to a night mode based resource.
结合第一方面,在第一方面的某些实现方式中,电子设备当前处于夜间模式,上述界面显示方法还包括:在检测到第三操作的情况下,第三操作指示电子设备将颜色模式从夜间模式切换为日间模式,将显示的第一壁纸的资源从基于夜间模式的资源切换为基于日间模式的资源。With reference to the first aspect, in some implementations of the first aspect, the electronic device is currently in the night mode, and the above interface display method further includes: when the third operation is detected, the third operation instructs the electronic device to change the color mode from The night mode is switched to the day mode, switching the resource of the first wallpaper displayed from the resource based on the night mode to the resource based on the day mode.
基于上述技术方案,在检测到电子设备的颜色模式发生切换时,包括从日间模式切换为夜间模式,从夜间模式切换为日间模式,电子设备显示的第一壁纸可以随电子设备的颜色模式发生切换,从而自动适应电子设备显示的亮度,避免对用户的眼部造成刺激,或者避免用户无法看清屏幕,提高用户体验。Based on the above technical solution, when it is detected that the color mode of the electronic device is switched, including switching from day mode to night mode, and from night mode to day mode, the first wallpaper displayed by the electronic device can follow the color mode of the electronic device. Switching occurs, thereby automatically adapting to the brightness displayed by the electronic device, avoiding irritation to the user's eyes, or preventing the user from being unable to see the screen clearly, and improving user experience.
结合第一方面和上述实现方式,在第一方面的某些实现方式中,第一壁纸的资源包括视频、图片中的至少一种。With reference to the first aspect and the foregoing implementation manners, in some implementation manners of the first aspect, the resources of the first wallpaper include at least one of video and pictures.
第一壁纸可以是静态壁纸,静态壁纸显示为一张图片,第一壁纸的资源包括日间模式的图片和夜间模式的图片。The first wallpaper may be a static wallpaper, and the static wallpaper is displayed as a picture, and the resource of the first wallpaper includes a picture in a day mode and a picture in a night mode.
第一壁纸也可以是动效类壁纸,动态类壁纸可以是超级壁纸、锁屏桌面动态壁纸、桌面动态壁纸、折叠屏壁纸等,其中,动效类壁纸显示的动画效果由一段视频中连续的视频帧确定,第一壁纸的资源包括日间模式的视频和夜间模式的视频。The first wallpaper can also be a dynamic wallpaper, and the dynamic wallpaper can be a super wallpaper, a lock screen desktop dynamic wallpaper, a desktop dynamic wallpaper, a folding screen wallpaper, etc., wherein the animation effect displayed by the dynamic wallpaper is composed of continuous The video frame is determined, and the resource of the first wallpaper includes a day mode video and a night mode video.
当第一壁纸是动效类壁纸时,第一壁纸的资源中除了日间模式的视频和夜间模式的视频之外,还可以包括日间模式的图片和夜间模式的图片,此时,图片可以是视频中的一帧,在该场景下,电子设备在日间模式下显示锁屏界面时显示日间模式的图片,电子设备在夜间模式下显示锁屏界面时显示夜间模式的图片,从而使锁屏界面也可以适应电子的夜间模式。When the first wallpaper is a dynamic wallpaper, in addition to the video of the day mode and the video of the night mode, the resource of the first wallpaper may also include a picture of the day mode and a picture of the night mode. At this time, the picture can be It is a frame in the video. In this scenario, when the electronic device displays the lock screen interface in day mode, it displays the picture in day mode, and when the electronic device displays the lock screen interface in night mode, it displays the picture in night mode, so that The lock screen can also be adapted to Electron's night mode.
第二方面,本申请实施例提供一种电子设备,包括:一个或多个处理器;一个或多个存储器;存储器存储有一个或多个程序,当一个或者多个程序被处理器执行时,使得电子设备执行上述第一方面任一项可能的方法。In the second aspect, the embodiment of the present application provides an electronic device, including: one or more processors; one or more memories; one or more programs are stored in the memories, and when the one or more programs are executed by the processor, The electronic device is made to execute any one possible method of the first aspect above.
第三方面,本申请实施例提供了一种装置,该装置包含在电子设备中,该装置具有实现上述各方面及上述各方面的可能实现方式中电子设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,显示模块或单元、检测模块或单元、处理模块或单元等。In a third aspect, an embodiment of the present application provides an apparatus, which is included in an electronic device, and has a function of realizing the behavior of the electronic device in the above aspects and possible implementation manners of the above aspects. The functions may be implemented by hardware, or may be implemented by executing corresponding software through hardware. Hardware or software includes one or more modules or units corresponding to the functions described above. For example, a display module or unit, a detection module or unit, a processing module or unit, etc.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instruction is run on a computer, the computer executes the method described in the first aspect above.
第五方面,本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面所述的方法。In the fifth aspect, the embodiment of the present application provides a computer program product containing instructions, which, when run on a computer, causes the computer to execute the method described in the first aspect above.
上述第二方面、第三方面、第四方面和第五方面所获得的技术效果与上述第一方面中对应的技术手段获得的技术效果近似,在这里不再赘述。The technical effects obtained by the above-mentioned second aspect, third aspect, fourth aspect and fifth aspect are similar to those obtained by the corresponding technical means in the above-mentioned first aspect, and will not be repeated here.
附图说明Description of drawings
图1示出了本申请实施例提供的一例电子设备100的结构示意图;FIG. 1 shows a schematic structural diagram of an electronic device 100 provided by an embodiment of the present application;
图2示出了本申请实施例提供的一例颜色模式切换过程的界面示意图;Fig. 2 shows a schematic interface diagram of an example of the color mode switching process provided by the embodiment of the present application;
图3示出了本申请实施例提供的又一例颜色模式切换过程的界面示意图;FIG. 3 shows a schematic interface diagram of another example of the color mode switching process provided by the embodiment of the present application;
图4示出了本申请实施例提供的一例界面显示方法的流程示意图;FIG. 4 shows a schematic flowchart of an example of an interface display method provided by an embodiment of the present application;
图5示出了本申请实施例提供的一例日间模式和夜间模式下的壁纸示意图;Fig. 5 shows a schematic diagram of wallpapers in daytime mode and nighttime mode provided by the embodiment of the present application;
图6示出了本申请实施例提供的一例软件结构框图;FIG. 6 shows a block diagram of a software structure provided by the embodiment of the present application;
图7示出了本申请实施例提供的又一例界面显示方法的流程示意图;FIG. 7 shows a schematic flowchart of another example of an interface display method provided by the embodiment of the present application;
图8示出了本申请实施例提供的又一例界面显示方法的流程示意图。FIG. 8 shows a schematic flowchart of another example of the interface display method provided by the embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请的实施方式作进一步地详细描述。以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In order to make the purpose, technical solution and advantages of the present application clearer, the implementation manner of the present application will be further described in detail below in conjunction with the accompanying drawings. Hereinafter, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
本申请提供的技术方案,应用于具备显示功能的电子设备中。其中,电子设备可以包括但不限于:多媒体播放器、智能终端、智能穿戴设备、智能家电设备、虚拟现实设备等。其中,多媒体播放器可以包括但不限于:智能电视、音乐播放器、视频播放器、电子投影仪等。智能终端可以包括但不限于:智能手机、笔记本电脑、平板电脑等。智能穿戴设备可以包括但不限于:智能手环、智能手表、智能眼镜等。智能家电设备可以包括但不限于:智能电饭煲、智能开关、智能温控设备等。虚拟显示设备可以包括但不限于虚拟现实(virtualreality,VR)设备、增强现实(augmented reality,AR)设备等。The technical solution provided by this application is applied to an electronic device with a display function. Wherein, the electronic devices may include but not limited to: multimedia players, smart terminals, smart wearable devices, smart home appliances, virtual reality devices, and the like. Wherein, the multimedia player may include but not limited to: smart TV, music player, video player, electronic projector, and the like. Smart terminals may include, but are not limited to: smart phones, notebook computers, tablet computers, and the like. Smart wearable devices may include, but are not limited to: smart bracelets, smart watches, smart glasses, etc. Smart home appliances may include, but are not limited to: smart rice cookers, smart switches, smart temperature control devices, etc. The virtual display device may include but not limited to a virtual reality (virtual reality, VR) device, an augmented reality (augmented reality, AR) device, and the like.
图1示出了一种电子设备100的硬件结构示意图。FIG. 1 shows a schematic diagram of a hardware structure of an electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments,
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL). In some embodiments,
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments,
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the
按键190包括电源键,电源键用于用户控制电子设备100开机、关机、亮屏和灭屏。例如,在电子设备100关机的情况下,电子设备100响应于用户长按电源键的操作,开机。再例如,电子设备100在灭屏的情况下,电子设备100响应于用户点击电源键的操作,亮屏。又例如,电子设备100在亮屏的情况下,响应于用户点击电源键的操作,灭屏。比如,电子设备100在显示锁屏界面或者桌面时,响应于用户点击电源键的操作,进入AOD界面,即在显示屏上显示AOD界面。再例如,电子设备100在显示AOD界面时,响应于用户点击电源键的操作,进入桌面或者锁屏界面,即在显示屏上显示桌面或锁屏界面。The keys 190 include a power key, and the power key is used for the user to control the electronic device 100 to turn on, off, turn on and turn off the screen. For example, when the electronic device 100 is turned off, the electronic device 100 is turned on in response to the user's operation of long pressing the power button. For another example, when the screen of the electronic device 100 is off, the screen of the electronic device 100 is turned on in response to the user's operation of clicking the power button. For another example, when the screen of the electronic device 100 is on, the screen is off in response to the user's operation of clicking the power button. For example, when the electronic device 100 is displaying a lock screen interface or a desktop, in response to the user's operation of clicking a power button, the electronic device 100 enters the AOD interface, that is, displays the AOD interface on the display screen. For another example, when the electronic device 100 displays the AOD interface, in response to the user's operation of clicking the power button, the desktop or lock screen interface is entered, that is, the desktop or the lock screen interface is displayed on the display screen.
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled to the
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
显示屏194用于显示壁纸界面,如AOD界面、锁屏界面、桌面的壁纸界面等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display a wallpaper interface, such as an AOD interface, a lock screen interface, a desktop wallpaper interface, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,电子设备100根据压力传感器180A检测所述触摸操作强度。电子设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.
陀螺仪传感器180B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B can be used to determine the motion posture of the electronic device 100 . In some embodiments, the angular velocity of the electronic device 100 around three axes (ie, x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器180C用于测量气压。在一些实施例中,电子设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.
磁传感器180D包括霍尔传感器。电子设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The electronic device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a clamshell machine, the electronic device 100 can detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器180G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it may be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.
环境光传感器180L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access to application locks, take pictures with fingerprints, answer incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,电子设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,电子设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池142加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature treatment strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the electronic device 100 may reduce the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from being shut down abnormally due to the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于电子设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the position of the display screen 194 .
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
电子设备的颜色模式包括:日间模式和夜间模式,其中,日间模式也可以称为浅色模式、普通模式、室外模式、Light Mode,夜间模式也可以称为深色模式、暗模式、DarkMode、全局夜间模式等,本申请实施例对模式名称无特别限定。The color modes of electronic devices include: day mode and night mode, wherein day mode can also be called light mode, normal mode, outdoor mode, Light Mode, night mode can also be called dark mode, dark mode, DarkMode , global night mode, etc., the embodiment of the present application does not specifically limit the mode name.
用户从一种明亮环境下进入一种黑暗环境下时,例如关灯,或者,从一种黑暗环境下进入一种明亮环境下时,例如开灯,可以切换电子设备的颜色模式。When the user enters a dark environment from a bright environment, such as turning off the light, or when entering a bright environment from a dark environment, such as turning on the light, the color mode of the electronic device can be switched.
下面以电子设备为手机为例进行说明。在一种应用场景中,用户可以通过点击状态栏中的“夜间模式”控件切换电子设备的颜色模式。例如,图2示出了手机开启夜间模式的一种实现过程,如图2中的(a)所示,手机当前处于日间模式,并显示日间模式的信息列表。当电子设备处于日间模式时,会以系统预设的或默认的色彩配置,或者用户自定义的色彩配置,来显示信息列表,如图2中的(a)所示的白色背景色为一种常用的默认设计,在此仅用于说明这种设置方式,并不用于限制本申请。手机接收到从屏幕顶部向下滑动的信号时,显示状态栏,如图2中的(b)所示,状态栏上布局有多个控件,这些控件中包括开启夜间模式的控件21,手机接收到用户点击控件21的信号时,将颜色模式从日间模式切换为夜间模式,切换为夜间模式之后状态栏的状态如图2中的(c)所示,手机接收到向上滑动的信号时,退出状态栏,返回信息列表,此时显示夜间模式的信息列表,如图2中的(d)所示。当手机处于夜间模式时,会以一个较暗的底色,如图2中的(d)所示的黑色,来呈现该信息列表,并且,在夜间模式中所呈现的信息列表也经过处理,使得信息列表能够与黑色背景色区分开。The following takes the electronic device as a mobile phone as an example for description. In one application scenario, the user can switch the color mode of the electronic device by clicking the "night mode" control in the status bar. For example, FIG. 2 shows an implementation process of turning on the night mode of the mobile phone. As shown in (a) in FIG. 2 , the mobile phone is currently in the day mode and displays the information list of the day mode. When the electronic device is in the daytime mode, it will display the information list with the system preset or default color configuration, or the user-defined color configuration, as shown in (a) in Figure 2. The white background color is one A commonly used default design is only used to illustrate this setting method, and is not used to limit the application. When the mobile phone receives a signal that slides down from the top of the screen, the status bar is displayed, as shown in (b) in Figure 2. There are multiple controls on the status bar, and these controls include the
反之,若用户在夜间模式下进入状态栏,点击控件21,响应于用户的点击操作,手机从夜间模式切换为日间模式。On the contrary, if the user enters the status bar in the night mode and clicks the
在另一种应用场景中,用户可以在设置应用中切换电子设备的颜色模式。例如,图3示出了手机开启夜间模式的一种实现过程,如图3中的(a)所示,手机的主界面上布局有多个应用程序的图标,例如“设置”、“视频”、“天气”等。手机接收到用户点击“设置”的触摸信号时,可以进入到如图3中的(b)所示的界面,该界面包括“夜间模式”控件31。手机接收到用户点击控件31的信号时,可以将颜色模式从日间模式切换为夜间模式,切换为夜间模式之后控件31的状态如图3中的(c)所示。In another application scenario, the user can switch the color mode of the electronic device in the setting application. For example, Fig. 3 shows an implementation process of turning on the night mode of the mobile phone. As shown in (a) in Fig. 3, the main interface of the mobile phone is arranged with icons of multiple application programs, such as "Settings", "Video" and so on. , "weather", etc. When the mobile phone receives the touch signal that the user clicks “Settings”, it can enter the interface shown in (b) in FIG. 3 , which includes a “night mode”
本申请实施例所提供的技术方案,用于使电子设备的壁纸能够自适应电子设备的颜色模式。电子设备中显示壁纸的界面可以包括AOD界面、锁屏界面、桌面,以及,AOD界面与锁屏界面切换、锁屏界面与桌面切换、AOD界面与桌面切换的过程中显示的界面。The technical solution provided by the embodiment of the present application is used to enable the wallpaper of the electronic device to adapt to the color mode of the electronic device. The interface displaying the wallpaper in the electronic device may include an AOD interface, a lock screen interface, a desktop, and an interface displayed during the switching between the AOD interface and the lock screen interface, the switching between the lock screen interface and the desktop, and the switching between the AOD interface and the desktop.
本申请实施例中,壁纸可以静态壁纸,也可以是动效类壁纸,静态壁纸是指背景壁纸为静态的一帧图片,动效类壁纸是指背景壁纸是动态变化的,动效类壁纸可以包括超级壁纸(SuperWallpaper)、动态壁纸(DynamicWallpaper)和折叠屏壁纸(FoldWallpaper)等,本申请实施例对壁纸的类型无特别限定。In this embodiment of the application, the wallpaper can be a static wallpaper or a dynamic wallpaper. A static wallpaper refers to a frame of pictures with a static background wallpaper. A dynamic wallpaper refers to a dynamic background wallpaper. A dynamic wallpaper can be Including super wallpaper (SuperWallpaper), dynamic wallpaper (DynamicWallpaper), folding screen wallpaper (FoldWallpaper), etc., the embodiment of the present application does not specifically limit the type of wallpaper.
其中,静态壁纸可以在AOD界面或锁屏界面或桌面定格显示。动效类壁纸除了可以在AOD界面或锁屏界面或桌面定格显示之外,还可以在AOD界面与锁屏界面切换、锁屏界面与桌面切换、AOD界面与桌面切换的过程中显示。Among them, the static wallpaper can be displayed in a fixed frame on the AOD interface, lock screen interface or desktop. Dynamic effect wallpapers can not only be displayed on the AOD interface or the lock screen interface or the desktop, but also can be displayed during the switching between the AOD interface and the lock screen interface, between the lock screen interface and the desktop, and between the AOD interface and the desktop.
动效类壁纸在显示时本质上是播放一段视频。具体的,超级壁纸指的是手机从灭屏显示(always on display,AOD)界面进入桌面或锁屏界面、从AOD界面进入锁屏界面再进入桌面、从桌面或锁屏界面回到AOD界面的过程中播放的背景壁纸是动态连续的,具有背景壁纸的内容变化一气呵成的显示效果。灭屏显示指的是手机在执行灭屏指令后,可以点亮显示屏的部分区域,显示AOD界面,然后再完全灭屏。其中,AOD界面可以包括时间、日期、背景壁纸。超级壁纸的触发时机可以有多种,(1)例如,手机在显示屏上显示AOD界面时,如果用户点击电源键,则手机响应于用户点击电源键的操作,退出AOD,触发播放超级壁纸,以及点亮显示屏,进入锁屏界面,即在显示屏上显示超级壁纸从AOD界面到锁屏界面的动画。(2)例如,手机在显示锁屏界面时,如果用户在锁屏界面对手机解锁,则响应于用户对手机的解锁操作,手机退出锁屏界面,在显示屏上显示桌面,在显示屏上显示超级壁纸从锁屏界面到桌面的动画。(3)例如,手机在显示屏上显示AOD界面时,如果用户通过密码、指纹或人脸验证,则响应于用户对手机的解锁操作,在显示屏上显示从AOD界面到桌面的动画。(4)例如,手机在显示屏上显示桌面时,如果用户点击电源键,则手机响应于用户点击电源键的操作,在显示屏上显示从桌面到AOD界面的动画。(5)例如,手机在显示锁屏界面时,如果用户点击电源键,则手机响应于用户点击电源键的操作,在显示屏上显示从锁屏界面到AOD界面的动画。Animated wallpapers essentially play a video when displayed. Specifically, the super wallpaper refers to the mobile phone from the always on display (AOD) interface to enter the desktop or lock screen interface, enter the lock screen interface from the AOD interface and then enter the desktop, and return to the AOD interface from the desktop or lock screen interface. The background wallpaper played during the process is dynamic and continuous, with the display effect that the content of the background wallpaper changes in one go. The off-screen display means that after the mobile phone executes the off-screen command, it can light up a part of the display area, display the AOD interface, and then completely turn off the screen. Wherein, the AOD interface may include time, date, and background wallpaper. The timing of triggering the super wallpaper can be multiple. (1) For example, when the mobile phone displays the AOD interface on the display screen, if the user clicks the power button, the mobile phone responds to the operation of the user clicking the power button, exits the AOD, and triggers the playback of the super wallpaper. And turn on the display screen to enter the lock screen interface, that is, display the animation of the super wallpaper from the AOD interface to the lock screen interface on the display screen. (2) For example, when the mobile phone is displaying the lock screen interface, if the user unlocks the mobile phone on the lock screen interface, then in response to the user's unlocking operation on the mobile phone, the mobile phone exits the lock screen interface, displays the desktop on the display screen, and displays the desktop on the display screen. Shows the animation of the super wallpaper from the lock screen to the desktop. (3) For example, when the mobile phone displays the AOD interface on the display screen, if the user passes password, fingerprint or face verification, then in response to the user's unlocking operation of the mobile phone, an animation from the AOD interface to the desktop is displayed on the display screen. (4) For example, when the mobile phone displays the desktop on the display screen, if the user clicks the power button, the mobile phone displays an animation from the desktop to the AOD interface on the display screen in response to the operation of the user clicking the power button. (5) For example, when the mobile phone is displaying the lock screen interface, if the user clicks the power button, the mobile phone displays an animation from the lock screen interface to the AOD interface on the display screen in response to the operation of the user clicking the power button.
动态壁纸指的手机从锁屏界面进入桌面的过程中播放的背景壁纸是动态连续的,具有锁屏动效与桌面动效联动的显示效果,可以称为锁屏桌面动态壁纸,或者手机桌面的背景壁纸是动态的,可以称为桌面动态壁纸。例如,手机在显示锁屏界面时,如果用户在锁屏界面对手机解锁,则手机响应于用户对手机的解锁操作,在显示屏上显示动态壁纸。Live wallpaper refers to the background wallpaper played when the mobile phone enters the desktop from the lock screen interface, which is dynamic and continuous, and has the display effect of the lock screen dynamic effect and the desktop dynamic effect linkage. It can be called the lock screen desktop dynamic wallpaper, or the mobile desktop. The background wallpaper is dynamic and can be called a desktop live wallpaper. For example, when the mobile phone is displaying a lock screen interface, if the user unlocks the mobile phone on the lock screen interface, the mobile phone displays a dynamic wallpaper on the display screen in response to the user's unlocking operation on the mobile phone.
折叠屏壁纸应用于折叠屏手机,折叠屏壁纸指的是手机在显示屏展开至一定角度至完全展开的过程中,或者在显示屏由完全展开变化至折叠状态的过程中,播放背景壁纸,且背景壁纸是动态连续的,背景壁纸的内容随显示屏的折叠角度的变化而变化。Folding screen wallpaper is applied to folding screen mobile phones. Folding screen wallpaper refers to the process of playing the background wallpaper when the display screen of the mobile phone is unfolded to a certain angle to fully unfolded, or when the display screen changes from fully unfolded to folded state, and The background wallpaper is dynamic and continuous, and the content of the background wallpaper changes as the folding angle of the display screen changes.
下面结合图4对本申请实施例提供的一种界面显示方法进行说明。该方法由具有显示屏的电子设备执行,如图4所示,界面显示方法包括S401-S403。An interface display method provided by the embodiment of the present application will be described below with reference to FIG. 4 . The method is executed by an electronic device with a display screen. As shown in FIG. 4 , the interface display method includes S401-S403.
S401,检测到第一操作,第一操作请求将第一壁纸显示在电子设备的显示屏上。S401. A first operation is detected, and the first operation requests to display a first wallpaper on a display screen of an electronic device.
第一操作为使电子设备从任一状态切换至显示壁纸的界面的操作,第一操作可以是使电子设备从任一应用界面退回到桌面的操作,按压电源键,轻触屏幕,点击一键锁屏控件,指纹解锁、人脸解锁、手势解锁,等。在一些情况下,电子设备具有折叠屏,第一操作可以是将折叠屏从完全折叠状态展开或者的操作,或者是将折叠屏从展开状态折叠的操作。The first operation is the operation of switching the electronic device from any state to the interface displaying the wallpaper. The first operation may be the operation of returning the electronic device from any application interface to the desktop. Press the power button, touch the screen lightly, and click a key Lock screen controls, fingerprint unlock, face unlock, gesture unlock, etc. In some cases, the electronic device has a folding screen, and the first operation may be an operation of unfolding or folding the folding screen from a fully folded state, or an operation of folding the folding screen from an unfolded state.
S402,响应于第一操作,获取第一壁纸的资源和电子设备当前处于的颜色模式,电子设备的颜色模式包括日间模式和夜间模式,第一壁纸的资源包括基于日间模式的资源和基于夜间模式的资源。S402. In response to the first operation, acquire the resource of the first wallpaper and the color mode that the electronic device is currently in. The color mode of the electronic device includes day mode and night mode, and the resource of the first wallpaper includes resources based on the day mode and based on Resources for night mode.
S403,根据电子设备当前处于的模式,显示第一壁纸的资源中的一个。S403. Display one of the resources of the first wallpaper according to the current mode of the electronic device.
第一壁纸的资源包括基于日间模式的资源和基于夜间模式的资源。基于日间模式的资源用于在电子设备的日间模式下显示,基于日间模式的资源显示的亮度与日间环境更接近,基于夜间模式的资源用于在电子设备的夜间模式下显示,基于夜间模式的资源显示的亮度与夜间环境更接近。对于同一个壁纸,其基于日间模式的资源和基于夜间模式的资源显示的图案样式是相同的,但是颜色、对比度、透明度等亮度参数设置不同,从而在显示时其亮度不同。The resources of the first wallpaper include resources based on a day mode and resources based on a night mode. The resources based on the day mode are used for display in the day mode of the electronic device, the brightness of the resource display based on the day mode is closer to the daytime environment, and the resources based on the night mode are used for display in the night mode of the electronic device, Assets based on Night Mode display brightness that more closely matches that of a nighttime environment. For the same wallpaper, the resources based on the day mode and the resources based on the night mode display the same pattern style, but the brightness parameters such as color, contrast, and transparency are set differently, so the brightness is different when displayed.
示例性的,图5示出了一种界面示意图,图5中的(a)为资源中基于日间模式的图片,图5中的(b)为资源中基于夜间模式的图片,其中,基于日间模式的图片使用白色背景色,对图案样式使用黑色线条勾勒。基于夜间模式的图片使用黑色背景色,对图案样式使用白色线条勾勒。从而,基于夜间模式的图片的亮度低于基于日间模式的图片的亮度。Exemplarily, FIG. 5 shows a schematic diagram of an interface. (a) in FIG. 5 is a picture based on day mode in resources, and (b) in FIG. 5 is a picture based on night mode in resources, wherein, based Use a white background color for day mode images and black lines for pattern styles. Use a black background color for images based on night mode, and white lines for pattern styles. Thus, the brightness of the picture based on the night mode is lower than that of the picture based on the day mode.
第一壁纸的资源可以包括视频,还可以包括图片。例如,第一壁纸可以是静态壁纸,静态壁纸显示为一张图片,第一壁纸的资源可以包括日间模式的图片和夜间模式的图片。The resource of the first wallpaper may include a video, and may also include a picture. For example, the first wallpaper may be a static wallpaper, and the static wallpaper is displayed as a picture, and the resource of the first wallpaper may include a picture in a day mode and a picture in a night mode.
例如,第一壁纸是动效类壁纸,其显示的动画效果由一段视频中连续的视频帧确定,第一壁纸的资源可以包括日间模式的视频和夜间模式的视频。在一种实现方式中,当第一壁纸是动效类壁纸时,第一壁纸的资源中除了日间模式的视频和夜间模式的视频之外,还可以包括日间模式的图片和夜间模式的图片,图片可以是视频中的一帧,在该实现方式下,图片可以用于在锁屏、桌面等界面定格显示,例如,电子设备在日间模式下显示锁屏界面时可以显示日间模式的图片,电子设备在夜间模式下显示锁屏界面时可以显示夜间模式的图片。For example, the first wallpaper is a dynamic wallpaper, and the animation effect displayed by it is determined by continuous video frames in a video, and the resource of the first wallpaper may include a day mode video and a night mode video. In an implementation manner, when the first wallpaper is a dynamic wallpaper, in addition to the video of the day mode and the video of the night mode, the resources of the first wallpaper may also include pictures of the day mode and images of the night mode. The picture, the picture can be a frame in the video, in this implementation mode, the picture can be used to freeze the display on the lock screen, desktop and other interfaces, for example, when the electronic device displays the lock screen interface in the day mode, it can display the day mode When the electronic device displays a lock screen interface in the night mode, the picture in the night mode may be displayed.
在一种实现方式中,第一壁纸的资源可以是实时获取的,例如,在第一壁纸被设置为电子设备的壁纸之后,电子设备存储第一壁纸的资源标识信息,例如统一资源标识符(Uniform Resource Identifier,URI),响应于第一操作,电子设备根据资源标识信息从互联网获取第一壁纸的资源。In one implementation, the resource of the first wallpaper may be acquired in real time. For example, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device stores the resource identification information of the first wallpaper, such as a uniform resource identifier ( Uniform Resource Identifier, URI), in response to the first operation, the electronic device obtains the resource of the first wallpaper from the Internet according to the resource identification information.
在一种实现方式中,在第一壁纸被设置为电子设备的壁纸之后,电子设备下载并存储第一壁纸的资源,响应于第一操作,电子设备从存储目录下获取第一壁纸的资源。In an implementation manner, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device downloads and stores the resources of the first wallpaper, and in response to the first operation, the electronic device acquires the resources of the first wallpaper from a storage directory.
在一种实现方式中,第一壁纸的资源包括在一个数据包中,电子设备从互联网获取或下载的是第一壁纸的数据包,或者可以称为主题包、安装包等,主题包中包括第一壁纸的资源,主题包可以是压缩格式的文件,或者其他格式的文件。In one implementation, the resource of the first wallpaper is included in a data package, and what the electronic device obtains or downloads from the Internet is the data package of the first wallpaper, or it may be called a theme package, an installation package, etc. The theme package includes The resources of the first wallpaper and the theme package may be files in a compressed format or in other formats.
在一种实现方式中,每次响应于第一操作,电子设备均获取第一壁纸的资源和电子设备当前处于的颜色模式,在电子设备当前处于日间模式的情况下,获取第一壁纸的资源中的基于日间模式的资源,或者,在电子设备当前处于夜间模式的情况下,获取第一壁纸的资源中的基于夜间模式的资源。In one implementation, each time in response to the first operation, the electronic device acquires the resource of the first wallpaper and the color mode that the electronic device is currently in, and when the electronic device is currently in the daytime mode, acquires the resource of the first wallpaper The resources based on the day mode in the resources, or, in the case that the electronic device is currently in the night mode, acquire the resources based on the night mode in the resources of the first wallpaper.
在一种实现方式中,响应于第一操作,电子设备获取电子设备当前处于的颜色模式,并确定电子设备的颜色模式相比于前一次显示第一壁纸时是否发生变化,在电子设备的颜色模式未发生变化时,电子设备显示当前第一壁纸的资源。在电子设备的颜色模式发生变化时,电子设备重新获取第一壁纸的资源进行显示。In one implementation, in response to the first operation, the electronic device acquires the color mode that the electronic device is currently in, and determines whether the color mode of the electronic device has changed compared to the previous display of the first wallpaper. When the mode does not change, the electronic device displays the resources of the current first wallpaper. When the color mode of the electronic device changes, the electronic device reacquires the resources of the first wallpaper for display.
在一种实现方式中,响应于第一操作,电子设备获取电子设备当前处于的颜色模式,并确定电子设备的颜色模式与预加载的资源的模式是否一致,在一致情况下,电子设备显示预加载的资源,在不一致的情况下,电子设备获取第一壁纸的资源,切换预加载的资源后进行显示。In one implementation, in response to the first operation, the electronic device acquires the color mode that the electronic device is currently in, and determines whether the color mode of the electronic device is consistent with the mode of the preloaded resource, and if they are consistent, the electronic device displays the preloaded resource mode. If the loaded resources are inconsistent, the electronic device acquires the resources of the first wallpaper, and displays them after switching the preloaded resources.
本申请实施例中,在电子设备当前处于日间模式的情况下,电子设备可以显示第一壁纸的资源中的基于日间模式的资源,或者,在电子设备当前处于夜间模式的情况下,电子设备可以显示第一壁纸的资源中的基于夜间模式的资源,从而第一壁纸能够适应电子的夜间模式,在夜间模式下显示第一壁纸时,避免第一壁纸的亮度过高的问题,能够给用户更加舒适的体验,提高用户体验。In this embodiment of the present application, when the electronic device is currently in the daytime mode, the electronic device may display resources based on the daytime mode in the resources of the first wallpaper, or, when the electronic device is currently in the nighttime mode, the electronic The device can display resources based on the night mode in the resources of the first wallpaper, so that the first wallpaper can adapt to the electronic night mode, and when the first wallpaper is displayed in the night mode, the problem that the brightness of the first wallpaper is too high can be avoided, which can give User more comfortable experience, improve user experience.
在一些情况下,第一壁纸的资源中只包括一种模式的资源,不支持颜色切换,响应于第一操作,电子设备获取第一壁纸的资源,确定第一壁纸是否支持夜间模式,在第一壁纸支持夜间模式的情况下,获取电子设备当前处于的颜色模式,以确定是显示基于日间模式的资源还是夜间模式的资源。在第一壁纸不支持夜间模式的情况下,直接显示第一壁纸的资源。In some cases, the resources of the first wallpaper only include resources of one mode and do not support color switching. In response to the first operation, the electronic device obtains the resources of the first wallpaper and determines whether the first wallpaper supports night mode. If the wallpaper supports the night mode, acquire the current color mode of the electronic device to determine whether to display resources based on the day mode or night mode. When the first wallpaper does not support the night mode, the resources of the first wallpaper are directly displayed.
此外,本申请实施例中,电子设备可以根据颜色模式的切换,对第一壁纸的资源进行切换。例如,电子设备当前处于日间模式,显示第一壁纸的资源中的基于日间模式的资源,电子设备在检测到第二操作的情况下,将显示的第一壁纸的资源从基于日间模式的资源切换为基于夜间模式的资源。其中,第二操作指示电子设备将颜色模式从日间模式切换为夜间模式,例如,第二操作可以是点击图2中的(b)所示的控件21的操作,例如,第二操作可以是点击图3中的(b)所示的控件31的操作。In addition, in the embodiment of the present application, the electronic device may switch the resource of the first wallpaper according to the switching of the color mode. For example, the electronic device is currently in the daytime mode, and the resources based on the daytime mode among the resources of the first wallpaper are displayed, and when the second operation is detected, the electronic device changes the resource of the displayed first wallpaper from the resources based on the daytime mode to Switched resources for Night Mode based resources. Wherein, the second operation instructs the electronic device to switch the color mode from the day mode to the night mode, for example, the second operation may be the operation of clicking the
例如,电子设备当前处于夜间模式,显示第一壁纸的资源中的基于夜间模式的资源,电子设备在检测到第三操作的情况下,将显示的第一壁纸的资源从基于夜间模式的资源切换为基于日间模式的资源。其中,第三操作指示电子设备将颜色模式从夜间模式切换为日间模式,例如,第二操作可以是点击图2中的(c)所示的控件21的操作,例如,第二操作可以是点击图3中的(c)所示的控件31的操作。For example, the electronic device is currently in the night mode, and the resource based on the night mode among the resources of the first wallpaper is displayed, and the electronic device switches the resource of the displayed first wallpaper from the resource based on the night mode when the third operation is detected is a day mode based resource. Wherein, the third operation instructs the electronic device to switch the color mode from the night mode to the day mode, for example, the second operation may be the operation of clicking the
基于上述技术方案,在检测到电子设备的颜色模式发生切换时,包括从日间模式切换为夜间模式,从夜间模式切换为日间模式,电子设备显示的第一壁纸可以随电子设备的颜色模式发生切换,从而自动适应电子设备显示的亮度,避免对用户的眼部造成刺激,或者避免用户无法看清屏幕,能够给用户更加舒适的体验。此外,基于本申请实施例提供的方法,相较于对资源进行实时处理的方式,能够使电子设备的颜色模式发生切换时第一壁纸自动适应的速度更快。Based on the above technical solution, when it is detected that the color mode of the electronic device is switched, including switching from day mode to night mode, and from night mode to day mode, the first wallpaper displayed by the electronic device can follow the color mode of the electronic device. Switching occurs, thereby automatically adapting to the brightness displayed by the electronic device, avoiding irritation to the user's eyes, or preventing the user from being unable to see the screen clearly, and giving the user a more comfortable experience. In addition, based on the method provided by the embodiment of the present application, compared with the method of real-time processing of resources, the speed of automatic adaptation of the first wallpaper when the color mode of the electronic device is switched is faster.
下面对第一壁纸的资源包括在主题包中的实现方式进行说明。The implementation manner in which the resources of the first wallpaper are included in the theme package will be described below.
表1示出了一种主题包中可以配置的视频、图片,其中,锁屏壁纸图片用作锁屏界面的背景壁纸。折叠屏大屏指的是折叠屏完全展开后的屏幕,动态壁纸和超级壁纸无需配置折叠屏大屏锁屏壁纸图片。Table 1 shows the videos and pictures that can be configured in a theme package, wherein the lock screen wallpaper picture is used as the background wallpaper of the lock screen interface. The foldable large screen refers to the fully unfolded screen of the foldable screen. Live wallpapers and super wallpapers do not need to be configured with foldable large screen lock screen wallpaper images.
表1壁纸资源配置表Table 1 Wallpaper resource configuration table
根据第一壁纸实际需要的显示效果在主题包中添加第一壁纸的资源。例如,第一壁纸的类型为超级壁纸,其资源可以包括日间模式的壁纸视频、夜间模式的壁纸视频、日间模式的锁屏壁纸图片、夜间模式的锁屏壁纸图片。例如,第一壁纸的类型为动态壁纸,其资源可以包括日间模式的壁纸视频、夜间模式的壁纸视频。例如,第一壁纸的类型为折叠屏壁纸,其资源可以包括日间模式的壁纸视频、夜间模式的壁纸视频、日间模式的锁屏壁纸图片、夜间模式的锁屏壁纸图片、日间模式的折叠屏大屏锁屏壁纸图片、夜间模式的折叠屏大屏锁屏壁纸图片,其锁屏壁纸图片用于在显示屏处于折叠状态时使用。例如,第一壁纸的类型为静态壁纸,其资源可以包括日间模式的锁屏壁纸图片、夜间模式的锁屏壁纸图片,还可以包括日间模式的桌面壁纸图片、夜间模式的桌面壁纸图片。The resources of the first wallpaper are added to the theme package according to the display effect actually required by the first wallpaper. For example, the type of the first wallpaper is a super wallpaper, and its resource may include a wallpaper video in day mode, a wallpaper video in night mode, a lock screen wallpaper picture in day mode, and a lock screen wallpaper picture in night mode. For example, the type of the first wallpaper is a dynamic wallpaper, and its resource may include a wallpaper video in a day mode and a wallpaper video in a night mode. For example, the type of the first wallpaper is a folding screen wallpaper, and its resources may include wallpaper videos in day mode, wallpaper videos in night mode, lock screen wallpaper pictures in day mode, lock screen wallpaper pictures in night mode, Folding screen large screen lock screen wallpaper picture, folding screen large screen lock screen wallpaper picture in night mode, the lock screen wallpaper picture is used when the display is in the folded state. For example, the type of the first wallpaper is a static wallpaper, and its resource may include a picture of a lock screen wallpaper in a day mode, a picture of a lock screen wallpaper in a night mode, and may also include a picture of a desktop wallpaper in a day mode and a picture of a desktop wallpaper in a night mode.
需要说明的是,每个壁纸在显示时都需要调用与之对应的软件功能,这一软件功能可以被称为壁纸服务(WallpaperService),该壁纸服务可以注册在具有显示壁纸功能的应用中,例如,壁纸应用程序包(Android application package,APK)。It should be noted that each wallpaper needs to call the corresponding software function when it is displayed. This software function can be called wallpaper service (WallpaperService). This wallpaper service can be registered in an application that has the function of displaying wallpaper, for example , wallpaper application package (Android application package, APK).
在一种实现方式中,一种类型的壁纸对应一个壁纸服务,一个类型的壁纸服务用于定义该类型的壁纸的播放流程,定义该类型的壁纸在不同时机接收到指令后如何执行指令,但是不限定播放流程中使用的资源。例如,超级壁纸对应一个超级壁纸服务,记为SuperWallpaperService,动态壁纸一个动态壁纸服务,记为DynamicWallpaperService,折叠屏壁纸对应一个折叠屏壁纸服务,记为FoldableWallpaperService。不同动画内容的同一个类型的壁纸可以使用同一个壁纸服务,从而在开发壁纸时可以提供壁纸产出效率。In one implementation, one type of wallpaper corresponds to one wallpaper service, and one type of wallpaper service is used to define the playback process of this type of wallpaper, and define how this type of wallpaper executes instructions after receiving instructions at different times, but The resources used in the playback process are not limited. For example, a super wallpaper corresponds to a super wallpaper service, denoted as SuperWallpaperService, a dynamic wallpaper corresponds to a dynamic wallpaper service, denoted as DynamicWallpaperService, and a folding screen wallpaper corresponds to a folding screen wallpaper service, denoted as FoldableWallpaperService. The same type of wallpaper with different animation content can use the same wallpaper service, so that the wallpaper output efficiency can be improved when developing the wallpaper.
在一种实现方式中,第一壁纸的主题包中还包括第一壁纸对应的壁纸服务的标识,从而在使用第一壁纸时调用与之对应的壁纸服务。本申请实施例对壁纸服务的标识的形式无特别限定。例如,壁纸服务的标识可以是壁纸服务名称。In an implementation manner, the theme package of the first wallpaper further includes an identifier of a wallpaper service corresponding to the first wallpaper, so that the corresponding wallpaper service is invoked when the first wallpaper is used. The embodiment of the present application has no special limitation on the form of the wallpaper service identification. For example, the identifier of the wallpaper service may be the name of the wallpaper service.
示例性的,主题包中包括第一文件,记为livepaper.xml,可以在第一文件中写入壁纸服务名称。其中,livepaper.xml文件内容样式如下:Exemplarily, the theme package includes a first file, recorded as livepaper.xml, and the name of the wallpaper service can be written in the first file. Among them, the content style of the livepaper.xml file is as follows:
<?xml version="1.0"encoding="UTF-8"?><? xml version="1.0"encoding="UTF-8"? >
<HwTheme><HwTheme>
<pkgname>com.hihonor.livewallpaper.paradise</pkgname><pkgname>com.hihonor.livewallpaper.paradise</pkgname>
<classname>com.hihonor.wallpaper.superwallpaper.SuperWallpaperService</classname><classname>com.hihonor.wallpaper.superwallpaper.SuperWallpaperService</classname>
</HwTheme></HwTheme>
其中,pkgname为包名,也代表着唯一的application ID,用于标识壁纸APK。Classname指示第一壁纸绑定的壁纸服务名称,其中,超级壁纸服务名称可以记为com.hihonor.wallpaper.superwallpaper.SuperWallpaperService,折叠屏壁纸服务名称可以记为com.hihonor.wallpaper.fold.FoldableWallpaperService,动态壁纸服务名称可以记为com.hihonor.wallpaper.dynamic.DynamicWallpaperService。根据壁纸服务名称还可以确定第一壁纸的类型是超级壁纸、动态壁纸还是折叠屏壁纸。Among them, pkgname is the package name, which also represents the unique application ID, which is used to identify the wallpaper APK. Classname indicates the wallpaper service name bound to the first wallpaper, where the super wallpaper service name can be recorded as com.hihonor.wallpaper.superwallpaper.SuperWallpaperService, the foldable screen wallpaper service name can be recorded as com.hihonor.wallpaper.fold.FoldableWallpaperService, dynamic The name of the wallpaper service can be recorded as com.hihonor.wallpaper.dynamic.DynamicWallpaperService. According to the name of the wallpaper service, it can also be determined whether the type of the first wallpaper is a super wallpaper, a dynamic wallpaper or a folding screen wallpaper.
在一些实现方式中,在第一壁纸被设置为电子设备的壁纸之后,电子设备可以存储第一壁纸的资源,并对第一壁纸的资源进行预处理,例如,预先加载视频,预先确定视频包括的视频帧区间,或者预先设置图片至锁屏或桌面等,从而电子设备能够更迅速的响应第一操作,提高电子设备的性能。In some implementations, after the first wallpaper is set as the wallpaper of the electronic device, the electronic device may store the resources of the first wallpaper and preprocess the resources of the first wallpaper, for example, preload a video, and predetermine that the video includes The video frame interval, or preset pictures to the lock screen or desktop, etc., so that the electronic device can respond to the first operation more quickly, and improve the performance of the electronic device.
相应的,第一壁纸的主题包中还包括用于预处理的信息,该信息包括在第二文件中,记为配置文件livepaper_config.xml,对于不同类型的壁纸,预处理方式不同,对应的配置文件中的内容也不同。例如,动态壁纸的配置文件可以配置动态壁纸是否支持夜间模式,是否支持动态模糊。配置文件中可以根据实际需要的显示效果配置更多或更少的内容。示例性的,一个动态壁纸的配置文件livepaper_config.xml配置如下:Correspondingly, the theme package of the first wallpaper also includes preprocessing information, which is included in the second file, which is recorded as the configuration file livepaper_config.xml. For different types of wallpapers, the preprocessing methods are different, and the corresponding configuration The content in the file is also different. For example, the configuration file of the live wallpaper can configure whether the live wallpaper supports night mode and whether it supports motion blur. More or less content can be configured in the configuration file according to the actual required display effect. Exemplarily, the configuration file livepaper_config.xml of a live wallpaper is configured as follows:
<support_background_blur>true</support_background_blur><support_background_blur>true</support_background_blur>
<support_dark_mode>true</support_dark_mode><support_dark_mode>true</support_dark_mode>
其中,support_background_blur表示是否支持动态模糊,support_dark_mode表示是否支持夜间模式,是否支持可以通过不同的标识(例如true和false)表示,true表示支持,false表示不支持。Among them, support_background_blur indicates whether motion blur is supported, support_dark_mode indicates whether night mode is supported, and whether it is supported can be indicated by different flags (such as true and false), true indicates support, and false indicates no support.
例如,折叠屏壁纸的配置文件可以配置动态壁纸是否支持夜间模式,是否支持动态模糊,弹性动画刚度(fold-spring-stiffness)。示例性的,一个折叠屏壁纸的配置文件livepaper_config.xml配置如下:For example, the configuration file of the folding screen wallpaper can configure whether the live wallpaper supports night mode, whether it supports motion blur, and elastic animation stiffness (fold-spring-stiffness). Exemplarily, the configuration file livepaper_config.xml of a folding screen wallpaper is configured as follows:
<support_background_blur>true</support_background_blur><support_background_blur>true</support_background_blur>
<support_dark_mode>true</support_dark_mode><support_dark_mode>true</support_dark_mode>
<fold-spring-stiffness>60</fold-spring-stiffness><fold-spring-stiffness>60</fold-spring-stiffness>
折叠屏壁纸动效为弹性动画,刚度值影响播放速度。刚度可以根据视频资源与动画效果确定,上述示例中刚度为60。The animation effect of the folding screen wallpaper is an elastic animation, and the stiffness value affects the playback speed. Stiffness can be determined according to video resources and animation effects. In the above example, the stiffness is 60.
例如,超级壁纸的配置文件可以配置超级壁纸是否支持夜间模式,是否支持动态模糊,aod界面样式,播放动效帧数。示例性的,一个超级壁纸的配置文件livepaper_config.xml配置如下:For example, the configuration file of the super wallpaper can configure whether the super wallpaper supports night mode, whether it supports motion blur, the aod interface style, and the number of frames for playing dynamic effects. Exemplarily, a super wallpaper configuration file livepaper_config.xml is configured as follows:
<support_background_blur>true</support_background_blur><support_background_blur>true</support_background_blur>
<support_dark_mode>true</support_dark_mode><support_dark_mode>true</support_dark_mode>
<aod_to_lock_total_frame>60</aod_to_lock_total_frame><aod_to_lock_total_frame>60</aod_to_lock_total_frame>
<lock_to_launcher_total_frame>60</lock_to_launcher_total_frame><lock_to_launcher_total_frame>60</lock_to_launcher_total_frame>
<aod_style>DuneRealmClock;Dune Realm</aod_style><aod_style>DuneRealmClock; Dune Realm</aod_style>
<aod_support_transition_animation>fakse</aod_support_transition_animation><aod_support_transition_animation>fakse</aod_support_transition_animation>
其中,aod_to_lock_total_frame表示从aod界面到锁屏界面播放的帧数,上述示例中,这一阶段播放60帧,lock_to_launcher_total_frame表示从锁屏界面到桌面播放的帧数,上述示例中,这一阶段播放60帧,根据aod_to_lock_total_frame和lock_to_launcher_total_frame可以确定超级壁纸动效总时长。aod_style表示当前超级壁纸的aod样式的名字,aod样式为aod界面显示的壁纸的画面内容,例如一个样式可以为人物,一个样式可以是动物,上述示例中,aod样式的名字为DuneRealmClock,当应用超级壁纸之后,用户又单独更换了aod样式,则播放超级壁纸时不显示aod界面的动画,aod_support_transition_animation表示进入或者退出AOD界面的时候是否有过渡动画。Among them, aod_to_lock_total_frame indicates the number of frames played from the aod interface to the lock screen interface. In the above example, 60 frames are played at this stage, and lock_to_launcher_total_frame indicates the number of frames played from the lock screen interface to the desktop. In the above example, 60 frames are played at this stage , according to aod_to_lock_total_frame and lock_to_launcher_total_frame can determine the total duration of super wallpaper animation. aod_style indicates the name of the aod style of the current super wallpaper. The aod style is the screen content of the wallpaper displayed on the aod interface. For example, one style can be a character, and the other can be an animal. In the above example, the name of the aod style is DuneRealmClock. After the wallpaper, if the user changes the aod style separately, the animation of the aod interface will not be displayed when the super wallpaper is played, and aod_support_transition_animation indicates whether there is a transition animation when entering or exiting the AOD interface.
下面结合电子设备的软件结构对下载第一壁纸的主题包到应用第一壁纸的资源的流程进行说明。图6为电子设备100的软件结构框图。The flow from downloading the theme package of the first wallpaper to applying the resource of the first wallpaper will be described below in combination with the software structure of the electronic device. FIG. 6 is a block diagram of the software structure of the electronic device 100 .
电子设备100软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the software structure of the electronic device 100 is exemplarily described by taking an Android system with a layered architecture as an example.
如图6所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统从上至下分别为应用程序层,应用程序框架层,本地(Native)层,硬件抽象层(HAL),内核层,以及硬件层。As shown in Figure 6, the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate through software interfaces. In some embodiments, the Android system is divided into application program layer, application program framework layer, local (Native) layer, hardware abstraction layer (HAL), kernel layer, and hardware layer from top to bottom.
其中,应用程序层可以包括AOD应用、系统服务(SystemUI)、主题、设置、壁纸APK等应用程序。主题提供壁纸预览服务和壁纸选择服务。Wherein, the application program layer may include application programs such as AOD application, system service (SystemUI), theme, setting, wallpaper APK and so on. The theme provides wallpaper preview service and wallpaper selection service.
AOD应用包括AOD动画显示模块、第一超级壁纸播放控制模块、灭屏控制模块。其中,AOD动画显示模块用于控制AOD界面的亮屏区域的位置和内容的显示。第一超级壁纸播放控制模块用于在第一壁纸为超级壁纸时,在灭屏的时候,向壁纸APK发送超级壁纸播放指令。灭屏控制模块用于在灭屏的时候,超级壁纸动画播放完成之后控制屏幕局部亮起。The AOD application includes an AOD animation display module, a first super wallpaper play control module, and an off-screen control module. Wherein, the AOD animation display module is used to control the display of the position and content of the bright screen area of the AOD interface. The first super wallpaper play control module is used to send a super wallpaper play instruction to the wallpaper APK when the screen is off when the first wallpaper is the super wallpaper. The off-screen control module is used to control the partial lighting of the screen after the super wallpaper animation is played when the screen is off.
系统服务(SystemUI)包括状态栏、锁屏窗口显示控制模块、第二超级壁纸播放控制模块、超级壁纸开关状态记录模块。锁屏窗口显示控制模块用于管理锁屏壁纸的显示属性,例如是否透明。超级壁纸开关状态记录模块用于在应用壁纸之后判断是否为超级壁纸。第二超级壁纸播放控制模块,用于在第一壁纸为超级壁纸时,在亮屏的时候,向壁纸APK发送超级壁纸播放指令。状态栏可以接收颜色模式切换事件。The system service (SystemUI) includes a status bar, a lock screen window display control module, a second super wallpaper play control module, and a super wallpaper switch state recording module. The display control module of the lock screen window is used to manage the display properties of the lock screen wallpaper, such as whether it is transparent or not. The super wallpaper switching state recording module is used for judging whether it is a super wallpaper after the wallpaper is applied. The second super wallpaper play control module is configured to send a super wallpaper play instruction to the wallpaper APK when the screen is turned on when the first wallpaper is the super wallpaper. The status bar can receive color mode switching events.
壁纸APK包括壁纸服务(超级壁纸服务、折叠屏壁纸服务、动态壁纸服务),壁纸播放控制器、壁纸切换控制器、多媒体播放器。其中,壁纸播放控制器通过多媒体播放器实现壁纸的播放,暂停和播放进度管理。壁纸切换控制器在电子设备的颜色模式发生切换时,通知多媒体播放器,将播放的资源切换为基于日间模式的资源或基于夜间模式的资源。Wallpaper APK includes wallpaper service (super wallpaper service, folding screen wallpaper service, dynamic wallpaper service), wallpaper playback controller, wallpaper switching controller, and multimedia player. Wherein, the wallpaper playing controller implements the playing, pausing and playing progress management of the wallpaper through the multimedia player. When the color mode of the electronic device is switched, the wallpaper switching controller notifies the multimedia player to switch the played resource to a resource based on the day mode or a resource based on the night mode.
应用程序框架层为应用程序层的应用程序提供应用编程接口(applicationprogramming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图6所示,应用程序框架层可以包括电源管理服务(PowerManagerService)、窗口管理服务(WindowManagerService,WMS)、壁纸管理服务(WallpaperManagerService)、屏幕管理服务(DisplayManagerService)、睡眠管理服务(DreamManagerService)、视频编解码模块(MediaCodec)、多媒体提取器(MediaExtractor),颜色模式管理服务。As shown in Figure 6, the application framework layer can include power management service (PowerManagerService), window management service (WindowManagerService, WMS), wallpaper management service (WallpaperManagerService), screen management service (DisplayManagerService), sleep management service (DreamManagerService), video Codec module (MediaCodec), multimedia extractor (MediaExtractor), color mode management service.
电源管理服务负责管理电源以及手机常用功能如触发亮屏或灭屏、亮度调节、低电量模式、保持CPU唤醒等。The power management service is responsible for managing power and common functions of mobile phones such as triggering screen on or off, brightness adjustment, low power mode, keeping CPU awake, etc.
窗口管理服务为应用程序分配以及管理窗口的属性(例如,层级、大小、显示顺序等)。窗口管理服务还可以管理锁屏窗口、壁纸窗口的显示、切换。窗口管理服务还可以用于管理壁纸上层元素(例如图标)的显示。The window management service allocates and manages properties of windows (eg, hierarchy, size, display order, etc.) for applications. The window management service can also manage the display and switching of lock screen windows and wallpaper windows. The window management service can also be used to manage the display of the upper layer elements of the wallpaper (such as icons).
壁纸管理服务用于管理壁纸的运行与切换,并通过WallpaperManager类向外界提供操作壁纸的接口。当通过WallpaperManagaer的接口进行壁纸的切换时,壁纸管理服务会确定是否需要取消当前绑定的壁纸服务(WallpaperService)并启动新壁纸的壁纸服务。The wallpaper management service is used to manage the running and switching of wallpapers, and provide an interface for operating wallpapers to the outside world through the WallpaperManager class. When the wallpaper is switched through the interface of WallpaperManager, the wallpaper management service will determine whether to cancel the currently bound wallpaper service (WallpaperService) and start the wallpaper service of the new wallpaper.
屏幕管理服务用于管理显示屏当前显示状态,在状态更新时向系统和其他应用发送通知等,例如,屏幕切换到了亮屏状态或者灭屏状态。例如,屏幕切换到了锁屏界面,例如,屏幕切换到了桌面等。The screen management service is used to manage the current display status of the display, and send notifications to the system and other applications when the status is updated, for example, the screen is switched to the on-screen state or off-screen state. For example, the screen is switched to the lock screen interface, for example, the screen is switched to the desktop, etc.
睡眠管理服务,主要是提供休眠服务(DozeService),与AOD应用的灭屏控制相关。The sleep management service mainly provides the dormancy service (DozeService), which is related to the off-screen control of the AOD application.
颜色模式管理服务,用于记录电子设备当前处于的颜色模式,以及,监听电子设备的颜色模式是否发生变化,在电子设备的颜色模式发生变化时,更新当前记录的电子设备的颜色模式。例如,颜色模式管理服务对应一个用于记录电子设备的颜色模式的第一数据库,记为Settings.System.GLOBAL_CURRENT_UIMOOE,第一数据库中用不同的字段代表电子设备的颜色模式,例如,true表示电子设备当前处于的颜色模式为日间模式,false表示表示电子设备当前处于的颜色模式为夜间模式。The color mode management service is used for recording the current color mode of the electronic device, and monitoring whether the color mode of the electronic device changes, and updating the currently recorded color mode of the electronic device when the color mode of the electronic device changes. For example, the color mode management service corresponds to a first database for recording the color mode of the electronic device, which is recorded as Settings.System.GLOBAL_CURRENT_UIMOOE. Different fields are used in the first database to represent the color mode of the electronic device. For example, true indicates the electronic device The current color mode is the day mode, and false indicates that the current color mode of the electronic device is the night mode.
视频编解码模块,用于对视频进行编解码。视频编解码模块和多媒体提取器为资源的播放提供支持。The video codec module is used to codec the video. The video codec module and multimedia extractor provide support for the playback of resources.
Native包括系统绘制核心(SurfaceFlinger),SurfaceFlinger用于绘制图形界面,例如壁纸。每个应用程序可能对应着一个或者多个图形界面,每个图形界面相互之间是独立的,在屏幕上有各自的位置以及大小,每个图形界面中显示的内容,内容大小,位置等这些元素在改变应用程序的时候都可能会改变,例如,在微信应用界面下,顶部状态栏和底部导航按键都是同时存在的。壁纸也是一个独立的图形界面,在壁纸图形界面上层是锁屏或桌面的界面。这些界面都是由SurfaceFlinger绘制的。Native includes the system rendering core (SurfaceFlinger), and SurfaceFlinger is used to draw graphical interfaces, such as wallpapers. Each application may correspond to one or more graphical interfaces, each graphical interface is independent of each other, has its own position and size on the screen, the content displayed in each graphical interface, content size, position, etc. Elements may change when changing the application. For example, in the WeChat application interface, the top status bar and the bottom navigation buttons both exist at the same time. The wallpaper is also an independent graphical interface, and the upper layer of the wallpaper graphical interface is the interface of the lock screen or the desktop. These interfaces are drawn by SurfaceFlinger.
硬件抽象层包括硬件图形制作器(Hardware composer,HWC)、TP HAL、LCD HAL、图形处理器(graphics processing unit,GPU),HWC是进行窗口合成和显示的模块,为系统绘制核心提供硬件支持。The hardware abstraction layer includes hardware composer (Hardware composer, HWC), TP HAL, LCD HAL, graphics processing unit (graphics processing unit, GPU). HWC is a module for window synthesis and display, providing hardware support for the system drawing core.
内核层是硬件和软件之间的层。内核层至少包含显示驱动(Display Driver),LCD驱动(LCD Driver),触摸屏驱动(TP Driver),AOD节点驱动。The kernel layer is the layer between hardware and software. The kernel layer includes at least a display driver (Display Driver), an LCD driver (LCD Driver), a touch screen driver (TP Driver), and an AOD node driver.
硬件至少包括LCD器件,TP器件。The hardware includes at least LCD devices and TP devices.
基于图6所示的软件结构,第一壁纸被应用为电子设备的壁纸之后,主题应用下载并解析第一壁纸的主题包,生成第一壁纸的基于日间模式资源、基于夜间模式的资源和配置文件的获取路径,根据livepaper.xml文件中的包名确定第一壁纸由壁纸APK运行。壁纸管理服务根据livepaper.xml文件中的壁纸服务名称,调用与第一壁纸对应的壁纸服务,例如第一壁纸是动态壁纸,则调用动态壁纸服务。Based on the software structure shown in Figure 6, after the first wallpaper is applied as the wallpaper of the electronic device, the theme application downloads and parses the theme package of the first wallpaper, and generates the first wallpaper based on day mode resources, night mode based resources and The acquisition path of the configuration file is determined according to the package name in the livepaper.xml file, and the first wallpaper is run by the wallpaper APK. The wallpaper management service calls the wallpaper service corresponding to the first wallpaper according to the wallpaper service name in the livepaper.xml file. For example, if the first wallpaper is a live wallpaper, the live wallpaper service is called.
在检测到第一操作之后,响应于第一操作,壁纸APK中的壁纸服务从颜色模式管理服务获取电子设备当前处于的颜色模式,在电子设备当前处于的颜色模式为日间模式时,从基于日间模式资源的获取路径获取日间模式的资源,或者,在电子设备当前处于的颜色模式为夜间模式时,基于夜间模式的获取路径获取夜间模式的资源,将资源加载到多媒体播放器,对于动效类壁纸,多媒体播放器将第一壁纸的资源中的视频通过视频编解码模块进行解码,多媒体提取器将解码之后的内容发送给SurfaceFlinger,SurfaceFlinger对第一壁纸进行绘制,通过硬件在显示屏上显示第一壁纸。After detecting the first operation, in response to the first operation, the wallpaper service in the wallpaper APK obtains the current color mode of the electronic device from the color mode management service. The acquisition path of day mode resources acquires the resources of day mode, or, when the current color mode of the electronic device is night mode, acquires the resources of night mode based on the acquisition path of night mode, and loads the resources into the multimedia player, for Dynamic wallpaper, the multimedia player decodes the video in the resource of the first wallpaper through the video codec module, the multimedia extractor sends the decoded content to SurfaceFlinger, SurfaceFlinger draws the first wallpaper, and displays it on the display screen through hardware Display the first wallpaper on .
在一种实现方式中,壁纸服务运行之后,在第一操作之前,从颜色模式管理服务获取电子设备当前的颜色模式,若电子设备处于日间模式,则将基于日间模式的资源加载到多媒体播放器,若电子设备处于夜间模式,则将基于夜间模式的资源加载到多媒体播放器。在检测到第一操作之后,电子设备响应于第一操作,获取电子设备当前处于的颜色模式,并确定多媒体播放器中加载的资源是基于日间模式的资源还是基于夜间模式的资源;确定电子设备当前处于的颜色模式与多媒体播放器中加载的资源是否一致,在不一致的情况下,获取第一壁纸的资源中的一个,并切换多媒体播放器中加载的资源。In one implementation, after the wallpaper service is running and before the first operation, the current color mode of the electronic device is obtained from the color mode management service, and if the electronic device is in the daytime mode, the resources based on the daytime mode are loaded into the multimedia The player loads resources based on the night mode to the multimedia player if the electronic device is in the night mode. After detecting the first operation, the electronic device responds to the first operation, acquires the color mode that the electronic device is currently in, and determines whether the resource loaded in the multimedia player is a resource based on a day mode or a resource based on a night mode; Whether the current color mode of the device is consistent with the resource loaded in the multimedia player, if not, obtain one of the resources of the first wallpaper, and switch the resource loaded in the multimedia player.
例如,多媒体播放器中加载的资源是基于日间模式的资源,在电子设备当前处于日间模式的情况下,无需再获取第一壁纸的资源。在电子设备当前处于夜间模式的情况下,电子设备获取第一壁纸的资源中的基于夜间模式的资源,将多媒体播放器中加载的资源从基于日间模式的资源更换为基于夜间模式的资源。例如,多媒体播放器中加载的资源是基于夜间模式的资源,在电子设备当前处于夜间模式的情况下,无需再获取第一壁纸的资源。在电子设备当前处于日间模式的情况下,电子设备获取第一壁纸的资源中的基于日间模式的资源,将多媒体播放器中加载的资源从基于夜间模式的资源更换为基于日间模式的资源。For example, the resources loaded in the multimedia player are based on the resources of the daytime mode, and when the electronic device is currently in the daytime mode, there is no need to acquire the resources of the first wallpaper. When the electronic device is currently in the night mode, the electronic device acquires the resources based on the night mode among the resources of the first wallpaper, and replaces the resources loaded in the multimedia player from the resources based on the day mode to the resources based on the night mode. For example, the resources loaded in the multimedia player are resources based on the night mode, and when the electronic device is currently in the night mode, there is no need to acquire the resources of the first wallpaper. When the electronic device is currently in the daytime mode, the electronic device obtains the resources based on the daytime mode among the resources of the first wallpaper, and replaces the resources loaded in the multimedia player from the resources based on the nighttime mode to those based on the daytime mode. resource.
在第一壁纸的资源还包括图片的情况下,第一壁纸被应用为电子设备的壁纸之后,壁纸管理服务还可以向系统服务发送第一壁纸被应用的广播,系统服务对第一壁纸的资源中的基于日间模式的图片和基于夜间模式的图片进行显示相关的设置。In the case that the resources of the first wallpaper also include pictures, after the first wallpaper is applied as the wallpaper of the electronic device, the wallpaper management service may also send a broadcast that the first wallpaper is applied to the system service, and the system service may send a broadcast of the application of the first wallpaper to the resource of the first wallpaper. Display-related settings for images based on day mode and images based on night mode in .
图7示出了一种界面显示方法的流程图,下面结合图7对预处理和切换资源的过程进行说明。本申请实施例中,第一壁纸的主题包中资源、配置文件和livepaper.xml文件。FIG. 7 shows a flow chart of an interface display method. The process of preprocessing and switching resources will be described below in conjunction with FIG. 7 . In the embodiment of this application, the resource, configuration file and livepaper.xml file are included in the theme package of the first wallpaper.
S701,在检测到应用第一壁纸的操作之后,设置应用下载第一壁纸的主题包。S701. After detecting an operation of applying the first wallpaper, set the application to download a theme package of the first wallpaper.
S702,将主题包解压到指定目录下。S702. Decompress the theme package to a specified directory.
例如指定目录路径为data/themes/0。主题包解压,设置应用获取第一壁纸的到livepaper.xml文件、配置文件livepaper_config.xml和资源。For example, specify the directory path as data/themes/0. Unzip the theme package, set the livepaper.xml file, configuration file livepaper_config.xml and resources to obtain the first wallpaper.
S703,设置应用对livepaper.xml文件进行解析,从livepaper.xml文件中获取第一壁纸的包名和壁纸服务名称。S703, the setting application parses the livepaper.xml file, and acquires the package name and the wallpaper service name of the first wallpaper from the livepaper.xml file.
S704,设置应用根据包名调用壁纸管理服务,并将壁纸服务名称发送给壁纸管理服务。S704. The setting application calls the wallpaper management service according to the package name, and sends the wallpaper service name to the wallpaper management service.
S705,壁纸管理服务判断第一壁纸的壁纸服务名称和第二壁纸的壁纸服务名称是否为同一个名称。S705. The wallpaper management service determines whether the wallpaper service name of the first wallpaper and the wallpaper service name of the second wallpaper are the same name.
壁纸管理服务根据壁纸服务名称确定运行第一壁纸的壁纸服务。第二壁纸是在第一壁纸之前电子设备应用的壁纸。The wallpaper management service determines the wallpaper service running the first wallpaper according to the wallpaper service name. The second wallpaper is a wallpaper applied by the electronic device before the first wallpaper.
若第一壁纸的壁纸服务名称和第二壁纸的壁纸服务名称不是同一个名称,表示第一壁纸和第二壁纸不是同一类型的壁纸,例如,第一壁纸是动态壁纸,第二壁纸是超级壁纸,则需要退出正在运行的超级壁纸服务,绑定动态壁纸服务,执行S706-S713。若第一壁纸的壁纸服务名称和第二壁纸的壁纸服务名称是同一个名称,表示第一壁纸和第二壁纸是同一类型的壁纸,例如,第一壁纸和第二壁纸都是超级壁纸,则继续使用正在运行的超级壁纸服务,不需要绑定新的壁纸服务,执行S714。If the wallpaper service name of the first wallpaper and the wallpaper service name of the second wallpaper are not the same name, it means that the first wallpaper and the second wallpaper are not the same type of wallpaper, for example, the first wallpaper is a dynamic wallpaper, and the second wallpaper is a super wallpaper , you need to quit the running super wallpaper service, bind the live wallpaper service, and execute S706-S713. If the wallpaper service name of the first wallpaper and the wallpaper service name of the second wallpaper are the same name, it means that the first wallpaper and the second wallpaper are the same type of wallpaper, for example, the first wallpaper and the second wallpaper are super wallpapers, then Continue to use the running super wallpaper service without binding a new wallpaper service, and execute S714.
S706,壁纸管理服务为第一壁纸绑定新的壁纸服务。S706, the wallpaper management service binds a new wallpaper service to the first wallpaper.
S707,新的壁纸服务启动后,注册颜色模式监听事件。S707, after the new wallpaper service is started, register the color mode monitoring event.
壁纸服务与颜色模式管理服务通信,监听电子设备当前是夜间模式还是日间模式。The wallpaper service communicates with the color mode management service to monitor whether the electronic device is currently in night mode or day mode.
S708,壁纸APK从指定目录下获取第一壁纸的配置文件,并解析第一壁纸的配置文件。S708. The wallpaper APK obtains the configuration file of the first wallpaper from the specified directory, and parses the configuration file of the first wallpaper.
S709,解析完成后,校验配置文件是否正确。S709, after the parsing is completed, verify whether the configuration file is correct.
通过校验配置文件以确保配置项能够被正常使用。例如,配置文件中是否有内容,即有字段,内容是否包括预设参数(例如,预设参数为夜间模式),参数是否有值(值可以为true或false),对于超级壁纸类型,还需要确认是否有设置帧数,即动效时长,等等。在一些实现方式中,可以在执行S1308之后执行步骤:将解析的配置文件的内容保存至第二数据库。Verify the configuration file to ensure that the configuration items can be used normally. For example, whether there is content in the configuration file, that is, there are fields, whether the content includes preset parameters (for example, the preset parameter is night mode), whether the parameter has a value (the value can be true or false), and for the super wallpaper type, also need Confirm whether there is a set frame number, that is, the duration of the animation effect, and so on. In some implementation manners, the step of saving the parsed configuration file content to the second database may be performed after performing S1308.
S710,在配置文件正确的情况下,壁纸APK将解析的配置文件的内容保存至第二数据库。S710, if the configuration file is correct, the wallpaper APK saves the analyzed content of the configuration file to the second database.
例如,将第一壁纸是否支持夜间模式,是否支持动态模糊等内容,写入第二数据库。在第一壁纸为超级壁纸时,还可以将超级壁纸的动效时长,AOD样式等写入数据库。从而在显示锁屏界面时,确定是否进行动态模糊处理,或者,在收到超级壁纸播放指令时,确定播放的视频帧区间,或者在显示AOD界面时确定AOD样式等等。在配置文件错误的情况下,结束本次流程。For example, whether the first wallpaper supports night mode, whether it supports motion blur, etc., is written into the second database. When the first wallpaper is a super wallpaper, the dynamic effect duration and AOD style of the super wallpaper may also be written into the database. Therefore, when displaying the lock screen interface, determine whether to perform motion blur processing, or, when receiving a super wallpaper play instruction, determine the video frame interval to be played, or determine the AOD style when displaying the AOD interface, and so on. In the case of an error in the configuration file, end this process.
在壁纸服务显示第一壁纸时,或者壁纸服务监听到电子设备的颜色模式发生切换时,可以从第二数据库中,确定第一壁纸是否支持夜间模式。When the wallpaper service displays the first wallpaper, or when the wallpaper service detects that the color mode of the electronic device is switched, it may be determined from the second database whether the first wallpaper supports the night mode.
S711,壁纸APK通过指定目录下的第一路径获取视频,通过指定目录下的第二路径获取图片,并将第二路径授权给系统服务读取。S711. The wallpaper APK obtains the video through the first path under the specified directory, obtains the picture through the second path under the specified directory, and authorizes the second path to be read by the system service.
在电子设备当前处于日间模式的情况下,获取资源中基于日间模式的视频和图片,在电子设备当前处于夜间模式的情况下,获取资源中基于夜间模式的视频和图片。When the electronic device is currently in the daytime mode, acquire videos and pictures based on the daytime mode in the resource, and acquire video and pictures based on the night mode in the resource when the electronic device is currently in the night mode.
如果图片中包括用于锁屏的图片,在获取到锁屏壁纸图片之后,如果获取的锁屏壁纸图片与显示资源中的图片不匹配,可以对第二路径下的锁屏壁纸图片进行更新。系统服务通过第二路径获取锁屏壁纸图片,从而在显示锁屏界面时显示该锁屏壁纸图片。If the picture includes a picture for the lock screen, after the lock screen wallpaper picture is acquired, if the acquired lock screen wallpaper picture does not match the picture in the display resource, the lock screen wallpaper picture in the second path may be updated. The system service obtains the lock screen wallpaper picture through the second path, so as to display the lock screen wallpaper picture when displaying the lock screen interface.
S712,初始化多媒体播放器。S712, initialize the multimedia player.
壁纸APK启动多媒体播放器,将第一壁纸的视频(动效类壁纸)或者图片(静态壁纸)加载到多媒体播放器中。如果电子设备当前是夜间模式,且第一壁纸支持夜间模式,则多媒体播放器加载的是基于夜间模式的视频或者图片。如果电子设备当前是日间模式,则多媒体播放器加载的是基于日间模式的壁纸视频或者图片。The wallpaper APK starts the multimedia player, and loads the video (dynamic wallpaper) or picture (static wallpaper) of the first wallpaper into the multimedia player. If the electronic device is currently in the night mode, and the first wallpaper supports the night mode, the multimedia player loads a video or picture based on the night mode. If the electronic device is currently in the daytime mode, what the multimedia player loads is a wallpaper video or picture based on the daytime mode.
S713,初始化壁纸界面。S713, initialize the wallpaper interface.
初始化壁纸界面指的是加载第一壁纸的之后,播放器先将第一壁纸的视频播放至最后一帧,用户回到桌面后,显示屏显示第一壁纸的视频中的最后一帧,即桌面的背景壁纸。Initializing the wallpaper interface means that after the first wallpaper is loaded, the player first plays the video of the first wallpaper to the last frame. After the user returns to the desktop, the display screen displays the last frame of the video of the first wallpaper, that is, the desktop background wallpaper.
S714,壁纸管理服务向壁纸APK发送壁纸服务再次应用的指令。S714, the wallpaper management service sends an instruction to reapply the wallpaper service to the wallpaper APK.
具体的,指令形式可以是android.wallpaper.reapply。壁纸APK接收到指令后,当前壁纸服务继续运行,解析配置文件,执行S808-S813。Specifically, the instruction form may be android.wallpaper.reapply. After the wallpaper APK receives the instruction, the current wallpaper service continues to run, parses the configuration file, and executes S808-S813.
颜色模式管理服务在电子设备的颜色模式发生切换时,将颜色模式切换事件发送给壁纸APK,壁纸APK在接收到颜色模式切换事件时,对多媒体播放器中的资源进行切换,具体包括以下步骤:When the color mode of the electronic device is switched, the color mode management service sends the color mode switching event to the wallpaper APK. When the wallpaper APK receives the color mode switching event, it switches the resources in the multimedia player, specifically including the following steps:
S715,壁纸APK接收到颜色模式切换事件。S715, the wallpaper APK receives a color mode switching event.
S716,确定电子设备当前处于的颜色模式与多媒体播放器中加载的资源的模式是否一致。S716. Determine whether the current color mode of the electronic device is consistent with the resource mode loaded in the multimedia player.
S717,在不一致的情况下,释放多媒体播放器,并加载切换后的颜色模式的资源。S717. In the case of inconsistency, release the multimedia player, and load the resource of the switched color mode.
或者,在一致的情况下,结束本次流程。Or, in the case of agreement, end this process.
例如,多媒体播放器中加载的资源是基于日间模式的资源,在电子设备当前处于夜间模式的情况下,电子设备获取第一壁纸的资源中的基于夜间模式的资源,将多媒体播放器中加载的资源从基于日间模式的资源更换为基于夜间模式的资源。例如,多媒体播放器中加载的资源是基于夜间模式的资源,在电子设备当前处于日间模式的情况下,电子设备获取第一壁纸的资源中的基于日间模式的资源,将多媒体播放器中加载的资源从基于夜间模式的资源更换为基于日间模式的资源。在显示第一壁纸时,显示多媒体播放器中的资源。For example, the resources loaded in the multimedia player are resources based on the daytime mode. The resources for were changed from day mode-based resources to night mode-based resources. For example, the resources loaded in the multimedia player are resources based on the night mode. Loaded assets changed from night mode based assets to day mode based assets. When the first wallpaper is displayed, resources in the multimedia player are displayed.
在一种实现方式中,在S715与S716之间还可以包括步骤:确定第一壁纸是否支持深色模式。在第一壁纸支持色模式的情况下,执行S716。In an implementation manner, between S715 and S716 may further include a step of: determining whether the first wallpaper supports the dark mode. In the case that the first wallpaper supports the color mode, execute S716.
下面介绍第一壁纸被设置为电子设备的壁纸之后,第一壁纸的资源中包括用于锁屏壁纸的图片时,对锁屏壁纸图片预处理的流程。图8为本申请实施例提供的一种界面显示方法的流程示意图。After the first wallpaper is set as the wallpaper of the electronic device, the process of preprocessing the lock screen wallpaper picture when the resource of the first wallpaper includes the picture used for the lock screen wallpaper is introduced below. FIG. 8 is a schematic flowchart of an interface display method provided by an embodiment of the present application.
S801,系统服务启动后注册颜色模式监听事件。S801, registering a color mode monitoring event after the system service is started.
从而确定电子设备当前处于日间模式还是夜间模式。Therefore, it is determined whether the electronic device is currently in the day mode or the night mode.
S802,系统服务接收到壁纸发生变化的广播。S802, the system service receives a broadcast that the wallpaper changes.
在一种实现方式中,由系统服务中的状态栏(StatusBar)接收壁纸变化的广播,状态栏是系统服务中常驻的功能。In an implementation manner, the broadcast of wallpaper change is received by a status bar (StatusBar) in the system service, and the status bar is a resident function in the system service.
S803,默认第一壁纸的初始化为静态壁纸。S803, the default initialization of the first wallpaper is a static wallpaper.
然后再根据主题包内容和壁纸APK中的一些信息确定锁屏壁纸图片的显示设置。Then, the display setting of the lock screen wallpaper picture is determined according to the content of the theme package and some information in the wallpaper APK.
S804,系统服务判断是否为静态壁纸广播。S804, the system service judges whether it is a static wallpaper broadcast.
本申请实施例中,获取第一参数,第一参数表征是否为静态壁纸广播。若是静态壁纸广播,则表示第一壁纸为静态壁纸。若不是静态壁纸广播,则表示第一壁纸是动效类壁纸。可以理解,一个壁纸,除了主题包中包括的数据之外,在壁纸APK中还配置有其他信息,即壁纸元数据(meta数据)。本申请实施例中,可以在壁纸meta数据中配置第一参数,记为wallpaperinfo。在接收到壁纸发生变化的广播之后,系统服务确定第一壁纸的meta数据中wallpaperinfo是否为空,即是否配置有wallpaperinfo参数,若没有配置wallpaperinfo则为静态壁纸广播,若配置有wallpaperinfo则为动效类壁纸广播。In the embodiment of the present application, the first parameter is obtained, and the first parameter indicates whether it is a static wallpaper broadcast. If the static wallpaper is broadcast, it indicates that the first wallpaper is a static wallpaper. If it is not a static wallpaper broadcast, it means that the first wallpaper is a dynamic wallpaper. It can be understood that for a wallpaper, in addition to the data included in the theme package, other information is configured in the wallpaper APK, that is, wallpaper metadata (meta data). In the embodiment of the present application, the first parameter may be configured in the wallpaper meta data, which is recorded as wallpaperinfo. After receiving the broadcast that the wallpaper changes, the system service determines whether the wallpaperinfo in the meta data of the first wallpaper is empty, that is, whether the wallpaperinfo parameter is configured, if no wallpaperinfo is configured, it will be a static wallpaper broadcast, and if wallpaperinfo is configured, it will be a dynamic effect class wallpaper broadcast.
S805,若不是静态壁纸广播,系统服务判断第一壁纸是否支持锁屏壁纸图片缩放。S805. If it is not a static wallpaper broadcast, the system service determines whether the first wallpaper supports zooming of lock screen wallpaper images.
本申请实施例中,获取第二参数,第二参数标识是否支持锁屏壁纸图片缩放。例如,可以在第一壁纸的meta数据中设置第二参数,记为LiveWallpaper。在第一壁纸meta数据中配置有LiveWallpaper的情况下,该第一壁纸支持锁屏壁纸图片缩放。在第一壁纸的meta数据中没有配置LiveWallpaper的情况下,该第一壁纸不支持锁屏壁纸图片缩放。In the embodiment of the present application, the second parameter is acquired, and the second parameter identifies whether to support the scaling of the lock screen wallpaper image. For example, a second parameter, denoted as LiveWallpaper, may be set in the meta data of the first wallpaper. In the case that LiveWallpaper is configured in the meta data of the first wallpaper, the first wallpaper supports zooming of the lock screen wallpaper image. In the case that LiveWallpaper is not configured in the meta data of the first wallpaper, the first wallpaper does not support the scaling of the lock screen wallpaper image.
S806,若是,在第二数据库中写入支持锁屏壁纸图片缩放。S806, if yes, write in the second database to support the zooming of the lock screen wallpaper picture.
S807,若否,在第二数据库中写入不支持锁屏壁纸图片缩放。S807, if not, write in the second database that zooming of the lock screen wallpaper image is not supported.
系统服务将是否支持锁屏壁纸图片缩放判断结果写入第二数据库中进行存储,例如,若支持锁屏壁纸图片缩放,则在第二数据库中写入“live_paper_effect:1”,若不支持锁屏壁纸图片缩放,则在第二数据库中写入“live_paper_effect:0”,从而显示锁屏窗口时,根据第二数据库中的结果判断锁屏壁纸图片是否显示缩放效果。The system service writes the result of judging whether to support lock screen wallpaper image scaling into the second database for storage. For example, if it supports lock screen wallpaper image scaling, write "live_paper_effect: 1" in the second database; if it does not support lock screen image scaling If the wallpaper image is zoomed, write "live_paper_effect:0" in the second database, so that when the lock screen window is displayed, it is determined whether the lock screen wallpaper image displays the zoom effect according to the result in the second database.
S808,判断是否支持将锁屏壁纸图片从壁纸APK复制到锁屏应用。S808. Determine whether copying the lock screen wallpaper picture from the wallpaper APK to the lock screen application is supported.
本申请实施例中,系统服务根据livepaper.xml文件中的壁纸服务名称,判断是否支持将锁屏壁纸图片从壁纸APK复制到锁屏应用。如果壁纸服务名称是动态壁纸服务名称、超级壁纸服务名称、折叠屏壁纸服务名称中的一个,表示支持将锁屏壁纸图片从壁纸APK复制到锁屏应用,从而用于锁屏上滑场景。若不支持,第一壁纸为静态壁纸,结束本次流程。In the embodiment of the present application, the system service judges whether to support copying the lock screen wallpaper picture from the wallpaper APK to the lock screen application according to the wallpaper service name in the livepaper.xml file. If the wallpaper service name is one of the live wallpaper service name, super wallpaper service name, and foldable screen wallpaper service name, it means that the lock screen wallpaper image is supported to be copied from the wallpaper APK to the lock screen application, so as to be used in the lock screen sliding up scene. If not supported, the first wallpaper is a static wallpaper, and this process ends.
在一种实现方式中,动态壁纸是从锁屏界面开始播放的,可以不单独配置锁屏壁纸图片,可以理解为其锁屏壁纸是透明的,锁屏界面显示的是壁纸视频的第一帧。对于超级壁纸和折叠屏壁纸单独配置锁屏壁纸以实现缩放效果。也就是说第一壁纸的类型为超级壁纸和折叠屏壁纸时,支持将锁屏壁纸图片从壁纸APK复制到锁屏应用。In one implementation, the dynamic wallpaper is played from the lock screen interface, and the lock screen wallpaper image may not be configured separately, it can be understood that the lock screen wallpaper is transparent, and the lock screen interface displays the first frame of the wallpaper video . For super wallpapers and folding screen wallpapers, configure lock screen wallpapers separately to achieve zoom effects. That is to say, when the type of the first wallpaper is a super wallpaper or a folding screen wallpaper, it is supported to copy the lock screen wallpaper picture from the wallpaper APK to the lock screen application.
S809,若支持,系统服务判断是否支持从第二路径获取锁屏壁纸图片。S809, if supported, the system service judges whether to support obtaining the lock screen wallpaper image from the second path.
考虑到有的壁纸的资源不是包括在上述主题包中的,对于使用本申请实施例提供的主题包的壁纸,从资源解析之后生成的路径(第二路径)获取锁屏壁纸图片,未使用本申请实施例提供的主题包的壁纸,从壁纸meta数据中获取锁屏壁纸图片。Considering that the resources of some wallpapers are not included in the above theme package, for the wallpaper using the theme package provided by the embodiment of this application, the lock screen wallpaper image is obtained from the path (second path) generated after resource analysis, without using this Apply for the wallpaper of the theme package provided by the embodiment, and obtain the lock screen wallpaper picture from the wallpaper meta data.
本申请实施例,在第一壁纸绑定壁纸服务之后,壁纸服务设置复制锁屏壁纸图片的方式,例如,在第二数据库中设置第一开关true或false,true表示从资源解析之后生成的路径获取锁屏壁纸图片,false表示从壁纸meta数据中获取锁屏壁纸图片。在第一壁纸支持将锁屏壁纸图片从壁纸APK复制到锁屏应用的情况下,系统服务从数据库中获取第一开关,以确定复制方式。In this embodiment of the application, after the first wallpaper is bound to the wallpaper service, the wallpaper service sets the way to copy the lock screen wallpaper picture, for example, set the first switch true or false in the second database, and true indicates the path generated after resource parsing Get the lock screen wallpaper picture, false means get the lock screen wallpaper picture from the wallpaper meta data. In the case that the first wallpaper supports copying the lock screen wallpaper picture from the wallpaper APK to the lock screen application, the system service acquires the first switch from the database to determine the copying method.
S810,系统服务从第二路径获取锁屏壁纸图片。S810, the system service obtains the lock screen wallpaper picture from the second path.
S811,系统服务从壁纸meta数据中获取锁屏壁纸图片。S811, the system service obtains the lock screen wallpaper picture from the wallpaper meta data.
其中,在电子设备当前处于日间模式时,获取基于日间模式的图片,或者,在电子设备当前处于夜间模式时,获取基于夜间模式的图片。Wherein, when the electronic device is currently in the day mode, the picture based on the day mode is acquired, or, when the electronic device is currently in the night mode, the picture based on the night mode is acquired.
S812,系统服务确定锁屏壁纸图片是否成功复制到锁屏。S812, the system service determines whether the lock screen wallpaper picture is successfully copied to the lock screen.
成功复制到锁屏也就是锁屏应用自身存储了锁屏壁纸图片。若复制失败,则将第一壁纸作为静态壁纸显示,结束本次流程。Successfully copied to the lock screen means that the lock screen application itself stores the lock screen wallpaper image. If the copying fails, the first wallpaper is displayed as a static wallpaper, and this process ends.
除此之外,在一些实现方式中,该方法还可以包括:S813,系统服务确定第一壁纸是否支持配置AOD。In addition, in some implementation manners, the method may further include: S813, the system service determines whether the first wallpaper supports AOD configuration.
本申请实施例中,根据livepaper.xml文件中的壁纸服务名称确定第一壁纸是否支持AOD显示,在壁纸服务名称是超级壁纸服务的情况下,也就是第一壁纸为超级壁纸时,第一壁纸支持配置AOD。In this embodiment of the application, it is determined whether the first wallpaper supports AOD display according to the wallpaper service name in the livepaper. Support for configuring AOD.
S814,若支持配置AOD,系统服务获取第一壁纸的超级壁纸动效时长,AOD样式和锁屏壁纸图片。S814, if the configuration of AOD is supported, the system service obtains the super wallpaper dynamic effect duration, AOD style and lock screen wallpaper image of the first wallpaper.
从而,在亮屏的时候,锁屏应用实现指示播放超级壁纸动画的功能,在灭屏的时候,AOD应用实现指示播放超级壁纸动画的功能。Therefore, when the screen is turned on, the lock screen application realizes the function of instructing to play the super wallpaper animation, and when the screen is off, the AOD application realizes the function of instructing to play the super wallpaper animation.
S815,若不支持配置AOD,清空超级壁纸相关配置,接管灭屏属性。S815, if the configuration of AOD is not supported, clear the relevant configuration of the super wallpaper, and take over the off-screen attribute.
在一种场景中,第一壁纸是动态壁纸,第二壁纸是超级壁纸,也就是从超级壁纸切换到了动态壁纸。在第二壁纸的应用过程中,系统服务记录了超级壁纸的动效时长,AOD样式和锁屏壁纸图片等设置,在灭屏的时候,由AOD应用进行灭屏控制。在切换为第一壁纸之后,系统服务清空原来设置的超级壁纸相关配置,AOD应用停止运行,由系统服务接管灭屏属性,进行灭屏控制。In one scenario, the first wallpaper is a dynamic wallpaper, and the second wallpaper is a super wallpaper, that is, the super wallpaper is switched to the dynamic wallpaper. During the application process of the second wallpaper, the system service records the animation duration of the super wallpaper, the AOD style and the lock screen wallpaper picture and other settings, and when the screen is turned off, the AOD application performs the off-screen control. After switching to the first wallpaper, the system service clears the original settings related to the super wallpaper, the AOD application stops running, and the system service takes over the off-screen attribute and performs off-screen control.
可选的,在一些实现方式中,该方法还可以包括:S816,设置锁屏界面的透明属性。Optionally, in some implementation manners, the method may further include: S816, setting a transparency attribute of the lock screen interface.
也就是,在壁纸显示时,不同时机显示的锁屏窗口是否需要设置为透明,例如,在定格在锁屏界面时,锁屏窗口设置为不透明。That is, when the wallpaper is displayed, whether the lock screen window displayed at different times needs to be set to be transparent, for example, when the lock screen interface is frozen, the lock screen window is set to be opaque.
S817,系统服务中锁屏相关业务配置完成。S817, the configuration of lock screen-related services in the system service is completed.
S818,系统服务接收到颜色模式切换事件。S818, the system service receives a color mode switching event.
在S810和S811中,系统服务获取了一个颜色模式的锁屏壁纸图片,颜色模式管理服务在电子设备的颜色模式发生切换时,将颜色模式切换事件发送给系统服务,系统服务在接收到颜色模式切换事件时,获取另一个颜色模式的锁屏壁纸图片,执行S809。In S810 and S811, the system service obtains a lock screen wallpaper image in a color mode, and the color mode management service sends the color mode switching event to the system service when the color mode of the electronic device is switched, and the system service receives the color mode When the event is switched, the lock screen wallpaper picture of another color mode is obtained, and S809 is executed.
综上所述,本申请实施例中,为第一壁纸提供日间模式的资源和夜间模式的资源,在电子设备当前处于日间模式的情况下,电子设备可以显示第一壁纸的资源中的基于日间模式的资源,或者,在电子设备当前处于夜间模式的情况下,电子设备可以显示第一壁纸的资源中的基于夜间模式的资源,从而第一壁纸能够适应电子的夜间模式,在夜间模式下显示第一壁纸时,避免第一壁纸的亮度过高的问题,在电子设备颜色模式发生切换时,第一壁纸可以随电子设备的颜色模式发生切换,从而自动适应电子设备显示的亮度,能够给用户更加舒适的体验,提高用户体验。To sum up, in the embodiment of the present application, resources of the day mode and night mode are provided for the first wallpaper, and when the electronic device is currently in the day mode, the electronic device can display the resources of the first wallpaper. The resources based on the day mode, or, when the electronic device is currently in the night mode, the electronic device may display the resources based on the night mode in the resources of the first wallpaper, so that the first wallpaper can adapt to the night mode of the electronic device at night When displaying the first wallpaper in the mode, avoid the problem that the brightness of the first wallpaper is too high. When the color mode of the electronic device is switched, the first wallpaper can be switched with the color mode of the electronic device, thereby automatically adapting to the brightness displayed by the electronic device. It can give users a more comfortable experience and improve user experience.
本实施例提供的电子设备,用于执行上述方法,因此可以达到与上述实现方法相同的效果。在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理,例如,可以用于支持电子设备执行处理单元执行的步骤。存储模块可以用于支持电子设备执行存储程序代码和数据等。通信模块,可以用于支持电子设备与其他设备的通信。The electronic device provided in this embodiment is used to execute the above method, so it can achieve the same effect as the above implementation method. In the case of an integrated unit, the electronic device may include a processing module, a memory module and a communication module. Wherein, the processing module may be used to control and manage the actions of the electronic device, for example, may be used to support the electronic device to execute the steps performed by the processing unit. The memory module can be used to support electronic devices to execute stored program codes and data, and the like. The communication module can be used to support the communication between the electronic device and other devices.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each of the foregoing method embodiments can be realized.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得电子设备执行时实现可实现上述各个方法实施例中的步骤。An embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the electronic device can implement the steps in the foregoing method embodiments when executed.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的方法。In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the methods in the foregoing method embodiments.
在本申请所提供的实施例中,应该理解到,所揭露的装置/电子设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/电子设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/electronic equipment and method can be implemented in other ways. For example, the device/electronic device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(read-only memory,ROM)、随机存取存储器(random accessmemory,RAM)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments in the present application can be completed by instructing related hardware through computer programs, and the computer programs can be stored in computer-readable storage media. When executed by the processor, the steps in the above-mentioned various method embodiments can be realized. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program codes to a photographing device/terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (random access memory, RAM), electrical carrier signals, telecommunication signals, and software distribution media. Such as U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunication signals under legislation and patent practice.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
以上描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the above description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and/or components, but does not exclude one or more other Presence or addition of features, wholes, steps, operations, elements, components and/or collections thereof.
还应当理解,本申请说明书和所附权利要求书中提及的“多个”是指两个或两个以上。在本申请的描述中,除非另有说明,“/”表示或的意思,比如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合,比如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。It should also be understood that the "plurality" mentioned in the description of the present application and the appended claims means two or more. In the description of this application, unless otherwise specified, "/" means or means, for example, A/B can mean A or B; "and/or" in this article is just a description of the relationship between associated objects, means any combination and all possible combinations of one or more of the items listed in association, and includes such combinations, for example, A and/or B, may mean: A alone, both A and B, alone B these three situations.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be construed, depending on the context, as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be construed, depending on the context, to mean "once determined" or "in response to the determination" or "once detected [the described condition or event] ]” or “in response to detection of [described condition or event]”.
另外,为了便于清楚描述本申请的技术方案,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,不能理解为指示或暗示相对重要性,并且“第一”、“第二”等字样也并不限定一定不同。In addition, in order to clearly describe the technical solution of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. Those skilled in the art can understand that words such as "first" and "second" do not limit the number and order of execution, and cannot be understood as indicating or implying relative importance, and words such as "first" and "second" are not limited It is not limited to be different.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" or the like in the specification of the present application means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "including", "comprising", "having" and variations thereof mean "including but not limited to", unless specifically stated otherwise.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still implement the foregoing embodiments Modifications to the technical solutions described in the examples, or equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the application, and should be included in the Within the protection scope of this application.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211337269.XA CN115941836B (en) | 2022-10-28 | 2022-10-28 | Interface display method, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211337269.XA CN115941836B (en) | 2022-10-28 | 2022-10-28 | Interface display method, electronic device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115941836A true CN115941836A (en) | 2023-04-07 |
CN115941836B CN115941836B (en) | 2023-10-20 |
Family
ID=86553160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211337269.XA Active CN115941836B (en) | 2022-10-28 | 2022-10-28 | Interface display method, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115941836B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118675486A (en) * | 2024-07-25 | 2024-09-20 | 荣耀终端有限公司 | Display method and electronic equipment |
WO2025067124A1 (en) * | 2023-09-28 | 2025-04-03 | 北京字跳网络技术有限公司 | Starting method and apparatus, and electronic device and medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252299A (en) * | 2013-06-28 | 2014-12-31 | 上海斐讯数据通信技术有限公司 | Mobile terminal for controlling wallpaper to change color |
CN104735247A (en) * | 2015-03-11 | 2015-06-24 | 广东欧珀移动通信有限公司 | Method and device for adjusting screen brightness of mobile terminal |
CN105302517A (en) * | 2015-10-20 | 2016-02-03 | 魅族科技(中国)有限公司 | Method and device for regulating display color of terminal screen |
CN105511717A (en) * | 2015-11-30 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Page display method and page display device |
CN106126094A (en) * | 2016-06-21 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of brightness adjusting method and terminal |
CN108469976A (en) * | 2018-03-13 | 2018-08-31 | 北京车和家信息技术有限公司 | Mode switching method, mode-changeover device, mobile unit and vehicle |
CN110609722A (en) * | 2019-08-09 | 2019-12-24 | 华为技术有限公司 | A kind of dark mode display interface processing method, electronic device and storage medium |
CN111209065A (en) * | 2019-12-31 | 2020-05-29 | Oppo广东移动通信有限公司 | Dynamic wallpaper setting method and device, storage medium and electronic equipment |
WO2022068724A1 (en) * | 2020-09-29 | 2022-04-07 | 维沃移动通信有限公司 | Image display method and electronic device |
-
2022
- 2022-10-28 CN CN202211337269.XA patent/CN115941836B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104252299A (en) * | 2013-06-28 | 2014-12-31 | 上海斐讯数据通信技术有限公司 | Mobile terminal for controlling wallpaper to change color |
CN104735247A (en) * | 2015-03-11 | 2015-06-24 | 广东欧珀移动通信有限公司 | Method and device for adjusting screen brightness of mobile terminal |
CN105302517A (en) * | 2015-10-20 | 2016-02-03 | 魅族科技(中国)有限公司 | Method and device for regulating display color of terminal screen |
CN105511717A (en) * | 2015-11-30 | 2016-04-20 | 北京京东尚科信息技术有限公司 | Page display method and page display device |
CN106126094A (en) * | 2016-06-21 | 2016-11-16 | 深圳市金立通信设备有限公司 | A kind of brightness adjusting method and terminal |
CN108469976A (en) * | 2018-03-13 | 2018-08-31 | 北京车和家信息技术有限公司 | Mode switching method, mode-changeover device, mobile unit and vehicle |
CN110609722A (en) * | 2019-08-09 | 2019-12-24 | 华为技术有限公司 | A kind of dark mode display interface processing method, electronic device and storage medium |
CN111209065A (en) * | 2019-12-31 | 2020-05-29 | Oppo广东移动通信有限公司 | Dynamic wallpaper setting method and device, storage medium and electronic equipment |
WO2022068724A1 (en) * | 2020-09-29 | 2022-04-07 | 维沃移动通信有限公司 | Image display method and electronic device |
Non-Patent Citations (1)
Title |
---|
阿立;: "夜景模式 眼睛的福音", 电脑爱好者, no. 19 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2025067124A1 (en) * | 2023-09-28 | 2025-04-03 | 北京字跳网络技术有限公司 | Starting method and apparatus, and electronic device and medium |
CN118675486A (en) * | 2024-07-25 | 2024-09-20 | 荣耀终端有限公司 | Display method and electronic equipment |
CN118675486B (en) * | 2024-07-25 | 2025-04-04 | 荣耀终端股份有限公司 | Display method and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN115941836B (en) | 2023-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114816209B (en) | Full-screen display method and device for mobile terminal | |
CN114467297B (en) | Video call display method and related device applied to electronic equipment | |
CN109814766B (en) | Application display method and electronic device | |
CN109559270B (en) | Image processing method and electronic equipment | |
CN114679538A (en) | Shooting method and terminal | |
WO2021036585A1 (en) | Flexible screen display method and electronic device | |
WO2021159746A1 (en) | File sharing method and system, and related device | |
CN115129410B (en) | Desktop wallpaper configuration method and device, electronic equipment and readable storage medium | |
CN114089932B (en) | Multi-screen display method, device, terminal equipment and storage medium | |
CN115967851A (en) | Quick photographing method, electronic device and computer-readable storage medium | |
WO2020118490A1 (en) | Automatic screen-splitting method, graphical user interface, and electronic device | |
CN115941836B (en) | Interface display method, electronic device and storage medium | |
CN115705241A (en) | Application scheduling method and electronic equipment | |
CN116339569A (en) | Split screen display method, folding screen device and computer readable storage medium | |
CN116437194B (en) | Method, device and readable storage medium for displaying preview images | |
CN114489469B (en) | A data reading method, electronic device and storage medium | |
CN115686182B (en) | Processing method of augmented reality video and electronic equipment | |
CN113495733A (en) | Theme pack installation method and device, electronic equipment and computer readable storage medium | |
CN115904576B (en) | Wallpaper application method, electronic equipment and storage medium | |
CN115529379B (en) | Method, electronic device and storage medium for preventing bluetooth audio track from shaking | |
WO2023207799A1 (en) | Message processing method and electronic device | |
CN116939090A (en) | Methods for switching Bluetooth devices to play audio data and related devices | |
CN116709609A (en) | Message transmission method, electronic device and storage medium | |
CN119536868A (en) | Application display status switching method and device | |
CN117435309A (en) | Task migration method, electronic equipment and system |
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 | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |