From ad7a666a3edd0bc9b56b3fb6fda6b105462b4d95 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 11 Mar 2016 15:44:24 -0800 Subject: [PATCH] fix a launch issue when the user has deleted the app --- packages/flutter_tools/lib/src/android/android_device.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/android/android_device.dart b/packages/flutter_tools/lib/src/android/android_device.dart index c126f852a63..c4df79ef8c7 100644 --- a/packages/flutter_tools/lib/src/android/android_device.dart +++ b/packages/flutter_tools/lib/src/android/android_device.dart @@ -147,7 +147,11 @@ class AndroidDevice extends Device { @override bool isAppInstalled(ApplicationPackage app) { - // Just check for the existence of the application SHA. + // This call takes 400ms - 600ms. + if (runCheckedSync(adbCommandForDevice(['shell', 'pm', 'path', app.id])).isEmpty) + return false; + + // Check the application SHA. return _getDeviceApkSha1(app) == _getSourceSha1(app); }