Merge "Fix low probability deadlock"
This commit is contained in:
@@ -503,6 +503,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
synchronized (mRecords) {
|
synchronized (mRecords) {
|
||||||
// register
|
// register
|
||||||
IBinder b = callback.asBinder();
|
IBinder b = callback.asBinder();
|
||||||
@@ -525,9 +526,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
} else {//APP specify subID
|
} else {//APP specify subID
|
||||||
r.subId = subId;
|
r.subId = subId;
|
||||||
}
|
}
|
||||||
r.phoneId = SubscriptionManager.getPhoneId(r.subId);
|
r.phoneId = phoneId;
|
||||||
|
|
||||||
int phoneId = r.phoneId;
|
|
||||||
r.events = events;
|
r.events = events;
|
||||||
if (DBG) {
|
if (DBG) {
|
||||||
log("listen: Register r=" + r + " r.subId=" + r.subId + " phoneId=" + phoneId);
|
log("listen: Register r=" + r + " r.subId=" + r.subId + " phoneId=" + phoneId);
|
||||||
@@ -1013,9 +1012,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
log("notifyCellInfoForSubscriber: subId=" + subId
|
log("notifyCellInfoForSubscriber: subId=" + subId
|
||||||
+ " cellInfo=" + cellInfo);
|
+ " cellInfo=" + cellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mRecords) {
|
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
mCellInfo.set(phoneId, cellInfo);
|
mCellInfo.set(phoneId, cellInfo);
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
@@ -1103,8 +1101,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
log("notifyCallForwardingChangedForSubscriber: subId=" + subId
|
log("notifyCallForwardingChangedForSubscriber: subId=" + subId
|
||||||
+ " cfi=" + cfi);
|
+ " cfi=" + cfi);
|
||||||
}
|
}
|
||||||
synchronized (mRecords) {
|
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
mCallForwarding[phoneId] = cfi;
|
mCallForwarding[phoneId] = cfi;
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
@@ -1131,8 +1129,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
if (!checkNotifyPermission("notifyDataActivity()" )) {
|
if (!checkNotifyPermission("notifyDataActivity()" )) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
synchronized (mRecords) {
|
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
mDataActivity[phoneId] = state;
|
mDataActivity[phoneId] = state;
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
@@ -1173,8 +1171,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
+ "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType
|
+ "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType
|
||||||
+ " mRecords.size()=" + mRecords.size());
|
+ " mRecords.size()=" + mRecords.size());
|
||||||
}
|
}
|
||||||
synchronized (mRecords) {
|
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
boolean modified = false;
|
boolean modified = false;
|
||||||
if (state == TelephonyManager.DATA_CONNECTED) {
|
if (state == TelephonyManager.DATA_CONNECTED) {
|
||||||
@@ -1297,8 +1295,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
log("notifyCellLocationForSubscriber: subId=" + subId
|
log("notifyCellLocationForSubscriber: subId=" + subId
|
||||||
+ " cellLocation=" + cellLocation);
|
+ " cellLocation=" + cellLocation);
|
||||||
}
|
}
|
||||||
synchronized (mRecords) {
|
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
mCellLocation[phoneId] = cellLocation;
|
mCellLocation[phoneId] = cellLocation;
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
|
|||||||
Reference in New Issue
Block a user