summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brown <dab@google.com>2010-08-18 14:32:36 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-18 14:32:36 -0700
commit5aaeaffdce904dae6e3eaf566dccf52611dffafa (patch)
treef1b6534bbf17614e8ee0aa26678994b8587b0124
parent917031361c2a6f8ddc2986964d1306c51f2b1c27 (diff)
parentae3efa53a9bd52c6eddde2a8e4bb1ae4d86a9c21 (diff)
downloadframeworks_base-5aaeaffdce904dae6e3eaf566dccf52611dffafa.zip
frameworks_base-5aaeaffdce904dae6e3eaf566dccf52611dffafa.tar.gz
frameworks_base-5aaeaffdce904dae6e3eaf566dccf52611dffafa.tar.bz2
Merge "Move the "voice_capable" resource into the framework."
-rw-r--r--core/res/res/values/config.xml13
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java21
2 files changed, 34 insertions, 0 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 05cae9f..4430ea0 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -377,4 +377,17 @@
<!-- 2 means give warning -->
<integer name="config_datause_notification_type">2</integer>
+ <!-- Flag indicating whether the current device is "voice capable".
+ If true, this means that the device supports circuit-switched
+ (i.e. voice) phone calls over the telephony network, and is
+ allowed to display the in-call UI while a cellular voice call is
+ active. This can be overridden to false for "data only" devices
+ which can't make voice calls and don't support any in-call UI.
+
+ Note: this flag is subtly different from the
+ PackageManager.FEATURE_TELEPHONY system feature, which is
+ available on *any* device with a telephony radio, even if the
+ device is data-only. -->
+ <bool name="config_voice_capable">true</bool>
+
</resources>
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index aa916e0..92bed8d 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -912,4 +912,25 @@ public class TelephonyManager {
return null;
}
}
+
+ /**
+ * @return true if the current device is "voice capable".
+ * <p>
+ * "Voice capable" means that this device supports circuit-switched
+ * (i.e. voice) phone calls over the telephony network, and is allowed
+ * to display the in-call UI while a cellular voice call is active.
+ * This will be false on "data only" devices which can't make voice
+ * calls and don't support any in-call UI.
+ * <p>
+ * Note: the meaning of this flag is subtly different from the
+ * PackageManager.FEATURE_TELEPHONY system feature, which is available
+ * on any device with a telephony radio, even if the device is
+ * data-only.
+ *
+ * @hide pending API review
+ */
+ public boolean isVoiceCapable() {
+ return mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_voice_capable);
+ }
}