Screen testing method for controlling brightness, electronic equipment and related medium
Through the process identifier, whether it is a test process and the brightness control instructions are managed uniformly, the command response failure problem caused by control logic conflicts in screen testing of electronic devices is solved, and a more efficient screen testing process is achieved.
Patent Information
- Application Number
- CN202411832763.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2044-12-13
AI Technical Summary
In the prior art, electronic devices need to provide different test control interfaces for different test projects during screen testing, resulting in a large operating burden, and the test control logic of different test projects is different, which is prone to instruction response failures, affecting the testing progress.
By determining whether the process identifier meets the preset conditions, determine whether the process is a test process, and adjust the brightness or save the brightness value accordingly, manage the brightness control instructions uniformly to avoid control logic conflicts.
The screen testing process is simplified, control logic conflicts are avoided, screen testing is carried out normally and orderly, and testing efficiency is improved.
Smart Images

Figure CN119377027B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular, to a screen testing method, an electronic device, and a related medium for controlling brightness. Background Art
[0002] Currently, the screen testing of electronic devices includes human-machine interface testing, aging testing, and testing using a micro-needle module. These tests can better test the display performance and touch performance of the display screen of the electronic device. Among them, the display performance of the display screen can include the resolution, color restoration degree, brightness uniformity, etc. of the display screen, and the touch performance can include the touch sensitivity, touch accuracy, and multi-touch of the display screen.
[0003] During the screen testing process, the electronic device needs to provide different test control interfaces for different test items, resulting in a large operating burden on the electronic device. Moreover, the test control logics corresponding to different test items are also different, which makes the electronic device prone to instruction response failures caused by test control logic conflicts during testing, thus affecting the progress of the screen test. Therefore, how to optimize the display screen test process is an urgent problem for those skilled in the art. Summary of the Invention
[0004] In a first aspect, the present application provides a screen testing method, an electronic device, and a related medium for controlling brightness. The method is applied to an electronic device, which may include a display screen. The method may include:
[0005] When the electronic device is in a test state, receive a brightness adjustment instruction sent by a first process. The brightness adjustment instruction may include a target brightness value;
[0006] When the first process identifier corresponding to the first process meets a preset condition, determine that the first process is a test process, and adjust the brightness value of the display screen to the target brightness value;
[0007] When the first process identifier does not meet the preset condition, save the target brightness value to a preset memory area.
[0008] Implementing the method provided in the first aspect, the electronic device can determine whether the first process is a test process by determining whether the first process representation corresponding to the first process meets a preset condition. Specifically, when the first process identifier meets the preset condition, it is determined that the first process is a test process, and the brightness value of the display screen is adjusted to the target brightness value; when the first process identifier does not meet the preset condition, the target brightness value is saved to a preset memory area, which helps to adjust the brightness value of the display screen based on the target brightness value in a timely manner after the screen test is completed, ensuring that the display screen can normally respond to control instructions (such as brightness adjustment instructions, etc.) corresponding to other application programs and their application processes in the electronic device. Among them, in the prior art, the electronic device needs to provide different call interfaces for each different screen test item, and the test control logics corresponding to each different screen test item are also different, which is prone to the situation of control logic conflicts during the actual test process, so the screen test effect is not good and the screen test efficiency is too low. Different from this, the electronic device in the embodiment of the present application can determine the test process based on the process identifier, and when the electronic device is in the test state, it can adjust the brightness value of the display screen to the target brightness value corresponding to the brightness adjustment instruction sent by the test process, which helps to ensure that the electronic device will not be affected by the brightness adjustment instructions issued by other non-test application processes during the screen test, ensuring that the display screen backlight can normally respond to the brightness adjustment instructions of the test process, so that the screen test can proceed normally and orderly.
[0009] Implementing the method provided in the first aspect, in some embodiments, the preset condition is that the first process identifier is the same as the target process identifier.
[0010] Implementing the method provided in the first aspect, in some other embodiments, the electronic device may further include a processor;
[0011] Before receiving the brightness adjustment instruction sent by the first process when the electronic device is in the test state, the method may further include:
[0012] In response to the startup of the electronic device or in response to a startup instruction for the test process, start the test process;
[0013] When the processor has completed initialization, initialize the test process based on the processor and determine the process identifier corresponding to the test process as the target process identifier.
[0014] Implementing the method provided in the above embodiments, after the electronic device is powered on (or after receiving the start instruction of the test process of the test program), it can perform initialization operations on the test process. Among them, when the processor completes initialization, the electronic device can call and initialize the test process based on the processor, and determine the process identifier corresponding to the test process as the target process identifier, which helps to determine whether the first process is a test process subsequently and ensures that the screen test can be carried out correctly and orderly.
[0015] Implementing the method provided in the first aspect, in some other embodiments, the method may further include:
[0016] When the processor has not completed initialization, call and initialize the test process based on the display interface, and determine the process identifier corresponding to the test process as the target process identifier.
[0017] Implementing the method provided in the above embodiments, when the processor has not completed initialization, the electronic device can call and initialize the test process based on the display interface, and determine the process identifier corresponding to the test process as the target process identifier, which helps to determine whether the first process is a test process subsequently and ensures that the screen test can be carried out correctly and orderly.
[0018] Implementing the method provided in the first aspect, in some other embodiments, after initializing the test process, the method may further include:
[0019] Receive the lock instruction sent by the test process;
[0020] Control the electronic device to enter the test state based on the lock instruction.
[0021] Implementing the method provided in the above embodiments, after the electronic device receives the lock instruction sent by the test process, it can enter the test state, which helps to ensure that the screen test can be carried out correctly and orderly.
[0022] Implementing the method provided in the first aspect, in some other embodiments, before controlling the electronic device to enter the test state based on the lock instruction, the method may further include:
[0023] In response to the lock instruction, obtain the current first brightness value corresponding to the display screen and save the first brightness value in a preset memory area.
[0024] Implementing the method provided in the above embodiments, before the electronic device enters the test state, it will save the current first brightness value displayed on the display screen in a preset memory area, which helps the electronic device to return to the state of normally presenting the backlight of the display screen after exiting the test state.
[0025] In some other embodiments of the method provided in the first aspect, when the first process identifier does not meet the preset condition, saving the target brightness value to a preset memory area may include:
[0026] When the first process identifier does not meet the preset condition, the first brightness value in the preset memory area is replaced with the target brightness value.
[0027] When the method provided in the above embodiment is implemented, when the electronic device is in a test state, if a brightness adjustment instruction sent by the first process is received, and the first process identifier does not meet the preset condition, the first brightness value in the preset memory area can be replaced with the target brightness value, which helps to ensure the timeliness of the brightness value stored in the preset memory area, so that the electronic device (or it can be understood as a display screen) can correctly respond to the control instructions (such as brightness adjustment instructions) of various applications and their application processes in the electronic device.
[0028] Implementing the method provided in the first aspect, in some other embodiments, the method may further include:
[0029] Receive the unlocking instruction sent by the test process;
[0030] Release the test state of the electronic device based on the unlocking instruction;
[0031] Receive the read instruction sent by the test process;
[0032] Based on the read instruction, the second brightness value is read from the preset memory area, and the brightness value of the display screen is adjusted to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
[0033] By implementing the method provided in the above embodiment, after the electronic device is released from the test state, it will read the second brightness value from the preset memory area and adjust the brightness value of the display screen to the second brightness value, which helps to ensure that the electronic device (or it can be understood as the display screen) can correctly respond to the control instructions (such as brightness adjustment instructions) of various applications and their application processes in the electronic device.
[0034] In some other embodiments of the method provided in the first aspect, when the electronic device is in a testing state, the method may further include:
[0035] If the application crashes, the test state of the electronic device is released after receiving the screen-off command, which is used to turn off the backlight of the display;
[0036] After receiving the wake-up command, the brightness value of the display screen is adjusted to the brightness value corresponding to the wake-up command based on the wake-up command.
[0037] By implementing the method provided in the above embodiment, when an application crashes, the electronic device can respond to the screen-off command to release the test state of the electronic device, ensuring that the electronic device or display screen can subsequently respond normally to the control commands (such as brightness control commands) of each application and its application process in the electronic device.
[0038] In a second aspect, an embodiment of the present application provides an electronic device, which may include: a display screen and a processor;
[0039] The processor may be used to receive a brightness control instruction sent by the first process when the electronic device is in a test state, and the brightness control instruction may include a target brightness value;
[0040] The processor may also be used to determine that the first process is a test process and adjust the brightness value of the display screen to a target brightness value when the first process identifier corresponding to the first process meets a preset condition;
[0041] The processor may also be used to save the target brightness value to a preset memory area when the first process identifier does not meet a preset condition.
[0042] In some embodiments of the method provided in the second aspect, the preset condition is that the first process identifier is the same as the target process identifier.
[0043] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0044] The processor may also be used to start the test process in response to the electronic device being turned on, or in response to a start instruction for the test process;
[0045] The processor may also be used to initialize a test process based on the processor when the processor has completed initialization, and determine the process identifier corresponding to the test process as the target process identifier.
[0046] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0047] The processor may also be used to call and initialize the test process based on the display interface when the processor has not completed initialization, and determine the process identifier corresponding to the test process as the target process identifier.
[0048] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0049] The processor can also be used to receive the locking instruction sent by the test process;
[0050] The processor can also be used to control the electronic device to enter a test state based on the locking instruction.
[0051] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0052] The processor may also be used to obtain a first brightness value currently corresponding to the display screen in response to the locking instruction, and save the first brightness value in a preset memory area.
[0053] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0054] The processor may also be used to replace the first brightness value in the preset memory area with the target brightness value when the first process identifier does not meet the preset condition.
[0055] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0056] The processor can also be used to receive unlocking instructions sent by the test process;
[0057] The processor may also be used to release the test state of the electronic device based on the unlock instruction;
[0058] The processor can also be used to receive read instructions sent by the test process;
[0059] The processor may also be used to read a second brightness value from a preset memory area based on a read instruction, and adjust the brightness value of the display screen to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
[0060] In implementing the method provided in the second aspect, in some other embodiments, the electronic device may further include:
[0061] The processor may also be used to release the electronic device from the test state after receiving a screen-off command if an application crashes, and the screen-off command is used to turn off the backlight of the display screen;
[0062] The processor may also be used to adjust the brightness value of the display screen to the brightness value corresponding to the wake-up instruction based on the wake-up instruction after receiving the wake-up instruction.
[0063] In a third aspect, an embodiment of the present application provides an electronic device, which may include one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the method described in the first aspect and any possible implementation method of the first aspect is executed.
[0064] Fourthly, an embodiment of the present application provides a chip, including a logic circuit and an interface, where the logic circuit and the interface are coupled; the interface is used to input and / or output code instructions, and the logic circuit is used to execute the code instructions so that the method in the first aspect or any possible implementation manner of the first aspect is executed.
[0065] Fifthly, the present application provides a computer-readable storage medium, including instructions, which when running on an electronic device, cause the execution of the method described in the first aspect and any possible implementation manner of the first aspect.
[0066] Sixthly, the present application provides a computer program product containing instructions, which when running on an electronic device, cause the electronic device to execute the method described in the first aspect and any possible implementation manner of the first aspect.
[0067] It can be understood that the electronic device provided in the second aspect and the third aspect, the chip provided in the fourth aspect, the computer-readable storage medium provided in the fifth aspect, and the computer program product provided in the sixth aspect are all related to the method for controlling the brightness of a screen provided in the first aspect, and can be used to execute the method provided in the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the method for controlling the brightness of a screen in the corresponding first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0069] Figure 1 is a schematic diagram of the instruction issuing logic for production line testing provided by an embodiment of the present application;
[0070] Figure 2 is a schematic flowchart of a method for controlling the brightness of a screen provided by an embodiment of the present application;
[0071] Figure 3 is a schematic flowchart of a method for determining a target process identifier provided by an embodiment of the present application;
[0072] Figure 4 is a schematic diagram of a scenario where an electronic device responds to a brightness adjustment instruction provided by an embodiment of the present application;
[0073] Figure 5This is a schematic diagram of a brightness control scenario provided by an embodiment of the present application;
[0074] Figure 6 is a schematic diagram of a scenario for releasing an electronic device from a test state provided by an embodiment of the present application;
[0075] Figure 7 is another schematic diagram of a scenario for releasing an electronic device from a test state provided by an embodiment of the present application;
[0076] Figure 8 is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application;
[0077] Figure 9 is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present application;
[0078] Figure 10 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0079] Figure 11 This is a software structure diagram provided by the embodiment of this application. Specific implementation method
[0080] The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to be limiting of the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that in the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is merely a description of an association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two.
[0081] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.
[0082] In the following embodiments of this application, the term "user interface (UI)" refers to a media interface for interaction and information exchange between an application or an operating system and a user. It realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is source code written in specific computer languages such as Java and Extensible Markup Language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content recognizable by the user. The common manifestation form of the user interface is the graphical user interface (GUI), which refers to the user interface related to computer operations displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and Widgets displayed on the display screen of an electronic device.
[0083] For the sake of clear and concise description of the following embodiments, a brief introduction to the related technologies is given first:
[0084] (1) Application layer, application framework layer, system runtime library layer, hardware abstraction layer, and kernel layer
[0085] The application layer (Application), application framework layer (Android Framework), system runtime library layer (NATIVE), hardware abstraction layer (Hardware Abstraction Layer), and kernel layer (Linux Kernel) are the five layers in the Android system architecture. Among them:
[0086] The application layer includes system-built-in applications and non-system-level applications, which are usually developed based on the Java language and are mainly responsible for direct interaction with users.
[0087] The application framework layer is the basis for Android application development. This layer is written in Java code and provides developers with the APIs required for developing applications. Many core applications also implement their core functions through this layer. This layer simplifies the reuse of components. Developers can directly use the components provided by it for rapid application development or achieve personalized expansion through inheritance. Specifically, the application framework layer can include multiple parts such as activity manager, window manager, content provider, view system, package manager, phone manager, resource manager, location manager, and notification manager.
[0088] The system runtime layer includes libraries and the Android Runtime (ART). Among them, the libraries can include a collection of C / C++ libraries. Generally, Android application developers cannot directly call the libraries and need to call them through the JAVA API interface layer. Moreover, in the Android system, each application runs in its own separate process, and each application has a corresponding virtual machine instance. ART ensures the ability to run multiple virtual machine instances in a system by running DEX files. The DEX file is a bytecode format file specifically designed for Android. It is optimized and uses very little memory. The main functions of ART include: Ahead-of-Time (AOT) and Just-In-Time (JIT) compilation, optimized garbage collection (GC), and debugging-related support.
[0089] The hardware abstraction layer encapsulates the underlying hardware drivers and provides a general interface for the application framework layer to call the drivers. As long as the manufacturer implements the corresponding interfaces according to the specifications and stores them in a specific directory in the form of a shared library, then the upper layer can operate the underlying hardware by simply loading this shared library and finding the pointer to the device corresponding to the corresponding module and obtaining the pointer to the entire device.
[0090] The kernel layer provides underlying drivers for various hardware of the electronic device (display driver, keyboard driver, Flash memory driver, camera driver, audio driver, Bluetooth driver, Wi-Fi driver, Binder IPC driver, Power Management). The kernel exists as an abstraction layer between the hardware and software, with powerful memory management and process management, a security mode based on permissions, and support for shared libraries. In the method of this application, the operation process of presenting the application startup animation to the user by the electronic device is mainly related to the display driver.
[0091] (2)Human-Machine Interface Testing
[0092] Human-Machine Interface (MMI) testing is used to test whether some electronic device hardware is normal and whether the application (APP) can respond and be controlled normally. The test items include button testing, headphone plugging and unplugging, SIM card plugging and unplugging, display screen touch response, display screen display color, dead pixels, motor vibration effect, and so on.
[0093] Among them, the MMI test is divided into three cases, specifically the MMI test for the large board (main board containing CPU, FLASH, etc.), the MMI test for the small board (auxiliary circuit board such as buttons and RF fixation), and the MMI test for the whole machine. Specifically, the MMI tests for the large board and the small board refer to the situation where the electronic device is not assembled into a whole machine. Wires are used to connect each unit (large board, small board, display screen) for testing. At this time, the electronic device is not assembled yet, so the large board and the small board are visible. Further, when testing the large board (small board), it can be considered that the small board (large board) for cooperative testing is normal, and the samples of the large board (small board) to be tested need to be replaced one by one for testing. Different from this, the whole machine test is carried out after the entire electronic device is assembled. At this time, the large board and the small board are already inside the electronic device and are in an invisible state.
[0094] (3) Aging Test
[0095] Aging Test (Running Test, RT) is a test method that simulates long-term use or environmental impacts under certain conditions to continuously run and observe the product. Its purpose is to evaluate the performance, reliability, and stability of the product during its actual service life, and to predict possible problems that may occur after long-term use. Exemplarily, the aging test can include high-temperature aging test, low-temperature aging test, humidity aging test, light aging test, vibration aging test, and chemical aging test. Further, the aging test for the display can also include brightness aging test, color deviation test, and response time test, which helps to comprehensively evaluate the working performance of the display screen.
[0096] (4) Micro-needle Module
[0097] The micro-needle module is used to test the reaction sensitivity, precision, touch accuracy, and recognition resolution of the display screen. Currently, the large-current spring needle micro-needle module is often used to test the display screen. Among them, the large-current spring needle micro-needle module can pass a current of up to 50A during current transmission, has a constant resistance, and has a strong over-current capacity. It can establish a stable connection with the device under test while maintaining good conductive function. Further, in a complex test environment, the head shape of the large-current spring needle micro-needle module has a self-cleaning function design, which helps to prevent impurities or dust from entering the test connection, thus ensuring the stability of the test.
[0098] (5) Process Control Character
[0099] The Process Identifier (PID) is also often referred to as the process identifier. It is the identity identifier of each process running in the operating system, which can help the operating system distinguish and manage different processes and can also be used in various system calls and operations. Among them, the relationship between the process identifier and the program is one-to-many. Specifically, the same program file can be loaded multiple times to become different processes. Each time a process is generated, the operating system will assign a unique identifier to identify the process.
[0100] (6)Power handling service and display management service
[0101] The PowerManagerService (PMS) is the core service responsible for power management in the Android system. Its main functions include providing application programming interfaces upward and making decisions on power management policies at the hardware layer downward. Among them, the main functions of PMS include: providing interfaces upward and making decisions on the hardware layer downward. Specifically, providing interfaces upward means that PMS provides a series of interfaces for applications upward, such as keeping the system awake in the audio scenario and waking up the phone screen in message notifications; making decisions on the hardware layer downward means that PMS makes decisions on the power management policies of the hardware layer, controls the standby state of the device, and manages the states of hardware devices such as the display screen, backlight, distance sensor, and light sensor.
[0102] The DisplayManagerService (DMS) is an important service in the Android system, mainly responsible for managing all display devices, including the display screen, external display devices, and virtual display screens, and handling display-related events and requests. DMS provides a series of interfaces for applications to call to obtain screen information, monitor changes in the connection status of display devices, etc. Among them, the main functions of DMS include: managing all display devices (such as connecting and disconnecting the screen and external display devices), handling display-related events (such as screen rotation, resolution adjustment, display mode switching, etc.), querying and setting the status and properties of display devices, coordinating the allocation and release of display resources among multiple applications, and providing display-related system services (such as screenshot, screen recording, etc.).
[0103] (7)View, Surface, SurfaceControl, and SurfaceFlinger
[0104] In a window, View usually refers to a part of the user interface, including windows, menus, buttons, and other elements that interact with the user. It represents a rectangular area on the screen, responsible for displaying content and responding to user operations within the area.
[0105] Surface represents a screen buffer in Android development, which is used to manage and display the content of a window. A Surface is a handle to a native buffer managed by the screen compositor. Through it, direct access to the native buffer can be achieved, and this buffer is used to store the pixel data of the current window. In Android, each window corresponds to a Surface, and any View is drawn on the Surface. Simply put, Surface is the infrastructure for drawing graphics and images in Android.
[0106] SurfaceControl is a class in the Android system, which is used to manage and control the creation, display, and destruction of Surfaces.
[0107] The SurfaceFlinger, the surface deliverer, is a component in the Android system. It is mainly responsible for managing and compositing all visible content of the application interface to ensure the smooth display and rendering of the user interface. The main functions of the SurfaceFlinger include: buffer management, compositor, hardware acceleration, handling input events, and screen management. Specifically, buffer management can manage the content of the application interface (such as windows, bitmaps, and other graphic elements); the compositor function means that the SurfaceFlinger can composite different applications, system UI components, and other graphic layers into the final display frame to ensure that each layer is superimposed in the correct order and transparency; the hardware acceleration function means that the SurfaceFlinger can utilize the acceleration function of hardware, such as the Graphics Processing Unit (GPU), to improve the graphic rendering performance and ensure the smoothness and response speed of the user interface; handling input events means that the SurfaceFlinger can respond to touch screen operations and pass the corresponding information of the operation to the correct application or system component; the screen management function means that the SurfaceFlinger can handle instructions such as screen rotation, resolution adjustment, and display output, and implement the corresponding screen display effects.
[0108] Please refer to Figure 1 , Figure 1 which is a schematic diagram of the instruction issuing logic for a production line test provided by an embodiment of this application.
[0109] As Figure 1 shown, on the production line, man-machine interface testing (MMI testing), aging testing (RT testing), and micro-needle modules can be set to perform screen testing on electronic devices.
[0110] Specifically, MMI testing can be used to perform brightness testing on the display screen (such asFigure 1 Three - level brightness test), under - screen ambient light calibration, picture display test, and light leakage test. Exemplarily, the electronic device can call the display service process in the HAL layer (such as the vendor.honor.hardware.hwdisplay.service process) through the brightness setting interface (such as the setLcdBrightness interface) to control the BacklightDriver, so as to perform the three - level brightness test for the display screen. Optionally, the electronic device can also call the sensor (such as the ambient light sensor, etc.) through the ambient light calibration interface (such as the setAmbientLightPara interface) to control the BacklightDriver, so as to perform the under - screen ambient light calibration operation for the display screen. Optionally, the electronic device can also call the power management service PMS and the display management service DMS in the application framework layer (Framework layer) through the backlight setting interface (such as the setDisplayBackgroundBrightness interface) to transfer the parameters related to backlight setting, and further, the DMS transfers the parameters related to backlight setting along the path of "display management service DMS → surface control component SurfaceControl → surface renderer component SurfaceFlinger → hardware compositor (HWComposer, HWC) → BacklightDriver" to finally control the BacklightDriver, so as to perform the picture display test for the display screen. Optionally, the electronic device can transfer the parameters related to light leakage test through the light leakage test interface (such as the Setting.System.putInt interface), where the parameters related to light leakage test can be transferred along the path of "settings application (such as SettingAPP) → display management service DMS → surface control component SurfaceControl → surface renderer component SurfaceFlinger → hardware compositor HWC → BacklightDriver", so as to implement the light leakage test for the display screen.
[0111] Furthermore, the RT test can be used to perform a solid color picture switching test and a white screen test on the display screen. Exemplarily, the electronic device can call the power management service PMS and the display management service DMS in the Framework layer through the backlight setting interface setDisplayBackgroundBrightness to transfer the parameters related to backlight setting, and further the DMS transfers the parameters related to backlight setting along the path of "display management service DMS → surface control component SurfaceControl → surface painter component SurfaceFlinger → hardware compositor HWC → backlight driver BacklightDriver" to finally implement the solid color picture switching test for the display screen. Optionally, the electronic device can also call the surface control component SurfaceControl through the white screen setting interface (such as the setDisplayBackgroundBrightnessByld interface) and transfer the parameters related to white screen setting along the path of "surface control component SurfaceControl → surface painter component SurfaceFlinger → hardware compositor HWC → backlight driver BacklightDriver" to implement the white screen test for the display screen.
[0112] Furthermore, the micro-needle module can be used to perform a picture test on the display screen. Exemplarily, the micro-needle module calls the power management service PMS and the display management service DMS in the Framework layer through the backlight setting interface setDisplayBackgroundBrightness to transfer the parameters related to backlight setting, and further the DMS transfers the parameters related to backlight setting along the path of "display management service DMS → surface control component SurfaceControl → surface painter component SurfaceFlinger → hardware compositor HWC → backlight driver BacklightDriver" to finally implement the picture test for the display screen.
[0113] Optionally, other applications (such as other applications unrelated to screen testing) can also issue brightness adjustment instructions to the processor (or backlight driver). Exemplarily, as Figure 1 shown, the path for other applications to issue brightness adjustment instructions can be "other applications → display management service DMS → surface control component SurfaceControl → surface painter component SurfaceFlinger → hardware compositor HWC → backlight driver BacklightDriver", so as to achieve the effect of adjusting the brightness value of the display screen.
[0114] Optionally, a specific script file can also adjust the brightness value of the display screen through a brightness adjustment instruction. Exemplarily, as Figure 1 shown, the transmission path of the brightness adjustment instruction of the script file can be "script file → BacklightDriver".
[0115] It can be seen that Figure 1 each test in corresponds to different call interfaces and control logics. In the actual test process, it is easy to have a situation of control logic conflict, which may cause the backlight of the display screen to not correctly respond to the control instructions corresponding to each test, resulting in poor test effects, and thus unable to correctly test the performance of the display screen.
[0116] Exemplarily, when performing an MMI test on an electronic device, assume that the brightness value issued by the test instruction is 120 nits. If at this time a non-production line test process (which can be understood as a process unrelated to the screen test item) issues a control instruction to adjust the brightness of the display screen to 400 nits (which can be understood as covering the above 120 nits), this will cause the brightness of the first screen of the display screen to be too high (which can be understood as a screen with a brightness value of 400 nits), or the test screen is first a darker screen (which can be understood as a screen with a brightness value of 120 nits), and then the screen becomes brighter after more than ten seconds (which can be understood as a screen with a brightness value of 400 nits), resulting in the tester needing to spend more time locating and solving the above abnormal problems, thus affecting the efficiency of the screen test.
[0117] Exemplarily, when performing an aging test on an electronic device, if after the test instruction corresponding to the aging test (assuming its corresponding brightness value is 120 nits) is issued, the system issues a brightness adjustment instruction (assuming its corresponding brightness value is 400 nits), this will cause the test instruction to be covered by the brightness adjustment instruction issued by the system, making the display screen present a screen with a brightness value of 400 nits. And the too high brightness of the display screen will cause the temperature of the display screen to exceed the test standard value, and finally the display screen will be judged as a failed test. It can be seen that this fault easily leads to a decrease in the accuracy rate of the screen test.
[0118] Exemplarily, when performing a screen test on an electronic device, it may be necessary to issue the same brightness value to the display screen multiple times, and SurfaceFinger may filter out duplicate backlight values, resulting in the display screen may fail to light up again after the screen is turned off during the test process, and thus be judged as a failed test. It can be seen that this fault easily leads to a decrease in the accuracy rate of the screen test.
[0119] To solve the above problems, an embodiment of the present application provides a screen test method for controlling brightness. This method can integrate various tests into the same brightness control interface, and all test-related instructions are issued by the same test process, achieving the normalization of the test interfaces for various tests. This helps to simplify the control logic of various tests, prevent conflicts in the control logic between various tests, and also helps to reduce the time for developers to follow up and analyze problems on the production line, improving the screen test efficiency. Further, this method can also select different response methods based on the process identifiers of the processes that issue brightness adjustment instructions. Exemplarily, when it is determined based on the process identifier that the process is a test process, the backlight brightness of the display screen can be directly adjusted based on the brightness adjustment instruction; when it is determined based on the process identifier that the process is not a test process, the brightness value corresponding to the brightness adjustment instruction can be saved to a preset memory area, and the backlight brightness of the display screen can be adjusted after the test is completed, which helps to prevent the brightness adjustment instructions of non-test processes from overwriting the brightness adjustment instructions of test processes and ensures that the screen test can proceed normally and orderly.
[0120] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of a screen test method for controlling brightness provided by an embodiment of the present application. As Figure 2 shown, in an embodiment of the present application, the electronic device can directly issue test control instructions corresponding to MMI tests, RT tests, and micro-needle module tests to the processor and / or the backlight driver Backlight Driver through the display service process (such as the vendor.honor.hardware.hwdisplay.service process), achieving the normalization of the screen test interface, which helps to ensure that the screen test can proceed correctly and orderly.
[0121] Optionally, the test control instructions corresponding to the MMI test, RT test, and micro-needle module test may include lock instructions, unlock instructions, brightness adjustment instructions, read instructions, and brightness acquisition instructions. Exemplarily, the lock instructions and unlock instructions can be issued to the processor and / or the backlight driver Backlight Driver through the backlight lock / unlock interface (such as the lockBacklight interface); the brightness adjustment instructions and read instructions can be issued to the processor and / or the backlight driver Backlight Driver through the brightness adjustment interface (such as the setBacklight interface); the brightness acquisition instructions can be issued to the processor and / or the backlight driver Backlight Driver through the brightness acquisition interface (such as the getBacklight interface).
[0122] For example, the specific function form of the backlight lock / unlock interface (such as the lockBacklight interface) may be int lockBacklight(boolean enable, int screenId). The corresponding meanings of various parameters in the function may be referred to in Table 1:
[0123] Table 1
[0124]
[0125] Specifically, different values of the parameter screenId can be used to represent different screens. For example, when screenId==0, the instruction is used to lock / unlock the brightness value of the inner screen of the display screen; when screenId==1, the instruction is used to lock / unlock the brightness value of the outer screen of the display screen; when screenId==-1, the processor of the electronic device can determine whether the target screen corresponding to the instruction is the inner screen or the outer screen by calling the active channel determination function get_active_panel function.
[0126] Optionally, different values of the parameter enable can be used to indicate a locked test state or an unlocked test state. For example, when the value of enable is true, it can indicate that the instruction is a locked instruction, and the electronic device can enter the test state in response to the instruction; when the value of enable is false, it can indicate that the instruction is an unlocked instruction, and the electronic device can release the test state in response to the instruction.
[0127] Optionally, after the electronic device sends a lock command (or unlock command) through the lockBacklight interface, if the return value of int lockBacklight(boolean enable, int screenId) is 0, it can be considered that the execution of this command is successful and the electronic device has successfully entered the test state (or successfully released the test state); if the return value of int lockBacklight(boolean enable, int screenId) is other non-0 values, it can be considered that the execution of this command failed and the electronic device did not enter the test state (or did not release the test state).
[0128] It should be noted that the above settings of the values of various parameters and their related meanings are only for a more detailed description of the method of the embodiment of the present application. The values of various parameters and their related meanings can be set by technicians according to actual conditions and are not limited here.
[0129] In some possible implementations, the method of the present application embodiment may include:
[0130] Receive the lock command sent by the test process;
[0131] Control the electronic equipment to enter the test state based on the lock instruction.
[0132] Exemplarily, after the test process (i.e., the display service process described above) is initialized, in response to any test requirement of the MMI test, RT test, and microneedle module, the test process (such as the vendor.honor.hardware.hwdisplay.service process) can issue a lock instruction to the processor and / or the backlight driver Backlight Driver through the lockBacklight interface, thereby putting the electronic device into a test state.
[0133] Optionally, when the electronic device is in a test state, the processor and / or the backlight driver Backlight Driver can adjust the brightness value of the display screen based on the relevant test instructions issued by the display service process, and the brightness adjustment instructions issued by other applications and their related processes will not affect the brightness value of the display screen. Optionally, when the electronic device is in a test state, if other applications and their related processes issue brightness adjustment instructions, the processor can cache the brightness value corresponding to the brightness adjustment instruction into the memory space.
[0134] In some other possible implementations, the method of the embodiment of the present application may also include:
[0135] In response to the locking instruction, the first brightness value currently corresponding to the display screen is obtained, and the first brightness value is saved in a preset memory area.
[0136] For example, when receiving the lock instruction sent by the display service process, if the current brightness value of the display screen is 3210, the first brightness value can be determined as 3210, and the first brightness value can be saved to the preset memory area, which helps the electronic device to return to the normal display backlight state after the test state is released.
[0137] For example, the brightness acquisition interface (such as the getBacklight interface) provided in the embodiment of the present application can be used for the electronic device (or processor) to query and read the brightness value currently displayed on the display screen (such as the first brightness value mentioned above). Among them, the specific function form of the brightness acquisition interface (such as the getBacklight interface) can be int getBacklight (intscreenId), and the corresponding meanings of various parameters in the function can be referred to in Table 2:
[0138] Table 2
[0139]
[0140] Among them, similar to Table 1, different values of the parameter screenId can be used to represent different screens. For the relevant meanings, refer to the relevant descriptions in Table 1, which will not be elaborated here.
[0141] Optionally, for the brightness accuracy range of 0 - 8191, after the electronic device issues a brightness adjustment instruction (or a read instruction) through the getBacklight interface, if the return value of int getBacklight(int screenId) is any value within 0 - 4095, it can be considered that the instruction execution is successful, and the electronic device successfully obtains the brightness value of the display screen; if the return value of int getBacklight(int screenId) is -1, it can be considered that the instruction execution fails, and the electronic device does not successfully obtain the brightness value of the display screen. Optionally, for the brightness accuracy range of 0 - 8191, after the electronic device issues a brightness adjustment instruction (or a read instruction) through the getBacklight interface, if the return value of int getBacklight(int screenId) is any value within 0 - 8191, it can be considered that the instruction execution is successful, and the electronic device successfully obtains the brightness value of the display screen; if the return value of int getBacklight(int screenId) is -1, it can be considered that the instruction execution fails, and the electronic device does not successfully obtain the brightness value of the display screen.
[0142] It should be noted that the setting of the values of various parameters and their relevant meanings above is only to describe the method of the embodiment of the present application in more detail. The values of various parameters and their relevant meanings can be set by those skilled in the art according to the actual situation, and are not limited here.
[0143] In some other possible implementation manners, before sending a lock instruction to the processor or the backlight driver through the display service process, the method of the embodiment of the present application may further include:
[0144] In response to the power-on of the electronic device or in response to a start instruction for the test process, start the test process;
[0145] When the processor has completed initialization, based on the processor, initialize the test process, and determine the process identifier corresponding to the test process as the target process identifier;
[0146] When the processor has not completed initialization, based on the display interface call and initialize the test process, and determine the process identifier corresponding to the test process as the target process identifier.
[0147] Among them, the test process can be understood as the above-mentioned display service process. Optionally, the target process identifier helps the backlight driver or the processor to subsequently determine whether the process for issuing the brightness adjustment instruction is the test process, so as to ensure that the screen test can be carried out correctly and orderly. Further, the method of the embodiment of the present application can initialize the test process based on multiple ways, which helps to ensure that the subsequent test work can be carried out normally and smoothly.
[0148] Exemplarily, please refer to Figure 3 , Figure 3 which is a schematic flowchart of a method for determining a target process identifier provided by an embodiment of the present application. As Figure 3 shown, in response to the power-on of the electronic device, or in response to a start instruction for the display service process, the electronic device can start the display service process. Further, the electronic device will select different initialization paths for the display service process based on the initialization status of the underlying nodes. Among them, "whether the underlying nodes are initialized" can be understood as "whether the relevant nodes or components of the processor (such as the Snapdragon Engine, abbreviated as SDE) are initialized". Exemplarily, when the initialization of the underlying nodes is completed, the electronic device can initialize the display service process based on the processor; when the initialization of the underlying nodes is not completed, the electronic device can initialize the display service process based on the display interface call.
[0149] Furthermore, after the initialization of the display service process is completed, save the process identifier of the display service process. Furthermore, the processor (such as SDE) can determine the process identifier corresponding to the display service process as the target process identifier, which helps the processor to determine whether the process for issuing the brightness adjustment instruction is the display service process when the electronic device is in the test state, so as to ensure that the screen test can be carried out correctly and orderly.
[0150] In some other possible implementation manners, the method of the embodiment of the present application may further include:
[0151] When the electronic device is in the test state, receive a brightness adjustment instruction sent by the first process, and the brightness adjustment instruction may include a target brightness value;
[0152] When the first process identifier corresponding to the first process meets a preset condition, determine that the first process is the test process, and adjust the brightness value of the display screen to the target brightness value;
[0153] When the first process identifier does not meet the preset condition, save the target brightness value to a preset memory area.
[0154] Optionally, the above preset condition may be that the first process identifier is the same as the target process identifier. Optionally, different first processes correspond to different process identifiers, and the processor needs to perform corresponding operations based on the identifier of the first process. Exemplarily, if the first process identifier is the same as the target process identifier, it can be determined that the first process is a test process (or a display service process), and the processor can adjust the brightness value of the display screen to the brightness value corresponding to the brightness adjustment instruction; if the first process identifier is different from the target process identifier, it can be considered that the first process is not a test process (or a display service process), and the processor can save the brightness value corresponding to the brightness adjustment instruction to a preset memory area.
[0155] Exemplarily, please refer to Figure 4 , Figure 4 which is a schematic diagram of a scenario where an electronic device according to an embodiment of the present application responds to a brightness adjustment instruction. As Figure 4 shown, for the electronic device 100, before the processor or the backlight driver receives the lock instruction issued by the display service process (which can be understood as when the electronic device 100 is not in the test state), if the processor or the backlight driver receives a first brightness adjustment instruction, regardless of whether the first brightness adjustment instruction is issued by the display service process or by other application programs and their related processes, the processor can control the backlight driver to adjust the brightness value of the display to the brightness value corresponding to the first brightness adjustment instruction (such as Figure 4 the brightness value 3210 shown in). Optionally, after the processor or the backlight driver receives the lock instruction issued by the display service process (which can be understood as when the electronic device 100 is in the test state), if the processor or the backlight driver receives a second brightness adjustment instruction issued by the display service process, the processor can control the backlight driver to adjust the brightness value of the display to the brightness value corresponding to the second brightness adjustment instruction (such as Figure 4 the brightness value 3345 shown in); if the processor or the backlight driver receives a third brightness adjustment instruction issued by a process corresponding to a video application (assuming that the process corresponding to the video application is not a test process), the processor can save the brightness value corresponding to the third brightness adjustment instruction (such as Figure 4 the brightness value 3260 shown in) to a preset memory area. It should be noted that the above example of a non-test process is a process corresponding to a video application, which does not mean that non-test processes only include processes corresponding to video applications, and should not constitute a limitation to the present application. Non-test processes can be set by those skilled in the art according to actual situations, and the present application does not make any restrictions on this.
[0156] It can be seen that the processor can select different response methods based on the process identifier of the first process, which helps to ensure the smooth completion of relevant tests for the electronic device. Specifically, when the electronic device is in the test state, the processor can adjust the brightness value of the display screen based on the brightness adjustment instruction issued by the test process, and save the target brightness value corresponding to the brightness adjustment instruction sent by the non-test process to a preset memory area, which helps to adjust the brightness value of the display screen in a timely manner based on the target brightness value corresponding to the brightness adjustment instruction sent by the non-test process after the screen test is completed, ensuring that the display screen can normally respond to control instructions (such as brightness adjustment instructions) corresponding to other non-test application programs and their application processes in the electronic device.
[0157] Optionally, when the first process identifier does not meet the preset conditions, saving the target brightness value to the preset memory area may include:
[0158] When the first process identifier does not meet the preset conditions, replace the first brightness value in the preset memory area with the target brightness value.
[0159] Exemplarily, when receiving a locking instruction issued by the display service process, the brightness value read by the processor from the display screen is 3210, then the first brightness value can be determined to be 3210. The processor can cache the first brightness value to the preset memory area and control the electronic device to enter the test state. Further, if during the test state of the electronic device, the processor or the backlight driver receives a brightness adjustment instruction (assuming the target brightness value corresponding to this brightness adjustment instruction is 3325) issued by a non-test process (such as the process corresponding to a video application), then it is necessary to replace the first brightness value cached in the preset memory area with the target brightness value corresponding to the brightness adjustment instruction (it can be understood that replace the brightness value 3210 cached in the preset memory area with the brightness value 3325, that is, the currently cached brightness value in the preset memory area is 3325). It can be seen that by implementing the method provided in the above embodiments, it helps to ensure the timeliness of the brightness value stored in the preset memory area, enabling the electronic device (or it can be understood as the display screen) to correctly respond to control instructions (such as brightness adjustment instructions) of various application programs and their application processes in the electronic device.
[0160] Optionally, when the first process is a test process (which can be understood as the process corresponding to the MMI test component, the RT test component, and the microprobe module issuing control instructions, such as Figure 2 the display service process in Figure 2When the brightness control instruction sent by the first process is executed, the transmission path of the brightness control instruction sent by the first process can be "first process → display management service → surface deliverer component → hardware mixed renderer → backlight driver → processor driver".
[0161] Optionally, the first process may also represent the execution process of a script file, wherein, with the help of the script file, the electronic device may perform tasks such as automation, system maintenance, and application installation. For example, Figure 2 As shown in , when the first process is the execution process of executing the script file, the transmission path of the brightness control instruction can be "first process→backlight drive→processor drive".
[0162] In some other possible implementations, the method of the embodiment of the present application may also include:
[0163] Receive the unlocking instruction sent by the test process;
[0164] Release the test state of the electronic device based on the unlocking instruction;
[0165] Receive the read instruction sent by the test process;
[0166] Based on the read instruction, the second brightness value is read from the preset memory area, and the brightness value of the display screen is adjusted to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
[0167] For example, see Figure 5 , Figure 5 is a schematic diagram of a brightness control scenario provided by an embodiment of the present application. For example Figure 5As shown, in response to the locking instruction, the processor can save the first brightness value corresponding to the display screen to the preset memory area, and control the electronic device to enter the test state. Optionally, if no non-test process issues a brightness adjustment instruction during the test state of the electronic device, then in response to the unlocking instruction sent by the display service process, the processor can read the second brightness value (here it can be understood as the above-mentioned first brightness value) from the preset memory area, and adjust the display brightness of the display screen to the second brightness value, and release the test state of the electronic device. Optionally, if a non-test process (such as a process corresponding to a video application) issues a brightness adjustment instruction to the processor or backlight driver during the test state of the electronic device, the processor does not need to adjust the brightness value of the display screen based on the brightness adjustment instruction (it can be understood that the brightness adjustment instruction of the non-test process is not successfully issued to the display screen, or the brightness adjustment instruction of the non-test process fails to be issued). Further, the processor needs to replace the first brightness value in the preset memory area with the target brightness value corresponding to the brightness adjustment instruction issued by the above-mentioned non-test process. Furthermore, in response to the unlock instruction sent by the display service process, the processor can read the second brightness value (which can be understood as the target brightness value corresponding to the brightness adjustment instruction issued by the non-test process) from the preset memory area, and adjust the display brightness of the display screen to the second brightness value, and release the test state of the electronic device.
[0168] For example, the brightness control instruction and the read instruction can be sent to the processor and / or the backlight driver via the brightness control interface (such as the setBacklight interface). The specific function form of the brightness control interface (such as the setBacklight interface) can be int setBacklight(boolean accuracy, int scence, intbacklight, int screenId). The corresponding meanings of the various parameters in the function can be found in Table 3:
[0169] Table 3
[0170]
[0171] As in Table 1, different values of the parameter screenId can be used to represent different screens. For the relevant meanings, please refer to the relevant descriptions in Table 1, which will not be elaborated here.
[0172] Optionally, different values of the parameter "accuracy" can be used to represent different ranges of brightness adjustment accuracy. Exemplarily, when the value of "accuracy" is "true", it can represent that the brightness adjustment accuracy of this instruction is high precision; when the value of "accuracy" is "true", it can represent that the brightness adjustment accuracy of this instruction is low precision. Exemplarily, when the brightness adjustment accuracy of this instruction is high precision, it can include two high-precision ranges: 0 - 4095 and 0 - 8191.
[0173] Optionally, different numerical values of the parameter "scence" can be used to represent the brightness upper limit of the display screen brightness adjustment. Exemplarily, when the value of "scence" is 0, it can represent that the brightness adjustment upper limit corresponding to this instruction is the standard brightness upper limit, which is set by technicians according to the actual situation and is not limited in the embodiments of this application; when the value of "scence" is 1 or 2, it can represent that the brightness adjustment upper limit corresponding to this instruction is the high brightness mode (High Brightness Mode, HBM), which can enable the display screen to display the brightness of its hardware upper limit; when the value of "scence" is -1, it can represent that the electronic device needs to restore the brightness value of the display screen to the previous non-production line backlight (for example, read the cached brightness value from the preset memory area and adjust the brightness value of the display screen to be the same as the cached brightness value); when the value of "scence" is 3, it can represent that this instruction has no brightness adjustment upper limit.
[0174] Optionally, different values of the parameter "backlight" can be used to represent whether to display the brightness value corresponding to the test instruction. Exemplarily, when the value of "backlight" is 0, it can represent that the electronic device needs to adjust the brightness value of the display screen to the target brightness value corresponding to this instruction; when the value of "backlight" is -1, it can represent that the electronic device needs to restore the brightness value of the display screen to the previous non-production line backlight (for example, read the cached brightness value from the preset memory area and adjust the brightness value of the display screen to be the same as the cached brightness value).
[0175] Optionally, after the electronic device issues a brightness adjustment instruction (or a read instruction) through the setBacklight interface, if the return value of int setBacklight(boolean accuracy, int scence, int backlight, int screenId) is 0, it can be considered that the instruction is successfully executed this time, and the electronic device successfully adjusts the brightness value of the display screen (or successfully reads the brightness value of the corresponding screen); if the return value of int setBacklight(boolean accuracy, int scence, int backlight, int screenId) is other non-zero values, it can be considered that the instruction execution fails this time, and the electronic device does not successfully adjust the brightness value of the display screen (or does not successfully read the brightness value of the corresponding screen).
[0176] It should be noted that the setting of the values of various parameters and their related meanings above is only to describe the method of the embodiment of the present application in more detail. The values of various parameters and their related meanings can be set by those skilled in the art according to the actual situation, and are not limited herein.
[0177] In some other possible implementation manners, when the electronic device is in the test state, the method of the embodiment of the present application may further include:
[0178] If an application crashes, the test state of the electronic device is released after receiving the screen-off instruction, and the screen-off instruction is used to turn off the backlight of the display screen;
[0179] After receiving the wake-up instruction, the brightness value of the display screen is adjusted to the brightness value corresponding to the wake-up instruction based on the wake-up instruction.
[0180] Among them, the application crash APPCRASH refers to the phenomenon that the application suddenly stops responding or is forced to close during operation. The reasons for the application crash may include insufficient memory, software conflicts, network problems, version incompatibility, program errors, and device compatibility problems.
[0181] Exemplarily, if the electronic device has an application crash during the test state, it will cause the unlock instruction of the display service process (or the test process) to be unable to be successfully sent to the processor (or it can be understood that the electronic device cannot release the test state), resulting in the electronic device (or the processor) being unable to respond to the relevant control instructions of each application (such as the brightness adjustment instruction for the display screen). Exemplarily, please refer to Figure 6 , Figure 6 is a schematic diagram of a scenario for releasing the test state of the electronic device provided by the embodiment of the present application. As Figure 6As shown, if APPCRASH occurs in the electronic device while it is in the test state, the processor (or backlight driver) cannot respond to the brightness control instruction of the test process (or display service process). Therefore, after APPCRASH occurs in the electronic device, the display screen cannot normally display the corresponding brightness value of the brightness control instruction issued by the test process (or display service process). Furthermore, since APPCRASH occurs in the electronic device, the processor (or backlight startup) cannot normally respond to the unlock instruction of the test process (or display service process), which makes the electronic device unable to release the test state, making the electronic device unable to respond to the relevant control instructions of various applications (such as brightness control instructions for the display screen, screen off instructions, and wake-up instructions).
[0182] It can be seen that the method of the embodiment of the present application normalizes the control interfaces corresponding to each screen test, which helps to simplify the control logic of various tests and also helps to avoid screen response failures caused by too many control command issuing entities. Furthermore, the normalized control interface also helps to reduce the maintenance cost of the production line test software, and when a test failure occurs in the production line test, the normalized control interface and simplified control logic also help to shorten the time for testers to locate the fault and improve the efficiency of troubleshooting. Furthermore, the normalized control interface can adapt to various chip components, which helps to improve the universality of the method of the embodiment of the present application, thereby further improving the efficiency of production line testing.
[0183] Optionally, in order to ensure that the electronic device can operate normally, in response to the above-mentioned situation of "the electronic device crashes when the electronic device is in the test state", the method of the embodiment of the present application can use the screen-off command to release the test state of the electronic device. Furthermore, after the test state of the electronic device is released by using the screen-off command, the method of the embodiment of the present application can also adjust the brightness value of the display screen based on the wake-up command. For example, see Figure 7 , Figure 7 is another schematic diagram of a scenario for releasing the electronic device from the test state provided by an embodiment of the present application. Figure 7 As shown, in response to the PMS screen-off instruction, the processor can release the test state of the electronic device based on the screen-off instruction, thereby ensuring that the processor (or backlight driver) can subsequently correctly respond to the brightness control instructions issued by various applications. It can be understood that in an embodiment of the present application, if the electronic device encounters an APPCRASH situation, the screen-off instruction can be used to clear the lock flag in the lock instruction. For example, the screen-off instruction can change the value of the parameter enable in the function shown in Table 1 from true to false, thereby achieving the effect of releasing the test state of the electronic device, so that the processor (or backlight driver) can subsequently respond normally to the control instructions of various applications for the display screen (such as brightness control instructions, wake-up instructions, etc.). Furthermore, after releasing the test state of the electronic device, if the processor (or backlight driver) receives a wake-up instruction (or brightness control instruction) sent by the application (or PMS), the brightness value of the display screen can be adjusted to the brightness value corresponding to the wake-up instruction (or brightness control instruction).
[0184] It can be seen that by implementing the method provided in the above embodiment, when an application crashes, the electronic device can release the test state of the electronic device by responding to the screen-off command, ensuring that the electronic device or display screen can subsequently respond normally to the control commands (such as brightness control commands) of various applications and their application processes in the electronic device.
[0185] Please see Figure 8 , Figure 8 is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. Figure 8 As shown in FIG. 1 , the electronic device 100 may include: a display screen 107 and a processor 101;
[0186] The processor 101 may be used to receive a brightness control instruction sent by a first process when the electronic device is in a test state, where the brightness control instruction may include a target brightness value;
[0187] The processor 101 may also be configured to determine that the first process is a test process and adjust the brightness value of the display screen 107 to a target brightness value when the first process identifier corresponding to the first process meets a preset condition;
[0188] The processor 101 may also be used to save the target brightness value to a preset memory area when the first process identifier does not meet a preset condition.
[0189] In some possible implementations, the preset condition is that the first process identifier is the same as the target process identifier.
[0190] In some other possible implementations, the electronic device may further include:
[0191] The processor 101 may also be used to start the test process in response to the electronic device being turned on, or in response to a start instruction for the test process;
[0192] The processor 101 may also be used to initialize a test process based on the processor 101 when the processor 101 has completed initialization, and determine the process identifier corresponding to the test process as the target process identifier.
[0193] In some other possible implementations, the electronic device may further include:
[0194] The processor 101 may also be used to call and initialize the test process based on the display interface when the processor 101 has not completed initialization, and determine the process identifier corresponding to the test process as the target process identifier.
[0195] In some other possible implementations, the electronic device may further include:
[0196] The processor 101 may also be used to receive a locking instruction sent by the test process;
[0197] The processor 101 may also be used to control the electronic device to enter a test state based on the locking instruction.
[0198] In some other possible implementations, the electronic device may further include:
[0199] The processor 101 may also be used to obtain the first brightness value currently corresponding to the display screen 107 in response to the locking instruction, and save the first brightness value in a preset memory area.
[0200] In some other possible implementations, the electronic device may further include:
[0201] The processor 101 may also be used to replace the first brightness value in the preset memory area with the target brightness value when the first process identifier does not meet the preset condition.
[0202] In some other possible implementations, the electronic device may further include:
[0203] The processor 101 may also be used to receive an unlocking instruction sent by the test process;
[0204] The processor 101 may also be used to release the test state of the electronic device based on the unlock instruction;
[0205] The processor 101 may also be used to receive a read instruction sent by the test process;
[0206] The processor 101 may also be used to read a second brightness value from a preset memory area based on a read instruction, and adjust the brightness value of the display screen 107 to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
[0207] In some other possible implementations, the electronic device may further include:
[0208] The processor 101 may also be used to release the test state of the electronic device after receiving a screen-off instruction if an application crashes, and the screen-off instruction is used to turn off the backlight of the display screen 107;
[0209] The processor 101 may also be used to adjust the brightness value of the display screen 107 to the brightness value corresponding to the wake-up instruction based on the wake-up instruction after receiving the wake-up instruction.
[0210] For further information, see Figure 9 , Figure 9 is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. Figure 9 As shown, the composition architecture of the electronic device 100 in the embodiment of the present application can be divided into six layers, from top to bottom, they are application layer (Application), application framework layer (Android Framework), system runtime layer (NATIVE), hardware abstraction layer (Hardware Abstraction Layer), kernel layer (Linux Kernel) and hardware layer (Hardware).
[0211] Among them, the application layer may include production applications or components for production line testing, such as MMI test components (or applications) corresponding to screen testing, RT test components (or applications) and working components (or applications) corresponding to microneedle modules. Furthermore, the application layer may also include third-party applications and setting applications corresponding to the operating system of the electronic device 100. Optionally, both the third-party application and the setting application can send brightness control instructions to the processor (or backlight startup) to control the brightness value of the display screen of the electronic device 100.
[0212] Optionally, the application framework layer may include a Power Management Service (PMS) and a Display Management Service (DMS). Among them, the PMS can provide a series of interfaces for applications upward, such as keeping the system awake in an audio scenario, waking up the phone screen in a message notification, etc.; the PMS can also make decisions on the power management strategy of the hardware layer downward, control the standby state of the device, and manage the states of hardware devices such as the display screen, backlight, proximity sensor, light sensor, etc. Moreover, the DMS can be called by applications through a series of interfaces to obtain screen information, monitor changes in the display connection status, etc. Among them, the main functions of the DMS include: managing the connection and disconnection of all display devices (such as the screen and external display devices), handling display-related events (such as screen rotation, resolution adjustment, display mode switching, etc.), querying and setting the status and attributes of display devices, coordinating the allocation and release of display resources among multiple applications, and providing system services related to display (such as screenshot, screen recording, etc.).
[0213] Optionally, the system runtime library layer may include a Surface Buffer (Surface), which can be used to manage and display the content of windows. Among them, Surface is a handle to the native buffer managed by the screen compositor. Through it, direct access to the native buffer can be achieved, and this buffer is used to save the pixel data of the current window. In Android, each window corresponds to a Surface, and any View is drawn on the Surface. Among them, in a window, a View usually refers to a part of the user interface, including windows, menus, buttons, and other elements that interact with users. It represents a rectangular area on the screen, responsible for displaying content and responding to user operations within the area.
[0214] Optionally, the hardware abstraction layer may include a Hardware Display (Hwdisplay), a Hardware Layer Composer (HWC), and a Sensor Hal. Among them, the role of HWDisplay in the Android system is to abstract the hardware interface of the display device, enabling upper-layer applications and system services to access and control the display device through a unified interface without having to concern themselves with the specific hardware details. Moreover, HWDisplay is a key component in the Android system. It provides a set of APIs for controlling the initialization, configuration, screen resolution, refresh rate, rotation, etc. of the display device. Further, HWC is responsible for the composition of layers in the Android system, thereby optimizing the display effect and performance. Even further, Sensor Hal is a key component connecting the sensor framework and the underlying hardware in the Android system. By providing a unified interface, it simplifies the access of applications to sensor data, improving development efficiency and system scalability.
[0215] Optionally, the kernel layer may include a processor driver (such as Snapdragon Engine Driver, SDEDriver), a display screen component driver (Lcdkit Driver), and a sensor driver (Sensor Driver). Among them, SDEDriver acts as a bridge between the operating system and other hardware. It ensures that the operating system can correctly identify, configure, and manage the processor (such as SDE), thereby achieving higher performance and stability. In addition, SDE Driver can also provide additional functions and features, such as optimizing power consumption management and providing additional interfaces. Further, Lcdkit may include necessary hardware and software components such as a display screen, a driver IC, a connector, etc., and Lcdkit Driver can be used to respond to control instructions from the processor or other applications to control the display screen to present the corresponding display effect. Even further, Sensor Driver can provide a signal interface and a driver circuit for the sensor, enabling the signal of the sensor to be recognized and processed by a Digital Signal Processor (DSP) or a Microcontroller Unit (MCU). Among them, through the sensor driver circuit, the output signal of the sensor can be converted into an electrical signal that can be processed by the processor, thereby achieving real-time data acquisition and processing.
[0216] Optionally, the hardware layer may include a Data Processing Unit (DPU), a current-driven Organic Light-Emitting Diode (OLED), and a Sensor. Among them, the DPU is a processor specifically designed to handle data-centric workloads, mainly applied to network, storage, and security operations in data centers. Further, the OLED is a current-driven organic light-emitting device, which emits light through the injection and recombination of carriers, and its light emission intensity is proportional to the injected current. Even further, the sensor can convert non-electrical physical quantities into electrical signals for the transmission, processing, storage, display, recording, and control of information.
[0217] Even further, please refer to Figure 10 , Figure 10 which is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application.
[0218] The electronic device 100 may include a processor 101, a memory 102, a wireless communication module 103, an antenna 103A, a power switch 104, a sensor module 105, a camera 106, a display screen 107, etc. Among them, the sensor module 105 may include an ambient light sensor 105A, an image sensor 105B, etc. Among them, the wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above-mentioned multiple parts can transmit data through a bus.
[0219] The processor 101 may include one or more processing units. For example, the processor 101 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0220] The memory 102 can be used to store computer-executable program code, and the executable program code can include instructions. The processor 101 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the memory 102. The memory 102 can include a program storage area and a data storage area. In a specific implementation, the memory 102 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more disk storage devices, flash memory devices or other non-volatile solid-state storage devices.
[0221] The wireless communication function of the electronic device 100 can be implemented by the antenna 103A, the wireless communication module 103, the modulation and demodulation processor, the baseband processor, etc.
[0222] The antenna 103A can be used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas.
[0223] The wireless communication module 103 can provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc.
[0224] The electronic device 100 can implement the shooting function through the ISP, the camera 106, the video codec, the GPU, the display screen 107, the application processor, etc.
[0225] The electronic device 100 can implement the display function through the GPU, the display screen 107, the application processor, etc. The GPU is a microprocessor for image processing, connecting the display screen 107 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 101 can include one or more GPUs, which execute program instructions to generate or change the display information.
[0226] The display screen 107 is used to display images, videos, etc. The display screen 107 includes a display panel. In some embodiments, the electronic device 100 can include 1 or N display screens 107, where N is a positive integer greater than 1.
[0227] The structure illustrated in the embodiments of the present application does not specifically limit the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figures, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figures may be implemented in hardware, software, or a combination of software and hardware.
[0228] In the embodiments of the present application:
[0229] Any one or more of the wireless communication module 103, the sensor module 105, the camera 106, etc. can be used to detect the current environmental characteristics of the electronic device 100.
[0230] The display screen 107 is used to display the user interface provided by the aforementioned electronic device 100, such as a shooting interface or an album interface. The user interface displayed on the display screen 107 can refer to the UI embodiments described above.
[0231] For the operations performed by each component in the electronic device 100, reference can specifically be made to the relevant descriptions in the method embodiments described above.
[0232] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present application, taking the mobile operating system with a layered architecture as an example, the software structure of the electronic device 100 is exemplarily described.
[0233] Further, please refer to Figure 11 , Figure 11 which is a software structure block diagram provided by the embodiments of the present application. As Figure 11 shown, the layered architecture divides the software into several layers, each layer having a clear role and division of labor, and the layers can communicate through software interfaces.
[0234] In some embodiments, the system of the electronic device 100 can be divided into five layers, from top to bottom, namely the application layer, the application framework layer, the system runtime library layer, the hardware abstraction layer (HAL), and the kernel layer. The descriptions of the above layers are as follows:
[0235] The application layer may include a series of application packages. Exemplarily, the application packages in the application layer may include applications such as a camera, a gallery, a calendar, a call, a map, a navigation, a browser, a video, music, and a short message.
[0236] The application framework layer can provide application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer may include some predefined functions.
[0237] Exemplarily, the application framework layer may include an activity manager, a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and an accelerated graphics port (AGP), etc. Among them:
[0238] The activity manager can be used to manage the life cycles of various applications and the general navigation back function.
[0239] The window manager can be used to manage window programs. Exemplarily, the window manager can obtain the display screen size of the electronic device 100, lock the screen, capture the screen, and determine whether there is a status bar, etc.
[0240] The content provider can be used to store and obtain data, and enable these data to be accessible by applications, so that different applications can access or share data. Exemplarily, the above data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, and phone books, etc.
[0241] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures.
[0242] The telephony manager is used to provide the communication function of the electronic device 100, such as the management of call states (including answering calls, hanging up calls, etc.).
[0243] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0244] The notification manager enables an application to display notification information in the status bar. It can be used to convey informative messages, which can automatically disappear after a short stay without user interaction. Exemplarily, the notification manager can be used to inform that a download is complete, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as a notification of a background running application, or a notification that appears in the form of a dialogue window on the display screen. For example, it can prompt text information in the status bar, emit a prompt tone, vibrate the electronic device, blink the indicator light, etc.
[0245] The AGP in the application framework layer can be used to improve the rendering performance of the graphics card, such as providing more cache capacity to the graphics card to achieve faster image processing speed.
[0246] The system runtime library layer can include system libraries and Android Runtime. Among them:
[0247] Android Runtime includes core libraries and a virtual machine. Android Runtime is responsible for the scheduling and management of the Android system. Among them, the core libraries contain two parts: one part is the functional functions that the Java language needs to call, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0248] The system libraries can be understood as the support of the application framework and are an important link connecting the application framework layer and the kernel layer. The system layer can include multiple functional modules, such as it can include a surface manager, media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as: SGL), etc. Among them:
[0249] The surface manager can be used to manage the display subsystem. For example, when the electronic device 100 executes multiple applications, it is responsible for managing the interaction between the display and access operations. The surface manager can also be used to provide the fusion of 2D and 3D layers for multiple applications.
[0250] The media libraries can support the playback and recording of multiple common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as it can be MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0251] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.
[0252] The 2D graphics engine can be understood as a graphics engine for 2D drawing.
[0253] The hardware abstraction layer provides standard interfaces, such as the HAL interface definition language (HIDL) interface or the Android interface definition language (AIDL) interface.
[0254] The kernel layer can be understood as an abstraction layer between hardware and software. The kernel layer can include system services such as security, memory management, process management, power management, network protocol management, and driver management. Among them, the kernel layer can include drivers. Exemplarily, the drivers can include a display driver, a camera driver, an audio driver, and a sensor driver, etc. Optionally, the kernel layer can also be referred to as the Android kernel or the kernel program. Exemplarily, the hardware layer of the electronic device 100 can include a touch panel (TP), a liquid crystal display (LCD), etc.
[0255] In some embodiments, the kernel layer can be understood as the kernel state, and the other four layers (i.e., the application layer, the application framework layer, the system runtime library layer, and the HAL) can be understood as the user state.
[0256] It can be understood that there are various applications in the application layer that have video recording and / or playing functions. Exemplarily, such as the camera has a video recording function, and applications such as the gallery, navigation, and browser can all have video playing functions. Further, based on the differences in the duration, resolution, and shooting parameters of the video, etc., they will all affect the video recording and / or playing. Among them, the above shooting parameters can be the aperture value, shutter speed, sensitivity, exposure, focal length, and depth of field, etc.
[0257] Exemplarily, the relevant parameters for video recording and / or playing supported by various applications can be stored in the sensor binary file (sensor bin), and this sensor bin file can be stored in the external storage, such as a disk or a hard disk. When the user uses a specific application for video recording and / or playing, the application can read the relevant parameters for video recording and / or playing into the memory, so as to enable the user to use the application normally and ensure the user experience.
[0258] It should be understood that each step in the above method embodiments can be completed by the integrated logic circuit of the hardware in the processor or the instructions in the form of software. The method steps disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware processor, or executed and completed by the combination of the hardware and software modules in the processor.
[0259] The present application also provides an electronic device, which may include: a memory and a processor. Among them, the memory can be used to store computer programs; the processor can be used to call the computer programs in the memory, so that the electronic device executes the methods executed on the electronic device side in any of the above embodiments.
[0260] The present application also provides a chip system, and the chip system includes at least one processor for implementing the functions involved in the electronic device side in any of the above embodiments.
[0261] In some possible designs, the chip system further includes a memory, and the memory is used to store program instructions and data, and the memory is located inside or outside the processor.
[0262] The chip system can be composed of chips or can include chips and other discrete devices.
[0263] Optionally, the processor in the chip system can be one or more. The processor can be implemented by hardware or by software. When implemented by hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented by software, the processor can be a general-purpose processor that realizes by reading the software code stored in the memory.
[0264] Optionally, the memory in the chip system can also be one or more. The memory can be integrated with the processor or can be separately arranged from the processor, and the embodiments of the present application do not limit this. Exemplarily, the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip or can be separately arranged on different chips, and the embodiments of the present application do not specifically limit the type of the memory and the setting manner of the memory and the processor.
[0265] Exemplarily, the chip system may be a field programmable gate array (FPGA), may be an application specific integrated circuit (ASIC), may also be a system on chip (SoC), may also be a central processor unit (CPU), may also be a network processor (NP), may also be a digital signal processor (DSP), may also be a micro controller unit (MCU), may also be a programmable logic device (PLD), or other integrated chips.
[0266] The present application also provides a computer program product, which includes: a computer program (which may also be referred to as code or instruction). When the computer program is run, it causes the computer to execute the method performed on the electronic device side in any of the above embodiments.
[0267] The present application also provides a computer-readable storage medium, which stores a computer program (which may also be referred to as code or instruction). When the computer program is run, it causes the computer to execute the method performed on the electronic device side in any of the above embodiments.
[0268] As used in the above embodiments, depending on the context, the term "when..." may be interpreted to mean "if...", or "after...", or "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if detecting (the stated condition or event)" may be interpreted to mean "if determining...", or "in response to determining...", or "when detecting (the stated condition or event)", or "in response to detecting (the stated condition or event)".
[0269] The various embodiments of the present application can be combined arbitrarily to achieve different technical effects.
[0270] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk (SSD)), etc.
[0271] Those of ordinary skill in the art can understand that all or part of the processes in the above embodiments of the method can be completed by instructing relevant hardware with a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The foregoing storage medium includes: various media such as ROM or random access memory RAM, magnetic disk, or optical disc that can store program codes.
[0272] In summary, the above descriptions are only embodiments of the technical solutions of this application and are not intended to limit the protection scope of this application. Any modifications, equivalent replacements, improvements, etc. made according to the disclosure of this application shall be included within the protection scope of this application.
Claims
1. A screen testing method for controlling brightness, characterized in that: Applied to an electronic device, the electronic device includes a display screen, and the method includes: When the electronic device is in a test state, receiving a brightness control instruction sent by a first process, the brightness control instruction including a target brightness value; When the first process identifier corresponding to the first process meets a preset condition, determining that the first process is a test process, and adjusting the brightness value of the display screen to the target brightness value; If the first process identifier does not satisfy the preset condition, saving the target brightness value to a preset memory area; The method further comprises: Receiving a locking instruction sent by the test process; In response to the locking instruction, obtaining a first brightness value currently corresponding to the display screen, and saving the first brightness value in the preset memory area; The method further comprises: Receiving an unlocking instruction sent by the test process; releasing the test state of the electronic device based on the unlock instruction; Receiving a read instruction sent by the test process; Based on the read instruction, a second brightness value is read from the preset memory area, and the brightness value of the display screen is adjusted to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
2. The method according to claim 1, characterized in that The preset condition is that the first process identifier is the same as the target process identifier.
3. The method according to claim 2, characterized in that The electronic device also includes a processor; Before receiving the brightness control instruction sent by the first process when the electronic device is in the test state, the method further includes: In response to the electronic device being powered on, or in response to a start instruction for the test process, starting the test process; When the processor has completed initialization, the test process is initialized based on the processor, and a process identifier corresponding to the test process is determined as the target process identifier.
4. The method according to claim 3, characterized in that: The method further comprises: In the case that the processor has not completed initialization, the test process is called and initialized based on a display interface, and a process identifier corresponding to the test process is determined as the target process identifier.
5. The method according to claim 3 or 4, characterized in that: After initializing the test process, the method further includes: In response to the locking instruction, the locking instruction controls the electronic device to enter the testing state.
6. The method according to claim 5, characterized in that The step of saving the target brightness value to a preset memory area when the first process identifier does not satisfy the preset condition includes: When the first process identifier does not satisfy the preset condition, the first brightness value in the preset memory area is replaced by the target brightness value.
7. The method according to claim 6, characterized in that When the electronic device is in a testing state, the method further includes: If the application crashes, the test state of the electronic device is released after receiving a screen-off instruction, wherein the screen-off instruction is used to turn off the backlight of the display screen; After receiving the wake-up instruction, the brightness value of the display screen is adjusted to the brightness value corresponding to the wake-up instruction based on the wake-up instruction.
8. An electronic device, characterized in that: The electronic device comprises a display screen and a processor; The processor is configured to receive a brightness control instruction sent by a first process when the electronic device is in a test state, wherein the brightness control instruction includes a target brightness value; The processor is further configured to determine that the first process is a test process and adjust the brightness value of the display screen to the target brightness value when the first process identifier corresponding to the first process meets a preset condition; The processor is further configured to save the target brightness value to a preset memory area when the first process identifier does not satisfy the preset condition; The processor is further configured to receive a locking instruction sent by the test process; The processor is further configured to obtain, in response to the locking instruction, a first brightness value currently corresponding to the display screen, and save the first brightness value in the preset memory area; The processor is further configured to receive an unlock instruction sent by the test process; The processor is further configured to release the test state of the electronic device based on the unlock instruction; The processor is further configured to receive a read instruction sent by the test process; The processor is further configured to read a second brightness value from the preset memory area based on the read instruction, and adjust the brightness value of the display screen to the second brightness value, where the second brightness value is the first brightness value or the target brightness value.
9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions so that the method according to any one of claims 1 to 7 is executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Display brightness adjusting method and device, electronic equipment and computer readable storage medium
CN114170976A
Display method, terminal equipment and computer readable storage medium
CN118363671A