From: Jesse Chan Date: Sat, 13 Jun 2020 03:22:14 +0000 (+0800) Subject: power-libperfmgr: adapt and rebrand for hardware/samsung X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1e23cabb6c3e1ac93aeefc7469bcf9bea7c29cc;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung.git power-libperfmgr: adapt and rebrand for hardware/samsung Change-Id: I8aa9a712ac7cbc6085928f7cdb9e6ada8ed5e3fe --- diff --git a/hidl/power-libperfmgr/Android.bp b/hidl/power-libperfmgr/Android.bp index 7874d10..e13140d 100644 --- a/hidl/power-libperfmgr/Android.bp +++ b/hidl/power-libperfmgr/Android.bp @@ -14,16 +14,16 @@ // limitations under the License. cc_library_headers { - name: "pixel_power_headers", + name: "samsung_power_headers", vendor_available: true, export_include_dirs: ["."], } cc_binary { - name: "android.hardware.power@1.3-service.pixel-libperfmgr", + name: "android.hardware.power@1.3-service.samsung-libperfmgr", relative_install_path: "hw", - vintf_fragments: ["android.hardware.power@1.3-service.pixel.xml"], - init_rc: ["android.hardware.power@1.3-service.pixel-libperfmgr.rc"], + vintf_fragments: ["android.hardware.power@1.3-service.samsung.xml"], + init_rc: ["android.hardware.power@1.3-service.samsung-libperfmgr.rc"], srcs: ["service.cpp", "Power.cpp", "InteractionHandler.cpp", "display-helper.cpp"], cflags: [ diff --git a/hidl/power-libperfmgr/InteractionHandler.cpp b/hidl/power-libperfmgr/InteractionHandler.cpp index da6a917..74bdd69 100644 --- a/hidl/power-libperfmgr/InteractionHandler.cpp +++ b/hidl/power-libperfmgr/InteractionHandler.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr" +#define LOG_TAG "android.hardware.power@1.3-service.samsung-libperfmgr" #define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL) #include diff --git a/hidl/power-libperfmgr/Power.cpp b/hidl/power-libperfmgr/Power.cpp index f199bfb..a0c1308 100644 --- a/hidl/power-libperfmgr/Power.cpp +++ b/hidl/power-libperfmgr/Power.cpp @@ -15,7 +15,7 @@ */ #define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL) -#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr" +#define LOG_TAG "android.hardware.power@1.3-service.samsung-libperfmgr" #include #include diff --git a/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel-libperfmgr.rc b/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel-libperfmgr.rc deleted file mode 100644 index 6179f6e..0000000 --- a/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel-libperfmgr.rc +++ /dev/null @@ -1,26 +0,0 @@ -service vendor.power-hal-1-3 /vendor/bin/hw/android.hardware.power@1.3-service.pixel-libperfmgr - class hal - user root - group system - priority -20 - interface android.hardware.power@1.0::IPower default - interface android.hardware.power@1.1::IPower default - interface android.hardware.power@1.2::IPower default - interface android.hardware.power@1.3::IPower default - -# restart powerHAL when framework died -on property:init.svc.zygote=restarting && property:vendor.powerhal.state=* - setprop vendor.powerhal.state "" - setprop vendor.powerhal.audio "" - setprop vendor.powerhal.rendering "" - restart vendor.power-hal-1-3 - -# restart powerHAL when cameraHAL died -on property:init.svc.vendor.camera-provider-2-4=restarting && property:vendor.powerhal.state=CAMERA_STREAMING - setprop vendor.powerhal.state "" - restart vendor.power-hal-1-3 - -# restart powerHAL when audioHAL died -on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_LOW_LATENCY - setprop vendor.powerhal.audio "" - restart vendor.power-hal-1-3 diff --git a/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel.xml b/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel.xml deleted file mode 100644 index e52398c..0000000 --- a/hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - android.hardware.power - hwbinder - 1.3 - - IPower - default - - - diff --git a/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung-libperfmgr.rc b/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung-libperfmgr.rc new file mode 100644 index 0000000..f24fb2b --- /dev/null +++ b/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung-libperfmgr.rc @@ -0,0 +1,26 @@ +service vendor.power-hal-1-3 /vendor/bin/hw/android.hardware.power@1.3-service.samsung-libperfmgr + class hal + user root + group system + priority -20 + interface android.hardware.power@1.0::IPower default + interface android.hardware.power@1.1::IPower default + interface android.hardware.power@1.2::IPower default + interface android.hardware.power@1.3::IPower default + +# restart powerHAL when framework died +on property:init.svc.zygote=restarting && property:vendor.powerhal.state=* + setprop vendor.powerhal.state "" + setprop vendor.powerhal.audio "" + setprop vendor.powerhal.rendering "" + restart vendor.power-hal-1-3 + +# restart powerHAL when cameraHAL died +on property:init.svc.vendor.camera-provider-2-4=restarting && property:vendor.powerhal.state=CAMERA_STREAMING + setprop vendor.powerhal.state "" + restart vendor.power-hal-1-3 + +# restart powerHAL when audioHAL died +on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_LOW_LATENCY + setprop vendor.powerhal.audio "" + restart vendor.power-hal-1-3 diff --git a/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung.xml b/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung.xml new file mode 100644 index 0000000..e52398c --- /dev/null +++ b/hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung.xml @@ -0,0 +1,11 @@ + + + android.hardware.power + hwbinder + 1.3 + + IPower + default + + + diff --git a/hidl/power-libperfmgr/display-helper.cpp b/hidl/power-libperfmgr/display-helper.cpp index 2369c63..76154bc 100644 --- a/hidl/power-libperfmgr/display-helper.cpp +++ b/hidl/power-libperfmgr/display-helper.cpp @@ -15,7 +15,7 @@ */ #define LOG_NIDEBUG 0 -#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr" +#define LOG_TAG "android.hardware.power@1.3-service.samsung-libperfmgr" #include #include diff --git a/hidl/power-libperfmgr/service.cpp b/hidl/power-libperfmgr/service.cpp index 7bcc907..e334774 100644 --- a/hidl/power-libperfmgr/service.cpp +++ b/hidl/power-libperfmgr/service.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ -#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr" +#define LOG_TAG "android.hardware.power@1.3-service.samsung-libperfmgr" #include #include @@ -34,7 +34,7 @@ using android::hardware::power::V1_3::IPower; using android::hardware::power::V1_3::implementation::Power; int main(int /* argc */, char ** /* argv */) { - ALOGI("Power HAL Service 1.3 for Pixel is starting."); + ALOGI("Power HAL Service 1.3 for Samsung is starting."); android::sp service = new Power(); if (service == nullptr) {