From 37f770f03f975982fbe7a1f133e03724bd3dc81a Mon Sep 17 00:00:00 2001 From: "yoonsung.nam" Date: Sat, 20 Aug 2011 21:39:12 -0700 Subject: [PATCH] DO NOT MERGE: Notify overall state instead of current changed state TelephonyRegistry notifies wrong state thourgh onDataConnectionStateChanged(). As a result, browser works even though there is no data icon in status bar. The issue is reproducible as following senario: 1. There are two connections. 2. Network type is changed and one of the connections is disconnected at the same time. 3. TelephonyRegisitry notifies disconnect state to apps which are listening PhoneStateLinstener. Change-Id: Iac1e2b14e41715a63ea0d842cb44d232447e814a Signed-off-by: yoonsung.nam --- services/java/com/android/server/TelephonyRegistry.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java index a8d40b7558abe..60e98ba0fce9d 100644 --- a/services/java/com/android/server/TelephonyRegistry.java +++ b/services/java/com/android/server/TelephonyRegistry.java @@ -422,11 +422,13 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { modified = true; } if (modified) { - Slog.d(TAG, "onDataConnectionStateChanged(" + state + ", " + networkType + ")"); + Slog.d(TAG, "onDataConnectionStateChanged(" + mDataConnectionState + + ", " + mDataConnectionNetworkType + ")"); for (Record r : mRecords) { if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) { try { - r.callback.onDataConnectionStateChanged(state, networkType); + r.callback.onDataConnectionStateChanged(mDataConnectionState, + mDataConnectionNetworkType); } catch (RemoteException ex) { mRemoveList.add(r.binder); }