Update chipset detection to handle mismatches in ro.hardware and ro.soc.model

Add MT6785 chipset and fix a typo in MT6853

#android
[REVIEW] [at]Allan.Bentham
#rb Allan.Bentham


#ROBOMERGE-AUTHOR: chris.babcock
#ROBOMERGE-SOURCE: CL 20630114 via CL 20630150 via CL 20630168 via CL 20630181 via CL 20630198
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v955-20579017)

[CL 20636306 by chris babcock in ue5-main branch]
This commit is contained in:
chris babcock
2022-06-13 18:38:19 -04:00
parent 5748a77a04
commit 32b3394309

View File

@@ -1681,7 +1681,19 @@ public class GameActivity extends $${gameActivitySuperClass}$$ implements Surfac
if (!roSOCModel.equals(""))
{
Log.debug("ro.soc.model: " + roSOCModel);
hardware = roSOCModel;
// validate either we only have ro.soc.model, or that previous hardware value in agreement
// encountered a device which had ro.hardware and /proc/cpuinfo correct but ro.soc.model set differently
String CheckHardware = hardware.toLowerCase();
String CheckSOC = roSOCModel.toLowerCase();
if (CheckHardware.isEmpty() || CheckHardware.contains(CheckSOC) || CheckSOC.contains(CheckHardware))
{
hardware = roSOCModel;
}
else
{
Log.debug("Warning: hardware does not match ro.soc.model, assuming hardware is correct");
}
}
// register variables for the program to access