Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ad0a8a0 authored by Wei Wang's avatar Wei Wang
Browse files

ThermalManagerService: add retry for HAL connection

Fixes: 152430257
Test: Build
Change-Id: Ifdce156f74cf6c8d858a8139e03208c24f31e369
parent 52f4d8d9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -767,7 +767,7 @@ public class ThermalManagerService extends SystemService {
        protected boolean connectToHal() {
            synchronized (mHalLock) {
                try {
                    mThermalHal10 = android.hardware.thermal.V1_0.IThermal.getService();
                    mThermalHal10 = android.hardware.thermal.V1_0.IThermal.getService(true);
                    mThermalHal10.linkToDeath(new DeathRecipient(),
                            THERMAL_HAL_DEATH_COOKIE);
                    Slog.i(TAG,
@@ -902,7 +902,7 @@ public class ThermalManagerService extends SystemService {
        protected boolean connectToHal() {
            synchronized (mHalLock) {
                try {
                    mThermalHal11 = android.hardware.thermal.V1_1.IThermal.getService();
                    mThermalHal11 = android.hardware.thermal.V1_1.IThermal.getService(true);
                    mThermalHal11.linkToDeath(new DeathRecipient(),
                            THERMAL_HAL_DEATH_COOKIE);
                    mThermalHal11.registerThermalCallback(mThermalCallback11);
@@ -1046,7 +1046,7 @@ public class ThermalManagerService extends SystemService {
        protected boolean connectToHal() {
            synchronized (mHalLock) {
                try {
                    mThermalHal20 = android.hardware.thermal.V2_0.IThermal.getService();
                    mThermalHal20 = android.hardware.thermal.V2_0.IThermal.getService(true);
                    mThermalHal20.linkToDeath(new DeathRecipient(), THERMAL_HAL_DEATH_COOKIE);
                    mThermalHal20.registerThermalChangedCallback(mThermalCallback20, false,
                            0 /* not used */);