summaryrefslogtreecommitdiffstats
path: root/service/java
diff options
context:
space:
mode:
authorSravanthi Palakonda <srapal@codeaurora.org>2015-11-20 12:17:53 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-11-23 01:31:54 -0800
commitca8d2fecf390a255381f45ee6d12420992b95c53 (patch)
tree88c131b49623bffe755cc1d320fc8f0e6780824f /service/java
parent6747d4f0ff76245f06dfecb634e9a7661ce4e351 (diff)
downloadandroid_frameworks_opt_net_wifi-ca8d2fecf390a255381f45ee6d12420992b95c53.tar.gz
android_frameworks_opt_net_wifi-ca8d2fecf390a255381f45ee6d12420992b95c53.tar.bz2
android_frameworks_opt_net_wifi-ca8d2fecf390a255381f45ee6d12420992b95c53.zip
Check ecbm_mode_change param while processing ECBM intent
Commit Ib1eb4bf03262158f805ffac959f8f9b12b80e659 does not add the action ACTION_EMERGENCY_CALLBACK_MODE_CHANGED when config_wifi_ecbm_mode_change is set to FALSE . This configuration parameter is set to FALSE for a specific MCC-MNC combination and at this point of time these parameters (MCC/MNC) from the SIM are not read and thus the configuration parameter check is of no use here. Thus , check for this configuration parameter while processing the intent . CRs-Fixed: 941367 Change-Id: I2fb29f2460c0934a3ed66bbb84bb677c3182121b
Diffstat (limited to 'service/java')
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index baf492bfe..cdc76d4e3 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -1380,8 +1380,10 @@ public final class WifiServiceImpl extends IWifiManager.Stub {
BluetoothAdapter.STATE_DISCONNECTED);
mWifiStateMachine.sendBluetoothAdapterStateChange(state);
} else if (action.equals(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED)) {
- boolean emergencyMode = intent.getBooleanExtra("phoneinECMState", false);
- mWifiController.sendMessage(CMD_EMERGENCY_MODE_CHANGED, emergencyMode ? 1 : 0, 0);
+ if (mContext.getResources().getBoolean(R.bool.config_wifi_ecbm_mode_change)) {
+ boolean emergencyMode = intent.getBooleanExtra("phoneinECMState", false);
+ mWifiController.sendMessage(CMD_EMERGENCY_MODE_CHANGED, emergencyMode ? 1 : 0, 0);
+ }
} else if (action.equals(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED)) {
handleIdleModeChanged();
} else if (action.equals(WifiManager.WIFI_AP_STATE_CHANGED_ACTION)) {
@@ -1431,9 +1433,7 @@ public final class WifiServiceImpl extends IWifiManager.Stub {
intentFilter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
intentFilter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
intentFilter.addAction(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED);
- if(mContext.getResources().getBoolean(R.bool.config_wifi_ecbm_mode_change)) {
- intentFilter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
- }
+ intentFilter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
mContext.registerReceiver(mReceiver, intentFilter);
}