Merge "FR61513: Hide Use SIM in Single SIM for HAL 1.4" into r-keystone-qcom-dev
diff --git a/src/com/android/settings/network/telephony/MobileNetworkSwitchController.java b/src/com/android/settings/network/telephony/MobileNetworkSwitchController.java
index f573ec7..0a3aea9 100644
--- a/src/com/android/settings/network/telephony/MobileNetworkSwitchController.java
+++ b/src/com/android/settings/network/telephony/MobileNetworkSwitchController.java
@@ -110,6 +110,13 @@
             return;
         }
 
+        if (mTelephonyManager.getActiveModemCount() == 1 && !mSubscriptionManager.
+                canDisablePhysicalSubscription()) {
+            Log.d(TAG, "update: Hide SIM option for 1.4 HAL in single sim");
+            mSwitchBar.hide();
+            return;
+        }
+
         for (SubscriptionInfo info : SubscriptionUtil.getAvailableSubscriptions(mContext)) {
             if (info.getSubscriptionId() == mSubId) {
                 mSubInfo = info;
@@ -122,7 +129,6 @@
             Log.d(TAG, "update: disable switchbar, isEcbmEnabled=" + isEcbmEnabled +
                     ", callstate=" + mCallState);
             mSwitchBar.setEnabled(false);
-            return;
         } else {
             mSwitchBar.setEnabled(true);
         }