Body
[Java]
Private BroadcastReceiver br = new BroadcastReceiver (){
@ Override
Public void onReceive (Context context, Intent intent ){
String action = intent. getAction ();
If (action. equals ("com. android. FMRadio. FlightClock ")){
// Get the flight mode status, true enabled, false disabled
Int isAirplaneMode = Settings. System. getInt (mContext. getContentResolver (),
Settings. System. AIRPLANE_MODE_ON, 0 );
Boolean find = (isAirplaneMode = 1 )? True: false;
If (find ){
Toast. makeText (mContext, R. string. toast_in_flight, Toast. LENGTH_SHORT). show ();
If (mIsPlaying ){
RefreshImageButton (false );
RefreshActionMenuItem (false );
RefreshPopupMenuItem (false );
RefreshActionMenuPower (false );
ExitService ();
Return;
}
}
}
}
};
Private BroadcastReceiver br = new BroadcastReceiver (){
@ Override
Public void onReceive (Context context, Intent intent ){
String action = intent. getAction ();
If (action. equals ("com. android. FMRadio. FlightClock ")){
// Get the flight mode status, true enabled, false disabled
Int isAirplaneMode = Settings. System. getInt (mContext. getContentResolver (),
Settings. System. AIRPLANE_MODE_ON, 0 );
Boolean find = (isAirplaneMode = 1 )? True: false;
If (find ){
Toast. makeText (mContext, R. string. toast_in_flight, Toast. LENGTH_SHORT). show ();
If (mIsPlaying ){
RefreshImageButton (false );
RefreshActionMenuItem (false );
RefreshPopupMenuItem (false );
RefreshActionMenuPower (false );
ExitService ();
Return;
}
}
}
}
};