Merge "update CMParts overlay for sholes" into gingerbread
diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn
index d1a7ea7..92114ec 100644
--- a/CHANGELOG.mkdn
+++ b/CHANGELOG.mkdn
@@ -13,8 +13,8 @@
 ------------
 * Nexus One: Cyanogen
 * Nexus S: Koush
-* Droid: mtwebster, Koush
-* Dream/Sapphire: Cyanogen
+* Droid: cvpcs, mtwebster, Koush
+* Dream/Sapphire: Sileht, Wes Garner, Cyanogen
 * Hero: Lox (GSM), Darchstar (CDMA)
 * Desire (GSM/CDMA): Kali-, Defer
 * Incredible: jistone, slayher, Koush
@@ -41,14 +41,49 @@
 * Portuguese: Eduardo Martins
 * Spanish: PeRiJeY, KalimochoAz
 * Catalan: Oriol Pellicer
+* Finnish: Antti Leukkunen
+* Polish: Maciej Rozbicki
+* Korean: Inseok Lee
 
 CHANGELOG
 ---------
 ### 7.0.0
 * Common: Android 2.3.2 (Gingerbread) - Google
+* Common: Fixes and changes from AOSP master - Various
 * Common: ClockworkMod Recovery 3.0: Koush, Cyanogen, Zinx
 * Common: Themes engine - T-Mobile
 * Common: Performance enhancements for Qualcomm hardware - Code Aurora
+* Common: New boot animation - 73v1n - http://www.youtube.com/watch?v=mYXiKWwp0DQ
+* Common: Fix readahead values for NAND/MMC devices
+* Common: Revamped notification widget - cvpcs
+* Common: Updated various graphics for GB style - blunden
+* Common: DSPManager updated for 2.3 - alankila
+* Common: Restyled music app - Jason Asher
+* Common: Rotary answer in Phone app - James Peterson
+* Common: BT VoiceDialer fixes - Matthew Sparby
+* Common: Calendar enhancements - James Peterson
+* Common: Stagefright fixes for 7x30, 8x50, and 7x27 - Zinx, Arcee, Cyanogen
+* Common: Pacman package manager - Kmobs
+* Common: Workaround for unknown phone number - Jiri Tyr
+* Common: Trackball answer/hangup - Juan Rodriguez
+* Common: CMParts reorganization - Robert Burns
+* Common: Optional screen on/off animations - Diogo Ferreira
+* Common: New browser incognito mode - optedoblivion
+* Common: New trackball/trackpad wake - Zinx, Cyanogen
+* Common: Legacy sensor/GPS support - Arcee
+* Common: Customizable overscroll - Arcee
+* Common: Torch cleanup - defer
+* Common: OpenGL backwards compatibility - Zinx, Cyanogen
+* Common: SMS templates using gestures - Riccardo Ciovati
+* Common: Phone Goggles - David Bidorff
+* Common: Option to always show battery percentage on lockscreen - Robert Burns
+* Espresso/Legend: Enabled native WiFi tethering - Cyanogen, OMAPZoom.org
+* Z71: Enabled native WiFi tethering - arcee
+* Passion: Kernel 2.6.37 - Google, Cyanogen
+* Vision/Glacier/Espresso: WiFi calling compatibility and optimization - Zinx
+* Vision/Glacier/Ace: Unified kernel - HTC, Cyanogen, Zinx, Kali-, defer
+* Vision/Glacier/Ace: Fix FM radio on 2.3 - Zinx
+* Espresso/Legend/Liberty: Unified kernel - HTC, Cyanogen, attn1, jznomoney, Alex Hofbauer
 
 ### 6.1.3
 * Ace: Fix issue with some BT Headset
diff --git a/prebuilt/common/etc/init.d/04modules b/prebuilt/common/etc/init.d/04modules
index ad85910..1f00d63 100755
--- a/prebuilt/common/etc/init.d/04modules
+++ b/prebuilt/common/etc/init.d/04modules
@@ -4,7 +4,15 @@
 
 MODULES="ipv6"
 
