Screen test method for controlling brightness, electronic equipment and related medium

Through the process identifier determination whether it is the test process, uniformly manage the brightness control, solve the problem of inconsistent test control logic in existing technologies, and improve the efficiency and accuracy of screen testing.

CN119377027AActive Publication Date: 2025-01-28HONOR DEVICE CO LTD

Patent Information

Application Number
CN202411832763.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-01-28
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

In the process of screen testing, electronic devices need to provide different test control interfaces for different test projects, resulting in a large operating burden and inconsistent test control logic of different test projects, which is prone to instruction response failures, affecting the progress of testing.

Method used

By determining whether the process identifier meets the preset conditions, determine whether the process is the test process, and perform the brightness adjustment or save the brightness value according to this to uniformly manage the brightness control to avoid controlling logic conflicts.

Benefits of technology

Simplify the screen test process, avoid controlling logic conflicts, ensure the normal and orderly progress of the screen testing, and improve the test efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377027A_ABST
    Figure CN119377027A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a screen test method for controlling brightness, electronic equipment and a related medium, and the method comprises the steps: receiving a brightness control instruction sent by a first process when the electronic equipment is in a test state, and the brightness control instruction comprises a target brightness value; under the condition that the first process identifier corresponding to the first process meets a preset condition, determining the first process as a test process, and adjusting the brightness value of the display screen to a target brightness value; and under the condition that the first process identifier does not meet the preset condition, storing the target brightness value to a preset memory area. By implementing the method provided by the embodiment of the invention, the brightness value of the display screen can be adjusted to the target brightness value corresponding to the brightness regulation and control instruction based on the brightness regulation and control instruction sent by the test process, so that the electronic equipment is helped to avoid a screen response fault caused by excessive control instruction issuing subjects during a screen test period; and the screen test can be normally and orderly carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a screen testing method for controlling brightness, an electronic device, and related media. Background Art

[0002] At present, screen tests for electronic devices include human-machine interface tests, aging tests, and tests using microneedle modules. These tests can better test the display performance and touch performance of electronic device displays. Among them, the display performance of the display screen may include the resolution, color reproduction, brightness balance, etc. of the display screen, and the touch performance may include the touch sensitivity, touch accuracy, and multi-touch of the display screen.

[0003] During the screen test process, the electronic device needs to provide different test control interfaces for different test items, which makes the operation burden of the electronic device heavy. In addition, the test control logic corresponding to different test items is also different, which makes it easy for the electronic device to have command response failures caused by test control logic conflicts during the test, thereby affecting the progress of the screen test. Therefore, how to optimize the display screen test process is a problem that technicians in this field need to solve urgently. Summary of the invention

[0004] In a first aspect, the present application provides a screen testing method for controlling brightness, an electronic device, and related media. The method is applied to an electronic device, and the electronic device may include a display screen. The method may include: When the electronic device is in a test state, receiving a brightness control instruction sent by the first process, where the brightness control instruction may include 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 a target brightness value; When the first process identifier does not satisfy the preset condition, the target brightness value is saved in a preset memory area.

[0005] By implementing the method provided in the first aspect, the electronic device can determine whether the first process is a test process by judging whether the first process representation corresponding to the first process meets the preset conditions. Specifically, when the first process identifier meets the preset conditions, the first process is determined to be 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 conditions, the target brightness value is saved to the 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, and ensure that the display screen can normally respond to control instructions (such as brightness adjustment instructions, etc.) corresponding to other applications and their application processes in the electronic device. Among them, the electronic device in the prior art needs to provide different calling interfaces for different screen test items, and the test control logic corresponding to different screen test items is also different, which is easy to cause control logic conflicts in the actual test process, thus resulting in poor screen test results and low screen test efficiency. The difference is that 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 control instruction based on the brightness control instruction sent by the test process. This helps the electronic device not to be affected by the brightness control instructions issued by other non-test application processes during the screen test, ensuring that the display screen backlight can normally respond to the brightness control instructions of the test process, so that the screen test can be carried out normally and orderly.

[0006] In some embodiments of the method provided in the first aspect, the preset condition is that the first process identifier is the same as the target process identifier.

[0007] In implementing the method provided in the first aspect, in some other embodiments, the electronic device may further include a processor; When the electronic device is in the test state, before receiving the brightness adjustment instruction sent by the first process, the method may further include: 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, a test process is initialized based on the processor, and a process identifier corresponding to the test process is determined as a target process identifier.

[0008] By implementing the method provided in the above embodiment, the electronic device can initialize the test process after turning on (or after receiving the start instruction of the test process of the test program). In particular, when the processor completes the 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 is helpful for subsequent determination of whether the first process is a test process, and ensures that the screen test can be carried out correctly and orderly.

[0009] Implementing the method provided in the first aspect, in some other embodiments, the method may further include: In the case that the processor has not completed initialization, the test process is called and initialized based on the display interface, and the process identifier corresponding to the test process is determined as the target process identifier.

[0010] By implementing the method provided in the above embodiment, 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 subsequently determine whether the first process is the test process and ensure that the screen test can be carried out correctly and orderly.

[0011] In some other embodiments of the method provided in the first aspect, after initializing the test process, the method may further include: Receive the locking instruction sent by the test process; The electronic device is controlled to enter a test state based on the locking instruction.

[0012] By implementing the method provided in the above embodiment, the electronic device can enter the test state after receiving the locking instruction sent by the test process, which helps to ensure that the screen test can be carried out correctly and orderly.

[0013] In some other embodiments of the method provided in the first aspect, before controlling the electronic device to enter the test state based on the locking instruction, the method may further include: In response to the locking instruction, a first brightness value currently corresponding to the display screen is acquired, and the first brightness value is stored in a preset memory area.

[0014] By implementing the method provided in the above embodiment, the electronic device will save the first brightness value currently displayed on the display screen in a preset memory area before entering the test state, which helps the electronic device to return to the normal state of presenting the display screen backlight after the test state is released.

[0015] 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: 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.

[0016] By implementing the method provided in the above embodiment, when the electronic device is in a test state, if a brightness adjustment instruction sent by a first process is received and the first process identifier does not meet the preset conditions, 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.

