Merge "Improve CarrierPrivilegesTracker logging and dump." am: 9365a6584b am: 385d68d882 am: 0522616152 am: a9632c9080 am: a2b0eee3ca
Change-Id: Ied90841739d0e9cb7ea9775c5427d20b1f9b00ea
diff --git a/src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java b/src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java
index 502d1c8..329e5f2 100644
--- a/src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java
+++ b/src/java/com/android/internal/telephony/CarrierPrivilegesTracker.java
@@ -77,6 +77,8 @@
public class CarrierPrivilegesTracker extends Handler {
private static final String TAG = CarrierPrivilegesTracker.class.getSimpleName();
+ private static final boolean VDBG = false;
+
private static final String SHA_1 = "SHA-1";
private static final String SHA_256 = "SHA-256";
@@ -421,10 +423,13 @@
// Okay because no registrants exist yet
maybeUpdatePrivilegedUidsAndNotifyRegistrants();
- mLocalLog.log("Initializing state:"
+ String msg = "Initializing state:"
+ " CarrierConfig certs=" + mCarrierConfigCerts
- + " SIM-loaded certs=" + mUiccCerts
- + " installed pkgs=" + getObfuscatedPackages());
+ + " SIM-loaded certs=" + mUiccCerts;
+ if (VDBG) {
+ msg += " installed pkgs=" + getObfuscatedPackages();
+ }
+ mLocalLog.log(msg);
}
private String getObfuscatedPackages() {
@@ -512,6 +517,12 @@
pw.println("CarrierPrivilegesTracker - Log End ----");
pw.println("CarrierPrivilegesTracker - Privileged UIDs: "
+ Arrays.toString(mPrivilegedUids));
+ pw.println("CarrierPrivilegesTracker - SIM-loaded Certs: " + mUiccCerts);
+ pw.println("CarrierPrivilegesTracker - CarrierPrivileged Certs: " + mCarrierConfigCerts);
+ if (VDBG) {
+ pw.println("CarrierPrivilegesTracker - Obfuscated Pkgs + Certs: "
+ + getObfuscatedPackages());
+ }
}
/**