[Android] Fix NullPointerException in MainActivity by adding an empty constructor

Jean-Baptiste Kempf git at videolan.org
Wed Aug 8 15:10:54 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Aug  8 15:08:38 2012 +0200| [b2a3088d1c0bc9c5dcb8a4d6e68d1583e0354c68] | committer: Jean-Baptiste Kempf

Fix NullPointerException in MainActivity by adding an empty constructor

See bug in FragmentManagerImpl.restoreAllState()
See "All subclasses of Fragment must include a public empty constructor." in
http://developer.android.com/reference/android/app/Fragment.html

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=b2a3088d1c0bc9c5dcb8a4d6e68d1583e0354c68
---

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index 9a905da..bb25655 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -94,6 +94,9 @@ public class MainActivity extends SherlockFragmentActivity {
 
     private int mVersionNumber = -1;
 
+    public MainActivity() {
+    }
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         if (!Util.hasCompatibleCPU()) {



More information about the Android mailing list