[0017] Implementing the method provided in the first aspect, in some other embodiments, the method may further include: Receive the unlocking instruction sent by the test process; Release the test state of the electronic device based on the unlock instruction; Receive the read instruction sent by the test process; Based on the read instruction, a second brightness value is read from a 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.

[0018] 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 of various applications and their application processes in the electronic device (such as brightness adjustment instructions).

[0019] In some other embodiments of the method provided in the first aspect, when the electronic device is in a test state, the method may further include: If the application crashes, the test state of the electronic device is released after receiving the screen-off command, and the screen-off command 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.

[0020] By implementing the method provided in the above embodiment, when an application crashes, the electronic device can respond to a 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 control commands (such as brightness adjustment commands) of various applications and their application processes in the electronic device.

[0021] In a second aspect, an embodiment of the present application provides an electronic device, which may include: a display screen and a processor; The processor may be configured to receive a brightness control instruction sent by the first process when the electronic device is in a test state, wherein the brightness control instruction may include a target brightness value; The processor may also be configured 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 a first process identifier corresponding to the first process satisfies a preset condition; The processor may also be configured to save the target brightness value to a preset memory area when the first process identifier does not satisfy a preset condition.

[0022] 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.

[0023] To implement the method provided in the second aspect, in some other embodiments, the electronic device may further include: The processor may also be configured to start the test process in response to the electronic device being powered on, or in response to a start instruction for the test process; The processor may also be used to initialize a test process based on the processor when the processor has completed initialization, and determine a process identifier corresponding to the test process as a target process identifier.

[0024] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: The processor can 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.

[0025] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: The processor may also be used to receive a locking instruction sent by the test process; The processor can also be used to control the electronic device to enter a test state based on the locking instruction.

[0026] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: The processor may also be configured to obtain a first brightness value currently corresponding to the display screen in response to a locking instruction, and save the first brightness value in a preset memory area.

[0027] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: The processor may also be configured to replace the first brightness value in the preset memory area with the target brightness value when the first process identifier does not satisfy a preset condition.

[0028] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: The processor may also be used to receive an unlocking instruction sent by the test process; The processor may also be used to release the electronic device from a test state based on the unlock instruction; The processor may also be used to receive a read instruction sent by the test process; The processor can 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.

[0029] In some other embodiments of implementing the method provided in the second aspect, the electronic device may further include: 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, the screen-off command being used to turn off the backlight of the display screen; The processor may also be configured 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.

[0030] 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.

[0031] In a fourth aspect, an embodiment of the present application provides a chip, comprising a logic circuit and an interface, wherein 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 of the first aspect is executed.

[0032] In a fifth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on an electronic device, execute the method described in the first aspect and any possible implementation manner of the first aspect.

[0033] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0034] It can be understood that the electronic devices provided in the second and third aspects, 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 screen test method for controlling brightness 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 screen test method for controlling brightness in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 This is a logic diagram of issuing instructions for a production line test provided in an embodiment of the present application; Figure 2 It is a flow chart of a screen testing method for controlling brightness provided in an embodiment of the present application; Figure 3 It is a flowchart of determining a target process identifier provided by an embodiment of the present application; Figure 4 This is a schematic diagram of a scenario in which an electronic device responds to a brightness control instruction provided by an embodiment of the present application; Figure 5 This is a schematic diagram of a brightness control scenario provided by an embodiment of the present application; Figure 6 It is a schematic diagram of a scenario for releasing an electronic device from a test state provided in an embodiment of the present application; Figure 7 This is another schematic diagram of a scenario for releasing an electronic device from a test state provided in an embodiment of the present application; Figure 8 It is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application; Fig. 9 It is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present application; Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application; Fig.11 It is a software structure block diagram provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] 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 used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear contrary indication in the context. 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 only a kind of association relationship describing the associated objects, indicating that there can be three relationships, 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.

[0038] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0039] The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language 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 that the user can recognize. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0040] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given: (1) Application layer, application framework layer, system runtime layer, hardware abstraction layer, and kernel layer The five layers in the Android system architecture are the application layer (Application), application framework layer (Android Framework), system runtime layer (NATIVE), hardware abstraction layer (Hardware Abstraction Layer) and kernel layer (Linux Kernel). Among them: 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.

[0041] The application framework layer is the foundation of Android application development. This layer is written in Java code and provides developers with the APIs they need to develop applications. Many core applications also use this layer to implement their core functions. This layer simplifies the reuse of components. Developers can directly use the components it provides to quickly develop applications, or they can implement 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, notification manager, etc.

[0042] The system runtime layer includes runtime libraries and Android Runtime (ART). The runtime library can include a collection of C / C++ libraries. Usually, Android application developers cannot call the runtime library directly, but need to call it 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 that multiple virtual machine instances can run in one system by running DEX files. DEX files are a bytecode format file designed specifically for Android, which 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.

[0043] The hardware abstraction layer encapsulates the underlying hardware driver and provides a general interface for calling the driver to the application framework layer. Manufacturers only need to implement the corresponding interface according to the specification and store it in a specific directory in the form of a shared library. The upper layer only needs to load this shared library and find the pointer to the device corresponding to the corresponding module. After obtaining the pointer to the entire device, it can operate the underlying hardware.

[0044] The kernel layer provides underlying drivers for various hardware of electronic devices (display driver, keyboard driver, Flash memory driver, camera driver, audio driver, Bluetooth driver, Wi-Fi driver, Binder IPC driver, power management (PowerManagement)). The kernel exists as an abstract layer between hardware and software, with powerful memory management and process management, permission-based security mode, and support for shared libraries. In the present application method, the operation process of the electronic device presenting the application startup animation to the user is mainly related to the display driver.

[0045] (2) Human-machine interface testing Man Machine Interface (MMI) test is used to test whether the hardware of some electronic devices is normal and whether the application (APP) can respond and control normally. Test items include button test, headphone plug-in and pull-out, SIM card plug-in and pull-out, display touch response, display color, bad pixels, motor vibration effect, etc.

