fmapp2: Fix issue fm band with less than two channels causes exception

- When the number of channels in a band is less than two,
  horizontal number picker throws exception.
- Catching the exception.
CRs-Fixed: 540062
Change-Id: I8e34700b28e199571734ace190a81e97c54dd888
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index 2b45049..523bb1c 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -410,7 +410,11 @@
            displayValues[i] = String.valueOf((min + i * step) / 1000.0f);
        }
        mPicker.setDisplayedValues(displayValues, true);
-       mPicker.setWrapSelectorWheel(true);
+       try {
+           mPicker.setWrapSelectorWheel(true);
+       } catch (IllegalStateException e) {
+           e.printStackTrace();
+       }
        mPicker.invalidate();
    }
    protected int valueToFrequency(int value) {
diff --git a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
index 8a89a85..ac886bb 100644
--- a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
+++ b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
@@ -1487,6 +1487,7 @@
         int[] selectorIndices = mSelectorIndices;
         for (int i = 0; i < selectorIndices.length; i++) {
             int selectorIndex = selectorIndices[i];
+            float fNumber = 0;
             String scrollSelectorValue = mSelectorIndexToStringCache
                     .get(selectorIndex);
                 if(i - mSelectorMiddleItemIndex > 0 ){
@@ -1499,7 +1500,11 @@
                     mSelectorWheelPaint.setColor(Color.RED);
                     mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE);
                 }
-                float fNumber = Float.valueOf(scrollSelectorValue).floatValue();
+                try {
+                    fNumber = Float.valueOf(scrollSelectorValue).floatValue();
+                } catch(NumberFormatException e) {
+                    e.printStackTrace();
+                }
 
                 boolean bShowNumber = false;
                 float fWidthOfScale = mScaleWidth ;