Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bug 708283 - NullPointerException in VideoPlayer on launch r=dougt a=…

…akeybl

--HG--
branch : MOBILE90_2011120622_RELBRANCH
  • Loading branch information...
commit 3a78471e33b02e8d272079f8309a250469be75a2 1 parent 0947c2e
@bslassey bslassey authored
View
3  embedding/android/AndroidManifest.xml.in
@@ -125,8 +125,7 @@
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation"
android:theme="@android:style/Theme.NoTitleBar" >
<intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
+ <action android:name="org.mozilla.gecko.PLAY_VIDEO" />
</intent-filter>
</activity>
</application>
View
2  embedding/android/GeckoAppShell.java
@@ -808,7 +808,7 @@ static boolean openUriExternal(String aUriSpec, String aMimeType, String aPackag
// 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 = new Intent(VideoPlayer.VIDEO_ACTION);
intent.setClassName(GeckoApp.mAppContext.getPackageName(),
"org.mozilla.gecko.VideoPlayer");
intent.setData(uri);
View
4 embedding/android/VideoPlayer.java
@@ -49,6 +49,8 @@
public class VideoPlayer extends Activity
{
+ public static final String VIDEO_ACTION = "org.mozilla.gecko.PLAY_VIDEO";
+
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
@@ -60,6 +62,8 @@ public void onCreate(Bundle savedInstanceState)
mediaController.setAnchorView(mVideoView);
Intent intent = getIntent();
Uri data = intent.getData();
+ if (data == null)
+ return;
String spec = null;
if ("vnd.youtube".equals(data.getScheme())) {
String ssp = data.getSchemeSpecificPart();
Please sign in to comment.
Something went wrong with that request. Please try again.