From a107edd21bb53320897fddaeeb998872cc67e4e4 Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 28 May 2015 15:53:20 -0700 Subject: [PATCH] Rename VoLTE/WFC enable API to available - add VT available API. Renamed API to use consistent semantics: available refers to the current state of the service rather then whether feature is enabled by device/carrier/ user. Added VT API to match VoLTE/WFC. Change-Id: Ifb31f123db77e731e75a982b8594168f59a289e7 --- .../android/telephony/TelephonyManager.java | 38 +++++++++++++------ .../internal/telephony/ITelephony.aidl | 14 +++++-- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index a47f5e9d0a447..3d66bdaf1f044 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -4181,13 +4181,13 @@ public class TelephonyManager { } } - /** - * Returns the Status of Volte - *@hide - */ - public boolean isVolteEnabled() { + /** + * Returns the Status of Volte + * @hide + */ + public boolean isVolteAvailable() { try { - return getITelephony().isVolteEnabled(); + return getITelephony().isVolteAvailable(); } catch (RemoteException ex) { return false; } catch (NullPointerException ex) { @@ -4195,13 +4195,27 @@ public class TelephonyManager { } } - /** - * Returns the Status of Wi-Fi Calling - *@hide - */ - public boolean isWifiCallingEnabled() { + /** + * Returns the Status of video telephony (VT) + * @hide + */ + public boolean isVideoTelephonyAvailable() { + try { + return getITelephony().isVideoTelephonyAvailable(); + } catch (RemoteException ex) { + return false; + } catch (NullPointerException ex) { + return false; + } + } + + /** + * Returns the Status of Wi-Fi Calling + * @hide + */ + public boolean isWifiCallingAvailable() { try { - return getITelephony().isWifiCallingEnabled(); + return getITelephony().isWifiCallingAvailable(); } catch (RemoteException ex) { return false; } catch (NullPointerException ex) { diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 11d0ea6db74c0..790397ee2919b 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -921,13 +921,19 @@ interface ITelephony { * Returns the Status of Wi-Fi Calling *@hide */ - boolean isWifiCallingEnabled(); - - /** + boolean isWifiCallingAvailable(); + + /** * Returns the Status of Volte *@hide */ - boolean isVolteEnabled(); + boolean isVolteAvailable(); + + /** + * Returns the Status of VT (video telephony) + *@hide + */ + boolean isVideoTelephonyAvailable(); /** * Returns the unique device ID of phone, for example, the IMEI for