Adding facade for ImsMmTelManager so that multi sim devices can have
multiple sim cards set for Enabling/Disabling VoLTE.

Bug: 139641554
Test: yes locally
Change-Id: Icc40f5edaa0b83a38d8a0335b7a64cbe150ef969
(cherry picked from commit 90d4ef0fd03c42df8247e3639f23b7773cd1d8c2)
diff --git a/Common/src/com/googlecode/android_scripting/facade/telephony/ImsMmTelManagerFacade.java b/Common/src/com/googlecode/android_scripting/facade/telephony/ImsMmTelManagerFacade.java
new file mode 100644
index 0000000..7853e4d
--- /dev/null
+++ b/Common/src/com/googlecode/android_scripting/facade/telephony/ImsMmTelManagerFacade.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.googlecode.android_scripting.facade.telephony;
+
+import android.telephony.ims.ImsMmTelManager;
+
+import com.googlecode.android_scripting.facade.FacadeManager;
+import com.googlecode.android_scripting.jsonrpc.RpcReceiver;
+import com.googlecode.android_scripting.rpc.Rpc;
+import com.googlecode.android_scripting.rpc.RpcParameter;
+
+/**
+ * Exposes ImsMmManager functionality
+ */
+public class ImsMmTelManagerFacade extends RpcReceiver {
+
+    /**
+     * Exposes ImsMmTelManager functionality
+     */
+    public ImsMmTelManagerFacade(FacadeManager manager) {
+        super(manager);
+    }
+
+    /**
+     * Get whether Advanced Calling is enabled for a subId
+     *
+     * @param subId The subscription ID of the sim you want to check
+     */
+    @Rpc(description = "Return True if Enhanced 4g Lte mode is enabled.")
+    public boolean imsMmTelIsAdvancedCallingEnabled(@RpcParameter(name = "subId") Integer subId) {
+        return ImsMmTelManager.createForSubscriptionId(subId).isAdvancedCallingSettingEnabled();
+    }
+
+    /**
+     * Set whether Advanced Calling is enabled for a subId
+     *
+     * @param subId The subscription ID of the sim you want to check
+     * @param isEnabled Whether the sim should have Enhanced 4g Lte on or off
+     */
+    @Rpc(description = "Set Enhanced 4g Lte mode")
+    public void imsMmTelSetAdvancedCallingEnabled(
+                        @RpcParameter(name = "subId") Integer subId,
+                        @RpcParameter(name = "isEnabled") Boolean isEnabled) {
+        ImsMmTelManager.createForSubscriptionId(subId).setAdvancedCallingSettingEnabled(isEnabled);
+    }
+
+    @Override
+    public void shutdown() {
+
+    }
+}
diff --git a/ScriptingLayer/src/com/googlecode/android_scripting/facade/FacadeConfiguration.java b/ScriptingLayer/src/com/googlecode/android_scripting/facade/FacadeConfiguration.java
index 7ca7a84..4dbc711 100644
--- a/ScriptingLayer/src/com/googlecode/android_scripting/facade/FacadeConfiguration.java
+++ b/ScriptingLayer/src/com/googlecode/android_scripting/facade/FacadeConfiguration.java
@@ -48,6 +48,7 @@
 import com.googlecode.android_scripting.facade.net.nsd.NsdManagerFacade;
 import com.googlecode.android_scripting.facade.telephony.CarrierConfigFacade;
 import com.googlecode.android_scripting.facade.telephony.ImsManagerFacade;
+import com.googlecode.android_scripting.facade.telephony.ImsMmTelManagerFacade;
 import com.googlecode.android_scripting.facade.telephony.SmsFacade;
 import com.googlecode.android_scripting.facade.telephony.SubscriptionManagerFacade;
 import com.googlecode.android_scripting.facade.telephony.TelecomCallFacade;
@@ -104,6 +105,7 @@
         sFacadeClassList.add(ContactsFacade.class);
         sFacadeClassList.add(EventFacade.class);
         sFacadeClassList.add(ImsManagerFacade.class);
+        sFacadeClassList.add(ImsMmTelManagerFacade.class);
         sFacadeClassList.add(LocationFacade.class);
         sFacadeClassList.add(TelephonyManagerFacade.class);
         sFacadeClassList.add(PreferencesFacade.class);