[0046] Among them, MMI testing is divided into three situations, namely, MMI testing of large boards (main boards containing CPU, FLASH, etc.), MMI testing of small boards (auxiliary circuit boards such as buttons and RF fixation), and MMI testing of complete machines. Specifically, MMI testing of large boards and small boards refers to the testing of electronic devices that are not assembled into a complete machine, with wires connecting each unit (large board, small board, display screen). At this time, the electronic equipment is not assembled, so the large board and small board are visible. Furthermore, when testing the large board (small board), it can be considered that the small board (large board) that cooperates with the test is normal, and the large board (small board) samples to be tested need to be replaced one by one for testing. The difference is that the complete machine test is to assemble the entire electronic device for testing. At this time, the large board and small board are already inside the electronic device and are invisible.

[0047] (3) Aging test Aging test (Running Test, RT) is a test method that continuously runs and observes the product by simulating long-term use or environmental impact under certain conditions. Its purpose is to evaluate the performance, reliability and stability of the product during its actual service life, and to predict problems that may arise in the product after long-term use. Exemplarily, aging tests may include high temperature aging tests, low temperature aging tests, humidity aging tests, light aging tests, vibration aging tests, and chemical aging tests. Furthermore, aging tests for displays may also include brightness aging tests, color deviation tests, and response time tests, which help to comprehensively evaluate the working performance of the display.

[0048] (4) Microneedle module The microneedle module is used to test the reaction sensitivity, precision, touch accuracy and recognition separation of the display screen. At present, a large current shrapnel microneedle module is often used to test the display screen. Among them, the large current shrapnel microneedle module can pass a current of up to 50A during current transmission, with constant resistance and strong current-carrying capacity. It can establish a stable connection with the device under test while maintaining good conductive function. Furthermore, in a complex test environment, the head shape of the large current shrapnel microneedle module has a self-cleaning function design, which helps to prevent impurities or dust from entering the test connection, thereby ensuring the stability of the test.

[0049] (5) Process control symbol The process identifier (PID) is also often called the process identifier. It is the identity of each process running in the operating system. It can help the operating system distinguish and manage different processes and can also be used in various system calls and operations. There is a many-to-one relationship between the process identifier and the program. 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 it a unique identifier to identify the process.

[0050] (6) Power processing services and display management services The Power Manager Service (PMS) is the core service responsible for power management in the Android system. Its main functions include providing interfaces to application programs and making decisions on power management policies at the hardware layer. Among them, the main functions of PMS include: providing interfaces to the application program and making decisions on the hardware layer. Specifically, providing interfaces to the application program means that PMS provides a series of interfaces to the application program, such as keeping the system awake in audio scenarios and waking up the phone screen in message notifications; making decisions on the hardware layer means that PMS makes decisions on the power management policy of the hardware layer, controls the standby state of the device, and manages the status of hardware devices such as display screens, backlights, distance sensors, and light sensors.

