Bug 1047971: Delete even more redundant field initialisers r=rnewman
authorChris Kitching <chriskitching@linux.com>
Sun, 03 Aug 2014 02:21:42 -0700
changeset 197912 4bd09430f06376b23684b9efc62336d76f942826
parent 197911 c092f9e4310d44bcdea29d9443ecd8001412340b
child 197913 736c8625bcf76e386abde257104c8cbce557abd4
push id8061
push userchriskitching@linux.com
push dateTue, 05 Aug 2014 21:25:37 +0000
treeherderfx-team@4bd09430f063 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrnewman
bugs1047971
milestone34.0a1
Bug 1047971: Delete even more redundant field initialisers r=rnewman
media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
mobile/android/base/AndroidGamepadManager.java
mobile/android/base/BrowserApp.java
mobile/android/base/GeckoAppShell.java
mobile/android/base/gfx/LayerView.java
mobile/android/base/menu/GeckoMenuItem.java
mobile/android/base/util/INIParser.java
mobile/android/base/util/INISection.java
--- a/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/android/java/src/org/webrtc/videoengine/VideoCaptureAndroid.java
@@ -37,31 +37,31 @@ import org.mozilla.gecko.mozglue.WebRTCJ
 // the entry points to this class are all synchronized.  This shouldn't present
 // a performance bottleneck because only onPreviewFrame() is called more than
 // once (and is called serially on a single thread), so the lock should be
 // uncontended.
 public class VideoCaptureAndroid implements PreviewCallback, Callback, AppStateListener {
   private final static String TAG = "WEBRTC-JC";
 
   private Camera camera;  // Only non-null while capturing.
-  private Camera.CameraInfo info = null;
+  private Camera.CameraInfo info;
   private final int id;
   private final long native_capturer;  // |VideoCaptureAndroid*| in C++.
   private SurfaceHolder localPreview;
   private SurfaceTexture dummySurfaceTexture;
   // Arbitrary queue depth.  Higher number means more memory allocated & held,
   // lower number means more sensitivity to processing time in the client (and
   // potentially stalling the capturer if it runs out of buffers to write to).
   private final int numCaptureBuffers = 3;
   // Needed to start/stop/rotate camera.
   private volatile int mCaptureRotation;
   private int mCaptureWidth;
   private int mCaptureHeight;
-  private int mCaptureMinFPS = 0;
-  private int mCaptureMaxFPS = 0;
+  private int mCaptureMinFPS;
+  private int mCaptureMaxFPS;
   // Are we being told to start/stop the camera, or just suspending/resuming
   // due to the application being backgrounded.
   private boolean mResumeCapture;
 
   @WebRTCJNITarget
   public VideoCaptureAndroid(int id, long native_capturer) {
     this.id = id;
     this.native_capturer = native_capturer;
--- a/mobile/android/base/AndroidGamepadManager.java
+++ b/mobile/android/base/AndroidGamepadManager.java
@@ -33,30 +33,30 @@ public class AndroidGamepadManager {
         Z(MotionEvent.AXIS_Z),
         RZ(MotionEvent.AXIS_RZ);
 
         public final int axis;
 
         private Axis(int axis) {
             this.axis = axis;
         }
-    };
+    }
 
     // A list of gamepad button mappings. Axes are determined at
     // runtime, as they vary by Android version.
     private static enum Trigger {
         Left(6),
         Right(7);
 
         public final int button;
 
         private Trigger(int button) {
             this.button = button;
         }
-    };
+    }
 
     private static final int FIRST_DPAD_BUTTON = 12;
     // A list of axis number, gamepad button mappings for negative, positive.
     // Button mappings are added to FIRST_DPAD_BUTTON.
     private static enum DpadAxis {
         UpDown(MotionEvent.AXIS_HAT_Y, 0, 1),
         LeftRight(MotionEvent.AXIS_HAT_X, 2, 3);
 
@@ -64,17 +64,17 @@ public class AndroidGamepadManager {
         public final int negativeButton;
         public final int positiveButton;
 
         private DpadAxis(int axis, int negativeButton, int positiveButton) {
             this.axis = axis;
             this.negativeButton = negativeButton;
             this.positiveButton = positiveButton;
         }
-    };
+    }
 
     private static enum Button {
         A(KeyEvent.KEYCODE_BUTTON_A),
         B(KeyEvent.KEYCODE_BUTTON_B),
         X(KeyEvent.KEYCODE_BUTTON_X),
         Y(KeyEvent.KEYCODE_BUTTON_Y),
         L1(KeyEvent.KEYCODE_BUTTON_L1),
         R1(KeyEvent.KEYCODE_BUTTON_R1),
@@ -89,17 +89,17 @@ public class AndroidGamepadManager {
         DPAD_LEFT(KeyEvent.KEYCODE_DPAD_LEFT),
         DPAD_RIGHT(KeyEvent.KEYCODE_DPAD_RIGHT);
 
         public final int button;
 
         private Button(int button) {
             this.button = button;
         }
-    };
+    }
 
     private static class Gamepad {
         // ID from GamepadService
         public int id;
         // Retain axis state so we can determine changes.
         public float axes[];
         public boolean dpad[];
         public int triggerAxes[];
@@ -124,19 +124,19 @@ public class AndroidGamepadManager {
                 } else {
                     triggerAxes = null;
                 }
             }
         }
     }
 
     private static boolean sStarted;
