bug 705572 - Kindle Fire: YouTube videos do not open in unavailable YouTube App r=dougt,mfinkle
This commit is contained in:
@@ -811,6 +811,18 @@ public class GeckoAppShell
|
||||
intent.setDataAndType(Uri.parse(aUriSpec), aMimeType);
|
||||
} else {
|
||||
Uri uri = Uri.parse(aUriSpec);
|
||||
if ("vnd.youtube".equals(uri.getScheme())) {
|
||||
// Special case youtube to fallback to our own player
|
||||
String[] handlers = getHandlersForURL(aUriSpec, aAction);
|
||||
if (handlers.length == 0) {
|
||||
intent = new Intent(Intent.ACTION_MAIN);
|
||||
intent.setClassName(GeckoApp.mAppContext.getPackageName(),
|
||||
"org.mozilla.gecko.VideoPlayer");
|
||||
intent.setData(uri);
|
||||
GeckoApp.mAppContext.startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if ("sms".equals(uri.getScheme())) {
|
||||
// Have a apecial handling for the SMS, as the message body
|
||||
// is not extracted from the URI automatically
|
||||
|
||||
Reference in New Issue
Block a user