hidl:thermal: Rebrand to Samsung
authorFrancescodario Cuzzocrea <bosconovic@gmail.com>
Wed, 15 Jul 2020 17:59:28 +0000 (19:59 +0200)
committerFrancescodario Cuzzocrea <bosconovic@gmail.com>
Thu, 23 Jul 2020 17:00:07 +0000 (19:00 +0200)
Change-Id: I9119f21538c99143a5d0ec810ec1a0a7b43cacc9

hidl/thermal/Android.bp
hidl/thermal/android.hardware.thermal@2.0-service.pixel.rc [deleted file]
hidl/thermal/android.hardware.thermal@2.0-service.pixel.xml [deleted file]
hidl/thermal/android.hardware.thermal@2.0-service.samsung.rc [new file with mode: 0644]
hidl/thermal/android.hardware.thermal@2.0-service.samsung.xml [new file with mode: 0644]
hidl/thermal/service.cpp
hidl/thermal/thermal-helper.cpp

index 60d1c7006b123ceb4d1d7c67abce0780d2173b0a..d3cc1fc026966c74f5280876522f2cb7bcd8c9e8 100644 (file)
@@ -1,13 +1,13 @@
 cc_binary {
-  name: "android.hardware.thermal@2.0-service.pixel",
+  name: "android.hardware.thermal@2.0-service.samsung",
   defaults: [
     "hidl_defaults",
   ],
   vendor: true,
   relative_install_path: "hw",
-  vintf_fragments: ["android.hardware.thermal@2.0-service.pixel.xml"],
+  vintf_fragments: ["android.hardware.thermal@2.0-service.samsung.xml"],
   init_rc: [
-    "android.hardware.thermal@2.0-service.pixel.rc",
+    "android.hardware.thermal@2.0-service.samsung.rc",
   ],
   srcs: [
     "service.cpp",
diff --git a/hidl/thermal/android.hardware.thermal@2.0-service.pixel.rc b/hidl/thermal/android.hardware.thermal@2.0-service.pixel.rc
deleted file mode 100644 (file)
index 27fc14a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.pixel
-    interface android.hardware.thermal@2.0::IThermal default
-    class hal
-    user system
-    group system
diff --git a/hidl/thermal/android.hardware.thermal@2.0-service.pixel.xml b/hidl/thermal/android.hardware.thermal@2.0-service.pixel.xml
deleted file mode 100644 (file)
index bcd6344..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<manifest version="1.0" type="device">
-    <hal format="hidl">
-        <name>android.hardware.thermal</name>
-        <transport>hwbinder</transport>
-        <version>1.0</version>
-        <version>2.0</version>
-        <interface>
-            <name>IThermal</name>
-            <instance>default</instance>
-        </interface>
-    </hal>
-</manifest>
diff --git a/hidl/thermal/android.hardware.thermal@2.0-service.samsung.rc b/hidl/thermal/android.hardware.thermal@2.0-service.samsung.rc
new file mode 100644 (file)
index 0000000..ddc9104
--- /dev/null
@@ -0,0 +1,5 @@
+service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.samsung
+    interface android.hardware.thermal@2.0::IThermal default
+    class hal
+    user system
+    group system
diff --git a/hidl/thermal/android.hardware.thermal@2.0-service.samsung.xml b/hidl/thermal/android.hardware.thermal@2.0-service.samsung.xml
new file mode 100644 (file)
index 0000000..bcd6344
--- /dev/null
@@ -0,0 +1,12 @@
+<manifest version="1.0" type="device">
+    <hal format="hidl">
+        <name>android.hardware.thermal</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <version>2.0</version>
+        <interface>
+            <name>IThermal</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+</manifest>
index 190269b73c613feaeee20f3ccb1ace548002cd0c..8c79920a3d2c5a9763a0ed8293bb5aa67ace2e9a 100644 (file)
@@ -29,7 +29,7 @@ using ::android::hardware::thermal::V2_0::IThermal;
 using ::android::hardware::thermal::V2_0::implementation::Thermal;
 
 static int shutdown() {
-    LOG(ERROR) << "Pixel Thermal HAL Service is shutting down.";
+    LOG(ERROR) << "Samsung Thermal HAL Service is shutting down.";
     return 1;
 }
 
@@ -37,7 +37,7 @@ int main(int /* argc */, char ** /* argv */) {
     status_t status;
     android::sp<IThermal> service = nullptr;
 
-    LOG(INFO) << "Pixel Thermal HAL Service 2.0 starting...";
+    LOG(INFO) << "Samsung Thermal HAL Service 2.0 starting...";
 
     service = new Thermal();
     if (service == nullptr) {
@@ -53,7 +53,7 @@ int main(int /* argc */, char ** /* argv */) {
         return shutdown();
     }
 
-    LOG(INFO) << "Pixel Thermal HAL Service 2.0 started successfully.";
+    LOG(INFO) << "Samsung Thermal HAL Service 2.0 started successfully.";
     joinRpcThreadpool();
     // We should not get past the joinRpcThreadpool().
     return shutdown();
index 732d1817c16c967e2d80efc2a23465b4d142d3b5..dff45c298b3ad86019e6b4a715f2e87413452dd9 100644 (file)
@@ -56,7 +56,8 @@ namespace {
 using android::base::StringPrintf;
 
 /*
- * Pixel don't offline CPU, so std::thread::hardware_concurrency(); should work.
+ * The phone don't offline CPU, so std::thread::hardware_concurrency(); should
+ * work.
  * However /sys/devices/system/cpu/present is preferred.
  * The file is expected to contain single text line with two numbers %d-%d,
  * which is a range of available cpu numbers, e.g. 0-7 would mean there