diff --git a/fm_hci/fm_hci.c b/fm_hci/fm_hci.c
index c48edd5..378e0c9 100644
--- a/fm_hci/fm_hci.c
+++ b/fm_hci/fm_hci.c
@@ -677,6 +677,12 @@
         return;
     }
     event_notification(hci, HC_EVENT_EXIT);
+    pthread_mutex_lock(&hci->event_lock);
+again:
+    pthread_cond_wait(&hci->event_cond, &hci->event_lock);
+    if (!(ready_events & HC_EVENT_EXIT_DONE))
+        goto again;
+    pthread_mutex_unlock(&hci->event_lock);
 }
 
 int fm_hci_init(fm_hci_hal_t *hci_hal)
@@ -785,6 +791,7 @@
     vendor_close(hci);
     pthread_cond_broadcast(&hci->event_cond);
     pthread_cond_broadcast(&hci->cmd_credits_cond);
+    event_notification(hci, HC_EVENT_EXIT_DONE);
     stop_rx_thread(hci);
     stop_tx_thread(hci);
     ALOGD("Tx, Rx Threads join done");
diff --git a/fm_hci/fm_hci.h b/fm_hci/fm_hci.h
index 8818068..2cfb30e 100644
--- a/fm_hci/fm_hci.h
+++ b/fm_hci/fm_hci.h
@@ -46,6 +46,7 @@
 #define HC_EVENT_LPM_IDLE_TIMEOUT      0x0100
 #define HC_EVENT_EXIT                  0x0200
 #define HC_EVENT_EPILOG                0x0400
+#define HC_EVENT_EXIT_DONE             0x8000
 
 #define MAX_FM_CMD_CNT                 100
 #define FM_CMD                         0x11
diff --git a/fmapp2/res/layout/rename_dialog.xml b/fmapp2/res/layout/rename_dialog.xml
index 2374c9c..bef5432 100644
--- a/fmapp2/res/layout/rename_dialog.xml
+++ b/fmapp2/res/layout/rename_dialog.xml
@@ -40,7 +40,6 @@
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:inputType="text"
-        android:textColor="#FFF"
         android:singleLine="true"
         android:maxLength="16">
      <requestFocus />
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 7f6775b..a178548 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -156,7 +156,7 @@
    private File mA2DPSampleFile = null;
    //Track FM playback for reenter App usecases
    private boolean mPlaybackInProgress = false;
-   private boolean mStoppedOnFocusLoss = false;
+   private boolean mStoppedOnFocusLoss = true;
    private boolean mStoppedOnFactoryReset = false;
    private File mSampleFile = null;
    long mSampleStart = 0;
