Supported data enabled override for different scenarios

Added override rules support for always allowing mms and
internet data during voice call.

Test: Manual + unit tests
Bug: 132113695

Merged-In: I89653a47565c6e198715e716e3f2c1426e995613
Change-Id: I89653a47565c6e198715e716e3f2c1426e995613
(cherry picked from commit b07d497b3e663fede2324452b3aae0754d030577)
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 6c3ec89..e970157 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -7059,4 +7059,36 @@
             Binder.restoreCallingIdentity(identity);
         }
     }
+
+    @Override
+    public boolean setDataAllowedDuringVoiceCall(int subId, boolean allow) {
+        enforceModifyPermission();
+
+        // Now that all security checks passes, perform the operation as ourselves.
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            Phone phone = getPhone(subId);
+            if (phone == null) return false;
+
+            return phone.getDataEnabledSettings().setAllowDataDuringVoiceCall(allow);
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
+
+    @Override
+    public boolean isDataAllowedInVoiceCall(int subId) {
+        enforceReadPrivilegedPermission("isDataAllowedInVoiceCall");
+
+        // Now that all security checks passes, perform the operation as ourselves.
+        final long identity = Binder.clearCallingIdentity();
+        try {
+            Phone phone = getPhone(subId);
+            if (phone == null) return false;
+
+            return phone.getDataEnabledSettings().isDataAllowedInVoiceCall();
+        } finally {
+            Binder.restoreCallingIdentity(identity);
+        }
+    }
 }