From 001be79f0ff34ca60fa63b3cacecf2afdbae27a5 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Fri, 25 Oct 2024 09:20:12 +0900 Subject: [PATCH] Add log when resetting DeviceConfig The log should help investigate flakes, by knowing at which point DeviceConfig is being reset and to which value. Test: atest Change-Id: Ia7392ad57d3df17b0d5194158b402f52bc90f7e3 --- .../devicetests/com/android/testutils/DeviceConfigRule.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/staticlibs/testutils/devicetests/com/android/testutils/DeviceConfigRule.kt b/staticlibs/testutils/devicetests/com/android/testutils/DeviceConfigRule.kt index 68248ca5ee..785e55a0ba 100644 --- a/staticlibs/testutils/devicetests/com/android/testutils/DeviceConfigRule.kt +++ b/staticlibs/testutils/devicetests/com/android/testutils/DeviceConfigRule.kt @@ -89,6 +89,7 @@ class DeviceConfigRule @JvmOverloads constructor( } cleanupStep { runAsShell(WRITE_DEVICE_CONFIG) { originalConfig.forEach { (key, value) -> + Log.i(TAG, "Resetting config \"${key.second}\" to \"$value\"") DeviceConfig.setProperty( key.first, key.second, value, false /* makeDefault */) }