Merge "Ensure that onCellInfo is always NonNull" am: b4be2f450b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2190535 Change-Id: I639807cea6839c14d5db125cbd9160d54f5357fd Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -339,7 +339,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
|
|
||||||
private int[] mDataConnectionNetworkType;
|
private int[] mDataConnectionNetworkType;
|
||||||
|
|
||||||
private ArrayList<List<CellInfo>> mCellInfo = null;
|
private ArrayList<List<CellInfo>> mCellInfo;
|
||||||
|
|
||||||
private Map<Integer, List<EmergencyNumber>> mEmergencyNumberList;
|
private Map<Integer, List<EmergencyNumber>> mEmergencyNumberList;
|
||||||
|
|
||||||
@@ -725,7 +725,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mMessageWaiting[i] = false;
|
mMessageWaiting[i] = false;
|
||||||
mCallForwarding[i] = false;
|
mCallForwarding[i] = false;
|
||||||
mCellIdentity[i] = null;
|
mCellIdentity[i] = null;
|
||||||
mCellInfo.add(i, null);
|
mCellInfo.add(i, Collections.EMPTY_LIST);
|
||||||
mImsReasonInfo.add(i, null);
|
mImsReasonInfo.add(i, null);
|
||||||
mSrvccState[i] = TelephonyManager.SRVCC_STATE_HANDOVER_NONE;
|
mSrvccState[i] = TelephonyManager.SRVCC_STATE_HANDOVER_NONE;
|
||||||
mCallDisconnectCause[i] = DisconnectCause.NOT_VALID;
|
mCallDisconnectCause[i] = DisconnectCause.NOT_VALID;
|
||||||
@@ -802,7 +802,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mCallNetworkType = new int[numPhones];
|
mCallNetworkType = new int[numPhones];
|
||||||
mCallAttributes = new CallAttributes[numPhones];
|
mCallAttributes = new CallAttributes[numPhones];
|
||||||
mPreciseDataConnectionStates = new ArrayList<>();
|
mPreciseDataConnectionStates = new ArrayList<>();
|
||||||
mCellInfo = new ArrayList<>();
|
mCellInfo = new ArrayList<>(numPhones);
|
||||||
mImsReasonInfo = new ArrayList<>();
|
mImsReasonInfo = new ArrayList<>();
|
||||||
mEmergencyNumberList = new HashMap<>();
|
mEmergencyNumberList = new HashMap<>();
|
||||||
mOutgoingCallEmergencyNumber = new EmergencyNumber[numPhones];
|
mOutgoingCallEmergencyNumber = new EmergencyNumber[numPhones];
|
||||||
@@ -832,7 +832,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mMessageWaiting[i] = false;
|
mMessageWaiting[i] = false;
|
||||||
mCallForwarding[i] = false;
|
mCallForwarding[i] = false;
|
||||||
mCellIdentity[i] = null;
|
mCellIdentity[i] = null;
|
||||||
mCellInfo.add(i, null);
|
mCellInfo.add(i, Collections.EMPTY_LIST);
|
||||||
mImsReasonInfo.add(i, null);
|
mImsReasonInfo.add(i, null);
|
||||||
mSrvccState[i] = TelephonyManager.SRVCC_STATE_HANDOVER_NONE;
|
mSrvccState[i] = TelephonyManager.SRVCC_STATE_HANDOVER_NONE;
|
||||||
mCallDisconnectCause[i] = DisconnectCause.NOT_VALID;
|
mCallDisconnectCause[i] = DisconnectCause.NOT_VALID;
|
||||||
@@ -1794,10 +1794,17 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
if (!checkNotifyPermission("notifyCellInfoForSubscriber()")) {
|
if (!checkNotifyPermission("notifyCellInfoForSubscriber()")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VDBG) {
|
if (VDBG) {
|
||||||
log("notifyCellInfoForSubscriber: subId=" + subId
|
log("notifyCellInfoForSubscriber: subId=" + subId
|
||||||
+ " cellInfo=" + cellInfo);
|
+ " cellInfo=" + cellInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cellInfo == null) {
|
||||||
|
loge("notifyCellInfoForSubscriber() received a null list");
|
||||||
|
cellInfo = Collections.EMPTY_LIST;
|
||||||
|
}
|
||||||
|
|
||||||
int phoneId = getPhoneIdFromSubId(subId);
|
int phoneId = getPhoneIdFromSubId(subId);
|
||||||
synchronized (mRecords) {
|
synchronized (mRecords) {
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user