Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
31a4ff80
Unverified
Commit
31a4ff80
authored
Oct 21, 2019
by
Jonah Williams
Committed by
GitHub
Oct 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add samsungexynos7570 to list of known physical devices (#43042)
parent
83878683
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
android_device.dart
packages/flutter_tools/lib/src/android/android_device.dart
+4
-3
android_device_test.dart
...tools/test/general.shard/android/android_device_test.dart
+8
-0
No files found.
packages/flutter_tools/lib/src/android/android_device.dart
View file @
31a4ff80
...
...
@@ -32,7 +32,7 @@ import 'android_sdk.dart';
enum
_HardwareType
{
emulator
,
physical
}
/// Map to help our `isLocalEmulator` detection.
const
Map
<
String
,
_HardwareType
>
_knownHardware
=
<
String
,
_HardwareType
>{
const
Map
<
String
,
_HardwareType
>
_k
K
nownHardware
=
<
String
,
_HardwareType
>{
'goldfish'
:
_HardwareType
.
emulator
,
'qcom'
:
_HardwareType
.
physical
,
'ranchu'
:
_HardwareType
.
emulator
,
...
...
@@ -42,6 +42,7 @@ const Map<String, _HardwareType> _knownHardware = <String, _HardwareType>{
'samsungexynos8890'
:
_HardwareType
.
physical
,
'samsungexynos8895'
:
_HardwareType
.
physical
,
'samsungexynos9810'
:
_HardwareType
.
physical
,
'samsungexynos7570'
:
_HardwareType
.
physical
,
};
bool
allowHeapCorruptionOnWindows
(
int
exitCode
)
{
...
...
@@ -122,9 +123,9 @@ class AndroidDevice extends Device {
if
(
_isLocalEmulator
==
null
)
{
final
String
hardware
=
await
_getProperty
(
'ro.hardware'
);
printTrace
(
'ro.hardware =
$hardware
'
);
if
(
_knownHardware
.
containsKey
(
hardware
))
{
if
(
_k
K
nownHardware
.
containsKey
(
hardware
))
{
// Look for known hardware models.
_isLocalEmulator
=
_knownHardware
[
hardware
]
==
_HardwareType
.
emulator
;
_isLocalEmulator
=
_k
K
nownHardware
[
hardware
]
==
_HardwareType
.
emulator
;
}
else
{
// Fall back to a best-effort heuristic-based approach.
final
String
characteristics
=
await
_getProperty
(
'ro.build.characteristics'
);
...
...
packages/flutter_tools/test/general.shard/android/android_device_test.dart
View file @
31a4ff80
...
...
@@ -348,6 +348,14 @@ Use the 'android' tool to install them:
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'knownPhysical Samsung SM G570M'
,
()
async
{
hardware
=
'samsungexynos7570'
;
final
AndroidDevice
device
=
AndroidDevice
(
'test'
);
expect
(
await
device
.
isLocalEmulator
,
false
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'knownEmulator'
,
()
async
{
hardware
=
'goldfish'
;
final
AndroidDevice
device
=
AndroidDevice
(
'test'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment