Merge "Label gpuclk as sysfs_thermal file and add perms."
diff --git a/apns-full-conf.xml b/apns-full-conf.xml
index 403f998..8a8cce3 100644
--- a/apns-full-conf.xml
+++ b/apns-full-conf.xml
@@ -1467,27 +1467,6 @@
       mvno_type="gid"
   />
 
-  <apn carrier="Tele2 WAP"
-      mcc="208"
-      mnc="01"
-      apn="ofnew.fr"
-      user="orange"
-      password="orange"
-      type="default,supl"
-  />
-
-  <apn carrier="Tele2 MMS"
-      mcc="208"
-      mnc="01"
-      apn="orange.acte"
-      user="orange"
-      password="orange"
-      mmsc="http://mms.orange.fr"
-      mmsproxy="192.168.10.200"
-      mmsport="8080"
-      type="mms"
-  />
-
   <apn carrier="SFR webphone"
       mcc="208"
       mnc="09"
@@ -1610,6 +1589,15 @@
   <apn carrier="Coriolis WAP"
       mcc="208"
       mnc="10"
+      apn=""
+      type="ia"
+      mvno_match_data="12"
+      mvno_type="gid"
+  />
+
+  <apn carrier="Coriolis WAP"
+      mcc="208"
+      mnc="10"
       apn="fnetcoriolis"
       type="default,supl"
       mvno_match_data="12"
@@ -2320,6 +2308,9 @@
       mcc="214"
       mnc="18"
       apn="internet.ono.com"
+      user="wap@wap"
+      password="wap125"
+      authtype="1"
       type="default,supl"
   />
 
@@ -2327,6 +2318,7 @@
       mcc="214"
       mnc="18"
       apn="mms.ono.com"
+      authtype="1"
       mmsc="http://mms.ono.com/"
       mmsproxy="10.126.0.50"
       mmsport="8080"
@@ -2793,7 +2785,7 @@
       mcc="204"
       mnc="04"
       apn="pda.stm.sk.ca"
-      type="default,mms,supl"
+      type="default,mms,supl,dun"
       mmsc="http://mms.sasktel.com/"
       mmsproxy="mig.sasktel.com"
       mmsport="80"
@@ -4959,20 +4951,20 @@
       mvno_type="spn"
   />
 
-  <apn carrier="Ventelo Internett"
+  <apn carrier="Phonero Internett"
       mcc="242"
       mnc="01"
-      apn="internet.ventelo.no"
+      apn="internet.phonero.no"
       type="default,supl"
       mvno_match_data="24201700xxxxxxx"
       mvno_type="imsi"
   />
 
-  <apn carrier="Ventelo MMS"
+  <apn carrier="Phonero MMS"
       mcc="242"
       mnc="01"
-      apn="mms.ventelo.no"
-      user="ventelo"
+      apn="mms.phonero.no"
+      user="phonero"
       password="1111"
       mmsc="http://mmsc/"
       mmsproxy="10.10.10.11"
@@ -5059,6 +5051,8 @@
       mnc="03"
       apn="internet"
       type="default,supl"
+      protocol="IPV4V6"
+      roaming_protocol="IPV4"
   />
 
   <apn carrier="DNA MMS"
@@ -5152,6 +5146,8 @@
       mnc="12"
       apn="internet"
       type="default,supl"
+      protocol="IPV4V6"
+      roaming_protocol="IPV4"
   />
 
   <apn carrier="DNA MMS"
@@ -5723,8 +5719,6 @@
       mnc="03"
       apn="internet.tele2.ee"
       type="default,supl"
-      mvno_match_data="24803005x"
-      mvno_type="imsi"
   />
 
   <apn carrier="Tele2 MMS"
@@ -5735,8 +5729,6 @@
       mmsproxy="193.12.40.6"
       mmsport="8080"
       type="mms"
-      mvno_match_data="24803005x"
-      mvno_type="imsi"
   />
 
   <apn carrier="Smart/Ultra MMS"
@@ -5747,8 +5739,6 @@
       mmsproxy="193.12.40.6"
       mmsport="8080"
       type="mms"
-      mvno_match_data="24803005x"
-      mvno_type="imsi"
   />
 
   <apn carrier="Tele2 Internet"
