summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHall Liu <hallliu@google.com>2016-01-27 11:07:07 -0800
committerThe Android Automerger <android-build@google.com>2016-02-26 16:56:21 -0800
commitf7b8b342d74e52a0bdab72cef38ef8fdbed6bef2 (patch)
treea9af93d0034184a3dac2b40df13ef70e3d5dc7b1
parent2e11a63adbf452cd3b78c2e1e9e8234c6430fa4b (diff)
downloadandroid_packages_services_Telecomm-f7b8b342d74e52a0bdab72cef38ef8fdbed6bef2.tar.gz
android_packages_services_Telecomm-f7b8b342d74e52a0bdab72cef38ef8fdbed6bef2.tar.bz2
android_packages_services_Telecomm-f7b8b342d74e52a0bdab72cef38ef8fdbed6bef2.zip
DO NOT MERGE - Restrict ability to add call based on device provision status
Always return false for canAddCall if device is not yet provisioned. Bug: 26303187 Change-Id: I9c4ebc8b954a79562b2ec83d59314a3fb621ddfb
-rw-r--r--src/com/android/server/telecom/CallsManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java
index 195bd7cf..fe7fbb70 100644
--- a/src/com/android/server/telecom/CallsManager.java
+++ b/src/com/android/server/telecom/CallsManager.java
@@ -24,6 +24,7 @@ import android.os.Looper;
import android.os.SystemProperties;
import android.os.Trace;
import android.provider.CallLog.Calls;
+import android.provider.Settings;
import android.telecom.CallAudioState;
import android.telecom.Conference;
import android.telecom.Connection;
@@ -1077,6 +1078,13 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
* Returns true if telecom supports adding another top-level call.
*/
boolean canAddCall() {
+ boolean isDeviceProvisioned = Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.DEVICE_PROVISIONED, 0) != 0;
+ if (!isDeviceProvisioned) {
+ Log.d(TAG, "Device not provisioned, canAddCall is false.");
+ return false;
+ }
+
if (getFirstCallWithState(OUTGOING_CALL_STATES) != null) {
return false;
}