зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1529367 - Part 2: Minor intent processing optimisation. r=snorp
The extension is only ever used for local files, so don't bother retrieving it otherwise. Differential Revision: https://phabricator.services.mozilla.com/D21049 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
8ff617cb88
Коммит
2a0386d4c6
|
@ -342,12 +342,12 @@ public final class IntentHelper implements BundleEventListener {
|
|||
// custom handlers that would apply.
|
||||
// Start with the original URI. If we end up modifying it, we'll
|
||||
// overwrite it.
|
||||
final String extension = MimeTypeMap.getFileExtensionFromUrl(targetURI);
|
||||
final Intent intent = getIntentForActionString(action);
|
||||
intent.setData(uri);
|
||||
|
||||
if ("file".equals(scheme)) {
|
||||
// Only set explicit mimeTypes on file://.
|
||||
final String extension = MimeTypeMap.getFileExtensionFromUrl(targetURI);
|
||||
final String mimeType2 = GeckoAppShell.getMimeTypeFromExtension(extension);
|
||||
intent.setType(mimeType2);
|
||||
return intent;
|
||||
|
|
Загрузка…
Ссылка в новой задаче