From ecedfd476bb3785a96bf7923b0428ac72b4904e0 Mon Sep 17 00:00:00 2001 From: "burke.davey" Date: Mon, 30 Jul 2012 17:13:06 +0000 Subject: [PATCH] Fix bug where maps links were being deferred. --- .../com/google/android/apps/chrometophone/LauncherUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/com/google/android/apps/chrometophone/LauncherUtils.java b/android/src/com/google/android/apps/chrometophone/LauncherUtils.java index cfbe64c..1f0dc7a 100644 --- a/android/src/com/google/android/apps/chrometophone/LauncherUtils.java +++ b/android/src/com/google/android/apps/chrometophone/LauncherUtils.java @@ -133,7 +133,7 @@ public class LauncherUtils { // reasons. This is a little racey but in practice works fine. if (isScreenOffOrLocked(context) && intent.getAction().equals(Intent.ACTION_VIEW) && - (intent.getPackage() == null)) { + intent.getPackage() == null && intent.getComponent() == null) { // Stuff away the intent URL SharedPreferences prefs = Prefs.get(context); SharedPreferences.Editor editor = prefs.edit(); @@ -149,7 +149,7 @@ public class LauncherUtils { pm.setComponentEnabledSetting(componentName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP); - } else { // user present, so send immediately + } else { // user present or non-browser target, so send immediately try { context.startActivity(intent); } catch (ActivityNotFoundException e) { }