Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a12c7d6a authored by Simon MacMullen's avatar Simon MacMullen
Browse files

Store MCC and MNC as system properties on userdebug builds.

This is so that we can read the properties, and thus infer the carrier, in Perfetto traces.

Bug: 259231861
Test: Recorded Perfetto trace.
Change-Id: Iddad52f28ac743cccbf8f6bf80d2d7d54c6a769b
parent 6b5d003f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -4386,6 +4386,13 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                values.touchscreen,
                values.uiMode);

        // Note: certain tests currently run as platform_app which is not allowed
        // to set debug system properties. To ensure that system properties are set
        // only when allowed, we check the current UID.
        if (Process.myUid() == Process.SYSTEM_UID) {
            SystemProperties.set("debug.tracing.mcc", Integer.toString(values.mcc));
            SystemProperties.set("debug.tracing.mnc", Integer.toString(values.mnc));
        }

        if (!initLocale && !values.getLocales().isEmpty() && values.userSetLocale) {
            final LocaleList locales = values.getLocales();