[0051] Display Manager Service (DMS) is an important service in the Android system. It is mainly responsible for managing all display devices, including display screens, external display devices, and virtual display screens, and handling display-related events and requests. DMS is called by applications through a series of interfaces to obtain screen information, monitor display connection status changes, etc. Among them, the main functions of DMS include: managing all display devices (such as connection and disconnection of screens 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 between multiple applications, and providing display-related system services (such as screenshots, screen recording, etc.).

[0052] (7) View, Surface, SurfaceControl and SurfaceFlinger ‌‌In a window, 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 and is responsible for displaying content and responding to user operations within the area.

[0053] Surface‌ represents a screen buffer in Android development, which is used to manage and display the contents of a window. Surface is a handle to the native buffer managed by the screen compositor, through which you can directly access the native buffer, which 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. Simply put, Surface is the infrastructure for drawing graphics and images in Android.

[0054] SurfaceControl is a class in the Android system that is used to manage and control the creation, display, and destruction of Surface.

[0055] ‌Surface Flinger is a component in the Android system, which is mainly responsible for managing and synthesizing all visible content of the application interface to ensure smooth display and rendering of the user interface. The main functions of Surface Flinger include: buffer management, synthesizer, hardware acceleration, processing 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 synthesizer function means that Surface Flinger can synthesize different applications, system UI components, and other graphic layers into the final display frame, ensuring that each layer is superimposed in the correct order and transparency; the hardware acceleration function means that Surface Flinger can use hardware, such as the acceleration function of the graphics processing unit (GPU) to improve the graphics rendering performance and ensure the smoothness and responsiveness of the user interface; processing input events means that Surface Flinger can respond to the operation of touching the screen and pass the corresponding information of the operation to the correct application or system component; the screen management function means that Surface Flinger can handle instructions such as screen rotation, resolution adjustment, and display output, and realize the corresponding screen display effect.

[0056] See also Figure 1 , Figure 1 A logic diagram of issuing instructions for a production line test provided in an embodiment of the present application.

[0057] like Figure 1 As shown, human-machine interface test (MMI test), aging test (RT test) and microneedle module can be set up on the production line to perform screen test on electronic devices.

[0058] Specifically, the MMI test can be used to test the brightness of the display (such as Figure 1), under-screen ambient light calibration, picture display test, and light leakage test. Exemplarily, the electronic device can call the display service process (such as vendor.honor.hardware.hwdisplay.service process) of the HAL layer through a brightness setting interface (such as the setLcdBrightness interface) to control the backlight driver BacklightDriver, thereby performing a three-level brightness test for the display screen. Optionally, the electronic device can also call a sensor (such as an ambient light sensor, etc.) through an ambient light calibration interface (such as the setAmbientLightPara interface) to control the backlight driver BacklightDriver, thereby performing an 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 pass the backlight setting related parameters, and the DMS further passes the backlight setting related parameters according to the path of "display management service DMS→surface control component SurfaceControl→surface drawer component SurfaceFlinger→hardware compositing renderer (HWComposer, HWC)→backlight driver BacklightDriver", and finally realizes the control of BacklightDriver, so as to perform the picture display test for the display screen. Optionally, the electronic device can pass the light leakage test related parameters through the light leakage test interface (such as the Setting.System.putInt interface), wherein the light leakage test related parameters can be passed according to the path of "setting application (such as SettingAPP)→display management service DMS→surface control component SurfaceControl→surface drawer component SurfaceFlinger→hardware compositing renderer HWC→backlight driver BacklightDriver", so as to realize the light leakage test for the display screen.

[0059] Furthermore, the RT test can be used to perform a pure color image switching test and a white screen test on the display screen. Exemplarily, the electronic device can call the power processing service PMS and the display management service DMS in the Framework layer through the backlight setting interface setDisplayBackgroundBrightness to pass the backlight setting related parameters, and further the DMS passes the backlight setting related parameters according to the path of "display management service DMS→surface control component SurfaceControl→surface drawer component SurfaceFlinger→hardware hybrid renderer HWC→backlight driver BacklightDriver", and finally realizes the pure color image 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 pass the white screen setting related parameters according to the path of "surface control component SurfaceControl→surface drawer component SurfaceFlinger→hardware hybrid renderer HWC→backlight driver BacklightDriver", so as to realize the white screen test for the display screen.

[0060] Furthermore, the microneedle module can be used to perform image testing on the display screen. For example, the microneedle module calls the power management service PMS and the display management service DMS in the Framework layer through the backlight setting interface setDisplayBackgroundBrightness to pass the backlight setting related parameters, and the DMS further passes the backlight setting related parameters according to the path of "display management service DMS→surface control component SurfaceControl→surface drawing component SurfaceFlinger→hardware hybrid renderer HWC→backlight driver BacklightDriver", and finally realizes the image test of the display screen.

[0061] Optionally, other applications (such as other applications not related to screen testing) can also send brightness control instructions to the processor (or backlight driver). Figure 1 As shown, the path for other applications to send brightness control instructions can be "other applications → display management service DMS → surface control component SurfaceControl → surface drawer component SurfaceFlinger → hardware hybrid renderer HWC → backlight driver BacklightDriver", thereby achieving the effect of adjusting the brightness value of the display screen.

[0062] Optionally, a specific script file can also adjust the brightness value of the display screen through brightness control instructions. For example, Figure 1 As shown, the transmission path of the brightness control instruction of the script file can be "script file→backlight driver BacklightDriver".

[0063] It can be seen that Figure 1 Each test in the test corresponds to a different calling interface and control logic. In the actual test process, control logic conflicts are prone to occur, which may cause the backlight of the display to be unable to correctly respond to the control instructions corresponding to each test, resulting in poor test results, and thus unable to correctly test the performance of the display.

[0064] For example, when performing MMI testing 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 will be a darker screen first (which can be understood as a screen with a brightness value of 120 nits), and then the screen will become brighter after more than ten seconds (which can be understood as a screen with a brightness value of 400 nits), causing the test personnel to spend more time locating and solving the above abnormal problems, thereby affecting the efficiency of the screen test.

[0065] For example, when an electronic device is subjected to an aging test, if after the test instruction corresponding to the aging test (assuming the corresponding brightness value is 120 nits) is issued, the system issues a brightness adjustment instruction (assuming the corresponding brightness value is 400 nits), this will cause the test instruction to be overwritten by the brightness adjustment instruction issued by the system, causing the display screen to present a 400 nit picture. However, the excessive 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 failing the test. It can be seen that this fault can easily lead to a decrease in the accuracy of screen testing.

[0066] For example, when performing a screen test on an electronic device, it may be necessary to send the same brightness value to the display screen multiple times, and SurfaceFinger may filter out repeated backlight values, causing the display screen to fail to light up again after being turned off during the test, and thus the test is judged to have failed. It can be seen that this fault can easily lead to a decrease in the accuracy of screen testing.

[0067] In order to solve the above problems, the embodiment of the present application provides a screen test method for controlling brightness. The method can collect various tests into the same brightness control interface, and all test-related instructions are issued by the same test process, so as to realize the normalization of the test interface of various tests, which is helpful to simplify the control logic of various tests, prevent the control logic between various tests from conflicting, and also help to reduce the time for developers to follow the line and locate and analyze problems on the production line, thereby improving the efficiency of screen testing. Further, the method can also select different response modes based on the process identifiers of each process that issues the brightness control instruction. For example, when the process is determined to be a test process based on the process identifier, the backlight brightness of the display screen can be adjusted directly based on the brightness control instruction; when the process is determined not to be a test process based on the process identifier, the brightness value corresponding to the brightness control 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 control instruction of the non-test process from overwriting the brightness control instruction of the test process, and ensure that the screen test can be carried out normally and orderly.

[0068] See also Figure 2 , Figure 2 A schematic diagram of a screen testing method for controlling brightness provided in an embodiment of the present application. Figure 2 As shown, in an embodiment of the present application, the electronic device can directly send test control instructions corresponding to the MMI test, RT test and microneedle module test to the processor and / or backlight driver Backlight Driver through a display service process (such as the vendor.honor.hardware.hwdisplay.service process), thereby realizing the normalization of the screen test interface and helping to ensure that the screen test can be carried out correctly and orderly.

[0069] Optionally, the test control instructions corresponding to the MMI test, RT test and microneedle module test may include locking instructions, unlocking instructions, brightness control instructions, reading instructions and brightness acquisition instructions. Exemplarily, the locking instructions and unlocking instructions may be sent to the processor and / or the backlight driver Backlight Driver through the backlight locking / unlocking interface (such as the lockBacklight interface); the brightness control instructions and reading instructions may be sent to the processor and / or the backlight driver Backlight Driver through the brightness control interface (such as the setBacklight interface); the brightness acquisition instructions may be sent to the processor and / or the backlight driver Backlight Driver through the brightness acquisition interface (such as the getBacklight interface).

[0070] 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: Table 1

[0071] 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.

[0072] 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 locking 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 unlocking instruction, and the electronic device can release the test state in response to the instruction.

[0073] 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).

[0074] It should be noted that the above-mentioned settings of the numerical values ​​of various parameters and their related meanings are only for describing the embodiment method of the present application in more detail. The numerical values ​​of various parameters and their related meanings can be set by technical personnel according to actual conditions and are not limited here.

[0075] In some possible implementations, the method of the present application may include: Receive the locking instruction sent by the test process; The electronic device is controlled to enter a test state based on the locking instruction.

