fm/qcom/fmradio/FmTransmitter.java
public boolean disable(){
      boolean status = false;
      int state;

      state = getFMState();
      switch(state) {
         case FMState_Turned_Off:
              Log.d(TAG, "FM already tuned Off.");
              return true;
         case subPwrLevel_FMTx_Starting:
              /*
               * If, FM is in the process of turning On, then wait for
               * the turn on operation to complete before turning off.
               */
              Log.d(TAG, "disable: FM not yet turned On...");
              try {
                   Thread.sleep(100);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              }
              /* Check for the state of FM device */
              state = getFMState();
              if(state == subPwrLevel_FMTx_Starting) {
                 Log.e(TAG, "disable: FM in bad state");
                 return status;
              }
              break;
         case subPwrLevel_FMTurning_Off:
              /*
               * If, FM is in the process of turning Off, then wait for
               * the turn off operation to complete.
               */
              Log.v(TAG, "disable: FM is getting turned Off.");
              return status;
      }
      setFMPowerState(subPwrLevel_FMTurning_Off);
      Log.v(TAG, "disable: CURRENT-STATE : FMTxOn ---> NEW-STATE : FMTurningOff");
      //Stop all the RDS transmissions if there any
      if(mPSStarted) {
         if(!stopPSInfo()) {
            Log.d(TAG, "FmTrasmitter:stopPSInfo failed\n");
         }
      }
      if(mRTStarted) {
        if(!stopRTInfo()) {
           Log.d(TAG, "FmTrasmitter:stopRTInfo failed\n");
        }
      }
      if(!transmitRdsGroupControl(RDS_GRPS_TX_STOP) ) {
         Log.d(TAG, "FmTrasmitter:transmitRdsGroupControl failed\n");
      }
      super.disable();
      return true;
   }
/**
    *  Disables the FM Transmitter Device.
    *  <p>
    *  This is a synchronous command used to disable the FM
    *  device. This function is expected to be used when the
    *  application no longer requires use of the FM device. Once
    *  called, most functionality offered by the FM device will be
    *  disabled until the application re-enables the device again
    *  via {@link #enable}.
    *
    *  <p>
    *  @return true if disabling succeeded, false if disabling
    *          failed.
    *
    *  @see #enable
    *  @see #registerTransmitClient
    */
Disables the FM Transmitter Device.

This is a synchronous command used to disable the FM
device. This function is expected to be used when the
application no longer requires use of the FM device. Once
called, most functionality offered by the FM device will be
disabled until the application re-enables the device again
via  #enable.


@return true if disabling succeeded, false if disabling
failed.

@see #enable
@see #registerTransmitClient
Disables the FM Transmitter Device . This is a synchronous command used to disable the FM device . This function is expected to be used when the application no longer requires use of the FM device . Once called most functionality offered by the FM device will be disabled until the application re - enables the device again via #enable . @return true if disabling succeeded false if disabling failed . @see #enable @see #registerTransmitClient
public boolean disable(){
      boolean status = false;
      int state;
      state = getFMState();
      switch(state) {
         case FMState_Turned_Off:
              Log.d(TAG, "FM already tuned Off.");
              return true;
         case subPwrLevel_FMTx_Starting:
              /*
               * If, FM is in the process of turning On, then wait for
               * the turn on operation to complete before turning off.
               */
              Log.d(TAG, "disable: FM not yet turned On...");
              try {
                   Thread.sleep(100);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              }
              /* Check for the state of FM device */
              state = getFMState();
              if(state == subPwrLevel_FMTx_Starting) {
                 Log.e(TAG, "disable: FM in bad state");
                 return status;
              }
              break;
         case subPwrLevel_FMTurning_Off:
              /*
               * If, FM is in the process of turning Off, then wait for
               * the turn off operation to complete.
               */
              Log.v(TAG, "disable: FM is getting turned Off.");
              return status;
      }
      setFMPowerState(subPwrLevel_FMTurning_Off);
      Log.v(TAG, "disable: CURRENT-STATE : FMTxOn ---> NEW-STATE : FMTurningOff");
      if(mPSStarted) {
         if(!stopPSInfo()) {
            Log.d(TAG, "FmTrasmitter:stopPSInfo failed\n");
         }
      }
      if(mRTStarted) {
        if(!stopRTInfo()) {
           Log.d(TAG, "FmTrasmitter:stopRTInfo failed\n");
        }
      }
      if(!transmitRdsGroupControl(RDS_GRPS_TX_STOP) ) {
         Log.d(TAG, "FmTrasmitter:transmitRdsGroupControl failed\n");
      }
      super.disable();
      return true;
   }
public boolean disable ( ) { boolean status = false ; int state ; state = getFMState ( ) ; switch ( state ) { case FMState_Turned_Off : Log . d ( TAG , "FM already tuned Off." ) ; return true ; case subPwrLevel_FMTx_Starting : /*
               * If, FM is in the process of turning On, then wait for
               * the turn on operation to complete before turning off.
               */ Log . d ( TAG , "disable: FM not yet turned On..." ) ; try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } /* Check for the state of FM device */ state = getFMState ( ) ; if ( state == subPwrLevel_FMTx_Starting ) { Log . e ( TAG , "disable: FM in bad state" ) ; return status ; } break ; case subPwrLevel_FMTurning_Off : /*
               * If, FM is in the process of turning Off, then wait for
               * the turn off operation to complete.
               */ Log . v ( TAG , "disable: FM is getting turned Off." ) ; return status ; } setFMPowerState ( subPwrLevel_FMTurning_Off ) ; Log . v ( TAG , "disable: CURRENT-STATE : FMTxOn ---> NEW-STATE : FMTurningOff" ) ; if ( mPSStarted ) { if ( ! stopPSInfo ( ) ) { Log . d ( TAG , "FmTrasmitter:stopPSInfo failed\n" ) ; } } if ( mRTStarted ) { if ( ! stopRTInfo ( ) ) { Log . d ( TAG , "FmTrasmitter:stopRTInfo failed\n" ) ; } } if ( ! transmitRdsGroupControl ( RDS_GRPS_TX_STOP ) ) { Log . d ( TAG , "FmTrasmitter:transmitRdsGroupControl failed\n" ) ; } super . disable ( ) ; return true ; }
Disables the FM Transmitter Device.
Disables the FM Transmitter Device .
//Stop all the RDS transmissions if there any