summaryrefslogtreecommitdiffstats
path: root/telephony/java/android
diff options
context:
space:
mode:
authorDavid Brown <dab@google.com>2010-08-17 17:54:48 -0700
committerDavid Brown <dab@google.com>2010-08-18 14:12:30 -0700
commitae3efa53a9bd52c6eddde2a8e4bb1ae4d86a9c21 (patch)
tree443feaeb60a05f1e1c53f11038a7601281bdec41 /telephony/java/android
parent8902abb7ff4495e63413ce6aabf32a8f3d584ad0 (diff)
downloadframeworks_base-ae3efa53a9bd52c6eddde2a8e4bb1ae4d86a9c21.zip
frameworks_base-ae3efa53a9bd52c6eddde2a8e4bb1ae4d86a9c21.tar.gz
frameworks_base-ae3efa53a9bd52c6eddde2a8e4bb1ae4d86a9c21.tar.bz2
Move the "voice_capable" resource into the framework.
There's currently a config.xml param in the phone app saying whether the current device is "voice capable", which is used to determine (among other things) whether the OTASP call should run in interactive mode. But both Contacts and Settings are about to need this flag too, so it really belongs in the framework instead. As of this change it's now "com.android.internal.R.bool.voice_capable". Also add a corresponding TelephonyManager call so that unbundled and 3rd party apps can access it too. Change-Id: Ie9a8803295bf97eb32154291aac8fce1e21c7b25
Diffstat (limited to 'telephony/java/android')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java21
1 files changed, 21 insertions, 0 deletions
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);
+ }
}