[0076] Exemplarily, after the test process (i.e., the above-mentioned display service process) completes initialization, in response to any test requirement of MMI test, RT test and microneedle module, the test process (such as vendor.honor.hardware.hwdisplay.service process) can send a lock instruction to the processor and / or backlight driver Backlight Driver through the lockBacklight interface, thereby putting the electronic device into a test state.

[0077] Optionally, when the electronic device is in a test state, the processor and / or the 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.

[0078] In some other possible implementations, the method of the embodiment of the present application may also include: In response to the locking instruction, a first brightness value currently corresponding to the display screen is acquired, and the first brightness value is stored in a preset memory area.

[0079] Exemplarily, when a lock instruction is received from a display service process, if the current brightness value of the display screen is 3210, the first brightness value can be determined as 3210 and saved to a preset memory area, which helps the electronic device to return to the normal display backlight state after the test state is released.

[0080] 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: Table 2

[0081] As in Table 1, different values ​​of the parameter screenId can be used to represent different screens. The relevant meanings can be found in the relevant descriptions in Table 1 and will not be elaborated here.

[0082] Optionally, for the brightness accuracy range of 0-8191, after the electronic device sends a brightness control instruction (or reads an instruction) through the getBacklight interface, if the return value of int getBacklight(int screenId) is any one of 0-4095, it can be considered that the execution of this instruction is successful, and the electronic device successfully obtains the brightness value of the display screen; if the return value of intgetBacklight(int screenId) is -1, it can be considered that the execution of this instruction failed, and the electronic device did not successfully obtain the brightness value of the display screen. Optionally, for the brightness accuracy range of 0-8191, after the electronic device sends a brightness control instruction (or reads an instruction) through the getBacklight interface, if the return value of int getBacklight(intscreenId) is any one of 0-8191, it can be considered that the execution of this instruction 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 execution of this instruction failed, and the electronic device did not successfully obtain the brightness value of the display screen.

[0083] It should be noted that the above-mentioned settings of the numerical values ​​of various parameters and their related meanings are only for describing the embodiment method of the present application in more detail. The numerical values ​​of various parameters and their related meanings can be set by technical personnel according to actual conditions and are not limited here.

[0084] In some other possible implementations, before the lock instruction is sent to the processor or the backlight driver through the display service process, the method of the embodiment of the present application may further include: 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, initialize the test process based on the processor, and determine the process identifier corresponding to the test process as the target process identifier; In the case that the processor has not completed initialization, the test process is called and initialized based on the display interface, and the process identifier corresponding to the test process is determined as the target process identifier.

[0085] 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 processor to subsequently determine whether the process that issues the brightness control instruction is a test process, thereby ensuring that the screen test can be carried out correctly and orderly. Furthermore, the method of the embodiment of the present application can initialize the test process based on multiple ways, which helps to ensure that subsequent test work can be carried out normally and smoothly.

[0086] For example, see Figure 3 , Figure 3 A schematic diagram of a process for determining a target process identifier provided by an embodiment of the present application. Figure 3 As shown, in response to the electronic device being powered on, or in response to a startup instruction for a display service process, the electronic device can start a display service process. Furthermore, the electronic device will select different display service process initialization paths based on the initialization status of the underlying nodes. Among them, "whether the underlying nodes have completed initialization" can be understood as "whether the nodes or components related to the processor (such as the Snapdragon processor Snapdragon Engine, referred to as SDE) have completed initialization." 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 call and initialize the display service process based on the display interface.

[0087] Furthermore, after the display service process is initialized, the process identifier of the display service process is saved. 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 that issues the brightness adjustment instruction is the display service process when the electronic device is in a test state, thereby ensuring that the screen test can be carried out correctly and orderly.

[0088] In some other possible implementations, the method of the embodiment of the present application may also include: When the electronic device is in a test state, receiving a brightness control instruction sent by the first process, where the brightness control instruction may include 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 a target brightness value; When the first process identifier does not satisfy the preset condition, the target brightness value is saved in a preset memory area.

[0089] 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 for 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 control 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 control instruction to a preset memory area.

[0090] For example, see Figure 4 , Figure 4 A schematic diagram of a scenario in which an electronic device responds to a brightness control instruction provided in an embodiment of the present application. Figure 4 As shown, for the electronic device 100, before the processor or the backlight driver receives the locking 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 the first brightness adjustment instruction, no matter whether the first brightness adjustment instruction is issued by the display service process or 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 Optionally, after the processor or the backlight driver receives the lock instruction sent 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 the second brightness adjustment instruction sent 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 3345 shown in ); if the processor or the backlight driver receives a third brightness adjustment instruction issued by a process corresponding to the video application (assuming that the process corresponding to the video application is not a test process), the processor may set the brightness value corresponding to the third brightness adjustment instruction (such as Figure 4 It should be noted that the above examples of non-test processes are processes corresponding to video applications, which does not mean that non-test processes only include processes corresponding to video applications, and should not be a limitation on this application. Non-test processes can be set by technicians according to actual conditions, and this application does not impose any restrictions on this.

[0091] 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 that the electronic device successfully completes the relevant tests. Specifically, when the electronic device is in a test state, the processor can adjust the brightness value of the display screen based on the brightness control instruction issued by the test process, and save the target brightness value corresponding to the brightness control instruction issued by the non-test process to the 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 control instruction issued 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 control instructions, etc.) corresponding to other non-test applications and their application processes in the electronic device.

[0092] Optionally, when the first process identifier does not meet a preset condition, saving the target brightness value to a preset memory area may include: 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.

[0093] Exemplarily, when receiving the lock instruction issued by the display service process, the brightness value read by the processor from the display screen is 3210, then it can be determined that the first brightness value is 3210, and 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 the processor or backlight driver receives a brightness control instruction issued by a non-test process (such as a process corresponding to a video application) during the test state of the electronic device (assuming that the target brightness value corresponding to the brightness control instruction is 3325), it is necessary to replace the first brightness value cached in the preset memory area with the target brightness value corresponding to the brightness control instruction (it can be understood that the brightness value 3210 cached in the preset memory area is replaced with the brightness value 3325, that is, the brightness value currently cached in the preset memory area is 3325). It can be seen that by implementing the method provided in the above embodiment, it is helpful 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 control instructions) of each application and its application process in the electronic device.

