Merge "Fix concurrent access violation." into lmp-mr1-dev

This commit is contained in:
Wink Saville
2014-09-30 22:30:03 +00:00
committed by Android (Google) Code Review

View File

@@ -212,11 +212,12 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
//defaultSubId comes before new defaultSubId update) we need to recall all //defaultSubId comes before new defaultSubId update) we need to recall all
//possible missed notify callback //possible missed notify callback
synchronized (mRecords) { synchronized (mRecords) {
for (Record r : mRecords) { for (Record r : mRecords) {
if(r.subId == SubscriptionManager.DEFAULT_SUB_ID) { if(r.subId == SubscriptionManager.DEFAULT_SUB_ID) {
checkPossibleMissNotify(r, newDefaultPhoneId); checkPossibleMissNotify(r, newDefaultPhoneId);
} }
} }
handleRemoveListLocked();
} }
mDefaultSubId = newDefaultSubId; mDefaultSubId = newDefaultSubId;
mDefaultPhoneId = newDefaultPhoneId; mDefaultPhoneId = newDefaultPhoneId;
@@ -1445,7 +1446,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
r.callback.onServiceStateChanged( r.callback.onServiceStateChanged(
new ServiceState(mServiceState[phoneId])); new ServiceState(mServiceState[phoneId]));
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
@@ -1472,7 +1473,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
r.callback.onSignalStrengthChanged((gsmSignalStrength == 99 ? -1 r.callback.onSignalStrengthChanged((gsmSignalStrength == 99 ? -1
: gsmSignalStrength)); : gsmSignalStrength));
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
@@ -1484,7 +1485,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
} }
r.callback.onCellInfoChanged(mCellInfo.get(phoneId)); r.callback.onCellInfoChanged(mCellInfo.get(phoneId));
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
@@ -1497,7 +1498,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
r.callback.onMessageWaitingIndicatorChanged( r.callback.onMessageWaitingIndicatorChanged(
mMessageWaiting[phoneId]); mMessageWaiting[phoneId]);
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
@@ -1510,7 +1511,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
r.callback.onCallForwardingIndicatorChanged( r.callback.onCallForwardingIndicatorChanged(
mCallForwarding[phoneId]); mCallForwarding[phoneId]);
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
@@ -1535,7 +1536,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
r.callback.onDataConnectionStateChanged(mDataConnectionState[phoneId], r.callback.onDataConnectionStateChanged(mDataConnectionState[phoneId],
mDataConnectionNetworkType[phoneId]); mDataConnectionNetworkType[phoneId]);
} catch (RemoteException ex) { } catch (RemoteException ex) {
remove(r.binder); mRemoveList.add(r.binder);
} }
} }
} }