Add simulator to manually override voicemail carrier configs

This allow new carriers to test their values or help debug/QA for situations like disabling prefetch.

Bug: 63013427
Test: N/A use at your own risk.
PiperOrigin-RevId: 162003756
Change-Id: Ifb227163bc3f2a94c1c07cc60fdc3a031fd625c8
diff --git a/java/com/android/voicemail/VoicemailClient.java b/java/com/android/voicemail/VoicemailClient.java
index 97b824b..847919a 100644
--- a/java/com/android/voicemail/VoicemailClient.java
+++ b/java/com/android/voicemail/VoicemailClient.java
@@ -18,7 +18,10 @@
 
 import android.content.Context;
 import android.content.Intent;
+import android.os.PersistableBundle;
 import android.provider.VoicemailContract.Voicemails;
+import android.support.annotation.MainThread;
+import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.telecom.PhoneAccountHandle;
 import android.telephony.TelephonyManager;
@@ -52,6 +55,12 @@
       "com.android.voicemail.VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL";
 
   /**
+   * Secret code to launch the voicemail config activity intended for OEMs and Carriers. {@code
+   * *#*#VVMCONFIG#*#*}
+   */
+  String VOICEMAIL_SECRET_CODE = "886266344";
+
+  /**
    * Whether the visual voicemail service is enabled for the {@code phoneAccountHandle}. "Enable"
    * means the user "wants" to have this service on, and does not mean the service is actually
    * functional(For example, the service is blocked on the carrier side. The service will be
@@ -122,4 +131,15 @@
    * provisioning. Being "activated" means all setup are completed, and VVM is expected to work.
    */
   boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle);
+
+  /**
+   * Called when {@link #VOICEMAIL_SECRET_CODE} is dialed. {@code context} will be a broadcast
+   * receiver context.
+   */
+  @MainThread
+  void showConfigUi(@NonNull Context context);
+
+  @NonNull
+  PersistableBundle getConfig(
+      @NonNull Context context, @Nullable PhoneAccountHandle phoneAccountHandle);
 }