@@ -5756,8 +5746,8 @@
       mnc="03"
       apn="internet.tele2.ee"
       type="default,supl"
-      mvno_match_data="24803000x"
-      mvno_type="imsi"
+      mvno_match_data="Tele2"
+      mvno_type="spn"
   />
 
   <apn carrier="Smart/Ultra MMS"
@@ -5768,8 +5758,8 @@
       mmsproxy="193.12.40.6"
       mmsport="8080"
       type="mms"
-      mvno_match_data="24803000x"
-      mvno_type="imsi"
+      mvno_match_data="Tele2"
+      mvno_type="spn"
   />
 
   <apn carrier="MTS Internet"
@@ -6199,16 +6189,16 @@
       mnc="06"
       apn="internet"
       type="default,supl"
+      protocol="IPV4V6"
   />
 
   <apn carrier="Play MMS"
       mcc="260"
       mnc="06"
       apn="mms"
-      mmsc="http://10.10.28.164/mms/wapenc"
-      mmsproxy="10.10.25.5"
-      mmsport="8080"
+      mmsc="http://mmsc.play.pl/mms/wapenc"
       type="mms"
+      protocol="IPV4V6"
   />
 
   <apn carrier="Truphone"
@@ -6936,6 +6926,8 @@
       mcc="293"
       mnc="70"
       apn="telemach.net"
+      user="telemach"
+      password="internet"
       mmsc="http://mms.telemach.net:8002"
       mmsproxy="91.185.221.85"
       mmsport="8080"
@@ -7309,7 +7301,7 @@
       mcc="302"
       mnc="780"
       apn="pda.stm.sk.ca"
-      type="default,mms,supl"
+      type="default,mms,supl,dun"
       mmsc="http://mms.sasktel.com/"
       mmsproxy="mig.sasktel.com"
       mmsport="80"
@@ -19036,6 +19028,13 @@
       type="default,supl"
   />
 
+  <apn carrier="Vodafonemobileconnect"
+      mcc="404"
+      mnc="01"
+      apn="www"
+      type="default,supl"
+  />
+
   <apn carrier="Vodafone live"
       mcc="404"
       mnc="01"
@@ -19045,13 +19044,6 @@
       type="default,supl"
   />
 
-  <apn carrier="Vodafonemobileconnect"
-      mcc="404"
-      mnc="01"
-      apn="www"
-      type="default,supl"
-  />
-
   <apn carrier="Vodafone_MMS"
       mcc="404"
       mnc="01"
@@ -26381,14 +26373,14 @@
       type="mms"
   />
 
-  <apn carrier="Internet HOT mobile"
+  <apn carrier="HOT mobile Internet"
       mcc="425"
       mnc="07"
       apn="net.hotm"
       type="default,supl"
   />
 
-  <apn carrier="MMS HOT mobile"
+  <apn carrier="HOT mobile MMS"
       mcc="425"
       mnc="07"
       apn="mms.hotm"
@@ -28775,13 +28767,6 @@
       type="default,supl"
   />
 
-  <apn carrier="Sun Streaming"
-      mcc="515"
-      mnc="05"
-      apn="minternet"
-      type="default,supl"
-  />
-
   <apn carrier="SUN MMS"
       mcc="515"
       mnc="05"
@@ -32322,16 +32307,6 @@
       type="default,supl"
   />
 
-  <apn carrier="Argentina:Personal:DUN"
-      mcc="722"
-      mnc="34"
-      apn="internet.personal.com"
-      type="dun"
-      user="internet"
-      password="internet"
-      authtype="0"
-  />
-
   <apn carrier="Personal MMS"
       mcc="722"
       mnc="34"
diff --git a/device.mk b/device.mk
index a5dfb1b..85df95a 100644
--- a/device.mk
+++ b/device.mk
@@ -332,7 +332,9 @@
 # If data_no_toggle is 1 then active and dormancy enable at all times.
 # If data_no_toggle is 0 there are no reports if the screen is off.
 # Leaving this property unset defaults to '0'
