Initialize the DebugEventReporter
Call DebugEventReporter.initialize() early in the
telephony initialization process.
Bug: 120941729
Test: manually modified Settings app for test purposes
Change-Id: Ibf330b9cbf91e9c9c4cacc20cb8ea71f39ca8a07
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ce774d8..6324f0f 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -93,6 +93,9 @@
<protected-broadcast android:name= "android.telephony.action.SUBSCRIPTION_CARRIER_IDENTITY_CHANGED" />
<protected-broadcast android:name= "android.telephony.action.SUBSCRIPTION_PRECISE_CARRIER_IDENTITY_CHANGED" />
+ <!-- For Vendor Debugging in Telephony -->
+ <protected-broadcast android:name="android.telephony.debug.action.DEBUG_EVENT" />
+
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index ccbb4d0..a5cd06b 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -44,6 +44,7 @@
import android.provider.Settings;
import android.telecom.TelecomManager;
import android.telephony.CarrierConfigManager;
+import android.telephony.DebugEventReporter;
import android.telephony.ServiceState;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -283,6 +284,9 @@
// getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY_VOICE_CALLS);
if (mCM == null) {
+ // Initialize DebugEventReporter early so that it can be used
+ DebugEventReporter.initialize(this);
+
// Inject telephony component factory if configured using other jars.
XmlResourceParser parser = getResources().getXml(R.xml.telephony_injection);
TelephonyComponentFactory.getInstance().injectTheComponentFactory(parser);