[0094] Optionally, when the first process is a test process (which can be understood as a process in which the MMI test component, the RT test component, and the microneedle module issue control instructions accordingly, such as Figure 2 ), the transmission path of the brightness control instruction sent by the first process can be "first process→backlight driver→processor driver"; when the first process is an application process other than the test process (such as Figure 2 When the brightness control instruction sent by the first process is executed (other applications in the process), 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".

[0095] 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 can perform tasks such as automation, system maintenance, and application installation. Figure 2 As shown, 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".

[0096] In some other possible implementations, the method of the embodiment of the present application may also include: Receive the unlocking instruction sent by the test process; Release the test state of the electronic device based on the unlock instruction; Receive the read instruction sent by the test process; Based on the read instruction, a second brightness value is read from a 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.

[0097] For example, see Figure 5 , Figure 5 A schematic diagram of a brightness control scenario provided in an embodiment of the present application. Figure 5 As 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 unlocking instruction sent by the display service process, the processor can read a second brightness value (which can be understood here as the target brightness value corresponding to the brightness control instruction issued by the non-test process) from a 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.

[0098] Exemplarily, 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: Table 3

[0099] As in Table 1, different values ​​of the parameter screenId can be used to represent different screens. The relevant meanings can be found in the relevant descriptions in Table 1 and will not be elaborated here.

[0100] Optionally, different values ​​of the parameter accuracy can be used to represent different brightness adjustment accuracy ranges. Exemplarily, when the value of accuracy is true, it can indicate that the brightness adjustment accuracy of the instruction is high precision; when the value of accuracy is true, it can indicate that the brightness adjustment accuracy of the instruction is low precision. Exemplarily, when the brightness adjustment accuracy of the instruction is high precision, two high precision ranges can be included: 0-4095 and 0-8191.

[0101] Optionally, different values ​​of the parameter scence can be used to indicate the upper limit of the brightness adjustment of the display screen. Exemplarily, when the value of scence is 0, it can indicate that the upper limit of the brightness adjustment corresponding to the instruction is the standard upper limit of brightness, which is set by the technician according to the actual situation and is not limited by the embodiment of the present application; when the value of scence is 1 or 2, it can indicate that the upper limit of the brightness adjustment corresponding to the 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 indicate that the electronic device needs to restore the brightness value of the display screen to the previous non-production line backlight (such as reading the cached brightness value from the preset memory area, and adjusting the brightness value of the display screen to the same as the cached brightness value); when the value of scence is 3, it can indicate that the instruction has no upper limit of brightness adjustment.

[0102] Optionally, different values ​​of the parameter backlight can be used to indicate whether to display the brightness value corresponding to the test instruction. For example, when the value of backlight is 0, it can indicate that the electronic device needs to adjust the brightness value of the display screen to the target brightness value corresponding to the instruction; when the value of backlight is -1, it can indicate that the electronic device needs to restore the brightness value of the display screen to the previous non-production line backlight (e.g., read the cached brightness value from the preset memory area, and adjust the brightness value of the display screen to the same as the cached brightness value).

[0103] Optionally, after the electronic device sends a brightness control instruction (or reads an instruction) through the setBacklight interface, if the return value of int setBacklight(boolean accuracy, int scence, int backlight, intscreenId) is 0, it can be considered that the execution of this instruction is successful, 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, intscence, int backlight, int screenId) is other non-0 values, it can be considered that the execution of this instruction failed, and the electronic device did not successfully adjust the brightness value of the display screen (or did not successfully read the brightness value of the corresponding screen).

[0104] It should be noted that the above-mentioned settings of the numerical values ​​of various parameters and their related meanings are only for describing the embodiment method of the present application in more detail. The numerical values ​​of various parameters and their related meanings can be set by technical personnel according to actual conditions and are not limited here.

[0105] In some other possible implementations, when the electronic device is in a testing state, the method of the embodiment of the present application may further include: If the application crashes, the test state of the electronic device is released after receiving the screen-off command, and the screen-off command 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.

[0106] Application crash refers to the phenomenon that an application suddenly stops responding or is forced to close during operation. The causes of application crashes may include insufficient memory, software conflicts, network problems, version incompatibility, program errors, and device compatibility issues.

[0107] For example, if an application crashes while the electronic device is in the test state, the unlocking instruction of the display service process (or test process) cannot be successfully sent to the processor (or it can be understood that the electronic device cannot be released from the test state), which causes the electronic device (or processor) to be unable to respond to the relevant control instructions of each application (such as the brightness adjustment instruction for the display screen). For example, see Figure 6 , Figure 6 A schematic diagram of a scenario for releasing an electronic device from a test state provided in an embodiment of the present application. 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 unlocking 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).

[0108] 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.

[0109] Optionally, in order to ensure that the electronic device can operate normally, in response to the above-mentioned situation of "the application crashes during the test state of the electronic device", 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 using the screen-off command to release the test state of the electronic device, 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 A schematic diagram of another scenario for releasing the test state of an electronic device provided in an embodiment of the present application. Figure 7As 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 each application. It can be understood that in an embodiment of the present application, if the electronic device has 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 each application 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).

[0110] 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 a screen-off command, thereby ensuring that the electronic device or display screen can subsequently respond normally to control commands (such as brightness adjustment commands) of various applications and their application processes in the electronic device.

[0111] See also Figure 8 , Figure 8 The following is a schematic diagram of the composition of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 100 may include: a display screen 107 and a processor 101; The processor 101 may be configured 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; 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; The processor 101 may also be configured to save the target brightness value to a preset memory area when the first process identifier does not satisfy a preset condition.

[0112] In some possible implementations, the preset condition is that the first process identifier is the same as the target process identifier.

[0113] In some other possible implementations, the electronic device may further include: The processor 101 may also be configured 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; 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 a process identifier corresponding to the test process as a target process identifier.

[0114] In some other possible implementations, the electronic device may further include: The processor 101 may also be configured to call and initialize a test process based on a display interface when the processor 101 has not completed initialization, and to determine a process identifier corresponding to the test process as a target process identifier.

