This change reflects the Dialer V10 RC00 branch.

RC00 is based on:
branch: dialer-android_release_branch/153304843.1
synced to: 153304843

following the instructions at go/dialer-aosp-release.

In this release:

* Removes final apache sources.
* Uses native lite compilation.

More drops will follow with subsequent release candidates
until we reach our final v10 release, in cadence with our
prebuilt drops.

Test: TreeHugger, on device
Change-Id: Ic9684057230f9b579c777820c746cd21bf45ec0f
diff --git a/java/com/android/voicemail/VoicemailClient.java b/java/com/android/voicemail/VoicemailClient.java
index 7482338..97b824b 100644
--- a/java/com/android/voicemail/VoicemailClient.java
+++ b/java/com/android/voicemail/VoicemailClient.java
@@ -39,12 +39,34 @@
    * android.content.Intent#ACTION_PROVIDER_CHANGED} will always be a self-change even if the UI is
    * external to the client.
    */
-  String ACTION_UPLOAD = "com.android.voicemailomtp.VoicemailClient.ACTION_UPLOAD";
+  String ACTION_UPLOAD = "com.android.voicemail.VoicemailClient.ACTION_UPLOAD";
 
   /** Common key for passing {@link PhoneAccountHandle} in bundles. */
   String PARAM_PHONE_ACCOUNT_HANDLE = "phone_account_handle";
 
   /**
+   * Broadcast from the client to inform the app to show a legacy voicemail notification. This
+   * broadcast is same as {@link TelephonyManager#ACTION_SHOW_VOICEMAIL_NOTIFICATION}.
+   */
+  String ACTION_SHOW_LEGACY_VOICEMAIL =
+      "com.android.voicemail.VoicemailClient.ACTION_SHOW_LEGACY_VOICEMAIL";
+
+  /**
+   * 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
+   * "enabled" but all it will do is show the error).
+   */
+  boolean isVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle);
+
+  /**
+   * Enable or disable visual voicemail service for the {@code phoneAccountHandle}. Setting to
+   * enabled will initiate provisioning and activation. Setting to disabled will initiate
+   * deactivation.
+   */
+  void setVoicemailEnabled(Context context, PhoneAccountHandle phoneAccountHandle, boolean enabled);
+
+  /**
    * Appends the selection to ignore voicemails from non-active OMTP voicemail package. In OC there
    * can be multiple packages handling OMTP voicemails which represents the same source of truth.
    * These packages should mark their voicemails as {@link Voicemails#IS_OMTP_VOICEMAIL} and only
@@ -92,4 +114,12 @@
    *     when calling into the mailbox.
    */
   Intent getSetPinIntent(Context context, PhoneAccountHandle phoneAccountHandle);
+
+  /**
+   * Whether the client is activated and handling visual voicemail for the {@code
+   * phoneAccountHandle}. "Enable" is the intention to use VVM. For example VVM can be enabled but
+   * prevented from working because the carrier blocked it, or a connection problem is blocking the
+   * provisioning. Being "activated" means all setup are completed, and VVM is expected to work.
+   */
+  boolean isActivated(Context context, PhoneAccountHandle phoneAccountHandle);
 }