Ensure we don't record 0 MCC/MNC.

We see lots of traces where correct-looking MCC/MNC are replaced by 0/0.

Bug: 285879449
Test: recorded a trace.
Change-Id: I532e2b97f7fb9337850613d56f70cfd3377462f0
This commit is contained in:
Simon MacMullen
2023-06-05 14:33:39 +00:00
parent ddfe6848c5
commit c9bb739def

View File

@@ -4505,9 +4505,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
// to set debug system properties. To ensure that system properties are set // to set debug system properties. To ensure that system properties are set
// only when allowed, we check the current UID. // only when allowed, we check the current UID.
if (Process.myUid() == Process.SYSTEM_UID) { if (Process.myUid() == Process.SYSTEM_UID) {
if (values.mcc != 0) {
SystemProperties.set("debug.tracing.mcc", Integer.toString(values.mcc)); SystemProperties.set("debug.tracing.mcc", Integer.toString(values.mcc));
}
if (values.mnc != 0) {
SystemProperties.set("debug.tracing.mnc", Integer.toString(values.mnc)); SystemProperties.set("debug.tracing.mnc", Integer.toString(values.mnc));
} }
}
if (!initLocale && !values.getLocales().isEmpty() && values.userSetLocale) { if (!initLocale && !values.getLocales().isEmpty() && values.userSetLocale) {
final LocaleList locales = values.getLocales(); final LocaleList locales = values.getLocales();