Hardcode a few Telecom constants

Hardcode a few Telecom constants into Telephony -- they're being used
for noncritical purposes and there's no justification for putting them
into the api surface.

Bug: 168551099
Test: NA
Change-Id: I138b2fd6eca413f5b94508d1cb2eff14087789c2
diff --git a/src/com/android/services/telephony/PstnIncomingCallNotifier.java b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
index 97460c8..377b471 100644
--- a/src/com/android/services/telephony/PstnIncomingCallNotifier.java
+++ b/src/com/android/services/telephony/PstnIncomingCallNotifier.java
@@ -65,6 +65,12 @@
      */
     private static final int MAX_NUMBER_VERIFICATION_HANGUP_DELAY_MILLIS = 10000;
 
+    /**
+     * Hardcoded extra for a call that's used to provide metrics information to the dialer app.
+     */
+    private static final String EXTRA_CALL_CREATED_TIME_MILLIS =
+            "android.telecom.extra.CALL_CREATED_TIME_MILLIS";
+
     /** The phone object to listen to. */
     private final Phone mPhone;
 
@@ -245,8 +251,7 @@
             }
 
             // Specifies the time the call was added. This is used by the dialer for analytics.
-            extras.putLong(TelecomManager.EXTRA_CALL_CREATED_TIME_MILLIS,
-                    SystemClock.elapsedRealtime());
+            extras.putLong(EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime());
 
             PhoneAccountHandle handle = findCorrectPhoneAccountHandle();
             if (handle == null) {
@@ -276,8 +281,7 @@
         }
 
         // Specifies the time the call was added. This is used by the dialer for analytics.
-        extras.putLong(TelecomManager.EXTRA_CALL_CREATED_TIME_MILLIS,
-                SystemClock.elapsedRealtime());
+        extras.putLong(EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime());
 
         if (connection.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS) {
             if (((ImsPhoneConnection) connection).isRttEnabledForCall()) {
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index c59df33..9f6c24f 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -106,6 +106,13 @@
      */
     private static final int LISTENER_STATE_REGISTERED = 3;
 
+    /**
+     * Copy-pasted from android.telecom.PhoneAccount -- hidden constant which is unfortunately being
+     * used by some 1P apps, so we're keeping it here until we can remove it.
+     */
+    private static final String EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK =
+            "android.telecom.extra.SUPPORTS_VIDEO_CALLING_FALLBACK";
+
     final class AccountEntry implements PstnPhoneCapabilitiesNotifier.Listener {
         private final Phone mPhone;
         private PhoneAccount mAccount;
@@ -416,7 +423,7 @@
                 extras.putBoolean(PhoneAccount.EXTRA_PLAY_CALL_RECORDING_TONE, true);
             }
 
-            extras.putBoolean(PhoneAccount.EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK,
+            extras.putBoolean(EXTRA_SUPPORTS_VIDEO_CALLING_FALLBACK,
                     mContext.getResources()
                             .getBoolean(R.bool.config_support_video_calling_fallback));