[0115] In some other possible implementations, the electronic device may further include: The processor 101 may also be used to receive a locking instruction sent by the test process; The processor 101 may also be used to control the electronic device to enter a test state based on the locking instruction.

[0116] In some other possible implementations, the electronic device may further include: The processor 101 may also be configured to obtain a first brightness value currently corresponding to the display screen 107 in response to a locking instruction, and store the first brightness value in a preset memory area.

[0117] In some other possible implementations, the electronic device may further include: The processor 101 may also be configured to replace the first brightness value in the preset memory area with the target brightness value when the first process identifier does not satisfy a preset condition.

[0118] In some other possible implementations, the electronic device may further include: The processor 101 may also be used to receive an unlock instruction sent by the test process; The processor 101 may also be used to release the test state of the electronic device based on the unlock instruction; The processor 101 may also be used to receive a read instruction sent by the test process; The processor 101 can 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.

[0119] In some other possible implementations, the electronic device may further include: 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; The processor 101 may also be configured to adjust the brightness value of the display screen 107 to a brightness value corresponding to the wake-up instruction based on the wake-up instruction after receiving the wake-up instruction.

[0120] For further information, see Fig. 9 , Fig. 9 The following is a schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. Fig. 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, namely, the application layer (Application), the application framework layer (Android Framework), the system runtime layer (NATIVE), the hardware abstraction layer (Hardware Abstraction Layer), the kernel layer (Linux Kernel) and the hardware layer (Hardware).

[0121] 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.

[0122] Optionally, the application framework layer may include a power management service PMS and a display management service DMS. Among them, PMS can provide a series of interfaces to applications upward, such as keeping the system awake in audio scenarios, waking up the mobile phone screen in message notifications, etc.; 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 status of hardware devices such as display screens, backlights, distance sensors, and light sensors. More importantly, DMS can be called by applications through a series of interfaces to obtain screen information, monitor changes in display connection status, 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 between multiple applications, and providing display-related system services (such as screenshots, screen recording, etc.).

[0123] Optionally, the system runtime layer may include a surface buffer Surface, which can be used to manage and display the contents of the window. Surface is a handle to a native buffer managed by the screen compositor, through which the native buffer can be directly accessed. 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. In the 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, which is responsible for displaying content and responding to user operations in the area.

[0124] Optionally, the hardware abstraction layer may include a hardware display (Hardware Display, Hwdisplay), a hardware layer composer (HWC), and a sensor control interface (Sensor Hal). Among them, the role of HWDisplay in the Android system is to abstract the hardware interface of the display device, so that upper-level applications and system services can access and control the display device through a unified interface without having to care about the specific hardware details. More importantly, HWDisplay is a key component in the Android system, which 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 synthesis of layers in the Android system, thereby optimizing the display effect and performance. Furthermore, Sensor Hal is a key component in the Android system that connects the sensor framework and the underlying hardware. By providing a unified interface, it simplifies the application's access to sensor data, improves development efficiency and system scalability.

[0125] Optionally, the kernel layer may include a processor driver (such as Snapdragon Engine Driver, SDEDriver), a display component driver (Lcdkit Driver), and a sensor driver (Sensor Driver). Among them, SDEDriver acts as a bridge between the operating system and other hardware, ensuring that the operating system can correctly identify, configure and manage the processor (such as SDE) to achieve higher performance and stability. In addition, SDE Driver can also provide additional functions and features, such as optimizing energy consumption management, providing additional interfaces, etc. Further, Lcdkit can include necessary hardware and software components such as display screens, driver ICs, connectors, etc., and Lcdkit Driver can be used to respond to control instructions from processors or other applications to control the display screen to present corresponding display effects. Furthermore, Sensor Driver can provide a signal interface and a driving circuit for the sensor, so that the sensor's signal can be recognized and processed by a digital signal processor (DigitalSignal Processor, DSP) or a microcontroller unit (Microcontroller Unit, MCU). Among them, through the sensor driving circuit, the output signal of the sensor can be converted into an electrical signal that can be processed by the processor, thereby realizing real-time data acquisition and processing.

[0126] Optionally, the hardware layer may include a data processing unit (DPU), a current-type organic light-emitting diode (OLED), and a sensor. Among them, the DPU is a processor specially designed to handle data-centric workloads, and is mainly used in network, storage, and security operations in data centers. Furthermore, the OLED is a current-type organic light-emitting device, which emits light through the injection and recombination of carriers, and its luminous intensity is proportional to the injected current. Furthermore, the sensor can convert non-electrical physical quantities into electrical signals to facilitate the transmission, processing, storage, display, recording, and control of information.

[0127] For further information, see Fig.10 , Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.

[0128] 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. The sensor module 105 may include an ambient light sensor 105A, an image sensor 105B, etc. The wireless communication module 103 may include a WLAN communication module, a Bluetooth communication module, etc. The above multiple parts may transmit data through a bus.

[0129] 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 processor (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. Different processing units may be independent devices or integrated into one or more processors.

[0130] The memory 102 may be used to store computer executable program codes, and the executable program codes may 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 may include a program storage area and a data storage area. In a specific implementation, the memory 102 may include a high-speed random access memory, and may 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.

[0131] The wireless communication function of the electronic device 100 can be implemented through the antenna 103A, the wireless communication module 103, the modem processor and the baseband processor.

[0132] Antenna 103A can be used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.

[0133] The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. for application in the electronic device 100.

[0134] The electronic device 100 can realize the shooting function through the ISP, the camera 106, the video codec, the GPU, the display screen 107 and the application processor.

[0135] The electronic device 100 can realize the display function through a GPU, a display screen 107, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 107 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information.

[0136] 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 may include 1 or N display screens 107, where N is a positive integer greater than 1.

[0137] The structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0138] In the embodiments of the present application: Any one or more of the wireless communication module 103 , the sensor module 105 , the camera 106 , etc. may be used to detect current environmental characteristics of the electronic device 100 .

[0139] The display screen 107 is used to display the user interface provided by the electronic device 100, such as a shooting interface or an album interface. The user interface displayed by the display screen 107 can refer to the UI embodiment described above.