-for i in $MODULES;
+KVER=`uname -r`
+if [ ! -d /system/lib/modules/$KVER ]
+then
+    exit 0
+fi
+
+for i in $MODULES
 do
-    modprobe $i;
+    modprobe $i >/dev/null 2>&1
 done
+
+exit 0
diff --git a/prebuilt/common/etc/init.d/05mountsd b/prebuilt/common/etc/init.d/05mountsd
old mode 100644
new mode 100755
diff --git a/prebuilt/common/etc/init.d/06mountdl b/prebuilt/common/etc/init.d/06mountdl
new file mode 100755
index 0000000..bed7019
--- /dev/null
+++ b/prebuilt/common/etc/init.d/06mountdl
@@ -0,0 +1,13 @@
+#!/system/bin/sh
+#
+# bind mount /data/local/download to /cache/download if cache
+# partition is too small
+#
+
+CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
+if [ $CACHESIZE -lt 20000 ]
+then
+  mount -o bind /data/local/download /cache/download
+fi
+
+exit 0
diff --git a/prebuilt/common/etc/init.d/20userinit b/prebuilt/common/etc/init.d/20userinit
index cc46480..8527576 100755
--- a/prebuilt/common/etc/init.d/20userinit
+++ b/prebuilt/common/etc/init.d/20userinit
@@ -28,3 +28,8 @@
    setprop cm.userinit.active 1;
 fi;
 
+if [ -d /data/local/userinit.d ];
+then
+   logwrapper busybox run-parts /data/local/userinit.d;
+   setprop cm.userinit.active 1;
+fi;
\ No newline at end of file
diff --git a/products/common.mk b/products/common.mk
index d34a4cf..89cd782 100644
--- a/products/common.mk
+++ b/products/common.mk
@@ -69,6 +69,8 @@
     vendor/cyanogen/prebuilt/common/etc/init.d/01sysctl:system/etc/init.d/01sysctl \
     vendor/cyanogen/prebuilt/common/etc/init.d/03firstboot:system/etc/init.d/03firstboot \
     vendor/cyanogen/prebuilt/common/etc/init.d/04modules:system/etc/init.d/04modules \
+    vendor/cyanogen/prebuilt/common/etc/init.d/05mountsd:system/etc/init.d/05mountsd \
+    vendor/cyanogen/prebuilt/common/etc/init.d/06mountdl:system/etc/init.d/06mountdl \
     vendor/cyanogen/prebuilt/common/etc/init.d/20userinit:system/etc/init.d/20userinit \
     vendor/cyanogen/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache \
     vendor/cyanogen/prebuilt/common/bin/compcache:system/bin/compcache \
@@ -80,7 +82,6 @@
     vendor/cyanogen/prebuilt/common/xbin/openvpn-up.sh:system/xbin/openvpn-up.sh
 
 PRODUCT_COPY_FILES += \
-    vendor/cyanogen/prebuilt/common/etc/init.d/05mountsd:system/etc/init.d/05mountsd
 #    vendor/cyanogen/prebuilt/common/etc/init.d/10apps2sd:system/etc/init.d/10apps2sd
 
 PRODUCT_COPY_FILES +=  \
diff --git a/products/common_full.mk b/products/common_full.mk
index 4b9edec..6bdc250 100644
--- a/products/common_full.mk
+++ b/products/common_full.mk
@@ -10,5 +10,5 @@
 # Default ringtone
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.config.ringtone=Playa.ogg \
-    ro.config.notification_sound=regulus.ogg
-
+    ro.config.notification_sound=regulus.ogg \
+    ro.config.alarm_alert=Alarm_Beep_03.ogg
diff --git a/products/cyanogen_espresso.mk b/products/cyanogen_espresso.mk
index 5739b0f..4619dc9 100644
--- a/products/cyanogen_espresso.mk
+++ b/products/cyanogen_espresso.mk
@@ -25,6 +25,9 @@
 # Add the Torch app
 PRODUCT_PACKAGES += Torch
 
+# Build GanOptimizer
+PRODUCT_PACKAGES += GanOptimizer
+
 #
 # Set ro.modversion
 #