Fix detection of model and device for some Android devices. We now also try and query the property information on the device if we can't get it from the adb devices list.

#codereview JJ.Hoesing

[CL 2075604 by Rene Rivera in Main branch]
This commit is contained in:
Rene Rivera
2014-05-16 11:22:43 -04:00
committed by UnrealBot
parent 50685c5dff
commit b074eef5ff

View File

@@ -151,10 +151,26 @@ private:
// parse the device model
FString Model;
FParse::Value(*DeviceString, TEXT("model:"), Model);
if (Model.IsEmpty())
{
FString ModelCommand = FString::Printf(TEXT("-s %s shell getprop ro.product.model"), *SerialNumber);
FString RoProductModel;
ExecuteAdbCommand(*ModelCommand, &RoProductModel, nullptr);
const TCHAR* Ptr = *RoProductModel;
FParse::Line(&Ptr, Model);
}
// parse the device model
FString DeviceName;
FParse::Value(*DeviceString, TEXT("device:"), DeviceName);
if (DeviceName.IsEmpty())
{
FString DeviceCommand = FString::Printf(TEXT("-s %s shell getprop ro.product.device"), *SerialNumber);
FString RoProductDevice;
ExecuteAdbCommand(*DeviceCommand, &RoProductDevice, nullptr);
const TCHAR* Ptr = *RoProductDevice;
FParse::Line(&Ptr, DeviceName);
}
// add the device to the map
{