Merge "Import translations. DO NOT MERGE" into oc-dr1-dev
diff --git a/src/com/android/phone/EmergencyDialer.java b/src/com/android/phone/EmergencyDialer.java
index fd64ff2..4cbfb38 100644
--- a/src/com/android/phone/EmergencyDialer.java
+++ b/src/com/android/phone/EmergencyDialer.java
@@ -96,8 +96,6 @@
     private static final boolean DBG = false;
     private static final String LOG_TAG = "EmergencyDialer";
 
-    private StatusBarManager mStatusBarManager;
-
     /** The length of DTMF tones in milliseconds */
     private static final int TONE_LENGTH_MS = 150;
 
@@ -175,8 +173,6 @@
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
-        mStatusBarManager = (StatusBarManager) getSystemService(Context.STATUS_BAR_SERVICE);
-
         // Allow this activity to be displayed in front of the keyguard / lockscreen.
         WindowManager.LayoutParams lp = getWindow().getAttributes();
         lp.flags |= WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED;
@@ -519,21 +515,11 @@
             }
         }
 
-        // Disable the status bar and set the poke lock timeout to medium.
-        // There is no need to do anything with the wake lock.
-        if (DBG) Log.d(LOG_TAG, "disabling status bar, set to long timeout");
-        mStatusBarManager.disable(StatusBarManager.DISABLE_EXPAND);
-
         updateDialAndDeleteButtonStateEnabledAttr();
     }
 
     @Override
     public void onPause() {
-        // Reenable the status bar and set the poke lock timeout to default.
-        // There is no need to do anything with the wake lock.
-        if (DBG) Log.d(LOG_TAG, "reenabling status bar and closing the dialer");
-        mStatusBarManager.disable(StatusBarManager.DISABLE_NONE);
-
         super.onPause();
 
         synchronized (mToneGeneratorLock) {
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 4650744..7a5006a 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -43,6 +43,7 @@
 import android.provider.Settings;
 import android.telephony.CarrierConfigManager;
 import android.telephony.PhoneStateListener;
+import android.telephony.ServiceState;
 import android.telephony.SubscriptionInfo;
 import android.telephony.SubscriptionManager;
 import android.telephony.TelephonyManager;
@@ -668,7 +669,9 @@
                 prefSet.removePreference(mLteDataServicePref);
             } else if (carrierConfig.getBoolean(CarrierConfigManager
                     .KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL)
-                    && !mPhone.getServiceState().getRoaming()) {
+                    && !mPhone.getServiceState().getRoaming()
+                    && mPhone.getServiceState().getDataRegState()
+                    == ServiceState.STATE_IN_SERVICE) {
                 prefSet.removePreference(mButtonPreferredNetworkMode);
                 prefSet.removePreference(mButtonEnabledNetworks);