Merge "A few conference calling fixes:" into nyc-mr1-dev
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 4906ba2..26b0c7a 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -337,7 +337,7 @@
              non-voice-capable tablets and regular phone devices. -->
         <activity android:name="MobileNetworkSettings"
             android:label="@string/settings_label"
-            android:theme="@style/SettingsLight">
+            android:theme="@style/NetworkOperatorsSettingsTheme">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
                 <action android:name="android.intent.action.MAIN" />
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 67572ed..870d692 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -54,9 +54,4 @@
 
     <color name="dialer_dialpad_touch_tint">#330288d1</color>
     <color name="floating_action_button_touch_tint">#80ffffff</color>
-
-    <color name="network_operators_color_primary">#ff263238</color>
-    <color name="network_operators_color_primary_dark">#ff21272b</color>
-
-    <color name="emergency_dialer_background">#ff263238</color>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 9d2d47f..057352d 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -153,13 +153,6 @@
         <item name="android:layout_marginEnd">5dip</item>
     </style>
 
-    <!-- Theme for the activity com.android.phone.Settings, which is the
-         "Mobile network settings" screen (used on non-voice-capable
-         tablets as well as regular phone devices.) -->
-    <style name="Theme.Settings" parent="@android:style/Theme.Holo.DialogWhenLarge">
-        <item name="android:windowCloseOnTouchOutside">true</item>
-    </style>
-
     <style name="SettingsLight" parent="android:Theme.Material.Light">
         <item name="android:windowBackground">@color/phone_settings_background_color</item>
         <item name="android:windowContentOverlay">@null</item>
@@ -186,11 +179,7 @@
         <item name="android:textColor">?android:attr/textColorPrimaryInverseDisableOnly</item>
     </style>
 
-    <style name="NetworkOperatorsSettingsTheme" parent="@android:style/Theme.Material.Light">
-        <item name="android:actionBarTheme">@android:style/ThemeOverlay.Material.Dark.ActionBar</item>
-        <item name="android:colorPrimary">@color/network_operators_color_primary</item>
-        <item name="android:colorPrimaryDark">@color/network_operators_color_primary_dark</item>
-    </style>
+    <style name="NetworkOperatorsSettingsTheme" parent="@android:style/Theme.DeviceDefault.Settings" />
 
     <style name="Empty" parent="@android:style/Theme.Material.Light">
         <item name="android:windowIsTranslucent">true</item>
@@ -256,10 +245,9 @@
         <item name="android:src">@drawable/overflow_menu</item>
     </style>
 
-    <style name="EmergencyDialerTheme" parent="@android:style/Theme.Material.NoActionBar">
-        <item name="android:colorPrimary">@color/emergency_dialer_background</item>
-        <item name="android:colorPrimaryDark">@color/emergency_dialer_background</item>
-        <item name="android:windowBackground">@color/emergency_dialer_background</item>
+    <style name="EmergencyDialerTheme" parent="@*android:style/Theme.DeviceDefault.Settings.Dark.NoActionBar">
+        <item name="android:colorPrimaryDark">?android:attr/colorPrimary</item>
+        <item name="android:windowBackground">?android:attr/colorPrimary</item>
         <item name="android:statusBarColor">@android:color/transparent</item>
         <item name="android:navigationBarColor">@android:color/transparent</item>
         <item name="android:homeAsUpIndicator">@drawable/ic_back_arrow</item>
@@ -296,8 +284,4 @@
         <item name="android:backgroundDimEnabled">false</item>
     </style>
 
-    <style name="Theme.Material.Settings" parent="@android:style/Theme.Material.Settings">
-        <item name="@*android:actionBarSize">56dip</item>
-        <item name="preferenceBackgroundColor">@drawable/preference_background</item>
-    </style>
 </resources>
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 404c976..fd4815e 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -421,7 +421,6 @@
     @Override
     protected void onCreate(Bundle icicle) {
         if (DBG) log("onCreate:+");
-        setTheme(R.style.Theme_Material_Settings);
         super.onCreate(icicle);
 
         mHandler = new MyHandler();
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index ed014d3..546f0f2 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3297,6 +3297,15 @@
      */
     @Override
     protected void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+        if (mPhone.getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
+                != PackageManager.PERMISSION_GRANTED) {
+            writer.println("Permission Denial: can't dump Phone from pid="
+                    + Binder.getCallingPid()
+                    + ", uid=" + Binder.getCallingUid()
+                    + "without permission "
+                    + android.Manifest.permission.DUMP);
+            return;
+        }
         DumpsysHandler.dump(mPhone.getContext(), fd, writer, args);
     }
 }