From cb612e4f8b84e1ca3d02b14dea5c465ca3d5dbb6 Mon Sep 17 00:00:00 2001 From: Calvin Pan Date: Wed, 18 May 2022 09:22:04 +0000 Subject: [PATCH] Avoid printing call stack for the app that doesn't add the LocaleConfig Most apps have not added the LocaleConfig yet and it will print each application's stack when settings query package status. To keep the logs clearer and reduce calls to getStackTrackString() to improve a little performance. Bug: 232557302 Test: Saving about 80% under java stack tracing mode Change-Id: Ic28641c35bad24928418820159a92efc1e146538 --- core/java/android/app/LocaleConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/app/LocaleConfig.java b/core/java/android/app/LocaleConfig.java index 7c83d5850f766..bbe3ce3c1cdbf 100644 --- a/core/java/android/app/LocaleConfig.java +++ b/core/java/android/app/LocaleConfig.java @@ -99,7 +99,7 @@ public class LocaleConfig { XmlResourceParser parser = res.getXml(resId); parseLocaleConfig(parser, res); } catch (Resources.NotFoundException e) { - Slog.w(TAG, "The resource file pointed to by the given resource ID isn't found.", e); + Slog.w(TAG, "The resource file pointed to by the given resource ID isn't found."); mStatus = STATUS_NOT_SPECIFIED; } catch (XmlPullParserException | IOException e) { Slog.w(TAG, "Failed to parse XML configuration from "