Merge "Add NTT Docomo(spmode) APN" into cm-10.2
diff --git a/CONTRIBUTORS.mkdn b/CONTRIBUTORS.mkdn
index 2c09da0..317c7d9 100644
--- a/CONTRIBUTORS.mkdn
+++ b/CONTRIBUTORS.mkdn
@@ -4,6 +4,8 @@
 Maintainers (CyanogenMod 10.2):
 -----------------------------
 * __Acer A700:__ pawitp
+* __Amazon Kindle Fire 1st Edition:__ Hashcode
+* __Amazon Kindle Fire 2nd Edition:__ Hashcode
 * __Asus EeePad Transformer (TF101):__ Bumble-Bee, EnJens
 * __Asus EeePad Transformer Prime (TF201):__ Bumble-Bee, EnJens
 * __Asus EeePad Transformer Pad TF300T:__ xplodwild
@@ -19,14 +21,21 @@
 * __HTC One (GSM):__ codeworkx, h8rift
 * __HTC One (Sprint):__ kushdeck, toastcfh
 * __HTC One S:__ intervigil, xkonni
+* __HTC One X+:__ Lloir, tombriden
 * __HTC One XL:__ h8rift, intervigil
 * __LG Optimus LTE (P930) / LG Nitro HD {P935):__ arcee
 * __LG Optimus LTE (SK Telecom) (SU640):__ arcee
-* __Motorola Droid 3:__ dhacker29, Hashcode
-* __Motorola Droid 4:__ dhacker29, Hashcode
-* __Motorola Droid Bionic:__ dhacker29, Hashcode
-* __Motorola Droid RAZR/RAZR Maxx (CDMA):__ dhacker29, Hashcode
-* __Motorola RAZR/RAZR Maxx (GSM):__ dhacker29, Hashcode
+* __Motorola Atrix HD (MB886/qinara):__ epinter, dhacker29, Hashcode, Skrilax_CZ, nadlabak
+* __Motorola Droid 3 (solana):__ Hashcode, dhacker29
+* __Motorola Droid 4 (maserati):__ Hashcode, dhacker29
+* __Motorola Droid Bionic (targa):__ dhacker29, Hashcode
+* __Motorola Droid RAZR/RAZR Maxx (spyder) (CDMA):__ dhacker29, Hashcode
+* __Motorola Droid RAZR HD/HD Maxx (xt926/vanquish) (CDMA):__ Hashcode,  dhacker29, epinter, Skrilax_CZ, nadlabak
+* __Motorola Droid RAZR M (xt907/scorpion_mini):__ dhacker29, Hashcode, epinter, Skrilax_CZ, nadlabak
+* __Motorola Photon Q (xt897/asanti) (GSM):__ Skrilax_CZ, nadlabak, epinter, dhacker29, Hashcode
+* __Motorola Photon Q (xt897c/asanti_c) (CDMA):__ nadlabak, Skrilax_CZ, epinter, dhacker29, Hashcode
+* __Motorola RAZR/RAZR Maxx (umts_spyder) (GSM):__ dhacker29, Hashcode
+* __Motorola RAZR HD(xt925/vanquish) (GSM):__ epinter, dhacker29, Hashcode, Skrilax_CZ, nadlabak
 * __Motorola Xoom (WiFi):__ bazar, SteadyHawkin, TDR (Team Rogue)
 * __Motorola Xoom 3G (UMTS):__ bazar, SteadyHawkin, TDR (Team Rogue)
 * __Motorola Xoom 4G LTE (Verizon):__ bazar, SteadyHawkin, TDR (Team Rogue)
@@ -87,25 +96,23 @@
 Translators:
 ------------
 * __Afrikaans:__ Corrie Meyer, David van Tonder
-* __Catalan:__ Oriol Pellicer
-* __Croatian:__ Antonio Marin
+* __Catalan:__ Arnau Llovet Vidal
+* __Chinese (Simplified):__ Andrew Jiang, John Hsing, Engle Mars
+* __Chinese (Traditional):__ Li Chi Tung, Fu-Chun Hsu
 * __Czech:__ Ondrej Zima, Radovan Kepak, Pavel Kucera, Jozka Jozin, Jiri Silvarich, Vaclav Moucha
