From dbd7dec662413d8e68dce31d7117f979dc41c9e1 Mon Sep 17 00:00:00 2001 From: Alexei Nicoara Date: Fri, 16 Jun 2023 14:46:29 +0000 Subject: [PATCH] Disabling RescueParty flag resets on master branch. RescueParty could reset all flags if an application is crashing. This behaviour has a potential of interfering with trunk stable launch, we need to disable it during the launch and figure out a way of reseting the flags in a less invasive way. Bug: 287618292 Change-Id: I84bd4c421dd1ca3a0f63a2d86f740a49209212be --- services/core/java/com/android/server/RescueParty.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/core/java/com/android/server/RescueParty.java b/services/core/java/com/android/server/RescueParty.java index 6e2e5f75b8f38..c094c12cc6d87 100644 --- a/services/core/java/com/android/server/RescueParty.java +++ b/services/core/java/com/android/server/RescueParty.java @@ -382,6 +382,14 @@ public class RescueParty { private static void executeRescueLevelInternal(Context context, int level, @Nullable String failedPackage) throws Exception { + + if (level <= LEVEL_RESET_SETTINGS_TRUSTED_DEFAULTS) { + // Disabling flag resets on master branch for trunk stable launch. + // TODO(b/287618292): Re-enable them after the trunk stable is launched and we + // figured out a way to reset flags without interfering with trunk development. + return; + } + FrameworkStatsLog.write(FrameworkStatsLog.RESCUE_PARTY_RESET_REPORTED, level); // Try our best to reset all settings possible, and once finished // rethrow any exception that we encountered