power-libperfmgr: adapt and rebrand for hardware/samsung
authorJesse Chan <jc@lineageos.org>
Sat, 13 Jun 2020 03:22:14 +0000 (11:22 +0800)
committerJesse Chan <jc@lineageos.org>
Sat, 27 Jun 2020 17:41:01 +0000 (01:41 +0800)
Change-Id: I8aa9a712ac7cbc6085928f7cdb9e6ada8ed5e3fe

hidl/power-libperfmgr/Android.bp
hidl/power-libperfmgr/InteractionHandler.cpp
hidl/power-libperfmgr/Power.cpp
hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel-libperfmgr.rc [deleted file]
hidl/power-libperfmgr/android.hardware.power@1.3-service.pixel.xml [deleted file]
hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung-libperfmgr.rc [new file with mode: 0644]
hidl/power-libperfmgr/android.hardware.power@1.3-service.samsung.xml [new file with mode: 0644]
hidl/power-libperfmgr/display-helper.cpp
hidl/power-libperfmgr/service.cpp

index 7874d10b0add37dc6f79a723c6b4d018d7bbff0a..e13140d37be034b703b9268f81546b263665cbbd 100644 (file)
 // 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: [
index da6a9173811a57a52f2caa69eb6b04f8b945937c..74bdd69661442b0f173e4f319764d987febbba44 100644 (file)
@@ -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 <fcntl.h>
index f199bfb2df542f37fce882fa9ccab75e310642ad..a0c130808e9dda5609b1981edbca6e722bdc1422 100644 (file)
@@ -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 <android-base/file.h>
 #include <android-base/logging.h>
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 (file)
index 6179f6e..0000000
+++ /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 (file)
index e52398c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<manifest version="1.0" type="device">
-     <hal format="hidl">
-        <name>android.hardware.power</name>
-        <transport>hwbinder</transport>
-        <version>1.3</version>
-        <interface>
-            <name>IPower</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-</manifest>
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 (file)
index 0000000..f24fb2b
--- /dev/null
@@ -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 (file)
index 0000000..e52398c
--- /dev/null
@@ -0,0 +1,11 @@
+<manifest version="1.0" type="device">
+     <hal format="hidl">
+        <name>android.hardware.power</name>
+        <transport>hwbinder</transport>
+        <version>1.3</version>
+        <interface>
+            <name>IPower</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+</manifest>
index 2369c63122e8231c1e708b6a273aab133af093bd..76154bce15901e6899de481d36d1bb11b1abb757 100644 (file)
@@ -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 <dlfcn.h>
 #include <errno.h>
index 7bcc9078f0d7bb6e161ccf48d439275d1b715690..e3347746658af8b087b45c9a6c4464f2e022922e 100644 (file)
@@ -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 <android/log.h>
 #include <hidl/HidlTransportSupport.h>
@@ -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<IPower> service = new Power();
     if (service == nullptr) {