-* __Dutch:__ Marco Brohet, Kasper Hettinga, Sam Segers, Bart Tiemersma, Eddy Witkamp
-* __Finnish:__ Antti Leukkunen, Niko Koivu
-* __French:__ Sébastien Vaucher, David Girault, Tanguy Pruvot
-* __German:__ Kim Lê, Jacob Müller, Patrick Schaaf, Christoph Quiter, Markus Hoeber, Matthias Büchner, Danny Baumann
-* __Greek:__ Michael Bestas
+* __Danish:__ Jacob Overgaard Madsen, Morten Jørgensen, Henning Nielsen Lund, Mikael Jepsen
+* __Dutch:__ Marco Brohet, Kasper Hettinga, Eddy Witkamp
+* __Finnish:__ Niko Koivu
+* __French:__ Delphin PETER, Eric Mourougandy, Léo Colombaro, Florent Imfloflo, Tanguy Pruvot, Matthias Bosc
+* __German:__ Kim Lê, Jacob Müller, Christoph Quiter, Markus Hoeber, Danny Baumann
+* __Greek:__ Michael Bestas, Vasilis Akritas
 * __Hungarian:__ Tamás Tóth, Dávid László, Dániel Buga
-* __Italian:__ Francesco Foresta, Moreno Pojer, Eugenio Ziliotto, Giulio Cervera, Mauro Bazzano
-* __Japanese:__ Takuo Kitame
-* __Korean:__ Inseok Lee
-* __Polish:__ Maciej Rozbicki
-* __Portuguese-Brazil:__ Gustavo Rosa
-* __Portuguese:__ Eduardo Martins, Ricardo Pinho
-* __Russian:__ OlegKrikun, Pavel Volkov, Kir Kolyshkin
-* __Simplified Chinese:__ comercy, Qian Zheng, Andrew Jiang, John Hsing
-* __Slovak:__ Juraj Janecek
-* __Spanish:__ PeRiJeY, KalimochoAz, Chuckycrx, Jorge Ruesga, djMesias
-* __Swedish:__ Patrik Kullman
-* __Traditional Chinese:__ Ladios Jonquil
-* __Turkish:__ Ethem Evlice (androidmeda)
+* __Italian:__ Francesco Foresta, Mauro Bazzano
+* __Japanese:__ Takuo Kitame, Taichi Nishimura
+* __Norwegian:__ Odin Ugedal, Arne Coucheron
+* __Polish:__ Tomasz Popielarczyk c.s.
+* __Portuguese (Brazilian):__ Gustavo Rosa, Pedro Carneiro, Emerson Pinter
+* __Russian:__ Pavel Volkov, Vladislav Koldobskiy, Vladimir Belkov
+* __Slovak:__ Dusan Kazik
+* __Spanish:__ Jorge Ruesga, Lorenzo M. Castaño
+* __Swedish:__ Simon Bäck, Ted Lundwall, Esa Laukkanen, Björn Lundén
diff --git a/config/common.mk b/config/common.mk
index a204f9b..996a963 100644
--- a/config/common.mk
+++ b/config/common.mk
@@ -46,8 +46,7 @@
 endef
 $(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
 
-PRODUCT_COPY_FILES += \
-    vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip:system/media/bootanimation.zip
+PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
 endif
 
 ifdef CM_NIGHTLY
diff --git a/overlay/common/frameworks/base/core/res/res/values/config.xml b/overlay/common/frameworks/base/core/res/res/values/config.xml
index 4600e22..9ce3a74 100644
--- a/overlay/common/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/common/frameworks/base/core/res/res/values/config.xml
@@ -19,5 +19,11 @@
 
     <bool name="config_cellBroadcastAppLinks">true</bool>
 
+    <!-- Disable stock OTA components if installed -->
+    <string-array name="config_disabledComponents" translatable="false">
+        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateActivity</item>
+        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService</item>
+        <item>com.google.android.gsf/com.google.android.gsf.update.SystemUpdateService$Receiver</item>
+    </string-array>
 </resources>
 
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 0ef562f..a45721e 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -24,8 +24,9 @@
 check_prereq() {
 if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then
   echo "Not backing up files from incompatible version: $V"
-  exit 127
+  return 0
 fi
+return 1
 }
 
 check_blacklist() {
@@ -39,6 +40,24 @@
   fi
 }
 
+check_whitelist() {
+  found=0
+  if [ -f /system/addon.d/whitelist ];then
+      ## forcefully keep any version-independent stuff
+      cd /$1/addon.d/
+      for f in *sh; do
+          s=$(md5sum $f | awk {'print $1'})
+          grep -q $s /system/addon.d/whitelist
+          if [ $? -eq 0 ]; then
+              found=1
+          else
+              rm -f $f
+          fi
+      done
+  fi
+  return $found
+}
+
 # Execute /system/addon.d/*.sh scripts with $1 parameter
 run_stage() {
 for script in $(find /tmp/addon.d/ -name '*.sh' |sort -n); do
@@ -49,7 +68,11 @@
 case "$1" in
   backup)
     mkdir -p $C
-    check_prereq
+    if check_prereq; then
+        if check_whitelist system; then
+            exit 127
+        fi
+    fi
     check_blacklist system
     preserve_addon_d
     run_stage pre-backup
@@ -57,7 +80,11 @@
     run_stage post-backup
   ;;
   restore)
