FM: check Audio Focus status before starting app loop back audio procedure

Change-Id: Ib8f00bf652766c293c2cd6e0edd4d4f908c08bdc
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 42e0a18..cfb78e2 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -4253,7 +4253,11 @@
    }
    private boolean startApplicationLoopBack(int deviceType) {
 
-   // stop existing playback path before starting new one
+        if (mStoppedOnFocusLoss == true) {
+            Log.d(LOGTAG, "FM does not have audio focus, not enabling " +
+                  "audio path");
+            return false;
+        }
         Log.d(LOGTAG,"startApplicationLoopBack for device "+deviceType);
 
         AudioDeviceInfo outputDevice = null;
@@ -4279,6 +4283,7 @@
             Log.d(LOGTAG,"no output device" + deviceType + " found");
             return false;
         }
+        // stop existing playback path before starting new one
         if(mIsFMDeviceLoopbackActive) {
             if ((mReceiver != null) && mReceiver.isCherokeeChip() &&
                             (mPref.getBoolean("SLIMBUS_SEQ", true))) {