-    private static HashMap<Integer, Gamepad> sGamepads = null;
-    private static HashMap<Integer, List<KeyEvent>> sPendingGamepads = null;
-    private static InputManager.InputDeviceListener sListener = null;
+    private static HashMap<Integer, Gamepad> sGamepads;
+    private static HashMap<Integer, List<KeyEvent>> sPendingGamepads;
+    private static InputManager.InputDeviceListener sListener;
     private static Timer sPollTimer;
 
     private AndroidGamepadManager() {
     }
 
     public static void startup() {
         ThreadUtils.assertOnUiThread();
         if (!sStarted) {
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -150,17 +150,17 @@ public class BrowserApp extends GeckoApp
 
     public ViewFlipper mViewFlipper;
     public ActionModeCompatView mActionBar;
     private BrowserToolbar mBrowserToolbar;
     private ToolbarProgressView mProgressView;
     private HomePager mHomePager;
     private TabsPanel mTabsPanel;
     private ViewGroup mHomePagerContainer;
-    protected Telemetry.Timer mAboutHomeStartupTimer = null;
+    protected Telemetry.Timer mAboutHomeStartupTimer;
     private ActionModeCompat mActionMode;
     private boolean mShowActionModeEndAnimation;
 
     private static final int GECKO_TOOLS_MENU = -1;
     private static final int ADDON_MENU_OFFSET = 1000;
     private static class MenuItemInfo {
         public int id;
         public String label;
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -1572,17 +1572,17 @@ public class GeckoAppShell
         };
             
         EnumerateGeckoProcesses(visitor);
     }
 
     public static boolean checkForGeckoProcs() {
 
         class GeckoPidCallback implements GeckoProcessesVisitor {
-            public boolean otherPidExist = false;
+            public boolean otherPidExist;
             @Override
             public boolean callback(int pid) {
                 if (pid != android.os.Process.myPid()) {
                     otherPidExist = true;
                     return false;
                 }
                 return true;
             }            
@@ -2094,22 +2094,22 @@ public class GeckoAppShell
     public static GeckoInterface getGeckoInterface() {
         return sGeckoInterface;
     }
 
     public static void setGeckoInterface(GeckoInterface aGeckoInterface) {
         sGeckoInterface = aGeckoInterface;
     }
 
-    public static android.hardware.Camera sCamera = null;
+    public static android.hardware.Camera sCamera;
 
     static native void cameraCallbackBridge(byte[] data);
 
     static int kPreferedFps = 25;
-    static byte[] sCameraBuffer = null;
+    static byte[] sCameraBuffer;
 
 
     @WrapElementForJNI(stubName = "InitCameraWrapper")
     static int[] initCamera(String aContentType, int aCamera, int aWidth, int aHeight) {
         ThreadUtils.postToUiThread(new Runnable() {
                 @Override
                 public void run() {
                     try {
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -152,17 +152,17 @@ public class LayerView extends FrameLayo
                 if (force16bit) {
                     GeckoAppShell.setScreenDepthOverride(16);
                 }
             }
         });
 
         mLayerClient.notifyGeckoReady();
         addTouchInterceptor(new TouchEventInterceptor() {
-            private PointF mInitialTouchPoint = null;
+            private PointF mInitialTouchPoint;
 
             @Override
             public boolean onInterceptTouchEvent(View view, MotionEvent event) {
                 return false;
             }
 
             @Override
             public boolean onTouch(View view, MotionEvent event) {
--- a/mobile/android/base/menu/GeckoMenuItem.java
+++ b/mobile/android/base/menu/GeckoMenuItem.java
@@ -43,17 +43,17 @@ public class GeckoMenuItem implements Me
     private boolean mChecked;
     private boolean mVisible = true;
     private boolean mEnabled = true;
     private Drawable mIcon;
     private int mIconRes;
     private GeckoActionProvider mActionProvider;
     private final GeckoMenu mMenu;
     private GeckoSubMenu mSubMenu;
-    private MenuItem.OnMenuItemClickListener mMenuItemClickListener = null;
+    private MenuItem.OnMenuItemClickListener mMenuItemClickListener;
     private OnShowAsActionChangedListener mShowAsActionChangedListener;
 
     public GeckoMenuItem(GeckoMenu menu, int id, int order, int titleRes) {
         mMenu = menu;
         mId = id;
         mOrder = order;
         setTitle(titleRes);
     }
--- a/mobile/android/base/util/INIParser.java
+++ b/mobile/android/base/util/INIParser.java
@@ -14,17 +14,17 @@ import java.io.IOException;
 import java.util.Enumeration;
 import java.util.Hashtable;
 
 public final class INIParser extends INISection {
     // default file to read and write to
     private File mFile;
 
     // List of sections in the current iniFile. null if the file has not been parsed yet
-    private Hashtable<String, INISection> mSections = null;
+    private Hashtable<String, INISection> mSections;
 
     // create a parser. The file will not be read until you attempt to
     // access sections or properties inside it. At that point its read synchronously
     public INIParser(File iniFile) {
         super("");
         mFile = iniFile;
     }
 
--- a/mobile/android/base/util/INISection.java
+++ b/mobile/android/base/util/INISection.java
@@ -19,17 +19,17 @@ public class INISection {
     private String mName;
     public String getName() { return mName; }
     public void setName(String name) { mName = name; }
 
     // show or hide debug logging
     private  boolean mDebug;
 
     // Global properties that aren't inside a section in the file
-    protected Hashtable<String, Object> mProperties = null;
+    protected Hashtable<String, Object> mProperties;
 
     // create a parser. The file will not be read until you attempt to
     // access sections or properties inside it. At that point its read synchronously
     public INISection(String name) {
         mName = name;
     }
 
     // log a debug string to the console