Merge "Supported data enabled override for different scenarios"
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);
+ }
+ }
}