Loading services/java/com/android/server/TelephonyRegistry.java +18 −6 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyCallState()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mCallState = state; mCallIncomingNumber = incomingNumber; Loading @@ -241,10 +242,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onCallStateChanged(state, incomingNumber); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } broadcastCallStateChanged(state, incomingNumber); } Loading @@ -268,6 +270,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifySignalStrength()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mSignalStrength = signalStrength; for (Record r : mRecords) { Loading @@ -280,10 +283,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { r.callback.onSignalStrengthChanged((gsmSignalStrength == 99 ? -1 : gsmSignalStrength)); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } broadcastSignalStrengthChanged(signalStrength); } Loading @@ -292,6 +296,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyMessageWaitingChanged()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mMessageWaiting = mwi; for (Record r : mRecords) { Loading @@ -299,10 +304,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onMessageWaitingIndicatorChanged(mwi); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading @@ -310,6 +316,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyCallForwardingChanged()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mCallForwarding = cfi; for (Record r : mRecords) { Loading @@ -317,10 +324,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onCallForwardingIndicatorChanged(cfi); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading @@ -328,6 +336,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyDataActivity()" )) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mDataActivity = state; for (Record r : mRecords) { Loading @@ -335,10 +344,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onDataActivity(state); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading Loading @@ -376,15 +386,17 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { modified = true; } if (modified) { ArrayList<IBinder> removeList = new ArrayList<IBinder>(); for (Record r : mRecords) { if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) { try { r.callback.onDataConnectionStateChanged(state, networkType); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } broadcastDataConnectionStateChanged(state, isDataConnectivityPossible, reason, apn, Loading Loading
services/java/com/android/server/TelephonyRegistry.java +18 −6 Original line number Diff line number Diff line Loading @@ -233,6 +233,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyCallState()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mCallState = state; mCallIncomingNumber = incomingNumber; Loading @@ -241,10 +242,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onCallStateChanged(state, incomingNumber); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } broadcastCallStateChanged(state, incomingNumber); } Loading @@ -268,6 +270,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifySignalStrength()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mSignalStrength = signalStrength; for (Record r : mRecords) { Loading @@ -280,10 +283,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { r.callback.onSignalStrengthChanged((gsmSignalStrength == 99 ? -1 : gsmSignalStrength)); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } broadcastSignalStrengthChanged(signalStrength); } Loading @@ -292,6 +296,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyMessageWaitingChanged()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mMessageWaiting = mwi; for (Record r : mRecords) { Loading @@ -299,10 +304,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onMessageWaitingIndicatorChanged(mwi); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading @@ -310,6 +316,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyCallForwardingChanged()")) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mCallForwarding = cfi; for (Record r : mRecords) { Loading @@ -317,10 +324,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onCallForwardingIndicatorChanged(cfi); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading @@ -328,6 +336,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { if (!checkNotifyPermission("notifyDataActivity()" )) { return; } ArrayList<IBinder> removeList = new ArrayList<IBinder>(); synchronized (mRecords) { mDataActivity = state; for (Record r : mRecords) { Loading @@ -335,10 +344,11 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { try { r.callback.onDataActivity(state); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } Loading Loading @@ -376,15 +386,17 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub { modified = true; } if (modified) { ArrayList<IBinder> removeList = new ArrayList<IBinder>(); for (Record r : mRecords) { if ((r.events & PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) != 0) { try { r.callback.onDataConnectionStateChanged(state, networkType); } catch (RemoteException ex) { remove(r.binder); removeList.add(r.binder); } } } for (IBinder b : removeList) remove(b); } } broadcastDataConnectionStateChanged(state, isDataConnectivityPossible, reason, apn, Loading