Remove APN type in notifyDataConnection.

Using APN_TYPE_ALL in notifyDataConnection causes data
connection state to be set as DISCONNECTED all the time
because apnTypeToId returns INVALID_ID for APN_TYPE_ALL.

bug:4972999
Change-Id: Ieb79194575dd97fa4bd7ef2bd8202030aa282d84
This commit is contained in:
John Wang
2011-07-21 14:46:11 -07:00
parent c27cc947e4
commit 343112fb15
4 changed files with 5 additions and 5 deletions

View File

@@ -806,10 +806,10 @@ public abstract class PhoneBase extends Handler implements Phone {
mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
}
public void notifyDataConnection() {
public void notifyDataConnection(String reason) {
String types[] = getActiveApnTypes();
for (String apnType : types) {
mNotifier.notifyDataConnection(this, null, apnType, getDataConnectionState(apnType));
mNotifier.notifyDataConnection(this, reason, apnType, getDataConnectionState(apnType));
}
}

View File

@@ -401,7 +401,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
}
if ((hasCdmaDataConnectionChanged || hasNetworkTypeChanged)) {
phone.notifyDataConnection();
phone.notifyDataConnection(null);
}
if (hasRoamingOn) {

View File

@@ -999,7 +999,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
}
if (hasCdmaDataConnectionChanged || hasNetworkTypeChanged) {
phone.notifyDataConnection();
phone.notifyDataConnection(null);
}
if (hasRoamingOn) {

View File

@@ -915,7 +915,7 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
}
if (hasRadioTechnologyChanged) {
phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED, Phone.APN_TYPE_ALL);
phone.notifyDataConnection(Phone.REASON_NW_TYPE_CHANGED);
}
if (hasRoamingOn) {