Power Management
Introduction
The power management subsystem provides the following functionalities:
- Rebooting the device
- Managing running locks
- Querying the power status
- Obtaining and reporting the charging and battery status
- Turning on/off the device screen and adjusting the screen brightness
Figure 1 Power management subsystem architecture
Directory Structure
/base/powermgr
├── battery_manager # Battery manager
│ ├── hdi # Hardware Driver Interfaces (HDIs)
│ ├── interfaces # APIs
│ ├── sa_profile # SA profile
│ ├── services # Services
│ └── utils # Utilities
├── display_manager # Display manager
│ ├── interfaces # APIs
│ └── sa_profile # SA profile
│ └── services # Services
│ └── utils # Utilities
├── powermgr_lite # Lite power manager
│ ├── interfaces # APIs
│ └── services # Services
└── power_manager # Power manager
├── interfaces # APIs
├── sa_profile # SA profile
└── services # Services
└── utils # Utilities
Usage
You can use the APIs provided by the power management subsystem to create and release a running lock, obtain battery information, adjust the screen brightness, reboot a device, and power off a device.
Repositories Involved
Power Management subsystem
powermgr_battery_manager
powermgr_power_manager
powermgr_display_manager