Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Fix bug where mobile launcher wouldn't find Android devices with hyphens in their product name #1296

Merged
merged 4 commits into from
Feb 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

- Fixed a bug where code generation would happen on every Unity compilation, despite the code generator returning successfully. [#1294](https://github.com/spatialos/gdk-for-unity/pull/1294)
- Fixed a bug where dotnet output from the code generator would cause exceptions to be thrown. [#1294](https://github.com/spatialos/gdk-for-unity/pull/1294)
- Fixed a bug where the Mobile Launcher window wouldn't find Android devices that contained hyphens in their product name. [#1288](https://github.com/spatialos/gdk-for-unity/issues/1288) [#1296](https://github.com/spatialos/gdk-for-unity/pull/1296)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ public static string Generate()
""Editor""
],
""excludePlatforms"": [],
""allowUnsafeCode"": false
""allowUnsafeCode"": false,
paulbalaji marked this conversation as resolved.
Show resolved Hide resolved
""overrideReferences"": false,
""precompiledReferences"": [],
""autoReferenced"": true,
""defineConstraints"": [],
""versionDefines"": []
}
";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ List of devices attached
the "product" capture would be "starltexx", "model" would be "SM_G960F" and "device" would be "starlte".
*/
private static readonly Regex DeviceMatchRegex = new Regex(pattern:
"(?:(?<id>[\\w_\\d-]+)\\s*device).*" +
"(?:product:(?<product>[\\w_\\d]+))\\s*" +
"(?:model:(?<model>[\\w_\\d]+))\\s*" +
"(?:device:(?<device>[\\w_\\d]+)).*");
"(?:(?<id>[\\w\\d_-]+)\\s*device).*" +
"(?:product:(?<product>[\\w\\d_-]+))\\s*" +
"(?:model:(?<model>[\\w\\d_-]+))\\s*" +
"(?:device:(?<device>[\\w\\d_-]+)).*");

public static (List<DeviceLaunchConfig> emulators, List<DeviceLaunchConfig> devices) RetrieveAvailableEmulatorsAndDevices()
{
Expand Down