@@ -742,8 +742,10 @@
                         Log.d(LOGTAG, "Music Service command : "+cmd+ " received");
                         if (cmd != null && cmd.equals("pause")) {
                             if (isFmOn()) {
-                                fmOperationsOff();
-                                mStoppedOnFocusLoss = true;
+                                AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+                                audioManager.abandonAudioFocus(mAudioFocusListener);
+                                mDelayedStopHandler.obtainMessage(FOCUSCHANGE, AudioManager.AUDIOFOCUS_LOSS, 0).sendToTarget();
+
                                 if (isOrderedBroadcast()) {
                                     abortBroadcast();
                                 }
@@ -1053,12 +1055,14 @@
            return;
        }
 
-       AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
-       int granted = audioManager.requestAudioFocus(mAudioFocusListener, AudioManager.STREAM_MUSIC,
-              AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
-       if(granted != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
-          Log.d(LOGTAG, "audio focuss couldnot be granted");
-          return;
+       if (mStoppedOnFocusLoss) {
+           AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+           int granted = audioManager.requestAudioFocus(mAudioFocusListener, AudioManager.STREAM_MUSIC,
+                   AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
+           if (granted != AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
+               Log.d(LOGTAG, "audio focuss couldnot be granted");
+               return;
+           }
        }
        mSession.setActive(true);
 
@@ -1442,6 +1446,32 @@
        resolver.insert(uri, values);
    }
 
+    private void resumeAfterCall() {
+        if (getCallState() != TelephonyManager.CALL_STATE_IDLE)
+            return;
+
+        // start playing again
+        if (!mResumeAfterCall)
+            return;
+
+        // resume playback only if FM Radio was playing
+        // when the call was answered
+        if (isAntennaAvailable() && (!isFmOn()) && mServiceInUse) {
+            Log.d(LOGTAG, "Resuming after call:");
+            if(!fmOn()) {
+                return;
+            }
+            mResumeAfterCall = false;
+            if (mCallbacks != null) {
+                try {
+                    mCallbacks.onEnabled();
+                } catch (RemoteException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+
    private void fmActionOnCallState( int state ) {
    //if Call Status is non IDLE we need to Mute FM as well stop recording if
    //any. Similarly once call is ended FM should be unmuted.
@@ -1473,49 +1503,6 @@
                mMuted = bTempMute;
            }
        }
-       else if (state == TelephonyManager.CALL_STATE_IDLE) {
-          // start playing again
-          if (mResumeAfterCall)
-          {
-             // resume playback only if FM Radio was playing
-             // when the call was answered
-              if (isAntennaAvailable() && (!isFmOn()) && mServiceInUse)
-              {
-                   Log.d(LOGTAG, "Resuming after call:");
-                   do {
-                       granted = audioManager.requestAudioFocus(mAudioFocusListener,
-                               AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
-                       ++count;
-                       try {
-                           Thread.sleep(100);
-                       } catch (Exception ex) {
-                           Log.d( LOGTAG, "InterruptedException");
-                       }
-                   } while(granted != AudioManager.AUDIOFOCUS_REQUEST_GRANTED && count != 3);
-
-                   if(true != fmOn()) {
-                       return;
-                   }
-
-                   mResumeAfterCall = false;
-                   if(mCallbacks != null) {
-                      try {
-                           mCallbacks.onEnabled();
-                      } catch (RemoteException e) {
-                           e.printStackTrace();
-                      }
-                   }
-              }
-          } else {
-              if (!isFmOn() && (mServiceInUse) && (mCallbacks != null)) {
-                  try {
-                      mCallbacks.onDisabled();
-                  } catch (RemoteException e) {
-                      e.printStackTrace();
-                  }
-              }
-          }
-       }//idle
    }
 
     /* Handle Phone Call + FM Concurrency */
@@ -1590,7 +1577,7 @@
               stopRecording();
               break;
           case FOCUSCHANGE:
-              if( false == isFmOn() ) {
+              if( !isFmOn() && !mResumeAfterCall) {
                   Log.v(LOGTAG, "FM is not running, not handling change");
                   return;
               }
@@ -1604,8 +1591,8 @@
                       Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK");
                       if (true == mPlaybackInProgress) {
                           stopFM();
-                          mStoppedOnFocusLoss = true;
                       }
+                      mStoppedOnFocusLoss = true;
                       break;
                   case AudioManager.AUDIOFOCUS_LOSS:
                       Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_LOSS");
@@ -1631,9 +1618,14 @@
                       break;
                   case AudioManager.AUDIOFOCUS_GAIN:
                       Log.v(LOGTAG, "AudioFocus: received AUDIOFOCUS_GAIN");
+                      mStoppedOnFocusLoss = false;
+                      if (mResumeAfterCall) {
+                          Log.v(LOGTAG, "resumeAfterCall");
+                          resumeAfterCall();
+                          break;
+                      }
                       if(false == mPlaybackInProgress)
                           startFM();
-                      mStoppedOnFocusLoss = false;
                       mSession.setActive(true);
                       break;
                   default:
@@ -2263,7 +2255,12 @@
          Log.d(LOGTAG, "audioManager.setFmRadioOn = false \n" );
          stopFM();
          unMute();
-         audioManager.abandonAudioFocus(mAudioFocusListener);
+         // If call is active, we will use audio focus to resume fm after call ends.
+         // So don't abandon audiofocus automatically
+         if (getCallState() == TelephonyManager.CALL_STATE_IDLE) {
+             audioManager.abandonAudioFocus(mAudioFocusListener);
+             mStoppedOnFocusLoss = true;
+         }
          //audioManager.setParameters("FMRadioOn=false");
          Log.d(LOGTAG, "audioManager.setFmRadioOn false done \n" );
       }
@@ -3832,7 +3829,7 @@
    }
    private void requestFocus() {
       if( (false == mPlaybackInProgress) &&
-          (true  == mStoppedOnFocusLoss) ) {
+          (true  == mStoppedOnFocusLoss) && isFmOn()) {
            // adding code for audio focus gain.
            AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
            audioManager.requestAudioFocus(mAudioFocusListener, AudioManager.STREAM_MUSIC,
