int rv;
wifi_manager_device_state_e device_state;
int activated = -1;
+ int flight_mode = -1;
+
+ if (vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &flight_mode) != 0) {
+ WIFI_LOG(WIFI_ERROR, "Failed to get vconf key of flight mode");
+ return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+ }
rv = _wifi_get_wifi_device_state(&device_state);
if (rv == WIFI_MANAGER_ERROR_NONE) {
activated = 1;
}
- WIFI_LOG(WIFI_INFO, "Activated: %d", activated);
+ WIFI_LOG(WIFI_INFO, "Activated: %d, flight mode: %d", activated, flight_mode);
+
+ if (activated == 0 && flight_mode > 0) {
+ WIFI_LOG(WIFI_INFO, "Invalid operation"); //LCOV_EXCL_LINE
+ return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
+ }
+
rv = net_bssid_scan_wifi(activated);
if (rv == NET_ERR_ACCESS_DENIED) {