From 74d99aabf254a4b736ab0da19dd0eec13013917e Mon Sep 17 00:00:00 2001 From: Robert Greenwalt Date: Wed, 14 Jul 2010 14:30:34 -0700 Subject: [PATCH] Don't cast CONNECTING msgs to CONNECTED. Fixed some logic in TelephonyRegistry so its notion of the state of our connection is preserved, but it still sends out proper CONNECTING msg on secondary APNS (ie, bringing up mms while the default connection was already up - it used to send out two CONNECTING msgs instead of one CONNECTING and one CONNECTED). Fixes mms while on mobile data. bug:2840564 Change-Id: I69159aa0f471396680615ce6b9785620d844968f --- services/java/com/android/server/TelephonyRegistry.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java index f42bc8bdf064d..73234df297abd 100644 --- a/services/java/com/android/server/TelephonyRegistry.java +++ b/services/java/com/android/server/TelephonyRegistry.java @@ -376,8 +376,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { mDataConnectionState = state; modified = true; } else { - // we're still connected, so send that out if we send anything. - state = mDataConnectionState; + // leave mDataConnectionState as is and + // send out the new status for the APN in question. } } mDataConnectionPossible = isDataConnectivityPossible; @@ -444,7 +444,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { /** * Copy the service state object so they can't mess it up in the local calls */ - public void sendServiceState(Record r, ServiceState state) { + private void sendServiceState(Record r, ServiceState state) { try { r.callback.onServiceStateChanged(new ServiceState(state)); } catch (RemoteException ex) {