Bug 1182328 - Backed out changeset 2e02ac7f87ab. r=me

Did not mean to land this WIP patch.
This commit is contained in:
Michael Comella 2015-07-13 17:14:41 -07:00
parent 14166d9613
commit 464113f926

View File

@ -1197,15 +1197,9 @@ public class GeckoAppShell
final Intent intent = getOpenURIIntentInner(context, targetURI, mimeType, action, title);
if (intent != null) {
// Ideally, we add Browsable on links from web content (bug 1182140) but we can't. Instead,
// we add Browsable to any Intent that has a scheme. This prevents us from sharing harmless
// content (e.g. plain text) and protects any potentially registered custom uri schemes.
//
// However, we also push file schemes through here and most applications that open files
// aren't expecting file schemes from web content so in order to be compatible, we drop
// Browsable from them (bug 1100100).
if (!TextUtils.isEmpty(intent.getScheme()) &&
!targetURI.startsWith("file:")) {
// Setting category on file:// URIs breaks about:downloads (Bug 1176018)
if (!targetURI.startsWith("file:")) {
// Only handle applications which can accept arbitrary data from a browser.
intent.addCategory(Intent.CATEGORY_BROWSABLE);
}