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

Commit a29361a8 authored by Agontuk's avatar Agontuk Committed by Dees Troy
Browse files

Don't try to read temparature file if TW_NO_CPU_TEMP is set to true.

Otherwise, recovery log gets filled up with
"I:Cannot find file /sys/class/thermal/thermal_zone0/temp"

This also fixes build warnings due to duplicate definition of TW_NO_CPU_TEMP.

Change-Id: Ib7fdcd103d6684249c38c8b14ec85f2faba158f6
parent d6966f44
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -290,9 +290,6 @@ endif
ifneq ($(TW_CUSTOM_CPU_TEMP_PATH),)
	LOCAL_CFLAGS += -DTW_CUSTOM_CPU_TEMP_PATH=$(TW_CUSTOM_CPU_TEMP_PATH)
endif
ifneq ($(TW_NO_CPU_TEMP),)
	LOCAL_CFLAGS += -DTW_NO_CPU_TEMP=$(TW_NO_CPU_TEMP)
endif
ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
    LOCAL_SHARED_LIBRARIES += libopenaes
else
+4 −0
Original line number Diff line number Diff line
@@ -891,6 +891,10 @@ int DataManager::GetMagicValue(const string varName, string& value)
	}
	else if (varName == "tw_cpu_temp")
	{
	   int tw_no_cpu_temp;
	   GetValue("tw_no_cpu_temp", tw_no_cpu_temp);
	   if (tw_no_cpu_temp == 1) return -1;

	   string cpu_temp_file;
	   static unsigned long convert_temp = 0;
	   static time_t cpuSecCheck = 0;