mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 20:24:19 +00:00
Merge "power.stats: Use PowerStats HAL v1.0 in cuttlefish"
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.power.stats@1.0-service",
|
||||
name: "android.hardware.power.stats@1.0-service.mock",
|
||||
relative_install_path: "hw",
|
||||
init_rc: ["android.hardware.power.stats@1.0-service.rc"],
|
||||
srcs: ["service.cpp", "PowerStats.cpp"],
|
||||
@@ -31,4 +31,5 @@ cc_binary {
|
||||
"android.hardware.power.stats@1.0",
|
||||
],
|
||||
vendor: true,
|
||||
vintf_fragments: ["android.hardware.power.stats@1.0-service-mock.xml"],
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.power.stats@1.0-service-mock"
|
||||
|
||||
#include "PowerStats.h"
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.power.stats</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IPowerStats</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
@@ -1,4 +1,5 @@
|
||||
service vendor.power.stats-hal-1-0 /vendor/bin/hw/android.hardware.power.stats@1.0-service
|
||||
service vendor.power.stats-hal-1-0-mock /vendor/bin/hw/android.hardware.power.stats@1.0-service.mock
|
||||
interface android.hardware.power.stats@1.0::IPowerStats default
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.power.stats@1.0-service"
|
||||
#define LOG_TAG "android.hardware.power.stats@1.0-service-mock"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
@@ -82,7 +82,7 @@ class DefaultStateResidencyDataProvider : public IStateResidencyDataProvider {
|
||||
};
|
||||
|
||||
int main(int /* argc */, char** /* argv */) {
|
||||
ALOGI("power.stats service 1.0 is starting.");
|
||||
ALOGI("power.stats service 1.0 mock is starting.");
|
||||
|
||||
PowerStats* service = new PowerStats();
|
||||
if (service == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user