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
1 file changed