aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Ruesga <jorge@ruesga.com>2015-11-07 01:34:20 +0100
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-11 15:53:31 -0800
commit7df85d58bcfd4b7578608c84e66011902d7613a8 (patch)
treeba71bba628e024a40d400a6dca36119d5ded70f5
parentaea6eb3a641292f8d75f2f475b2634fe0cb13091 (diff)
downloadandroid_frameworks_opt_telephony-7df85d58bcfd4b7578608c84e66011902d7613a8.tar.gz
android_frameworks_opt_telephony-7df85d58bcfd4b7578608c84e66011902d7613a8.tar.bz2
android_frameworks_opt_telephony-7df85d58bcfd4b7578608c84e66011902d7613a8.zip
telephony: use phoneaccounts to determine voiceprompt status
Check for phone accounts number instead of just sims number when disable voiceprompt Change-Id: I07151e54849e1af6de438e448b498512e55ea314 topic: cyan-7037 JIRA: CYAN-7037 Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
-rwxr-xr-xsrc/java/com/android/internal/telephony/SubscriptionController.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/java/com/android/internal/telephony/SubscriptionController.java b/src/java/com/android/internal/telephony/SubscriptionController.java
index 99b627b76..4326d7bf4 100755
--- a/src/java/com/android/internal/telephony/SubscriptionController.java
+++ b/src/java/com/android/internal/telephony/SubscriptionController.java
@@ -46,6 +46,7 @@ import com.android.internal.telephony.dataconnection.DdsSchedulerAc;
import android.provider.BaseColumns;
import android.provider.Settings;
+import android.telecom.TelecomManager;
import android.telephony.Rlog;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
@@ -138,6 +139,7 @@ public class SubscriptionController extends ISub.Stub {
protected static PhoneProxy[] sProxyPhones;
protected Context mContext;
protected TelephonyManager mTelephonyManager;
+ protected TelecomManager mTelecomManager;
protected CallManager mCM;
// When no valid SIM cards present on device, framework returns DUMMY subIds
@@ -217,6 +219,7 @@ public class SubscriptionController extends ISub.Stub {
mContext = c;
mCM = CallManager.getInstance();
mTelephonyManager = TelephonyManager.from(mContext);
+ mTelecomManager = TelecomManager.from(mContext);
if(ServiceManager.getService("isub") == null) {
ServiceManager.addService("isub", this);
@@ -1839,6 +1842,9 @@ public class SubscriptionController extends ISub.Stub {
//if activated sub count is less than 2, disable prompt.
if (mActCount < 2) {
setSMSPromptEnabled(false);
+ }
+ // for voice prompt we need to check phone accounts too, not only sim accounts
+ if (mTelecomManager.getAllPhoneAccountsCount() < 2) {
setVoicePromptEnabled(false);
}