Merge "Liberty: Build FM Radio" into gingerbread
diff --git a/CHANGELOG.mkdn b/CHANGELOG.mkdn
index 5cfd31c..242a013 100644
--- a/CHANGELOG.mkdn
+++ b/CHANGELOG.mkdn
@@ -98,9 +98,10 @@
* Common: Now playing and album art on lockscreen - kmobs
* Common: GPS fixes - CodeAurora, arcee
* Common: Breakfast/Brunch - arcee
-* Common: Statusbar battery percentage with mini icon - Sven Dawitz
+* Common: Statusbar battery percentage with mini icon - Sven Dawitz, design by Jazz Kalsi
* Common: SMS split for braindead carriers - Mike Wielgosz
* Common: CMParts cleanup - Sven Dawitz
+* Common: Notification profiles - Martin Long
* Espresso/Legend: Enabled native WiFi tethering - Cyanogen, OMAPZoom.org
* Z71: Enabled MPEG4/AAC video recording - arcee
* Z71: Enabled native WiFi tethering - arcee
diff --git a/overlay/ldpi/packages/apps/FM/res/layout/fmradio.xml b/overlay/ldpi/packages/apps/FM/res/layout/fmradio.xml
new file mode 100644
index 0000000..451a620
--- /dev/null
+++ b/overlay/ldpi/packages/apps/FM/res/layout/fmradio.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/fmradio"
+ android:background="@drawable/fmradio_background"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ >
+
+ <!-- This LinearLayout contains favorite Station Information display and the function buttons -->
+ <LinearLayout android:id="@+id/presets_layout"
+ android:background="@drawable/favorite_bg"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:orientation="horizontal"
+ android:layout_marginTop="170dip"
+ android:layout_marginLeft="14px"
+ android:layout_marginRight="13px"
+ >
+ <Button android:id="@+id/presets_button_1"
+ style="@style/favoriteButtonStyle"
+ />
+ <View
+ android:background="@drawable/favorite_line"
+ android:layout_width="2px"
+ android:layout_height="match_parent"
+ />
+ <Button android:id="@+id/presets_button_2"
+ style="@style/favoriteButtonStyle"
+ />
+ <View
+ android:background="@drawable/favorite_line"
+ android:layout_width="2px"
+ android:layout_height="match_parent"
+ />
+ <Button android:id="@+id/presets_button_3"
+ style="@style/favoriteButtonStyle"
+ />
+ <View
+ android:background="@drawable/favorite_line"
+ android:layout_width="2px"
+ android:layout_height="match_parent"
+ />
+ <Button android:id="@+id/presets_button_4"
+ style="@style/favoriteButtonStyle"
+ />
+ <View
+ android:background="@drawable/favorite_line"
+ android:layout_width="2px"
+ android:layout_height="match_parent"
+ />
+ <Button android:id="@+id/presets_button_5"
+ style="@style/favoriteButtonStyle"
+ />
+
+ </LinearLayout>
+
+ <!-- This LinearLayout contains Station Information display and the function buttons -->
+ <LinearLayout android:id="@+id/stationinfo_layout"
+ android:background="@null"
+ android:layout_width="match_parent"
+ android:layout_height="48dip"
+ android:orientation="horizontal"
+ android:layout_marginTop="5dip"
+ android:paddingLeft="10dip"
+ android:paddingRight="10dip"
+ >
+ <ImageButton android:id="@+id/btn_speaker"
+ android:src="@drawable/button_loudspeaker_off"
+ android:background="@null"
+ android:layout_marginLeft="5dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+
+ <LinearLayout
+ android:background="@drawable/station_freq_bg"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="40dip"
+ >
+ <TextView android:id="@+id/prog_frequency_tv"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:paddingLeft="40dip"
+ android:gravity="center"
+ android:textColor="#FFC3E7AA"
+ android:textSize="30sp"
+ android:text="@string/frequency_string"
+ />
+ </LinearLayout>
+
+ <ImageButton android:id="@+id/btn_onoff"
+ android:src="@drawable/button_power_off"
+ android:background="@null"
+ android:layout_marginLeft="45dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+
+ </LinearLayout>
+
+ <!-- This is frequency indicator: a red needle -->
+ <com.android.fm.radio.FreqIndicator
+ android:id="@+id/freq_indicator_view"
+ android:progressDrawable="@drawable/freq_indicator_seek"
+ android:thumb="@drawable/freq_indicator"
+ android:thumbOffset="0dip"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="11dip"
+ android:layout_marginRight="6dip"
+ android:layout_marginTop="5dip"
+ />
+
+ <!-- This is horizontal FM tuner -->
+ <com.android.fm.radio.TunerView
+ android:id="@+id/fm_tuner_view"
+ android:src="@drawable/tuner_view_0"
+ android:layout_width="240px"
+ android:layout_height="40px"
+ android:paddingTop="0px"
+ android:paddingBottom="23px"
+ android:paddingLeft="20px"
+ android:paddingRight="20px"
+ android:layout_marginTop="0dip"
+ android:layout_gravity="center_horizontal"
+ />
+
+</LinearLayout>
diff --git a/products/AndroidProducts.mk b/products/AndroidProducts.mk
index 2b72e59..a79c70e 100644
--- a/products/AndroidProducts.mk
+++ b/products/AndroidProducts.mk
@@ -6,6 +6,7 @@
$(LOCAL_DIR)/cyanogen_buzz.mk \
$(LOCAL_DIR)/cyanogen_click.mk \
$(LOCAL_DIR)/cyanogen_crespo.mk \
+ $(LOCAL_DIR)/cyanogen_dream_sapphire.mk \
$(LOCAL_DIR)/cyanogen_encore.mk \
$(LOCAL_DIR)/cyanogen_espresso.mk \
$(LOCAL_DIR)/cyanogen_hero.mk \
@@ -23,4 +24,3 @@
$(LOCAL_DIR)/cyanogen_supersonic.mk \
$(LOCAL_DIR)/cyanogen_vision.mk \
$(LOCAL_DIR)/cyanogen_z71.mk
-# $(LOCAL_DIR)/cyanogen_dream_sapphire.mk \
diff --git a/products/cyanogen_dream_sapphire.mk b/products/cyanogen_dream_sapphire.mk
index 6facc68..3576795 100644
--- a/products/cyanogen_dream_sapphire.mk
+++ b/products/cyanogen_dream_sapphire.mk
@@ -18,9 +18,9 @@
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_ID=FRG83 BUILD_DISPLAY_ID=GRI40 BUILD_FINGERPRINT=tmobile/opal/sapphire/sapphire:2.2.1/FRG83/60505:user/release-keys PRIVATE_BUILD_DESC="opal-user 2.2.1 FRG83 60505 release-keys"
# Build kernel
-PRODUCT_SPECIFIC_DEFINES += TARGET_PREBUILT_KERNEL=
-PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_DIR=kernel-msm
-PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_CONFIG=cyanogen_msm_defconfig
+#PRODUCT_SPECIFIC_DEFINES += TARGET_PREBUILT_KERNEL=
+#PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_DIR=kernel-msm
+#PRODUCT_SPECIFIC_DEFINES += TARGET_KERNEL_CONFIG=cyanogen_msm_defconfig
# Extra DS overlay
PRODUCT_PACKAGE_OVERLAYS += vendor/cyanogen/overlay/dream_sapphire
diff --git a/products/cyanogen_legend.mk b/products/cyanogen_legend.mk
index 776dc48..5d16874 100644
--- a/products/cyanogen_legend.mk
+++ b/products/cyanogen_legend.mk
@@ -19,6 +19,9 @@
PRODUCT_PACKAGES += Torch
+# TI FM radio
+$(call inherit-product, vendor/cyanogen/products/ti_fm_radio.mk)
+
PRODUCT_PACKAGE_OVERLAYS += vendor/cyanogen/overlay/legend
ifdef CYANOGEN_NIGHTLY
diff --git a/products/ti_fm_radio.mk b/products/ti_fm_radio.mk
new file mode 100644
index 0000000..7f91740
--- /dev/null
+++ b/products/ti_fm_radio.mk
@@ -0,0 +1,4 @@
+# TI FM Radio
+PRODUCT_PACKAGES += \
+ FM \
+ hcitool
diff --git a/vendorsetup.sh b/vendorsetup.sh
index 3e5860f..5b6103f 100644
--- a/vendorsetup.sh
+++ b/vendorsetup.sh
@@ -5,7 +5,7 @@
add_lunch_combo cyanogen_buzz-eng
add_lunch_combo cyanogen_click-eng
add_lunch_combo cyanogen_crespo-eng
-#add_lunch_combo cyanogen_dream_sapphire-eng
+add_lunch_combo cyanogen_dream_sapphire-eng
add_lunch_combo cyanogen_encore-eng
add_lunch_combo cyanogen_espresso-eng
add_lunch_combo cyanogen_generic-eng