Reset telephony stack during Reset Mobile Network flow

This CL introduces two more steps to restart Phone process and RILD
during the Reset mobile network flow by the help of the
TelephonyContentProvider which has been used by Pixel Adaptive
Connectivity Services ("SCONE") for a while.

The additional reset options can resolve issues like resources leak
and internal state stuck, effectively recover telephony stack into
fresh state.

The reset options are performed in the background and have no impact
on UX of the reset flow.

Bug: 271921464
Test: ResetNetworkOperationBuilderTest
Test: Feature test with both flag on and off
Change-Id: If09d20d79e908dd43f3f654fb7cca7f713b7f03a
This commit is contained in:
Rambo Wang
2024-01-04 04:33:23 +00:00
parent 4f06db7bf8
commit 4c384506d5
6 changed files with 126 additions and 1 deletions

View File

@@ -51,6 +51,12 @@ public class ResetNetworkRequest {
/* Reset option - reset IMS stack */
public static final int RESET_IMS_STACK = 0x20;
/* Reset option - reset phone process */
public static final int RESET_PHONE_PROCESS = 0x40;
/* Reset option - reset RILD */
public static final int RESET_RILD = 0x80;
/**
* Subscription ID indicates NOT resetting any of the components below:
* - TelephonyAndNetworkPolicy
@@ -264,6 +270,12 @@ public class ResetNetworkRequest {
if ((mResetOptions & RESET_IMS_STACK) != 0) {
builder.resetIms(mSubscriptionIdToResetIms);
}
if ((mResetOptions & RESET_PHONE_PROCESS) != 0) {
builder.restartPhoneProcess();
}
if ((mResetOptions & RESET_RILD) != 0) {
builder.restartRild();
}
return builder;
}
}