Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

Commit

Permalink
Merge pull request #583 from brave/fix_default_app_prompt
Browse files Browse the repository at this point in the history
Automatically load LinkBubble if it's found as a valid target
  • Loading branch information
KevinGrandon committed Oct 20, 2015
2 parents 30d65df + 6caf4cb commit a2f86ac
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,15 @@ public TabView openUrl(final String urlAsString, long urlLoadStartTime, final bo
return null;
}
} else {
showAppPicker = true;
// If LinkBubble is a valid resolve target, do not show other options to open the content.
for (ResolveInfo info : resolveInfos) {
if (info.activityInfo.packageName.startsWith("com.linkbubble.playstore")) {
showAppPicker = false;
break;
} else {
showAppPicker = true;
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,16 @@ public void onPageStarted(final String urlAsString, Bitmap favIcon) {
}
}
} else {
boolean isOnlyLinkBubble = mAppsForUrl.size() == 1 ? Util.isLinkBubbleResolveInfo(mAppsForUrl.get(0).mResolveInfo) : false;
if (isOnlyLinkBubble == false && MainApplication.sShowingAppPickerDialog == false &&
boolean isLinkBubblePresent = false;
//boolean isLinkBubblePresent = mAppsForUrl.size() == 1 ? Util.isLinkBubbleResolveInfo(mAppsForUrl.get(0).mResolveInfo) : false;
for (AppForUrl info : mAppsForUrl) {
if (info.mResolveInfo.activityInfo.packageName.startsWith("com.linkbubble.playstore")) {
isLinkBubblePresent = true;
break;
}
}

if (isLinkBubblePresent == false && MainApplication.sShowingAppPickerDialog == false &&
mHandledAppPickerForCurrentUrl == false && mAppPickersUrls.contains(urlAsString) == false) {
final ArrayList<ResolveInfo> resolveInfos = new ArrayList<ResolveInfo>();
for (AppForUrl appForUrl : mAppsForUrl) {
Expand Down

0 comments on commit a2f86ac

Please sign in to comment.