-#PRODUCT_PROPERTY_OVERRIDES += \
+# Due to RIL changes, setting this to 1 now enables toggling of limited
+# system indications and does not impact data state changes.
+PRODUCT_PROPERTY_OVERRIDES += \
     persist.radio.data_no_toggle=1
 
 # Audio Configuration
diff --git a/overlay/frameworks/base/core/res/res/values-mcc204-mnc04/config.xml b/overlay/frameworks/base/core/res/res/values-mcc204-mnc04/config.xml
index 5a9d552..f0cc698 100644
--- a/overlay/frameworks/base/core/res/res/values-mcc204-mnc04/config.xml
+++ b/overlay/frameworks/base/core/res/res/values-mcc204-mnc04/config.xml
@@ -26,7 +26,6 @@
          Or string format of ApnSettingV3.
          note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
     <string-array translatable="false" name="config_tether_apndata">
-        <item>[ApnSettingV3]SaskTel Tethering,inet.stm.sk.ca,,,,,,,,,204,04,,DUN,,,true,0,,,,,,,gid,5A</item>
         <item>[ApnSettingV3]HOT mobile PC,pc.hotm,,,,,,,,,204,04,,DUN,,,true,0,,,,,,,spn,HOT mobile</item>
     </string-array>
 
diff --git a/overlay/frameworks/base/core/res/res/values-mcc722-mnc34/config.xml b/overlay/frameworks/base/core/res/res/values-mcc722-mnc34/config.xml
new file mode 100644
index 0000000..bb1e49f
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/values-mcc722-mnc34/config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2015, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You my obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+    <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
+    <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+    <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+    <integer-array translatable="false" name="config_tether_upstream_types">
+      <item>1</item>
+      <item>4</item>
+      <item>7</item>
+      <item>9</item>
+    </integer-array>
+
+    <!-- String containing the apn value for tethering.  May be overriden by secure settings
+         TETHER_DUN_APN.  Value is a comma separated series of strings:
+         "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type",
+         Or string format of ApnSettingV3.
+         note that empty fields can be ommitted: "name,apn,,,,,,,,,310,270,,DUN" -->
+    <string-array translatable="false" name="config_tether_apndata">
+        <item>Personal Internet Movil,internet.personal.com,,,internet,internet,,,,,722,34,1,DUN</item>
+    </string-array>
+</resources>
+
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 5fcedcd..ddc22f3 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -123,7 +123,7 @@
     <integer name="config_defaultNotificationLedOff">9000</integer>
 
     <!-- reference volume index for music stream to limit headphone volume and display warning -->
-    <integer name="config_safe_media_volume_index">6</integer>
+    <integer name="config_safe_media_volume_index">5</integer>
 
     <!-- List of regexpressions describing the interface (if any) that represent tetherable
          USB interfaces.  If the device doesn't want to support tething over USB this should
diff --git a/overlay/frameworks/base/packages/SystemUI/res/values-mcc724-mnc39/config.xml b/overlay/frameworks/base/packages/SystemUI/res/values-mcc724-mnc39/config.xml
new file mode 100644
index 0000000..cbde9ff
--- /dev/null
+++ b/overlay/frameworks/base/packages/SystemUI/res/values-mcc724-mnc39/config.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2015, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
+    <bool name="config_show4GForLTE">true</bool>
+</resources>
+
diff --git a/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml b/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml
new file mode 100644
index 0000000..33a920a
--- /dev/null
+++ b/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<carrier_config_list>
+<carrier_config mcc="440" mnc="20">
+<boolean name="config_cellBroadcastAppLinks" value="false" />
+</carrier_config>
+</carrier_config_list>
diff --git a/sepolicy/perfprofd.te b/sepolicy/perfprofd.te
index 4296d4d..07aa298 100644
--- a/sepolicy/perfprofd.te
+++ b/sepolicy/perfprofd.te
@@ -1,6 +1,5 @@
 userdebug_or_eng(`
   # perfprofd disables mpdecision temporarily via setprop ctl.stop,
   # then re-enables afterwards with setprop ctl.start
-  allow perfprofd ctl_mpdecision:property_service set;
-  unix_socket_connect(perfprofd, property, init)
+  set_prop(perfprofd, ctl_mpdecision)
 ')