Fix issue #2164 Links open with handleWebUrl. (#2220)

* AboutActivity links now open with the in-app tabbed browser.
* UploadActivity license and policy links now open with the in-app tabbed browser.
This commit is contained in:
DylanRobson 2019-01-01 02:51:33 -08:00 committed by Vivek Maskara
parent af291a5fcc
commit 55113b3018
2 changed files with 55 additions and 7 deletions

View file

@ -188,6 +188,7 @@ public class Utils {
}
/**
* Opens Custom Tab Activity with in-app browser for the specified URL.
* Launches intent for web URL
* @param context
* @param url
@ -206,7 +207,8 @@ public class Utils {
builder.setSecondaryToolbarColor(ContextCompat.getColor(context, R.color.primaryDarkColor));
builder.setExitAnimations(context, android.R.anim.slide_in_left, android.R.anim.slide_out_right);
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Clear previous browser tasks, so that back/exit buttons work as intended.
customTabsIntent.intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
customTabsIntent.launchUrl(context, url);
}