-    check_prereq
+    if check_prereq; then
+        if check_whitelist tmp; then
+            exit 127
+        fi
+    fi
     check_blacklist tmp
     run_stage pre-restore
     run_stage restore
diff --git a/prebuilt/common/bin/whitelist b/prebuilt/common/bin/whitelist
new file mode 100644
index 0000000..ca3f017
--- /dev/null
+++ b/prebuilt/common/bin/whitelist
@@ -0,0 +1 @@
+b0a27bcb5c7504a81e1450a8313e37cb
diff --git a/prebuilt/common/etc/apns-conf.xml b/prebuilt/common/etc/apns-conf.xml
index f76cd4d..1322146 100644
--- a/prebuilt/common/etc/apns-conf.xml
+++ b/prebuilt/common/etc/apns-conf.xml
@@ -1402,13 +1402,13 @@
   <apn carrier="CTBC MMS" mcc="724" mnc="34" apn="mms.ctbc.br" user="ctbc" password="1212" mmsc="http://mms.ctbccelular.com.br/was" mmsproxy="172.29.7.70" mmsport="8080" type="mms" />
   <apn carrier="Entel PCS" mcc="730" mnc="01" apn="bam.entelpcs.cl" user="entelpcs" password="entelpcs" proxy="10.99.0.10" port="8080" type="default,supl" />
   <apn carrier="Entel MMS" mcc="730" mnc="01" apn="mms.entelpcs.cl" user="entelmms" password="entelpcs" mmsc="http://mmsc.entelpcs.cl" mmsproxy="10.99.0.10" mmsport="8080" type="mms" />
+  <apn carrier="Movistar CL" mcc="730" mnc="02" apn="web.tmovil.cl" user="web" password="web" type="default,supl" />
+  <apn carrier="Movistar CL MMS" mcc="730" mnc="02" apn="mms.tmovil.cl" user="mms" password="mms" mmsc="http://mms.tmovil.cl" mmsproxy="172.017.008.011" mmsport="9201" type="mms" />
   <apn carrier="Claro CL" mcc="730" mnc="03" apn="bam.clarochile.cl" user="clarochile" password="clarochile" type="default,supl" />
   <apn carrier="MMS CLARO" mcc="730" mnc="03" apn="mms.clarochile.cl" user="clarochile" password="clarochile" mmsc="http://mms.clarochile.cl" mmsproxy="172.23.200.200" mmsport="8080" type="mms" />
   <apn carrier="Internet Movil" mcc="730" mnc="10" apn="bam.entelpcs.cl" user="entelpcs" password="entelpcs" proxy="10.99.0.10" port="8080" type="default,supl" />
   <apn carrier="WEB EPCS" mcc="730" mnc="10" apn="imovil.entelpcs.cl" user="entelpcs" password="entelpcs" type="default,supl" />
   <apn carrier="MMS EPCS" mcc="730" mnc="10" apn="mms.entelpcs.cl" user="entelmms" password="entelpcs" mmsc="http://mmsc.entelpcs.cl" mmsproxy="10.99.0.10" mmsport="8080" type="mms" />
-  <apn carrier="Movistar CL MMS" mcc="730" mnc="10" apn="mms.tmovil.cl" user="mms" password="mms" mmsc="http://mms.tmovil.cl" mmsproxy="172.017.008.011" mmsport="9201" type="mms" />
-  <apn carrier="Movistar CL" mcc="730" mnc="10" apn="web.tmovil.cl" user="web" password="web" type="default,supl" />
   <apn carrier="COMCEL" mcc="732" mnc="101" apn="internet.comcel.com.co" user="COMCELWEB" password="COMCELWEB" type="default,supl" />
   <apn carrier="COMCEL MMS" mcc="732" mnc="101" apn="mms.comcel.com.co" user="COMCELMMS" password="*********" mmsc="http://mms.comcel.com.co/mms/" mmsproxy="198.228.90.225" mmsport="9201" type="mms" />
   <apn carrier="Movistar CO" mcc="732" mnc="102" apn="internet.movistar.com.co" user="movistar" password="movistar" type="default,supl" />