Skip to content

Commit 37f770f

Browse files
yoonsung.namJohn Huang
authored andcommitted
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 <yoonsung.nam@samsung.com>
1 parent eb7763e commit 37f770f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

services/java/com/android/server/TelephonyRegistry.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,11 +422,13 @@ public void notifyDataConnection(int state, boolean isDataConnectivityPossible,
422422
modified = true;
423423
}
424424
if (modified) {
425-
Slog.d(TAG, "onDataConnectionStateChanged(" + state + ", " + networkType + ")");
425+
Slog.d(TAG, "onDataConnectionStateChanged(" + mDataConnectionState
426+
+ ", " + mDataConnectionNetworkType + ")");
426427
for (Record r : mRecords) {
427428
if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) {
428429
try {
429-
r.callback.onDataConnectionStateChanged(state, networkType);
430+
r.callback.onDataConnectionStateChanged(mDataConnectionState,
431+
mDataConnectionNetworkType);
430432
} catch (RemoteException ex) {
431433
mRemoveList.add(r.binder);
432434
}

0 commit comments

Comments
 (0)