hidl:thermal: Rebrand to Samsung

Change-Id: I9119f21538c99143a5d0ec810ec1a0a7b43cacc9
tirimbino
Francescodario Cuzzocrea 4 years ago
parent bd62c30a6c
commit 01daaa0a6d
  1. 6
      hidl/thermal/Android.bp
  2. 2
      hidl/thermal/android.hardware.thermal@2.0-service.samsung.rc
  3. 0
      hidl/thermal/android.hardware.thermal@2.0-service.samsung.xml
  4. 6
      hidl/thermal/service.cpp
  5. 3
      hidl/thermal/thermal-helper.cpp

@ -1,13 +1,13 @@
cc_binary { cc_binary {
name: "android.hardware.thermal@2.0-service.pixel", name: "android.hardware.thermal@2.0-service.samsung",
defaults: [ defaults: [
"hidl_defaults", "hidl_defaults",
], ],
vendor: true, vendor: true,
relative_install_path: "hw", 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: [ init_rc: [
"android.hardware.thermal@2.0-service.pixel.rc", "android.hardware.thermal@2.0-service.samsung.rc",
], ],
srcs: [ srcs: [
"service.cpp", "service.cpp",

@ -1,4 +1,4 @@
service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.pixel service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.samsung
interface android.hardware.thermal@2.0::IThermal default interface android.hardware.thermal@2.0::IThermal default
class hal class hal
user system user system

@ -29,7 +29,7 @@ using ::android::hardware::thermal::V2_0::IThermal;
using ::android::hardware::thermal::V2_0::implementation::Thermal; using ::android::hardware::thermal::V2_0::implementation::Thermal;
static int shutdown() { static int shutdown() {
LOG(ERROR) << "Pixel Thermal HAL Service is shutting down."; LOG(ERROR) << "Samsung Thermal HAL Service is shutting down.";
return 1; return 1;
} }
@ -37,7 +37,7 @@ int main(int /* argc */, char ** /* argv */) {
status_t status; status_t status;
android::sp<IThermal> service = nullptr; 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(); service = new Thermal();
if (service == nullptr) { if (service == nullptr) {
@ -53,7 +53,7 @@ int main(int /* argc */, char ** /* argv */) {
return shutdown(); return shutdown();
} }
LOG(INFO) << "Pixel Thermal HAL Service 2.0 started successfully."; LOG(INFO) << "Samsung Thermal HAL Service 2.0 started successfully.";
joinRpcThreadpool(); joinRpcThreadpool();
// We should not get past the joinRpcThreadpool(). // We should not get past the joinRpcThreadpool().
return shutdown(); return shutdown();

@ -56,7 +56,8 @@ namespace {
using android::base::StringPrintf; 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. * However /sys/devices/system/cpu/present is preferred.
* The file is expected to contain single text line with two numbers %d-%d, * 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 * which is a range of available cpu numbers, e.g. 0-7 would mean there

Loading…
Cancel
Save