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

Commit a4cf1445 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11071763 from c31929f5 to 24Q1-release

Change-Id: I1b28b0adad7b074a4e47957a790ed4f304a6cc2c
parents 7d2494a9 c31929f5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ java_library {
        "net-utils-framework-common",
        "telephony-protos",
        "modules-utils-build_system",
        "modules-utils-fastxmlserializer",
        "modules-utils-statemachine",
    ],

+29 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import com.android.telephony.Rlog;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

@@ -521,6 +522,27 @@ public class PhoneFactory {
        return sMetricsCollector;
    }

    /**
     * Print all feature flag configurations that Telephony is using for debugging purposes.
     */
    private static void reflectAndPrintFlagConfigs(IndentingPrintWriter pw) {

        try {
            // Look away, a forbidden technique (reflection) is being used to allow us to get
            // all flag configs without having to add them manually to this method.
            Method[] methods = FeatureFlags.class.getMethods();
            if (methods.length == 0) {
                pw.println("NONE");
                return;
            }
            for (Method m : methods) {
                pw.println(m.getName() + "-> " + m.invoke(sFeatureFlags));
            }
        } catch (Exception e) {
            pw.println("[ERROR]");
        }
    }

    public static void dump(FileDescriptor fd, PrintWriter printwriter, String[] args) {
        IndentingPrintWriter pw = new IndentingPrintWriter(printwriter, "  ");
        pw.println("PhoneFactory:");
@@ -613,8 +635,15 @@ public class PhoneFactory {
        } catch (Exception e) {
            e.printStackTrace();
        }
        pw.flush();
        pw.decreaseIndent();

        pw.println("++++++++++++++++++++++++++++++++");
        pw.println("Flag Configurations:");
        pw.increaseIndent();
        reflectAndPrintFlagConfigs(pw);
        pw.flush();
        pw.decreaseIndent();
        pw.println("++++++++++++++++++++++++++++++++");
    }
}
+10 −1
Original line number Diff line number Diff line
@@ -1161,7 +1161,16 @@ public class SubscriptionManagerService extends ISub.Stub {
                        builder.setDisplayName(nickName);
                        builder.setDisplayNameSource(SubscriptionManager.NAME_SOURCE_CARRIER);
                    }

                    if (android.os.Build.isDebuggable() &&
                            SystemProperties.getInt("telephony.test.bootstrap_cid", -2)
                                == carrierId) {
                        // Force set as provisioning profile for test purpose
                        log("Hardcording as bootstrap subscription for cid=" + carrierId);
                        builder.setProfileClass(SimInfo.PROFILE_CLASS_PROVISIONING);
                    } else {
                        builder.setProfileClass(embeddedProfile.getProfileClass());
                    }
                    builder.setPortIndex(getPortIndex(embeddedProfile.getIccid()));

                    CarrierIdentifier cid = embeddedProfile.getCarrierIdentifier();