fm/qcom/fmradio/FmReceiver.java
public boolean enable (FmConfig configSettings){
      boolean status = false;
      /*
       * Check for FM State.
       * If FMRx already on, then return.
      */
      int state = getFMState();
      if (state == FMState_Rx_Turned_On || state == FMState_Srch_InProg) {
         Log.d(TAG, "enable: FM already turned On and running");
         return status;
      }else if (state == subPwrLevel_FMTurning_Off) {
         Log.v(TAG, "FM is in the process of turning off.Pls wait for sometime.");
         return status;
      }else if (state == subPwrLevel_FMRx_Starting) {
         Log.v(TAG, "FM is in the process of turning On.Pls wait for sometime.");
         return status;
      }else if ((state == FMState_Tx_Turned_On)
                || (state == subPwrLevel_FMTx_Starting)) {
         Log.v(TAG, "FM Tx is turned on or in the process of turning on.");
         return status;
      }

      setFMPowerState(subPwrLevel_FMRx_Starting);
      Log.v(TAG, "enable: CURRENT-STATE : FMOff ---> NEW-STATE : FMRxStarting");
      status = super.enable(configSettings, FmTransceiver.FM_RX);

      if( status == true ) {
         /* Do Receiver Specific Enable Stuff here.*/
         status = registerClient(mCallback);
         mRdsData = new FmRxRdsData(sFd);
      }
      else {
         status = false;
         Log.e(TAG, "enable: Error while turning FM On");
         Log.e(TAG, "enable: CURRENT-STATE : FMRxStarting ---> NEW-STATE : FMOff");
         setFMPowerState(FMState_Turned_Off);
      }
      return status;
   }
/**
   *    Enables the FM device in Receiver Mode.
   *    <p>
   *    This is a synchronous method used to initialize the FM
   *    receiver. If already initialized this function will
   *    intialize the receiver with default settings. Only after
   *    successfully calling this function can many of the FM device
   *    interfaces be used.
   *    <p>
   *    When enabling the receiver, the client must also provide
   *    the regional settings in which the receiver will operate.
   *    These settings (included in argument configSettings) are
   *    typically used for setting up the FM receiver for operating
   *    in a particular geographical region. These settings can be
   *    changed after the FM driver is enabled through the use of
   *    the function {@link #configure}.
   *    <p>
   *    This command can only be issued by the owner of an FM
   *    receiver.  To issue this command, the client must first
   *    successfully call {@link #acquire}.
   *    <p>
   *    @param configSettings  the settings to be applied when
   *                             turning on the radio
   *    @return true if Initialization succeeded, false if
   *            Initialization failed.
   *    <p>
   *    @see #enable
   *    @see #registerClient
   *    @see #disable
   *
   */
Enables the FM device in Receiver Mode.

This is a synchronous method used to initialize the FM
receiver. If already initialized this function will
intialize the receiver with default settings. Only after
successfully calling this function can many of the FM device
interfaces be used.

When enabling the receiver, the client must also provide
the regional settings in which the receiver will operate.
These settings (included in argument configSettings) are
typically used for setting up the FM receiver for operating
in a particular geographical region. These settings can be
changed after the FM driver is enabled through the use of
the function  #configure.

This command can only be issued by the owner of an FM
receiver.  To issue this command, the client must first
successfully call  #acquire.

@param configSettings  the settings to be applied when
turning on the radio
@return true if Initialization succeeded, false if
Initialization failed.
Enables the FM device in Receiver Mode . This is a synchronous method used to initialize the FM receiver . If already initialized this function will intialize the receiver with default settings . Only after successfully calling this function can many of the FM device interfaces be used . When enabling the receiver the client must also provide the regional settings in which the receiver will operate . These settings ( included in argument configSettings ) are typically used for setting up the FM receiver for operating in a particular geographical region . These settings can be changed after the FM driver is enabled through the use of the function #configure . This command can only be issued by the owner of an FM receiver . To issue this command the client must first successfully call #acquire . @param configSettings the settings to be applied when turning on the radio @return true if Initialization succeeded false if Initialization failed .
public boolean enable (FmConfig configSettings){
      boolean status = false;
      /*
       * Check for FM State.
       * If FMRx already on, then return.
      */
      int state = getFMState();
      if (state == FMState_Rx_Turned_On || state == FMState_Srch_InProg) {
         Log.d(TAG, "enable: FM already turned On and running");
         return status;
      }else if (state == subPwrLevel_FMTurning_Off) {
         Log.v(TAG, "FM is in the process of turning off.Pls wait for sometime.");
         return status;
      }else if (state == subPwrLevel_FMRx_Starting) {
         Log.v(TAG, "FM is in the process of turning On.Pls wait for sometime.");
         return status;
      }else if ((state == FMState_Tx_Turned_On)
                || (state == subPwrLevel_FMTx_Starting)) {
         Log.v(TAG, "FM Tx is turned on or in the process of turning on.");
         return status;
      }
      setFMPowerState(subPwrLevel_FMRx_Starting);
      Log.v(TAG, "enable: CURRENT-STATE : FMOff ---> NEW-STATE : FMRxStarting");
      status = super.enable(configSettings, FmTransceiver.FM_RX);
      if( status == true ) {
         /* Do Receiver Specific Enable Stuff here.*/
         status = registerClient(mCallback);
         mRdsData = new FmRxRdsData(sFd);
      }
      else {
         status = false;
         Log.e(TAG, "enable: Error while turning FM On");
         Log.e(TAG, "enable: CURRENT-STATE : FMRxStarting ---> NEW-STATE : FMOff");
         setFMPowerState(FMState_Turned_Off);
      }
      return status;
   }
public boolean enable ( FmConfig configSettings ) { boolean status = false ; /*
       * Check for FM State.
       * If FMRx already on, then return.
      */ int state = getFMState ( ) ; if ( state == FMState_Rx_Turned_On || state == FMState_Srch_InProg ) { Log . d ( TAG , "enable: FM already turned On and running" ) ; return status ; } else if ( state == subPwrLevel_FMTurning_Off ) { Log . v ( TAG , "FM is in the process of turning off.Pls wait for sometime." ) ; return status ; } else if ( state == subPwrLevel_FMRx_Starting ) { Log . v ( TAG , "FM is in the process of turning On.Pls wait for sometime." ) ; return status ; } else if ( ( state == FMState_Tx_Turned_On ) || ( state == subPwrLevel_FMTx_Starting ) ) { Log . v ( TAG , "FM Tx is turned on or in the process of turning on." ) ; return status ; } setFMPowerState ( subPwrLevel_FMRx_Starting ) ; Log . v ( TAG , "enable: CURRENT-STATE : FMOff ---> NEW-STATE : FMRxStarting" ) ; status = super . enable ( configSettings , FmTransceiver . FM_RX ) ; if ( status == true ) { /* Do Receiver Specific Enable Stuff here.*/ status = registerClient ( mCallback ) ; mRdsData = new FmRxRdsData ( sFd ) ; } else { status = false ; Log . e ( TAG , "enable: Error while turning FM On" ) ; Log . e ( TAG , "enable: CURRENT-STATE : FMRxStarting ---> NEW-STATE : FMOff" ) ; setFMPowerState ( FMState_Turned_Off ) ; } return status ; }
Enables the FM device in Receiver Mode.
Enables the FM device in Receiver Mode .