Fix Settings restart during Reset mobile nework settings flow

This CL avoids restarting Settings in the reset mobile flow when phone
process is restarted, by switching the usage of the stable content
provider connection to the unstable client.

The CL also arranges restarting phone process as the last reset
operation in the flow (later than RILD reset) to avoid any reset
operation get impacted by phone process restarting.

Since the permission to protect the TelephonyContentProvider has been
renamed, the CL also renames the requsted permision.

Bug: 347047105
Test: atest ResetNetworkOperationBuilderTest
Test: Reset mobile network feature test
Flag: EXEMPT resource update with minor refactoring
Change-Id: I7bfa79bc9d7451a4a03269704b0009a3730e287f
This commit is contained in:
Rambo Wang
2024-06-19 02:09:41 +00:00
parent a3894e6761
commit 5ac9d9c8fa
4 changed files with 50 additions and 44 deletions

View File

@@ -271,12 +271,12 @@ public class ResetNetworkRequest {
builder.resetIms(mSubscriptionIdToResetIms);
}
// Reset phone process and RILD may impact above components, keep them at the end
if ((mResetOptions & RESET_PHONE_PROCESS) != 0) {
builder.restartPhoneProcess();
}
if ((mResetOptions & RESET_RILD) != 0) {
builder.restartRild();
}
if ((mResetOptions & RESET_PHONE_PROCESS) != 0) {
builder.restartPhoneProcess();
}
return builder;
}
}