title: getFocusAreas() and getMaxNumFocusAreas() cause nullpointerexception
body: <p>I have a custom camera app, and I'm attempting to set it up so users can touch the screen and have the camera focus where they touch.</p>
  
  <p>The problem I'm running into is that when I run the if-statement <code>if(camParam.getMaxNumFocusAreas()&gt;0){...}</code> It encounters a null pointer exception.</p>
  
  <p>I tried logging the output first, with 
  <code>Log.d(TAG, "max focus areas: "+camParam.getMaxNumFocusAreas());</code>
  in case it was just freaking out about having it be 0 for some reason, but that just made it have the null pointer exception on that line.</p>
  
  <p>Anybody know why this might be happening?</p>
  
  <p>In case I'm blind and just not seeing what it's saying, here's the code causing the exception:</p>
  
  <pre><code>               Camera.Area area = new Camera.Area(new Rect(-500, -500, 500,500), 0);
                  ArrayList&lt;Camera.Area&gt; listArea = new ArrayList&lt;Camera.Area&gt;();
                  listArea.add(area);
                  Log.d(TAG, "max focus areas: "+camParam.getMaxNumFocusAreas());
                  if(camParam.getMaxNumFocusAreas()&gt;0){
                      camParam.setFocusAreas(listArea);
                  }
                  Preview.camera.setParameters(camParam);
  </code></pre>
  
  <p>and the exception in my stacktrace:</p>
  
  <pre><code>05-23 07:39:52.023    9780-9780/com.braindudecreations.tangets E/InputEventReceiver: Exception dispatching input event.
  05-23 07:39:52.023    9780-9780/com.braindudecreations.tangets E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
  05-23 07:39:52.023    9780-9780/com.braindudecreations.tangets E/MessageQueue-JNI: java.lang.NullPointerException
          at com.braindudecreations.tangets.CameraDemo.onTouchEvent(CameraDemo.java:611)
          at android.app.Activity.dispatchTouchEvent(Activity.java:2413)
          at com.braindudecreations.tangets.CameraDemo.dispatchTouchEvent(CameraDemo.java:585)
          at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1901)
          at android.view.View.dispatchPointerEvent(View.java:7426)
          at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3220)
          at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3165)
          at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4292)
          at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4271)
          at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4363)
          at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:179)
          at android.os.MessageQueue.nativePollOnce(Native Method)
          at android.os.MessageQueue.next(MessageQueue.java:125)
          at android.os.Looper.loop(Looper.java:124)
          at android.app.ActivityThread.main(ActivityThread.java:5041)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:511)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>