mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Fix #3825 crash installing onto certain Android devices
This commit is contained in:
parent
826936cd33
commit
e2ab858202
@ -190,7 +190,8 @@ class AndroidDevice extends Device {
|
|||||||
@override
|
@override
|
||||||
bool isAppInstalled(ApplicationPackage app) {
|
bool isAppInstalled(ApplicationPackage app) {
|
||||||
// This call takes 400ms - 600ms.
|
// This call takes 400ms - 600ms.
|
||||||
if (runCheckedSync(adbCommandForDevice(<String>['shell', 'pm', 'path', app.id])).isEmpty)
|
String listOut = runCheckedSync(adbCommandForDevice(<String>['shell', 'pm', 'list', 'packages', app.id]));
|
||||||
|
if (!LineSplitter.split(listOut).contains("package:${app.id}"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Check the application SHA.
|
// Check the application SHA.
|
||||||
|
Loading…
Reference in New Issue
Block a user