Merge "[Telephony] Physical Channel Config should support DSDS"
This commit is contained in:
@@ -313,7 +313,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
|
|
||||||
private final LocalLog mListenLog = new LocalLog(200);
|
private final LocalLog mListenLog = new LocalLog(200);
|
||||||
|
|
||||||
private List<PhysicalChannelConfig> mPhysicalChannelConfigs;
|
private List<List<PhysicalChannelConfig>> mPhysicalChannelConfigs;
|
||||||
|
|
||||||
private boolean[] mIsDataEnabled;
|
private boolean[] mIsDataEnabled;
|
||||||
|
|
||||||
@@ -583,9 +583,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mPreciseDataConnectionStates.add(new ArrayMap<>());
|
mPreciseDataConnectionStates.add(new ArrayMap<>());
|
||||||
mBarringInfo.add(i, new BarringInfo());
|
mBarringInfo.add(i, new BarringInfo());
|
||||||
mTelephonyDisplayInfos[i] = null;
|
mTelephonyDisplayInfos[i] = null;
|
||||||
mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build());
|
|
||||||
mIsDataEnabled[i] = false;
|
mIsDataEnabled[i] = false;
|
||||||
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
|
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
|
||||||
|
mPhysicalChannelConfigs.add(i, new ArrayList<>());
|
||||||
mAllowedNetworkTypeReason[i] = -1;
|
mAllowedNetworkTypeReason[i] = -1;
|
||||||
mAllowedNetworkTypeValue[i] = -1;
|
mAllowedNetworkTypeValue[i] = -1;
|
||||||
mLinkCapacityEstimateLists.add(i, new ArrayList<>());
|
mLinkCapacityEstimateLists.add(i, new ArrayList<>());
|
||||||
@@ -683,9 +683,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
mPreciseDataConnectionStates.add(new ArrayMap<>());
|
mPreciseDataConnectionStates.add(new ArrayMap<>());
|
||||||
mBarringInfo.add(i, new BarringInfo());
|
mBarringInfo.add(i, new BarringInfo());
|
||||||
mTelephonyDisplayInfos[i] = null;
|
mTelephonyDisplayInfos[i] = null;
|
||||||
mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build());
|
|
||||||
mIsDataEnabled[i] = false;
|
mIsDataEnabled[i] = false;
|
||||||
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
|
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
|
||||||
|
mPhysicalChannelConfigs.add(i, new ArrayList<>());
|
||||||
mAllowedNetworkTypeReason[i] = -1;
|
mAllowedNetworkTypeReason[i] = -1;
|
||||||
mAllowedNetworkTypeValue[i] = -1;
|
mAllowedNetworkTypeValue[i] = -1;
|
||||||
mLinkCapacityEstimateLists.add(i, new ArrayList<>());
|
mLinkCapacityEstimateLists.add(i, new ArrayList<>());
|
||||||
@@ -1176,8 +1176,9 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
try {
|
try {
|
||||||
r.callback.onPhysicalChannelConfigChanged(
|
r.callback.onPhysicalChannelConfigChanged(
|
||||||
shouldSanitizeLocationForPhysicalChannelConfig(r)
|
shouldSanitizeLocationForPhysicalChannelConfig(r)
|
||||||
? getLocationSanitizedConfigs(mPhysicalChannelConfigs)
|
? getLocationSanitizedConfigs(
|
||||||
: mPhysicalChannelConfigs);
|
mPhysicalChannelConfigs.get(phoneId))
|
||||||
|
: mPhysicalChannelConfigs.get(phoneId));
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
remove(r.binder);
|
remove(r.binder);
|
||||||
}
|
}
|
||||||
@@ -2387,7 +2388,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
synchronized (mRecords) {
|
synchronized (mRecords) {
|
||||||
int phoneId = SubscriptionManager.getPhoneId(subId);
|
int phoneId = SubscriptionManager.getPhoneId(subId);
|
||||||
if (validatePhoneId(phoneId)) {
|
if (validatePhoneId(phoneId)) {
|
||||||
mPhysicalChannelConfigs.set(phoneId, configs.get(phoneId));
|
mPhysicalChannelConfigs.set(phoneId, configs);
|
||||||
for (Record r : mRecords) {
|
for (Record r : mRecords) {
|
||||||
if (r.matchTelephonyCallbackEvent(
|
if (r.matchTelephonyCallbackEvent(
|
||||||
TelephonyCallback.EVENT_PHYSICAL_CHANNEL_CONFIG_CHANGED)
|
TelephonyCallback.EVENT_PHYSICAL_CHANNEL_CONFIG_CHANGED)
|
||||||
@@ -2594,6 +2595,7 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
pw.println("mDataEnabledReason=" + mDataEnabledReason);
|
pw.println("mDataEnabledReason=" + mDataEnabledReason);
|
||||||
pw.println("mAllowedNetworkTypeReason=" + mAllowedNetworkTypeReason[i]);
|
pw.println("mAllowedNetworkTypeReason=" + mAllowedNetworkTypeReason[i]);
|
||||||
pw.println("mAllowedNetworkTypeValue=" + mAllowedNetworkTypeValue[i]);
|
pw.println("mAllowedNetworkTypeValue=" + mAllowedNetworkTypeValue[i]);
|
||||||
|
pw.println("mPhysicalChannelConfigs=" + mPhysicalChannelConfigs.get(i));
|
||||||
pw.println("mLinkCapacityEstimateList=" + mLinkCapacityEstimateLists.get(i));
|
pw.println("mLinkCapacityEstimateList=" + mLinkCapacityEstimateLists.get(i));
|
||||||
pw.decreaseIndent();
|
pw.decreaseIndent();
|
||||||
}
|
}
|
||||||
@@ -2604,7 +2606,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
|
|||||||
pw.println("mEmergencyNumberList=" + mEmergencyNumberList);
|
pw.println("mEmergencyNumberList=" + mEmergencyNumberList);
|
||||||
pw.println("mDefaultPhoneId=" + mDefaultPhoneId);
|
pw.println("mDefaultPhoneId=" + mDefaultPhoneId);
|
||||||
pw.println("mDefaultSubId=" + mDefaultSubId);
|
pw.println("mDefaultSubId=" + mDefaultSubId);
|
||||||
pw.println("mPhysicalChannelConfigs=" + mPhysicalChannelConfigs);
|
|
||||||
|
|
||||||
pw.decreaseIndent();
|
pw.decreaseIndent();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user