aidl: thermal: Rebrand to samsung

Change-Id: I381364e55b1e36e11f5a659ee07cd734ff397bae
urubino
Tim Zimmermann 1 year ago
parent 96d8907514
commit ecd5614eb0
No known key found for this signature in database
GPG Key ID: 6DC21A63F819C5EF
  1. 14
      aidl/thermal/Android.bp
  2. 2
      aidl/thermal/android.hardware.thermal-service.samsung.rc
  3. 0
      aidl/thermal/android.hardware.thermal-service.samsung.xml
  4. 2
      aidl/thermal/samsung-thermal-logd.rc
  5. 2
      aidl/thermal/samsung-thermal-symlinks.rc
  6. 8
      aidl/thermal/service.cpp

@ -1,5 +1,5 @@
cc_binary { cc_binary {
name: "android.hardware.thermal-service.pixel", name: "android.hardware.thermal-service.samsung",
srcs: [ srcs: [
"service.cpp", "service.cpp",
"Thermal.cpp", "Thermal.cpp",
@ -15,10 +15,10 @@ cc_binary {
vendor: true, vendor: true,
relative_install_path: "hw", relative_install_path: "hw",
vintf_fragments: [ vintf_fragments: [
"android.hardware.thermal-service.pixel.xml" "android.hardware.thermal-service.samsung.xml"
], ],
init_rc: [ init_rc: [
"android.hardware.thermal-service.pixel.rc", "android.hardware.thermal-service.samsung.rc",
], ],
shared_libs: [ shared_libs: [
"libbase", "libbase",
@ -60,19 +60,19 @@ cc_binary {
} }
sh_binary { sh_binary {
name: "thermal_logd", name: "thermal_logd.samsung",
src: "init.thermal.logging.sh", src: "init.thermal.logging.sh",
vendor: true, vendor: true,
init_rc: [ init_rc: [
"pixel-thermal-logd.rc", "samsung-thermal-logd.rc",
], ],
} }
sh_binary { sh_binary {
name: "thermal_symlinks", name: "thermal_symlinks.samsung",
src: "init.thermal.symlinks.sh", src: "init.thermal.symlinks.sh",
vendor: true, vendor: true,
init_rc: [ init_rc: [
"pixel-thermal-symlinks.rc", "samsung-thermal-symlinks.rc",
], ],
} }

@ -6,7 +6,7 @@ on property:vendor.thermal.link_ready=1
on enable-thermal-hal on enable-thermal-hal
restart vendor.thermal-hal restart vendor.thermal-hal
service vendor.thermal-hal /vendor/bin/hw/android.hardware.thermal-service.pixel service vendor.thermal-hal /vendor/bin/hw/android.hardware.thermal-service.samsung
class hal class hal
user system user system
group system group system

@ -7,7 +7,7 @@ on property:persist.vendor.log.thermal=0
on property:persist.vendor.log.thermal=1 && property:persist.vendor.log.thermal.interval=* on property:persist.vendor.log.thermal=1 && property:persist.vendor.log.thermal.interval=*
restart vendor.thermal.logd restart vendor.thermal.logd
service vendor.thermal.logd /vendor/bin/thermal_logd ${persist.vendor.log.thermal.interval:-5} service vendor.thermal.logd /vendor/bin/thermal_logd.samsung ${persist.vendor.log.thermal.interval:-5}
class main class main
user root user root
group root system group root system

@ -4,7 +4,7 @@ on boot
mkdir /dev/thermal/cdev-by-name 0750 system system mkdir /dev/thermal/cdev-by-name 0750 system system
start vendor.thermal.symlinks start vendor.thermal.symlinks
service vendor.thermal.symlinks /vendor/bin/thermal_symlinks service vendor.thermal.symlinks /vendor/bin/thermal_symlinks.samsung
user system user system
group system group system
oneshot oneshot

@ -19,7 +19,7 @@
#include "Thermal.h" #include "Thermal.h"
constexpr std::string_view kThermalLogTag("pixel-thermal"); constexpr std::string_view kThermalLogTag("samsung-thermal");
using ::android::OK; using ::android::OK;
using ::android::status_t; using ::android::status_t;
@ -36,16 +36,16 @@ int main(int /* argc */, char ** /* argv */) {
auto svc = ndk::SharedRefBase::make<Thermal>(); auto svc = ndk::SharedRefBase::make<Thermal>();
const auto svcName = std::string() + svc->descriptor + "/" + THERMAL_INSTANCE_NAME; const auto svcName = std::string() + svc->descriptor + "/" + THERMAL_INSTANCE_NAME;
LOG(INFO) << "Pixel Thermal AIDL Service starting..." + svcName; LOG(INFO) << "Samsung Thermal AIDL Service starting..." + svcName;
ABinderProcess_setThreadPoolMaxThreadCount(0); ABinderProcess_setThreadPoolMaxThreadCount(0);
auto svcBinder = svc->asBinder(); auto svcBinder = svc->asBinder();
binder_status_t status = AServiceManager_addService(svcBinder.get(), svcName.c_str()); binder_status_t status = AServiceManager_addService(svcBinder.get(), svcName.c_str());
if (status != STATUS_OK) { if (status != STATUS_OK) {
LOG(ERROR) << "Pixel Thermal AIDL Service failed to start: " << status << "."; LOG(ERROR) << "Samsung Thermal AIDL Service failed to start: " << status << ".";
return EXIT_FAILURE; return EXIT_FAILURE;
} }
LOG(INFO) << "Pixel Thermal HAL AIDL Service started."; LOG(INFO) << "Samsung Thermal HAL AIDL Service started.";
ABinderProcess_joinThreadPool(); ABinderProcess_joinThreadPool();
return EXIT_FAILURE; // should not reach return EXIT_FAILURE; // should not reach
} }

Loading…
Cancel
Save