Loading flags/data.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -12,17 +12,6 @@ flag { } } # OWNER=linggm TARGET=24Q4 flag { name: "keep_empty_requests_network" namespace: "telephony" description: "Don't tear down network even if no requests attached to it." bug: "331301784" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=linggm TARGET=25Q2 flag { name: "auto_data_switch_enhanced" Loading flags/misc.aconfig +0 −11 Original line number Diff line number Diff line package: "com.android.internal.telephony.flags" container: "system" # OWNER=linggm TARGET=24Q3 flag { name: "combine_ril_death_handle" namespace: "telephony" description: "Upon radio service death, combine its handling to prevent race condition" bug:"319612362" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tjstuart TARGET=24Q3 flag { name: "do_not_override_precise_label" Loading src/java/com/android/internal/telephony/RIL.java +47 −103 Original line number Diff line number Diff line Loading @@ -394,7 +394,6 @@ public class RIL extends BaseCommands implements CommandsInterface { case EVENT_AIDL_PROXY_DEAD: int aidlService = msg.arg1; long msgCookie = (long) msg.obj; if (mFeatureFlags.combineRilDeathHandle()) { if (msgCookie == mServiceCookies.get(aidlService).get()) { riljLog("handleMessage: EVENT_AIDL_PROXY_DEAD cookie = " + msgCookie + ", service = " + serviceToString(aidlService) + ", cookie = " Loading @@ -407,15 +406,6 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLog("Ignore stale EVENT_AIDL_PROXY_DEAD for service " + serviceToString(aidlService)); } } else { riljLog("handleMessage: EVENT_AIDL_PROXY_DEAD cookie = " + msgCookie + ", service = " + serviceToString(aidlService) + ", cookie = " + mServiceCookies.get(aidlService)); if (msgCookie == mServiceCookies.get(aidlService).get()) { mIsRadioProxyInitialized = false; resetProxyAndRequestList(aidlService); } } break; } } Loading Loading @@ -459,14 +449,9 @@ public class RIL extends BaseCommands implements CommandsInterface { public void serviceDied(long cookie) { // Deal with service going away riljLog("serviceDied"); if (mFeatureFlags.combineRilDeathHandle()) { mRilHandler.sendMessageAtFrontOfQueue(mRilHandler.obtainMessage( EVENT_RADIO_PROXY_DEAD, HAL_SERVICE_RADIO, 0 /* ignored arg2 */, cookie)); } else { mRilHandler.sendMessage(mRilHandler.obtainMessage(EVENT_RADIO_PROXY_DEAD, HAL_SERVICE_RADIO, 0 /* ignored arg2 */, cookie)); } } } Loading Loading @@ -502,14 +487,9 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void binderDied() { riljLog("Service " + serviceToString(mService) + " has died."); if (mFeatureFlags.combineRilDeathHandle()) { mRilHandler.sendMessageAtFrontOfQueue(mRilHandler.obtainMessage( EVENT_AIDL_PROXY_DEAD, mService, 0 /* ignored arg2 */, mLinkedFlags)); } else { mRilHandler.sendMessage(mRilHandler.obtainMessage(EVENT_AIDL_PROXY_DEAD, mService, 0 /* ignored arg2 */, mLinkedFlags)); } unlinkToDeath(); } } Loading @@ -525,7 +505,6 @@ public class RIL extends BaseCommands implements CommandsInterface { // Increment the cookie so that death notification can be ignored mServiceCookies.get(service).incrementAndGet(); } else { if (mFeatureFlags.combineRilDeathHandle()) { // Reset all aidl services. for (int i = MIN_SERVICE_IDX; i <= MAX_SERVICE_IDX; i++) { if (i == HAL_SERVICE_RADIO) continue; Loading @@ -538,11 +517,6 @@ public class RIL extends BaseCommands implements CommandsInterface { // Increment the cookie so that death notification can be ignored mServiceCookies.get(i).incrementAndGet(); } } else { mServiceProxies.get(service).clear(); // Increment the cookie so that death notification can be ignored mServiceCookies.get(service).incrementAndGet(); } } setRadioState(TelephonyManager.RADIO_POWER_UNAVAILABLE, true /* forceNotifyRegistrants */); Loading @@ -554,7 +528,6 @@ public class RIL extends BaseCommands implements CommandsInterface { if (service == HAL_SERVICE_RADIO) { getRadioProxy(); } else { if (mFeatureFlags.combineRilDeathHandle()) { // Reset all aidl services. for (int i = MIN_SERVICE_IDX; i <= MAX_SERVICE_IDX; i++) { if (i == HAL_SERVICE_RADIO) continue; Loading @@ -565,9 +538,6 @@ public class RIL extends BaseCommands implements CommandsInterface { } getRadioServiceProxy(i); } } else { getRadioServiceProxy(service); } } } Loading Loading @@ -621,15 +591,9 @@ public class RIL extends BaseCommands implements CommandsInterface { if (serviceBound) { mIsRadioProxyInitialized = false; if (mFeatureFlags.combineRilDeathHandle()) { // Reset both hidl and aidl proxies. resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } else { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { resetProxyAndRequestList(service); } } } } Loading @@ -656,18 +620,13 @@ public class RIL extends BaseCommands implements CommandsInterface { mHalVersion.put(service, RADIO_HAL_VERSION_UNSUPPORTED); } } if (!mFeatureFlags.combineRilDeathHandle()) { resetProxyAndRequestList(service); } } if (mFeatureFlags.combineRilDeathHandle()) { // Reset both hidl and aidl proxies. Must be after cleaning mocked halVersion, // otherwise an aidl service will be incorrectly considered as disabled. resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } } } return serviceBound; } Loading Loading @@ -1082,7 +1041,6 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public synchronized void onSlotActiveStatusChange(boolean active) { mIsRadioProxyInitialized = false; if (mFeatureFlags.combineRilDeathHandle()) { if (active) { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { // Try to connect to RIL services and set response functions. Loading @@ -1097,20 +1055,6 @@ public class RIL extends BaseCommands implements CommandsInterface { resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } } else { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { if (active) { // Try to connect to RIL services and set response functions. if (service == HAL_SERVICE_RADIO) { getRadioProxy(); } else { getRadioServiceProxy(service); } } else { resetProxyAndRequestList(service); } } } } //***** Constructors Loading src/java/com/android/internal/telephony/data/DataNetwork.java +0 −13 Original line number Diff line number Diff line Loading @@ -1534,10 +1534,6 @@ public class DataNetwork extends StateMachine { setupData(); } else { mRetryDelayMillis = DataCallResponse.RETRY_DURATION_UNDEFINED; if (!mFlags.keepEmptyRequestsNetwork()) { // This will mark the data profile as no retry perm failure. mFailCause = DataFailCause.NO_RETRY_FAILURE; } transitionTo(mDisconnectedState); } break; Loading Loading @@ -1663,15 +1659,6 @@ public class DataNetwork extends StateMachine { updateDataNetwork(response); if (!mFlags.keepEmptyRequestsNetwork() && mAttachedNetworkRequestList.isEmpty()) { log("Tear down the network since there is no live network request."); // Directly call onTearDown here. Calling tearDown will cause deadlock because // EVENT_TEAR_DOWN_NETWORK is deferred until state machine enters connected // state, which will never happen in this case. onTearDown(TEAR_DOWN_REASON_NO_LIVE_REQUEST); return; } if (mVcnManager != null && mVcnManager.applyVcnNetworkPolicy(mNetworkCapabilities, mLinkProperties).isTeardownRequested()) { log("VCN service requested to tear down the network."); Loading tests/telephonytests/src/com/android/internal/telephony/RILTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -356,8 +356,6 @@ public class RILTest extends TelephonyTest { replaceInstance(RIL.class, "mHalVersion", mRILUnderTest, mHalVersionV14); } catch (Exception e) { } doReturn(true).when(mFeatureFlags).combineRilDeathHandle(); } @After Loading Loading
flags/data.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -12,17 +12,6 @@ flag { } } # OWNER=linggm TARGET=24Q4 flag { name: "keep_empty_requests_network" namespace: "telephony" description: "Don't tear down network even if no requests attached to it." bug: "331301784" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=linggm TARGET=25Q2 flag { name: "auto_data_switch_enhanced" Loading
flags/misc.aconfig +0 −11 Original line number Diff line number Diff line package: "com.android.internal.telephony.flags" container: "system" # OWNER=linggm TARGET=24Q3 flag { name: "combine_ril_death_handle" namespace: "telephony" description: "Upon radio service death, combine its handling to prevent race condition" bug:"319612362" metadata { purpose: PURPOSE_BUGFIX } } # OWNER=tjstuart TARGET=24Q3 flag { name: "do_not_override_precise_label" Loading
src/java/com/android/internal/telephony/RIL.java +47 −103 Original line number Diff line number Diff line Loading @@ -394,7 +394,6 @@ public class RIL extends BaseCommands implements CommandsInterface { case EVENT_AIDL_PROXY_DEAD: int aidlService = msg.arg1; long msgCookie = (long) msg.obj; if (mFeatureFlags.combineRilDeathHandle()) { if (msgCookie == mServiceCookies.get(aidlService).get()) { riljLog("handleMessage: EVENT_AIDL_PROXY_DEAD cookie = " + msgCookie + ", service = " + serviceToString(aidlService) + ", cookie = " Loading @@ -407,15 +406,6 @@ public class RIL extends BaseCommands implements CommandsInterface { riljLog("Ignore stale EVENT_AIDL_PROXY_DEAD for service " + serviceToString(aidlService)); } } else { riljLog("handleMessage: EVENT_AIDL_PROXY_DEAD cookie = " + msgCookie + ", service = " + serviceToString(aidlService) + ", cookie = " + mServiceCookies.get(aidlService)); if (msgCookie == mServiceCookies.get(aidlService).get()) { mIsRadioProxyInitialized = false; resetProxyAndRequestList(aidlService); } } break; } } Loading Loading @@ -459,14 +449,9 @@ public class RIL extends BaseCommands implements CommandsInterface { public void serviceDied(long cookie) { // Deal with service going away riljLog("serviceDied"); if (mFeatureFlags.combineRilDeathHandle()) { mRilHandler.sendMessageAtFrontOfQueue(mRilHandler.obtainMessage( EVENT_RADIO_PROXY_DEAD, HAL_SERVICE_RADIO, 0 /* ignored arg2 */, cookie)); } else { mRilHandler.sendMessage(mRilHandler.obtainMessage(EVENT_RADIO_PROXY_DEAD, HAL_SERVICE_RADIO, 0 /* ignored arg2 */, cookie)); } } } Loading Loading @@ -502,14 +487,9 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public void binderDied() { riljLog("Service " + serviceToString(mService) + " has died."); if (mFeatureFlags.combineRilDeathHandle()) { mRilHandler.sendMessageAtFrontOfQueue(mRilHandler.obtainMessage( EVENT_AIDL_PROXY_DEAD, mService, 0 /* ignored arg2 */, mLinkedFlags)); } else { mRilHandler.sendMessage(mRilHandler.obtainMessage(EVENT_AIDL_PROXY_DEAD, mService, 0 /* ignored arg2 */, mLinkedFlags)); } unlinkToDeath(); } } Loading @@ -525,7 +505,6 @@ public class RIL extends BaseCommands implements CommandsInterface { // Increment the cookie so that death notification can be ignored mServiceCookies.get(service).incrementAndGet(); } else { if (mFeatureFlags.combineRilDeathHandle()) { // Reset all aidl services. for (int i = MIN_SERVICE_IDX; i <= MAX_SERVICE_IDX; i++) { if (i == HAL_SERVICE_RADIO) continue; Loading @@ -538,11 +517,6 @@ public class RIL extends BaseCommands implements CommandsInterface { // Increment the cookie so that death notification can be ignored mServiceCookies.get(i).incrementAndGet(); } } else { mServiceProxies.get(service).clear(); // Increment the cookie so that death notification can be ignored mServiceCookies.get(service).incrementAndGet(); } } setRadioState(TelephonyManager.RADIO_POWER_UNAVAILABLE, true /* forceNotifyRegistrants */); Loading @@ -554,7 +528,6 @@ public class RIL extends BaseCommands implements CommandsInterface { if (service == HAL_SERVICE_RADIO) { getRadioProxy(); } else { if (mFeatureFlags.combineRilDeathHandle()) { // Reset all aidl services. for (int i = MIN_SERVICE_IDX; i <= MAX_SERVICE_IDX; i++) { if (i == HAL_SERVICE_RADIO) continue; Loading @@ -565,9 +538,6 @@ public class RIL extends BaseCommands implements CommandsInterface { } getRadioServiceProxy(i); } } else { getRadioServiceProxy(service); } } } Loading Loading @@ -621,15 +591,9 @@ public class RIL extends BaseCommands implements CommandsInterface { if (serviceBound) { mIsRadioProxyInitialized = false; if (mFeatureFlags.combineRilDeathHandle()) { // Reset both hidl and aidl proxies. resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } else { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { resetProxyAndRequestList(service); } } } } Loading @@ -656,18 +620,13 @@ public class RIL extends BaseCommands implements CommandsInterface { mHalVersion.put(service, RADIO_HAL_VERSION_UNSUPPORTED); } } if (!mFeatureFlags.combineRilDeathHandle()) { resetProxyAndRequestList(service); } } if (mFeatureFlags.combineRilDeathHandle()) { // Reset both hidl and aidl proxies. Must be after cleaning mocked halVersion, // otherwise an aidl service will be incorrectly considered as disabled. resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } } } return serviceBound; } Loading Loading @@ -1082,7 +1041,6 @@ public class RIL extends BaseCommands implements CommandsInterface { @Override public synchronized void onSlotActiveStatusChange(boolean active) { mIsRadioProxyInitialized = false; if (mFeatureFlags.combineRilDeathHandle()) { if (active) { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { // Try to connect to RIL services and set response functions. Loading @@ -1097,20 +1055,6 @@ public class RIL extends BaseCommands implements CommandsInterface { resetProxyAndRequestList(HAL_SERVICE_RADIO); resetProxyAndRequestList(HAL_SERVICE_DATA); } } else { for (int service = MIN_SERVICE_IDX; service <= MAX_SERVICE_IDX; service++) { if (active) { // Try to connect to RIL services and set response functions. if (service == HAL_SERVICE_RADIO) { getRadioProxy(); } else { getRadioServiceProxy(service); } } else { resetProxyAndRequestList(service); } } } } //***** Constructors Loading
src/java/com/android/internal/telephony/data/DataNetwork.java +0 −13 Original line number Diff line number Diff line Loading @@ -1534,10 +1534,6 @@ public class DataNetwork extends StateMachine { setupData(); } else { mRetryDelayMillis = DataCallResponse.RETRY_DURATION_UNDEFINED; if (!mFlags.keepEmptyRequestsNetwork()) { // This will mark the data profile as no retry perm failure. mFailCause = DataFailCause.NO_RETRY_FAILURE; } transitionTo(mDisconnectedState); } break; Loading Loading @@ -1663,15 +1659,6 @@ public class DataNetwork extends StateMachine { updateDataNetwork(response); if (!mFlags.keepEmptyRequestsNetwork() && mAttachedNetworkRequestList.isEmpty()) { log("Tear down the network since there is no live network request."); // Directly call onTearDown here. Calling tearDown will cause deadlock because // EVENT_TEAR_DOWN_NETWORK is deferred until state machine enters connected // state, which will never happen in this case. onTearDown(TEAR_DOWN_REASON_NO_LIVE_REQUEST); return; } if (mVcnManager != null && mVcnManager.applyVcnNetworkPolicy(mNetworkCapabilities, mLinkProperties).isTeardownRequested()) { log("VCN service requested to tear down the network."); Loading
tests/telephonytests/src/com/android/internal/telephony/RILTest.java +0 −2 Original line number Diff line number Diff line Loading @@ -356,8 +356,6 @@ public class RILTest extends TelephonyTest { replaceInstance(RIL.class, "mHalVersion", mRILUnderTest, mHalVersionV14); } catch (Exception e) { } doReturn(true).when(mFeatureFlags).combineRilDeathHandle(); } @After Loading