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:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -401,7 +401,7 @@ public class CdmaLteServiceStateTracker extends CdmaServiceStateTracker {
|
||||
}
|
||||
|
||||
if ((hasCdmaDataConnectionChanged || hasNetworkTypeChanged)) {
|
||||
phone.notifyDataConnection();
|
||||
phone.notifyDataConnection(null);
|
||||
}
|
||||
|
||||
if (hasRoamingOn) {
|
||||
|
||||
@@ -999,7 +999,7 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
|
||||
}
|
||||
|
||||
if (hasCdmaDataConnectionChanged || hasNetworkTypeChanged) {
|
||||
phone.notifyDataConnection();
|
||||
phone.notifyDataConnection(null);
|
||||
}
|
||||
|
||||
if (hasRoamingOn) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user