[0140] For details of the operations performed by the various components in the electronic device 100, please refer to the relevant description of the above method embodiments.

[0141] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The present application embodiment takes a mobile operating system with a layered architecture as an example to exemplify the software structure of the electronic device 100.

[0142] For further information, see Fig.11 , Fig.11 This is a software structure diagram provided by the embodiment of the present application. Fig.11 The layered architecture shown divides the software into several layers. Each layer has a clear role and division of labor, and the layers can communicate through software interfaces.

[0143] 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 layer, the hardware abstraction layer (HAL) and the kernel layer. The description of each of the above layers is as follows: The application layer may include a series of application packages. For example, the application packages of the application layer may include applications such as camera, gallery, calendar, call, map, navigation, browser, video, music, and short message.

[0144] The application framework layer can provide an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer can include some predefined functions.

[0145] 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: The activity manager can be used to manage the individual application lifecycles as well as general navigation back functionality.

[0146] The window manager can be used to manage window programs. For example, 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.

[0147] Content providers can be used to store and retrieve data and make the data accessible to applications so that different applications can access or share data. For example, the data may include videos, images, audio, calls made and received, browsing history and bookmarks, and phone books.

[0148] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0149] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering a call, hanging up a call, etc.).

[0150] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, etc.

[0151] The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager can be used to notify download completion, 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 an application running in the background, or a notification that appears on the display screen in the form of a dialog window. For example, a text message is prompted in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0152] AGP in the application framework layer can be used to improve the rendering performance of the graphics card, such as providing the graphics card with more cache capacity to achieve faster image processing speed.

[0153] The system runtime layer can include system libraries and Android Runtime. Among them: The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. 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 object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0154] The system library can be understood as the support of the application framework, and is an important link between the application framework layer and the kernel layer. The system layer can include multiple functional modules, such as surface managers, media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), etc. Among them: 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 display and access operations. The surface manager can also be used to provide fusion of two-dimensional and three-dimensional layers for multiple applications.

[0155] The media library can support playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0156] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.

[0157] A two-dimensional graphics engine can be understood as a drawing engine for two-dimensional drawing.

[0158] The hardware abstraction layer provides standard interfaces, such as the HAL interface definition language (HIDL) interface or the Android interface definition language (AIDL) interface.

[0159] The kernel layer can be understood as an abstract layer between hardware and software. The kernel layer may include system services such as security, memory management, process management, power management, network protocol management, and driver management. Among them, the kernel layer may include drivers. Exemplarily, the drivers may include display drivers, camera drivers, audio drivers, and sensor drivers. Optionally, the kernel layer may also be called an Android kernel or kernel program. Exemplarily, the hardware layer of the electronic device 100 may include a touch panel (TP), a liquid crystal display (LCD), and the like.

[0160] In some embodiments, the kernel layer can be understood as kernel state, and the other four layers (ie, application layer, application framework layer, system runtime layer, and HAL) can be understood as user state.

[0161] It is understandable that multiple applications that may exist in the application layer have video recording and / or playback functions. For example, if a camera has a video recording function, applications such as gallery, navigation, and browser may have a video playback function. Furthermore, based on the length, resolution, and shooting parameters of the video, the recording and / or playback of the video may be affected. The shooting parameters may include aperture value, shutter speed, sensitivity, exposure, focal length, depth of field, and the like.

[0162] For example, the video recording and / or playback related parameters supported by various applications can be stored in a sensor binary file (sensor bin), and the sensor bin file can be stored in an external memory, such as a disk or a hard disk. When a user uses a specific application to record and / or play a video, the application can read the video recording and / or playback related parameters into the memory so that the user can use the application normally and ensure the user experience.

[0163] It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0164] The present application also provides an electronic device, which may include: a memory and a processor. The memory may be used to store a computer program; the processor may be used to call the computer program in the memory so that the electronic device executes the method executed by the electronic device side in any of the above embodiments.

[0165] The present application also provides a chip system, which includes at least one processor for implementing the functions involved in the electronic device side in any of the above embodiments.

[0166] In some possible designs, the chip system also includes a memory, which is used to store program instructions and data, and the memory is located inside or outside the processor.

[0167] The chip system may be composed of the chip, or may include the chip and other discrete devices.

[0168] Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0169] Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, the memory may be a non-transient processor, such as a read-only memory ROM, which may be integrated with the processor on the same chip or may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

[0170] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0171] The present application also provides a computer program product, which includes: a computer program (also referred to as code, or instruction), which, when executed, enables a computer to execute the method executed by the electronic device side in any of the above embodiments.

[0172] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program (also referred to as code or instruction). When the computer program is executed, the computer executes the method executed by the electronic device side in any of the above embodiments.

[0173] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0174] The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.

[0175] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. 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 data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0176] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0177] In short, the above is only an embodiment of the technical solution of this application, and is not intended to limit the protection scope of this application. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of this application shall be included in 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; When the first process identifier does not satisfy the preset condition, the target brightness value is saved in a preset memory area.

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: Receiving a locking instruction sent by the test process; The electronic device is controlled to enter the test state based on the locking instruction.

6. The method according to claim 5, characterized in that Before controlling the electronic device to enter the test state based on the locking instruction, the method further includes: In response to the locking instruction, a first brightness value currently corresponding to the display screen is acquired, and the first brightness value is saved in the preset memory area.

7. The method according to claim 6, 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.

8. The method according to claim 7, characterized in that 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.

9. The method according to claim 8, 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.

10. 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.

11. 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 9 is executed.

12. 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 9 is executed.

Citation Information

Patent Citations

  • Information processing method and electronic device

    CN103914233A

  • Display brightness adjusting method and device, electronic equipment and computer readable storage medium

    CN114170976A

  • Screen control method, electronic equipment, chip system and readable storage medium

    CN118262681A

  • Display method, terminal equipment and computer readable storage medium

    CN118363671A

Cited By

  • Mobile terminal multi-source backlight control method and device and storage medium

    CN120048224A

  • Mobile terminal multi-source backlight control method, device and storage medium

    CN120048224B