Merge tag 'LA.QSSI.11.0.r1-11400-qssi.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/fm-commonsys into HEAD
"LA.QSSI.11.0.r1-11400-qssi.0"
* tag 'LA.QSSI.11.0.r1-11400-qssi.0' of https://source.codeaurora.org/quic/la/platform/vendor/qcom-opensource/fm-commonsys:
FM: add null check for BluetoothAdapter instance
Change-Id: I578c6073b24ea1f113092997b4c2909ed91d2b48
diff --git a/fm_hci/Android.bp b/fm_hci/Android.bp
deleted file mode 100644
index 764b6c4..0000000
--- a/fm_hci/Android.bp
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-cc_library_shared {
- name: "libfm-hci",
-
- srcs: ["fm_hci.cpp"],
-
- shared_libs: [
- "libdl",
- "libcutils",
- "libbase",
- "libhidlbase",
- "liblog",
- "libutils",
- "vendor.qti.hardware.fm@1.0",
- ],
-
- cflags: ["-Wno-unused-parameter"],
-
- include_dirs: [
- "vendor/qcom/opensource/commonsys/fm/helium",
- ],
-
- system_ext_specific: true,
-
-}
diff --git a/fmapp2/Android.bp b/fmapp2/Android.bp
index a2ef6ab..52361a9 100755
--- a/fmapp2/Android.bp
+++ b/fmapp2/Android.bp
@@ -10,4 +10,5 @@
platform_apis: true,
aaptflags: ["--legacy"],
system_ext_specific: true,
+ required: ["qcom.fmradio.xml"],
}
diff --git a/fmapp2/AndroidManifest.xml b/fmapp2/AndroidManifest.xml
index 9de2a62..595ee7d 100644
--- a/fmapp2/AndroidManifest.xml
+++ b/fmapp2/AndroidManifest.xml
@@ -51,18 +51,26 @@
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD" />
<uses-permission android:name="android.permission.MANAGE_USERS"/>
+
<application
- android:icon="@drawable/ic_launcher_fmradio"
+ android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:allowTaskReparenting="true"
android:taskAffinity="com.caf.task.fmradio"
+ android:theme="@style/FMTheme"
android:name=".FMAdapterApp">
- <activity android:icon="@drawable/ic_launcher_fmradio"
+
+ <uses-library android:name="qcom.fmradio"
+ android:required="true" />
+
+ <activity android:icon="@mipmap/ic_launcher"
android:name=".FMRadio"
android:label="@string/app_name"
android:clearTaskOnLaunch="true"
+ android:screenOrientation="portrait"
android:allowTaskReparenting="true"
android:launchMode="singleTask"
+ android:theme="@style/FMTheme"
android:configChanges="keyboardHidden|orientation|screenSize"
android:excludeFromRecents="false" >
@@ -85,7 +93,8 @@
</receiver>
<activity android:name=".Settings"
- android:label="@string/settings_menu">
+ android:theme="@style/FMTheme"
+ android:label="@string/menu_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -112,7 +121,7 @@
</activity>
<activity android:name=".StationListActivity"
- android:label="@string/app_label_all_channels"
+ android:label="@string/menu_all_channels"
android:configChanges="orientation|keyboardHidden|screenSize|fontScale">
<intent-filter>
diff --git a/fmapp2/fmtransmitter.xml b/fmapp2/fmtransmitter.xml
deleted file mode 100644
index 5e65620..0000000
--- a/fmapp2/fmtransmitter.xml
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <!--
- This LinearLayout contains Station Information display and the
- function buttons
- -->
- <LinearLayout android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="horizontal">
-
- <LinearLayout android:background="@drawable/station_border"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:orientation="vertical"
- android:gravity="top|fill_vertical">
-
- <RelativeLayout android:id="@+id/station_layout"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <!-- This included layout contains Station Information to display -->
- <LinearLayout android:id="@+id/stationinfo_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5px"
- android:layout_marginLeft="5px"
- android:layout_marginRight="5px"
- android:orientation="vertical"
- android:gravity="fill_vertical">
-
- <LinearLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="25px"
- android:paddingBottom="25px"
- android:gravity="fill_vertical|center">
-
- <TextView android:id="@+id/transmit_msg_tv"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="15px"
- android:layout_centerHorizontal="true"
- android:layout_alignWithParentIfMissing="true"
- android:text="@string/transmit_msg_string" />
-
- <TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:layout_alignWithParentIfMissing="true"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:textSize="56px"
- android:text="@string/frequency_string" />
- </LinearLayout>
-
- <!-- Station Radio Text information display -->
- <TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingBottom="2px"
- android:paddingLeft="5px"
- android:paddingRight="5px"
- android:gravity="center_horizontal"
- android:text="@string/radio_text_string" />
- <!-- android:gravity="center_horizontal" -->
- </LinearLayout>
-
- <ImageView android:id="@+id/btn_back"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:paddingLeft="10px"
- android:paddingRight="2px"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"
- android:visibility="visible"
- android:src="@drawable/btn_arrow_left" />
-
- <ImageView android:id="@+id/btn_forward"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="fill_parent"
- android:paddingLeft="2px"
- android:paddingRight="10px"
- android:layout_alignParentRight="true"
- android:layout_centerVertical="true"
- android:visibility="visible"
- android:src="@drawable/btn_arrow_right" />
-
- </RelativeLayout>
- </LinearLayout>
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_gravity="center"
- android:layout_marginLeft="5px"
- android:layout_marginRight="5px"
- android:layout_marginBottom="2px">
- <!-- On-Off button -->
- <ImageButton android:id="@+id/btn_onoff"
- android:layout_width="75px"
- android:layout_height="75px"
- android:src="@drawable/ic_btn_onoff"
- android:layout_marginTop="15px"
- android:layout_marginBottom="15px" />
- </LinearLayout>
-
- </LinearLayout>
- <View
- android:layout_width="fill_parent"
- android:layout_height="1px"
- android:background="#ffffffff" />
-
- <!--
- Layout contains the Next/Previous Presets and Tune buttons and status
- msg text
- -->
- <LinearLayout android:id="@+id/presets_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_weight="0"
- android:layout_gravity="center"
- android:layout_marginTop="15dip"
- android:layout_marginBottom="10dip"
- android:gravity="center_horizontal">
-
- <Button android:id="@+id/presets_button_1"
- android:text="@string/default_station"
- android:layout_marginLeft="20dip"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip" />
-
- <Button android:id="@+id/presets_button_2"
- android:text="@string/default_station"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip" />
-
- <Button android:id="@+id/presets_button_3"
- android:text="@string/default_station"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip" />
-
- <Button android:id="@+id/presets_button_4"
- android:text="@string/default_blank"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip" />
-
- <Button android:id="@+id/presets_button_5"
- android:text="@string/default_blank"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip" />
-
- <Button android:id="@+id/presets_button_6"
- android:text="@string/default_blank"
- android:layout_marginRight="20dip"
- android:textSize="24sp"
- android:singleLine="true"
- android:layout_width="110dip"
- android:layout_height="65dip"/>
-
- </LinearLayout>
-
-
-</LinearLayout>
diff --git a/fmapp2/res/drawable-hdpi/bg.png b/fmapp2/res/drawable-hdpi/bg.png
deleted file mode 100644
index fd10f0b..0000000
--- a/fmapp2/res/drawable-hdpi/bg.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png
deleted file mode 100644
index 857fb7a..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_left_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png
deleted file mode 100644
index 438e392..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_left_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_left_selected.png b/fmapp2/res/drawable-hdpi/btn_arrow_left_selected.png
deleted file mode 100644
index fab8ee4..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_left_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png
deleted file mode 100644
index 547e505..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_right_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png
deleted file mode 100644
index 96eacae..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_right_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/btn_arrow_right_selected.png b/fmapp2/res/drawable-hdpi/btn_arrow_right_selected.png
deleted file mode 100644
index 67a86f5..0000000
--- a/fmapp2/res/drawable-hdpi/btn_arrow_right_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png
deleted file mode 100644
index 6a5b8db..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png
deleted file mode 100644
index f32b96e..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_diable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png
deleted file mode 100644
index 67afd3e..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_earphone_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png
deleted file mode 100644
index 1c0f511..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png
deleted file mode 100644
index 12b2d28..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_disable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png
deleted file mode 100644
index efeebd3..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_onoff_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_spaker.png b/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
index f439e2e..07614df 100644
--- a/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
+++ b/fmapp2/res/drawable-hdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png
deleted file mode 100644
index bd5d57b..0000000
--- a/fmapp2/res/drawable-hdpi/ic_btn_spaker_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/ic_launcher_fmradio.png b/fmapp2/res/drawable-hdpi/ic_launcher_fmradio.png
deleted file mode 100644
index 4815bce..0000000
--- a/fmapp2/res/drawable-hdpi/ic_launcher_fmradio.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/recorder_stop.png b/fmapp2/res/drawable-hdpi/recorder_stop.png
index bb8b32b..ff9839b 100644
--- a/fmapp2/res/drawable-hdpi/recorder_stop.png
+++ b/fmapp2/res/drawable-hdpi/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/drawable-hdpi/stat_notify_fm.png b/fmapp2/res/drawable-hdpi/stat_notify_fm.png
old mode 100755
new mode 100644
index d4668a7..ad804c1
--- a/fmapp2/res/drawable-hdpi/stat_notify_fm.png
+++ b/fmapp2/res/drawable-hdpi/stat_notify_fm.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/bg.png b/fmapp2/res/drawable-mdpi/bg.png
deleted file mode 100644
index fd10f0b..0000000
--- a/fmapp2/res/drawable-mdpi/bg.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png b/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png
deleted file mode 100644
index da077e6..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_left_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png b/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png
deleted file mode 100644
index b18c859..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_left_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_left_selected.png b/fmapp2/res/drawable-mdpi/btn_arrow_left_selected.png
deleted file mode 100644
index aa5ebe4..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_left_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png b/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png
deleted file mode 100644
index 696f53a..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_right_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png b/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png
deleted file mode 100644
index 069df33..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_right_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/btn_arrow_right_selected.png b/fmapp2/res/drawable-mdpi/btn_arrow_right_selected.png
deleted file mode 100644
index d7d797b..0000000
--- a/fmapp2/res/drawable-mdpi/btn_arrow_right_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png
deleted file mode 100644
index c729ed0..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png
deleted file mode 100644
index c0929ba..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_diable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png b/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png
deleted file mode 100644
index fb51ce1..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_earphone_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png
deleted file mode 100644
index 9303cfb..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png
deleted file mode 100644
index 57e060a..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_disable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png b/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png
deleted file mode 100644
index 1228a66..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_onoff_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_spaker.png b/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
index b72fab9..82a6d91 100644
--- a/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
+++ b/fmapp2/res/drawable-mdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png b/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png
deleted file mode 100644
index 250baea..0000000
--- a/fmapp2/res/drawable-mdpi/ic_btn_spaker_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/ic_launcher_fmradio.png b/fmapp2/res/drawable-mdpi/ic_launcher_fmradio.png
deleted file mode 100644
index 3361ad5..0000000
--- a/fmapp2/res/drawable-mdpi/ic_launcher_fmradio.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/recorder_stop.png b/fmapp2/res/drawable-mdpi/recorder_stop.png
index bb8b32b..ff9839b 100644
--- a/fmapp2/res/drawable-mdpi/recorder_stop.png
+++ b/fmapp2/res/drawable-mdpi/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/drawable-mdpi/stat_notify_fm.png b/fmapp2/res/drawable-mdpi/stat_notify_fm.png
old mode 100755
new mode 100644
index 06c82f3..331abff
--- a/fmapp2/res/drawable-mdpi/stat_notify_fm.png
+++ b/fmapp2/res/drawable-mdpi/stat_notify_fm.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png b/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png
new file mode 100644
index 0000000..e51c03d
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-xhdpi/stat_notify_fm.png b/fmapp2/res/drawable-xhdpi/stat_notify_fm.png
new file mode 100644
index 0000000..51fbe01
--- /dev/null
+++ b/fmapp2/res/drawable-xhdpi/stat_notify_fm.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png
new file mode 100644
index 0000000..870da4d
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/ic_btn_spaker.png
Binary files differ
diff --git a/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png b/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png
new file mode 100644
index 0000000..1be7c37
--- /dev/null
+++ b/fmapp2/res/drawable-xxhdpi/stat_notify_fm.png
Binary files differ
diff --git a/fmapp2/res/drawable/application_border.xml b/fmapp2/res/drawable/application_border.xml
deleted file mode 100644
index eaf0918..0000000
--- a/fmapp2/res/drawable/application_border.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- * Copyright (c) 2009, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <stroke android:width="1dp" android:color="#A0000000" />
- <padding android:left="1dp" android:top="1dp"
- android:right="1dp" android:bottom="1dp" />
- <corners android:radius="1dp" />
-</shape>
diff --git a/fmapp2/res/drawable/bg.png b/fmapp2/res/drawable/bg.png
index fd10f0b..ebd97fd 100644
--- a/fmapp2/res/drawable/bg.png
+++ b/fmapp2/res/drawable/bg.png
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_left.xml b/fmapp2/res/drawable/btn_arrow_left.xml
index e64966c..ea850c4 100644
--- a/fmapp2/res/drawable/btn_arrow_left.xml
+++ b/fmapp2/res/drawable/btn_arrow_left.xml
@@ -31,9 +31,6 @@
<item android:state_pressed="true"
android:drawable="@drawable/btn_arrow_left_press" />
- <item android:state_window_focused="true" android:state_focused="true"
- android:drawable="@drawable/btn_arrow_left_selected" />
-
<item
android:drawable="@drawable/btn_arrow_left_default" />
diff --git a/fmapp2/res/drawable/btn_arrow_left_default.png b/fmapp2/res/drawable/btn_arrow_left_default.png
deleted file mode 100644
index 2a35952..0000000
--- a/fmapp2/res/drawable/btn_arrow_left_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_left_default.xml b/fmapp2/res/drawable/btn_arrow_left_default.xml
new file mode 100644
index 0000000..e07667c
--- /dev/null
+++ b/fmapp2/res/drawable/btn_arrow_left_default.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z" />
+ <path
+ android:pathData="M0-.5h24v24h-24z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/btn_arrow_left_press.png b/fmapp2/res/drawable/btn_arrow_left_press.png
deleted file mode 100644
index 8b72f0a..0000000
--- a/fmapp2/res/drawable/btn_arrow_left_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_left_press.xml b/fmapp2/res/drawable/btn_arrow_left_press.xml
new file mode 100644
index 0000000..75b7687
--- /dev/null
+++ b/fmapp2/res/drawable/btn_arrow_left_press.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fefefe"
+ android:pathData="M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z" />
+ <path
+ android:pathData="M0-.5h24v24h-24z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/btn_arrow_left_selected.png b/fmapp2/res/drawable/btn_arrow_left_selected.png
deleted file mode 100644
index 6cd3c9f..0000000
--- a/fmapp2/res/drawable/btn_arrow_left_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_right.xml b/fmapp2/res/drawable/btn_arrow_right.xml
index e4ab6f9..11c8a3c 100644
--- a/fmapp2/res/drawable/btn_arrow_right.xml
+++ b/fmapp2/res/drawable/btn_arrow_right.xml
@@ -32,9 +32,6 @@
<item android:state_pressed="true"
android:drawable="@drawable/btn_arrow_right_press" />
- <item android:state_window_focused="true" android:state_focused="true"
- android:drawable="@drawable/btn_arrow_right_selected" />
-
<item
android:drawable="@drawable/btn_arrow_right_default" />
diff --git a/fmapp2/res/drawable/btn_arrow_right_default.png b/fmapp2/res/drawable/btn_arrow_right_default.png
deleted file mode 100644
index ae6fd53..0000000
--- a/fmapp2/res/drawable/btn_arrow_right_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_right_default.xml b/fmapp2/res/drawable/btn_arrow_right_default.xml
new file mode 100644
index 0000000..8c782e1
--- /dev/null
+++ b/fmapp2/res/drawable/btn_arrow_right_default.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z" />
+ <path
+ android:pathData="M0-.25h24v24h-24z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/btn_arrow_right_press.png b/fmapp2/res/drawable/btn_arrow_right_press.png
deleted file mode 100644
index a4ae45b..0000000
--- a/fmapp2/res/drawable/btn_arrow_right_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_arrow_right_press.xml b/fmapp2/res/drawable/btn_arrow_right_press.xml
new file mode 100644
index 0000000..9c979c9
--- /dev/null
+++ b/fmapp2/res/drawable/btn_arrow_right_press.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fefefe"
+ android:pathData="M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z" />
+ <path
+ android:pathData="M0-.25h24v24h-24z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/btn_arrow_right_selected.png b/fmapp2/res/drawable/btn_arrow_right_selected.png
deleted file mode 100644
index 93bcc77..0000000
--- a/fmapp2/res/drawable/btn_arrow_right_selected.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/btn_recorder.xml b/fmapp2/res/drawable/btn_recorder.xml
deleted file mode 100644
index 88a5302..0000000
--- a/fmapp2/res/drawable/btn_recorder.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/recorder_selected" />
- <item android:state_enabled="true"
- android:drawable="@drawable/recorder_stop" />
- <item android:state_enabled="false"
- android:drawable="@drawable/recorder_start" />
-</selector>
diff --git a/fmapp2/res/drawable/btn_speaker.xml b/fmapp2/res/drawable/btn_speaker.xml
index a22e62a..3733fd8 100644
--- a/fmapp2/res/drawable/btn_speaker.xml
+++ b/fmapp2/res/drawable/btn_speaker.xml
@@ -33,5 +33,7 @@
<item android:state_pressed="true"
android:drawable="@drawable/ic_btn_spaker_select" />
<item android:state_enabled="true"
- android:drawable="@drawable/ic_btn_spaker" />
+ android:drawable="@drawable/ic_btn_spaker_default" />
+ <item android:state_enabled="false"
+ android:drawable="@drawable/ic_btn_spaker_diable" />
</selector>
diff --git a/fmapp2/res/drawable/btn_strip_trans_left.xml b/fmapp2/res/drawable/btn_strip_trans_left.xml
deleted file mode 100644
index 0a30f34..0000000
--- a/fmapp2/res/drawable/btn_strip_trans_left.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_pressed="true"
- android:drawable="@drawable/btn_strip_trans_left_pressed" />
-
- <item android:state_focused="true"
- android:drawable="@drawable/btn_strip_trans_left_selected" />
-
- <item android:state_enabled="true"
- android:drawable="@drawable/btn_strip_trans_left_normal" />
-
-</selector>
diff --git a/fmapp2/res/drawable/btn_strip_trans_middle.xml b/fmapp2/res/drawable/btn_strip_trans_middle.xml
deleted file mode 100644
index b6b95a6..0000000
--- a/fmapp2/res/drawable/btn_strip_trans_middle.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-
- <item android:state_pressed="true"
- android:drawable="@drawable/btn_strip_trans_middle_pressed" />
-
- <item android:state_focused="true"
- android:drawable="@drawable/btn_strip_trans_middle_selected" />
-
- <item android:state_enabled="true"
- android:drawable="@drawable/btn_strip_trans_middle_normal" />
-
-</selector>
diff --git a/fmapp2/res/drawable/ic_btn_earphone_default.png b/fmapp2/res/drawable/ic_btn_earphone_default.png
deleted file mode 100644
index 6a5b8db..0000000
--- a/fmapp2/res/drawable/ic_btn_earphone_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_earphone_default.xml b/fmapp2/res/drawable/ic_btn_earphone_default.xml
new file mode 100644
index 0000000..b7d2a39
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_earphone_default.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillAlpha=".1"
+ android:strokeAlpha=".1"
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#fefefe"
+ android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13
+7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_earphone_diable.png b/fmapp2/res/drawable/ic_btn_earphone_diable.png
deleted file mode 100644
index f32b96e..0000000
--- a/fmapp2/res/drawable/ic_btn_earphone_diable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_earphone_diable.xml b/fmapp2/res/drawable/ic_btn_earphone_diable.xml
new file mode 100644
index 0000000..87a957b
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_earphone_diable.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillAlpha=".1"
+ android:strokeAlpha=".1"
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#003a33"
+ android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13
+7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_earphone_select.png b/fmapp2/res/drawable/ic_btn_earphone_select.png
deleted file mode 100644
index 67afd3e..0000000
--- a/fmapp2/res/drawable/ic_btn_earphone_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_earphone_select.xml b/fmapp2/res/drawable/ic_btn_earphone_select.xml
new file mode 100644
index 0000000..979cb52
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_earphone_select.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillAlpha=".1"
+ android:strokeAlpha=".1"
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#4db6ac"
+ android:pathData="M12 1c-4.97 0-9 4.03-9 9v7c0 1.66 1.34 3 3 3h3v-8h-4v-2c0-3.87 3.13-7 7-7s7 3.13
+7 7v2h-4v8h3c1.66 0 3-1.34 3-3v-7c0-4.97-4.03-9-9-9z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_onoff_default.png b/fmapp2/res/drawable/ic_btn_onoff_default.png
deleted file mode 100644
index 1c0f511..0000000
--- a/fmapp2/res/drawable/ic_btn_onoff_default.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_onoff_default.xml b/fmapp2/res/drawable/ic_btn_onoff_default.xml
new file mode 100644
index 0000000..78a428b
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_onoff_default.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05
+2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06
+2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58
+8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_onoff_disable.png b/fmapp2/res/drawable/ic_btn_onoff_disable.png
deleted file mode 100644
index 12b2d28..0000000
--- a/fmapp2/res/drawable/ic_btn_onoff_disable.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_onoff_disable.xml b/fmapp2/res/drawable/ic_btn_onoff_disable.xml
new file mode 100644
index 0000000..73f72da
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_onoff_disable.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#fefefe"
+ android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05
+2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06
+2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58
+8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_onoff_press.png b/fmapp2/res/drawable/ic_btn_onoff_press.png
deleted file mode 100644
index efeebd3..0000000
--- a/fmapp2/res/drawable/ic_btn_onoff_press.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_onoff_press.xml b/fmapp2/res/drawable/ic_btn_onoff_press.xml
new file mode 100644
index 0000000..fc6f74a
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_onoff_press.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#eeeeee"
+ android:pathData="M7 24h2v-2h-2v2zm4 0h2v-2h-2v2zm2-22h-2v10h2v-10zm3.56 2.44l-1.45 1.45c1.73 1.05
+2.89 2.94 2.89 5.11 0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06
+2.88-5.12l-1.44-1.44c-2.08 1.44-3.44 3.84-3.44 6.56 0 4.42 3.58 8 8 8s8-3.58
+8-8c0-2.72-1.36-5.12-3.44-6.56zm-1.56 19.56h2v-2h-2v2z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_search.png b/fmapp2/res/drawable/ic_btn_search.png
deleted file mode 100644
index 7eea584..0000000
--- a/fmapp2/res/drawable/ic_btn_search.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_search.xml b/fmapp2/res/drawable/ic_btn_search.xml
new file mode 100644
index 0000000..ba4d4ba
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_search.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M15.5 14h-.79l-.28-.27c.98-1.14 1.57-2.62 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5
+2.91-6.5 6.5 2.91 6.5 6.5 6.5c1.61 0 3.09-.59 4.23-1.57l.27 .28 v.79l5 4.99
+1.49-1.49-4.99-5zm-6 0c-2.49 0-4.5-2.01-4.5-4.5s2.01-4.5 4.5-4.5 4.5 2.01 4.5
+4.5-2.01 4.5-4.5 4.5z" />
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_search_stop.png b/fmapp2/res/drawable/ic_btn_search_stop.png
deleted file mode 100644
index 0b8c4e8..0000000
--- a/fmapp2/res/drawable/ic_btn_search_stop.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_search_stop.xml b/fmapp2/res/drawable/ic_btn_search_stop.xml
new file mode 100644
index 0000000..00381de
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_search_stop.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:pathData="M0 0h24v24h-24z" />
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M12 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10zm-8
+10c0-4.42 3.58-8 8-8 1.85 0 3.55 .63 4.9 1.69l-11.21
+11.21c-1.06-1.35-1.69-3.05-1.69-4.9zm8 8c-1.85
+0-3.55-.63-4.9-1.69l11.21-11.21c1.06 1.35 1.69 3.05 1.69 4.9 0 4.42-3.58 8-8 8z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_spaker.png b/fmapp2/res/drawable/ic_btn_spaker.png
deleted file mode 100644
index f439e2e..0000000
--- a/fmapp2/res/drawable/ic_btn_spaker.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_spaker_default.xml b/fmapp2/res/drawable/ic_btn_spaker_default.xml
new file mode 100644
index 0000000..ba277fb
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_spaker_default.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fefefe"
+ android:pathData="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5
+5V4L9 9H5z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_spaker_diable.xml b/fmapp2/res/drawable/ic_btn_spaker_diable.xml
new file mode 100644
index 0000000..4fb4267
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_spaker_diable.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#003a33"
+ android:pathData="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5
+5V4L9 9H5z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_btn_spaker_select.png b/fmapp2/res/drawable/ic_btn_spaker_select.png
deleted file mode 100644
index bd5d57b..0000000
--- a/fmapp2/res/drawable/ic_btn_spaker_select.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_btn_spaker_select.xml b/fmapp2/res/drawable/ic_btn_spaker_select.xml
new file mode 100644
index 0000000..984677a
--- /dev/null
+++ b/fmapp2/res/drawable/ic_btn_spaker_select.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#4db6ac"
+ android:pathData="M18.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM5 9v6h4l5
+5V4L9 9H5z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_silent_mode.png b/fmapp2/res/drawable/ic_silent_mode.png
deleted file mode 100644
index c89291a..0000000
--- a/fmapp2/res/drawable/ic_silent_mode.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_silent_mode.xml b/fmapp2/res/drawable/ic_silent_mode.xml
new file mode 100644
index 0000000..29ecfdb
--- /dev/null
+++ b/fmapp2/res/drawable/ic_silent_mode.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2 .05 -.41 .05 -.63zm2.5
+0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21
+12c0-4.28-2.99-7.86-7-8.77v2.06c2.89 .86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73
+9H3v6h4l5 5v-6.73l4.25 4.25c-.67 .52 -1.42 .93 -2.25 1.18v2.06c1.38-.31 2.63-.95
+3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/ic_silent_mode_off.png b/fmapp2/res/drawable/ic_silent_mode_off.png
deleted file mode 100644
index 4748b9e..0000000
--- a/fmapp2/res/drawable/ic_silent_mode_off.png
+++ /dev/null
Binary files differ
diff --git a/fmapp2/res/drawable/ic_silent_mode_off.xml b/fmapp2/res/drawable/ic_silent_mode_off.xml
new file mode 100644
index 0000000..5264210
--- /dev/null
+++ b/fmapp2/res/drawable/ic_silent_mode_off.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <group>
+ <path
+ android:fillColor="#fafafa"
+ android:pathData="M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25
+2.5-4.02zM14 3.23v2.06c2.89 .86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91
+7-4.49 7-8.77s-2.99-7.86-7-8.77z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ </group>
+</vector>
diff --git a/fmapp2/res/drawable/btn_strip_trans_right.xml b/fmapp2/res/drawable/preset_button_background.xml
similarity index 89%
rename from fmapp2/res/drawable/btn_strip_trans_right.xml
rename to fmapp2/res/drawable/preset_button_background.xml
index 512c963..d6acfa5 100644
--- a/fmapp2/res/drawable/btn_strip_trans_right.xml
+++ b/fmapp2/res/drawable/preset_button_background.xml
@@ -32,12 +32,12 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
- android:drawable="@drawable/btn_strip_trans_right_pressed" />
+ android:drawable="@color/favorite_button_active" />
<item android:state_focused="true"
- android:drawable="@drawable/btn_strip_trans_right_selected" />
+ android:drawable="@color/favorite_button_active" />
<item android:state_enabled="true"
- android:drawable="@drawable/btn_strip_trans_right_normal" />
+ android:drawable="@color/favorite_button_normal" />
</selector>
diff --git a/fmapp2/res/drawable/recorder_stop.png b/fmapp2/res/drawable/recorder_stop.png
index 6017be9..ff9839b 100644
--- a/fmapp2/res/drawable/recorder_stop.png
+++ b/fmapp2/res/drawable/recorder_stop.png
Binary files differ
diff --git a/fmapp2/res/drawable/seeker.png b/fmapp2/res/drawable/seeker.png
new file mode 100644
index 0000000..9babc55
--- /dev/null
+++ b/fmapp2/res/drawable/seeker.png
Binary files differ
diff --git a/fmapp2/res/layout-800x480/fmradio.xml b/fmapp2/res/layout-800x480/fmradio.xml
deleted file mode 100644
index 0b96bc5..0000000
--- a/fmapp2/res/layout-800x480/fmradio.xml
+++ /dev/null
@@ -1,204 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/fmradio"
- android:background="@drawable/bg"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical">
-
- <RelativeLayout android:id="@+id/layout_on_off"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_marginTop="3dp"
- android:layout_alignParentTop="true">
-
- <ImageView android:id="@+id/btn_onoff"
- android:src="@drawable/btn_onoff"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/count_down"
- android:layout_toRightOf="@+id/btn_onoff"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:layout_marginLeft="5dp"
- android:textStyle="bold"
- android:visibility="invisible"
- android:text="@string/default_sleep" />
-
- <TextView android:id="@+id/prog_service_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp"
- android:layout_toLeftOf="@+id/btn_silent"
- android:layout_toRightOf="@+id/sleep_msg_tv"
- android:textSize="16sp"
- android:textColor="@android:color/white"
- android:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string"/>
-
- <ImageView android:id="@+id/btn_silent"
- android:src="@drawable/ic_silent_mode_off"
- android:layout_toLeftOf="@+id/btn_speaker_earphone"
- android:layout_width="wrap_content"
- android:layout_marginRight="10dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_height="wrap_content" />
-
- <ImageView android:id="@+id/btn_speaker_earphone"
- android:src="@drawable/btn_earphone"
- android:layout_alignParentRight="true"
- android:layout_marginRight="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- </RelativeLayout>
-
- <LinearLayout android:id="@+id/stationinfo_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_marginTop="5dp"
- android:layout_below="@+id/layout_on_off">
-
- <!-- This included layout contains Station Information to display -->
- <include layout="@layout/station_info" />
-
- </LinearLayout>
-
- <com.caf.fmradio.HorizontalNumberPicker
- android:id="@+id/fm_picker"
- android:layout_width="fill_parent"
- android:layout_height="200dp"
- android:layout_marginBottom="50dp"
- android:layout_below="@+id/stationinfo_layout"/>
-
- <HorizontalScrollView
- android:layout_width="fill_parent"
- android:layout_height="60dp"
- android:layout_alignParentBottom="true"
- android:scrollbars="none">
-
- <LinearLayout android:id="@+id/favorite_list"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="horizontal">
-
- <Button android:id="@+id/presets_button_1"
- style="@style/ButtonStripLeft"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_2"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_3"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_4"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_5"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_6"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- <Button android:id="@+id/presets_button_7"
- style="@style/ButtonStripRight"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="16sp"
- android:singleLine="true"
- android:layout_width="96dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
-
- </LinearLayout>
-
- </HorizontalScrollView>
-
-</RelativeLayout>
diff --git a/fmapp2/res/layout-800x480/fmtransmitter.xml b/fmapp2/res/layout-800x480/fmtransmitter.xml
index 4754780..62d0995 100644
--- a/fmapp2/res/layout-800x480/fmtransmitter.xml
+++ b/fmapp2/res/layout-800x480/fmtransmitter.xml
@@ -87,7 +87,7 @@
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/frequency_string"
+ android:text="@string/default_blank"
android:textColor="@android:color/white"/>
<ImageView android:id="@+id/btn_forward"
@@ -122,7 +122,7 @@
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
diff --git a/fmapp2/res/layout-800x480/navigate.xml b/fmapp2/res/layout-800x480/navigate.xml
deleted file mode 100644
index 7e60d32..0000000
--- a/fmapp2/res/layout-800x480/navigate.xml
+++ /dev/null
@@ -1,188 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <RelativeLayout android:id="@+id/message_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dp"
- android:paddingTop="5dp"
- android:paddingBottom="5dp">
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:textSize="28dp"
- android:textStyle="bold"
- android:gravity="fill"
- android:text="@string/default_record" />
-
- <Button android:id="@+id/btn_presets_list"
- android:text="@string/default_preset_list_name"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textSize="24dp"
- android:textStyle="bold"
- android:singleLine="true"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:layout_gravity="center"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:layout_marginBottom="10dp"
- android:gravity="fill"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@+id/btn_presets_list"
- android:textSize="28dp"
- android:textStyle="bold"
- android:gravity="fill"
- android:text="@string/default_sleep" />
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/presets_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/message_row"
- android:layout_centerInParent="true">
-
- <!-- Upper Presets -->
- <RelativeLayout android:id="@+id/presets_upper_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="top">
-
- <Button android:id="@+id/presets_button_1"
- android:text="@string/default_blank"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="24dp"
- android:singleLine="true"
- android:gravity="fill"
- android:layout_width="120dp"
- android:layout_height="65dp" />
-
- <Button android:id="@+id/presets_button_2"
- android:text="@string/default_blank"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="24dp"
- android:singleLine="true"
- android:layout_toRightOf="@id/presets_button_1"
- android:layout_alignTop="@id/presets_button_1"
- android:layout_alignBottom="@id/presets_button_1"
- android:gravity="fill"
- android:layout_width="120dp"
- android:layout_height="65dp" />
-
- <Button android:id="@+id/presets_button_3"
- android:text="@string/default_blank"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="24dp"
- android:singleLine="true"
- android:layout_toRightOf="@id/presets_button_2"
- android:layout_alignTop="@id/presets_button_2"
- android:layout_alignBottom="@id/presets_button_2"
- android:layout_width="120dp"
- android:gravity="fill"
- android:layout_height="65dp" />
- </RelativeLayout>
-
-<!-- Lower Presets -->
- <RelativeLayout android:id="@+id/presets_lower_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@id/presets_upper_layout"
- android:layout_alignLeft="@id/presets_upper_layout"
- android:layout_alignRight="@id/presets_upper_layout">
-
- <Button android:id="@+id/presets_button_4"
- android:text="@string/default_blank"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="24dp"
- android:singleLine="true"
- android:layout_width="120dp"
- android:gravity="fill"
- android:layout_alignLeft="@id/presets_button_1"
- android:layout_alignRight="@id/presets_button_1"
- android:layout_height="65dp" />
-
- <Button android:id="@+id/presets_button_5"
- android:text="@string/default_blank"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="24dp"
- android:singleLine="true"
- android:layout_toRightOf="@id/presets_button_4"
- android:layout_alignTop="@id/presets_button_4"
- android:layout_alignBottom="@id/presets_button_4"
- android:layout_alignLeft="@id/presets_button_2"
- android:layout_alignRight="@id/presets_button_2"
- android:gravity="fill"
- android:layout_width="120dp"
- android:layout_height="65dp" />
-
- <ImageButton android:id="@+id/btn_preset_page"
- android:src="@drawable/ic_btn_forward"
- android:layout_toRightOf="@id/presets_button_5"
- android:layout_alignTop="@id/presets_button_5"
- android:layout_alignBottom="@id/presets_button_5"
- android:layout_alignLeft="@id/presets_button_3"
- android:layout_alignRight="@id/presets_button_3"
- android:gravity="fill"
- android:layout_width="120dp"
- android:layout_height="65dp" />
- </RelativeLayout>
- </RelativeLayout>
-
- <RelativeLayout android:id="@+id/scanning_stoplayout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:gravity="center">
-
- <Button android:id="@+id/btn_scanning_stop"
- android:clickable="true"
- android:text="@string/stop_scanning"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="32dip"
- android:singleLine="true"
- android:padding="20dip"
- android:gravity="fill"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
- </RelativeLayout>
-
-</merge>
diff --git a/fmapp2/res/layout-800x480/station_info.xml b/fmapp2/res/layout-800x480/station_info.xml
deleted file mode 100644
index c96775a..0000000
--- a/fmapp2/res/layout-800x480/station_info.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <LinearLayout android:id="@+id/station_info"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_weight="0"
- android:orientation="vertical"
- android:gravity="top">
-
- <RelativeLayout android:id="@+id/top_most"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
-
- <ImageView android:id="@+id/signal_level"
- android:src="@drawable/ic_signal_2"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="5dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:visibility="gone" />
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/recorder_start"
- android:layout_marginLeft="20dp"
- android:textSize="14sp"
- android:textStyle="bold"
- android:textColor="@android:color/white"
- android:clickable="true"
- android:visibility="invisible"
- android:text="@string/default_record"/>
-
-
- <TextView android:id="@+id/stereo_text_tv"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="16dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@id/signal_level"
- android:textSize="13sp"
- android:textColor="@android:color/white"
- android:text="@string/default_audio"/>
-
- </RelativeLayout>
-
- <LinearLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:layout_alignWithParentIfMissing="true"
- android:gravity="center">
-
- <TextView android:id="@+id/call_sign_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/station_id_string" />
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:textColor="@android:color/white"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/pty_string" />
-
- </LinearLayout>
-
- <RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="1dp"
- android:layout_marginBottom="1dp"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp">
-
- <TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="25dp"
- android:textColor="@android:color/white"
- android:gravity="center"
- android:clickable="true"
- android:focusable="true"
- android:layout_toLeftOf="@+id/btn_forward"
- android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
-
- <ImageView android:id="@+id/btn_back"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="15dp"
- android:layout_alignParentLeft="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_left"/>
-
- <ImageView android:id="@+id/btn_forward"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="15dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right"/>
-
- </RelativeLayout>
-
-
- <!-- Station Radio Text information display -->
- <TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:textStyle="bold"
- android:textColor="@android:color/white"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:paddingTop="20dp"
- android:gravity="center_horizontal"
- android:text="@string/radio_text_string"/>
-
- <TextView android:id="@+id/eradio_text_tv"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:textColor="@android:color/white"
- android:singleLine="true"
- android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:gravity="center_horizontal"
- android:text="@string/eradio_text_string"/>
-
- </LinearLayout>
-
-</merge>
diff --git a/fmapp2/res/layout-land-finger-800x480/fmradio.xml b/fmapp2/res/layout-land-finger-800x480/fmradio.xml
index 4075e8d..ad35332 100644
--- a/fmapp2/res/layout-land-finger-800x480/fmradio.xml
+++ b/fmapp2/res/layout-land-finger-800x480/fmradio.xml
@@ -60,7 +60,7 @@
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
- android:text="@string/default_record"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/prog_service_tv"
android:textAppearance="?android:attr/textAppearanceMedium"
@@ -73,7 +73,7 @@
android:textColor="@android:color/white"
android:singleLine="true"
android:textStyle="bold"
- android:text="@string/prog_service_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_silent"
android:src="@drawable/ic_silent_mode_off"
diff --git a/fmapp2/res/layout-land-finger-800x480/fmtransmitter.xml b/fmapp2/res/layout-land-finger-800x480/fmtransmitter.xml
index d32ffbc..090cb2f 100644
--- a/fmapp2/res/layout-land-finger-800x480/fmtransmitter.xml
+++ b/fmapp2/res/layout-land-finger-800x480/fmtransmitter.xml
@@ -88,7 +88,7 @@
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/frequency_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_forward"
android:clickable="true"
@@ -120,7 +120,7 @@
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
diff --git a/fmapp2/res/layout-land-finger-800x480/navigate.xml b/fmapp2/res/layout-land-finger-800x480/navigate.xml
deleted file mode 100644
index 269793b..0000000
--- a/fmapp2/res/layout-land-finger-800x480/navigate.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="#ffffffff" />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="2dip"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:layout_marginBottom="2dip"
- android:orientation="vertical"
- android:gravity="bottom"
- >
- <RelativeLayout android:id="@+id/message_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- >
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_alignParentLeft="true"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_record"
- />
-
- <Button android:id="@+id/btn_presets_list"
- android:text= "@string/default_preset_list_name"
- android:textStyle="bold"
- android:singleLine="true"
- android:layout_gravity="center"
- android:layout_centerHorizontal="true"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_width="140dip"
- android:layout_height="45dip" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@+id/btn_presets_list"
- android:layout_gravity="center_vertical"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_sleep"
- />
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout android:id="@+id/presets_upper_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center"
- android:layout_marginBottom="5dip"
- android:gravity="center_horizontal">
-
- <Button android:id="@+id/presets_button_1"
- android:text="@string/default_station"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <Button android:id="@+id/presets_button_2"
- android:text="@string/default_station"
- android:layout_width="80dp"
- android:layout_height="50dp" />
-
- <Button android:id="@+id/presets_button_3"
- android:text="@string/default_station"
- android:layout_width="80dip"
- android:layout_height="50dip"
- android:visibility="visible" />
-
- <Button android:id="@+id/presets_button_4"
- android:text="@string/default_blank"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <Button android:id="@+id/presets_button_5"
- android:text="@string/default_blank"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <ImageButton android:id="@+id/btn_preset_page"
- android:src="@drawable/ic_btn_forward"
- android:layout_marginRight="2dp"
- android:layout_width="80dip"
- android:layout_height="50dip"
- android:visibility="visible" />
- </LinearLayout>
-</merge>
diff --git a/fmapp2/res/layout-land-finger-800x480/station_info.xml b/fmapp2/res/layout-land-finger-800x480/station_info.xml
index c9b787b..4a5d1ec 100644
--- a/fmapp2/res/layout-land-finger-800x480/station_info.xml
+++ b/fmapp2/res/layout-land-finger-800x480/station_info.xml
@@ -56,7 +56,7 @@
android:layout_marginLeft="25dp"
android:textStyle="bold"
android:visibility="invisible"
- android:text="@string/default_sleep" />
+ android:text="@string/default_blank" />
<TextView android:id="@+id/eradio_text_tv"
android:layout_width="wrap_content"
@@ -71,7 +71,7 @@
android:layout_toLeftOf="@+id/sleep_msg_tv"
android:layout_toRightOf="@+id/stereo_text_tv"
android:layout_centerInParent="true"
- android:text="@string/eradio_text_string"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/stereo_text_tv"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -83,7 +83,7 @@
android:layout_alignBaseline="@id/signal_level"
android:textSize="13sp"
android:textColor="@android:color/white"
- android:text="@string/default_audio"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
@@ -104,7 +104,7 @@
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:paddingLeft="16dp"
- android:text="@string/station_id_string" />
+ android:text="@string/default_blank" />
<TextView android:id="@+id/radio_text_tv"
android:layout_width="wrap_content"
@@ -115,7 +115,7 @@
android:singleLine="true"
android:textStyle="bold"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/pty_tv"
android:textAppearance="?android:attr/textAppearanceMedium"
@@ -126,7 +126,7 @@
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:paddingRight="16dp"
- android:text="@string/pty_string" />
+ android:text="@string/default_blank" />
</RelativeLayout>
@@ -150,7 +150,7 @@
android:focusable="true"
android:layout_toLeftOf="@+id/btn_forward"
android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_back"
android:clickable="true"
diff --git a/fmapp2/res/layout-land-finger/fmradio.xml b/fmapp2/res/layout-land-finger/fmradio.xml
index 23d74fb..116981a 100644
--- a/fmapp2/res/layout-land-finger/fmradio.xml
+++ b/fmapp2/res/layout-land-finger/fmradio.xml
@@ -57,7 +57,7 @@
android:clickable="true"
android:focusable="true"
android:visibility="invisible"
- android:text="@string/default_record"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/prog_service_tv"
android:textAppearance="?android:attr/textAppearanceMedium"
@@ -69,7 +69,7 @@
android:textSize="16sp"
android:singleLine="true"
android:textStyle="bold"
- android:text="@string/prog_service_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_silent"
android:src="@drawable/ic_silent_mode_off"
diff --git a/fmapp2/res/layout-land-finger/fmtransmitter.xml b/fmapp2/res/layout-land-finger/fmtransmitter.xml
index 1e350b0..35d3867 100644
--- a/fmapp2/res/layout-land-finger/fmtransmitter.xml
+++ b/fmapp2/res/layout-land-finger/fmtransmitter.xml
@@ -88,7 +88,7 @@
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/frequency_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_forward"
android:clickable="true"
@@ -121,7 +121,7 @@
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
diff --git a/fmapp2/res/layout-land-finger/navigate.xml b/fmapp2/res/layout-land-finger/navigate.xml
deleted file mode 100644
index 269793b..0000000
--- a/fmapp2/res/layout-land-finger/navigate.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <View
- android:layout_width="fill_parent"
- android:layout_height="1dip"
- android:background="#ffffffff" />
-
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="2dip"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="5dip"
- android:layout_marginBottom="2dip"
- android:orientation="vertical"
- android:gravity="bottom"
- >
- <RelativeLayout android:id="@+id/message_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- >
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:layout_alignParentLeft="true"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_record"
- />
-
- <Button android:id="@+id/btn_presets_list"
- android:text= "@string/default_preset_list_name"
- android:textStyle="bold"
- android:singleLine="true"
- android:layout_gravity="center"
- android:layout_centerHorizontal="true"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_width="140dip"
- android:layout_height="45dip" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@+id/btn_presets_list"
- android:layout_gravity="center_vertical"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_sleep"
- />
- </RelativeLayout>
- </LinearLayout>
-
- <LinearLayout android:id="@+id/presets_upper_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center"
- android:layout_marginBottom="5dip"
- android:gravity="center_horizontal">
-
- <Button android:id="@+id/presets_button_1"
- android:text="@string/default_station"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <Button android:id="@+id/presets_button_2"
- android:text="@string/default_station"
- android:layout_width="80dp"
- android:layout_height="50dp" />
-
- <Button android:id="@+id/presets_button_3"
- android:text="@string/default_station"
- android:layout_width="80dip"
- android:layout_height="50dip"
- android:visibility="visible" />
-
- <Button android:id="@+id/presets_button_4"
- android:text="@string/default_blank"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <Button android:id="@+id/presets_button_5"
- android:text="@string/default_blank"
- android:layout_width="80dip"
- android:layout_height="50dip" />
-
- <ImageButton android:id="@+id/btn_preset_page"
- android:src="@drawable/ic_btn_forward"
- android:layout_marginRight="2dp"
- android:layout_width="80dip"
- android:layout_height="50dip"
- android:visibility="visible" />
- </LinearLayout>
-</merge>
diff --git a/fmapp2/res/layout-land-finger/station_info.xml b/fmapp2/res/layout-land-finger/station_info.xml
index 9383894..8f0bdab 100644
--- a/fmapp2/res/layout-land-finger/station_info.xml
+++ b/fmapp2/res/layout-land-finger/station_info.xml
@@ -55,7 +55,7 @@
android:layout_marginLeft="25dp"
android:textStyle="bold"
android:visibility="invisible"
- android:text="@string/default_sleep" />
+ android:text="@string/default_blank" />
<TextView android:id="@+id/eradio_text_tv"
android:layout_width="wrap_content"
@@ -69,7 +69,7 @@
android:layout_toRightOf="@+id/sleep_msg_tv"
android:layout_toLeftOf="@+id/stereo_text_tv"
android:layout_centerInParent="true"
- android:text="@string/eradio_text_string"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/stereo_text_tv"
android:textAppearance="?android:attr/textAppearanceSmall"
@@ -80,7 +80,7 @@
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/signal_level"
android:textSize="13sp"
- android:text="@string/default_audio"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
@@ -100,7 +100,7 @@
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:paddingLeft="16dp"
- android:text="@string/station_id_string" />
+ android:text="@string/default_blank" />
<TextView android:id="@+id/radio_text_tv"
android:layout_width="wrap_content"
@@ -110,7 +110,7 @@
android:singleLine="true"
android:textStyle="bold"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/pty_tv"
android:textAppearance="?android:attr/textAppearanceMedium"
@@ -120,7 +120,7 @@
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:paddingRight="16dp"
- android:text="@string/pty_string" />
+ android:text="@string/default_blank" />
</RelativeLayout>
@@ -141,7 +141,7 @@
android:gravity="center"
android:layout_toLeftOf="@+id/btn_forward"
android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_back"
android:clickable="true"
diff --git a/fmapp2/res/layout/action_bar.xml b/fmapp2/res/layout/action_bar.xml
new file mode 100644
index 0000000..75c8628
--- /dev/null
+++ b/fmapp2/res/layout/action_bar.xml
@@ -0,0 +1,48 @@
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:enabled="false"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView android:id="@+id/btn_onoff"
+ android:src="@drawable/btn_onoff"
+ android:layout_alignParentLeft="true"
+ android:layout_marginLeft="15dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <TextView android:id="@+id/title"
+ android:paddingLeft="10dp"
+ android:textSize="18sp"
+ android:textColor="@color/white"
+ android:textAllCaps="true"
+ android:textStyle="bold"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ <Space
+ android:layout_width="0dp"
+ android:layout_height="match_parent"
+ android:layout_weight="1"/>
+
+ <ImageView android:id="@+id/btn_silent"
+ android:src="@drawable/ic_silent_mode_off"
+ android:layout_toLeftOf="@+id/btn_speaker_earphone"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="10dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_height="wrap_content" />
+
+ <ImageView android:id="@+id/btn_speaker_earphone"
+ android:src="@drawable/btn_earphone"
+ android:layout_alignParentRight="true"
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+</LinearLayout>
diff --git a/fmapp2/res/layout/alert_dialog_list.xml b/fmapp2/res/layout/alert_dialog_list.xml
deleted file mode 100644
index 8b9ae52..0000000
--- a/fmapp2/res/layout/alert_dialog_list.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <ListView android:id="@+id/list"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content">
- </ListView>
-
-</LinearLayout>
diff --git a/fmapp2/res/layout/delete_dialog.xml b/fmapp2/res/layout/delete_dialog.xml
index 44df762..6a36970 100644
--- a/fmapp2/res/layout/delete_dialog.xml
+++ b/fmapp2/res/layout/delete_dialog.xml
@@ -52,14 +52,14 @@
<Button android:id="@+id/delete"
android:layout_width="120dp"
android:layout_height="wrap_content"
- android:text="@string/button_delete"
+ android:text="@android:string/ok"
android:layout_gravity="center_horizontal"
android:layout_alignParentLeft="true" />
<Button android:id="@+id/cancel"
android:layout_width="120dp"
android:layout_height="wrap_content"
- android:text="@string/button_cancel"
+ android:text="@android:string/cancel"
android:layout_alignParentRight="true" />
</RelativeLayout>
diff --git a/fmapp2/res/layout/fmradio.xml b/fmapp2/res/layout/fmradio.xml
index 4aef544..bfbbd11 100644
--- a/fmapp2/res/layout/fmradio.xml
+++ b/fmapp2/res/layout/fmradio.xml
@@ -26,98 +26,47 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/fmradio"
- android:background="@drawable/bg"
+ android:background="@color/background_color"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
- <RelativeLayout android:id="@+id/layout_on_off"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_marginTop="3dp"
- android:layout_alignParentTop="true">
-
- <ImageView android:id="@+id/btn_onoff"
- android:src="@drawable/btn_onoff"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/count_down"
- android:layout_toRightOf="@+id/btn_onoff"
- android:textSize="14sp"
- android:layout_marginLeft="5dp"
- android:textStyle="bold"
- android:visibility="invisible"
- android:text="@string/default_sleep" />
-
- <TextView android:id="@+id/prog_service_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:layout_marginLeft="2dp"
- android:layout_marginRight="2dp"
- android:layout_toLeftOf="@+id/btn_silent"
- android:layout_toRightOf="@+id/sleep_msg_tv"
- android:textSize="16sp"
- android:singleLine="true"
- android:textStyle="bold"
- android:text="@string/prog_service_string"/>
-
- <ImageView android:id="@+id/btn_silent"
- android:src="@drawable/ic_silent_mode_off"
- android:layout_toLeftOf="@+id/btn_speaker_earphone"
- android:layout_width="wrap_content"
- android:layout_marginRight="10dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_height="wrap_content" />
-
- <ImageView android:id="@+id/btn_speaker_earphone"
- android:src="@drawable/btn_earphone"
- android:layout_alignParentRight="true"
- android:layout_marginRight="15dp"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
- </RelativeLayout>
-
<LinearLayout android:id="@+id/stationinfo_layout"
android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:layout_height="match_parent"
android:orientation="horizontal"
- android:layout_marginTop="5dp"
- android:layout_below="@+id/layout_on_off">
+ android:layout_weight="1">
<!-- This included layout contains Station Information to display -->
<include layout="@layout/station_info" />
</LinearLayout>
- <com.caf.fmradio.HorizontalNumberPicker
- android:id="@+id/fm_picker"
- android:layout_width="fill_parent"
- android:layout_height="200dp"
- android:layout_marginBottom="50dp"
- android:layout_below="@+id/stationinfo_layout"/>
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="155dp">
+
+ <com.caf.fmradio.HorizontalNumberPicker
+ android:id="@+id/fm_picker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/picker_background_color"/>
+
+ <ImageView
+ android:id="@+id/fm_seeker"
+ android:src="@drawable/seeker"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone"/>
+
+ </RelativeLayout>
+
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="60dp"
- android:layout_alignParentBottom="true"
android:scrollbars="none">
<LinearLayout android:id="@+id/favorite_list"
@@ -126,77 +75,28 @@
android:orientation="horizontal">
<Button android:id="@+id/presets_button_1"
- style="@style/ButtonStripLeft"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_2"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_3"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_4"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_5"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_6"
- style="@style/ButtonStripMiddle"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
<Button android:id="@+id/presets_button_7"
- style="@style/ButtonStripRight"
- android:text="@string/add_station"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
- android:singleLine="true"
- android:layout_width="80dp"
- android:layout_weight="1"
- android:layout_height="wrap_content"/>
+ style="@style/ButtonStripButtons"/>
</LinearLayout>
</HorizontalScrollView>
-</RelativeLayout>
+</LinearLayout>
diff --git a/fmapp2/res/layout/fmtransmitter.xml b/fmapp2/res/layout/fmtransmitter.xml
index b2ba8e5..3bef48f 100644
--- a/fmapp2/res/layout/fmtransmitter.xml
+++ b/fmapp2/res/layout/fmtransmitter.xml
@@ -88,7 +88,7 @@
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/frequency_string"/>
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_forward"
android:clickable="true"
@@ -121,7 +121,7 @@
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:layout_centerInParent="true"
- android:text="@string/radio_text_string"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
diff --git a/fmapp2/res/layout/navigate.xml b/fmapp2/res/layout/navigate.xml
deleted file mode 100644
index 5e6b665..0000000
--- a/fmapp2/res/layout/navigate.xml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (c) 2009, 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of The Linux Foundation nor
- * the names of its contributors may be used to endorse or promote
- * products derived from this software without specific prior written
- * permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--->
-<merge xmlns:android="http://schemas.android.com/apk/res/android">
-
- <RelativeLayout android:id="@+id/message_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="5dip"
- android:orientation="horizontal">
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_record"/>
-
- <Button android:id="@+id/btn_presets_list"
- android:text="@string/default_preset_list_name"
- android:textStyle="bold"
- android:singleLine="true"
- android:layout_centerHorizontal="true"
- android:layout_alignParentTop="true"
- android:layout_gravity="center"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_width="140dip"
- android:layout_height="45dip" />
-
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignBaseline="@+id/btn_presets_list"
- android:textSize="14dip"
- android:textStyle="bold"
- android:text="@string/default_sleep" />
-
- </RelativeLayout>
-
- <LinearLayout android:id="@+id/presets_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerHorizontal="true"
- android:orientation="vertical">
-
- <!-- Upper Presets -->
- <LinearLayout android:id="@+id/presets_upper_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center"
- android:layout_marginBottom="5dip"
- android:gravity="center_horizontal">
-
- <Button android:id="@+id/presets_button_1"
- android:text="@string/default_station"
- android:layout_marginLeft="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip" />
-
- <Button android:id="@+id/presets_button_2"
- android:text="@string/default_station"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip" />
-
- <Button android:id="@+id/presets_button_3"
- android:text="@string/default_station"
- android:layout_marginRight="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip"
- android:visibility="visible" />
-
- </LinearLayout>
-
- <!-- Lower Presets -->
- <LinearLayout android:id="@+id/presets_lower_layout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layout_gravity="center"
- android:layout_marginBottom="5dip"
- android:gravity="center_horizontal">
-
- <Button android:id="@+id/presets_button_4"
- android:text="@string/default_blank"
- android:layout_marginLeft="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip" />
-
- <Button android:id="@+id/presets_button_5"
- android:text="@string/default_blank"
- android:layout_marginLeft="10dip"
- android:layout_marginRight="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip" />
-
- <ImageButton android:id="@+id/btn_preset_page"
- android:src="@drawable/preset_page_button"
- android:layout_marginRight="10dip"
- android:layout_width="90dip"
- android:layout_height="55dip"
- android:visibility="visible" />
-
- </LinearLayout>
-
- </LinearLayout>
-
- <LinearLayout android:id="@+id/scanning_stoplayout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:visibility="gone"
- android:gravity="center">
-
- <Button android:id="@+id/btn_scanning_stop"
- android:clickable="true"
- android:text="@string/stop_scanning"
- android:singleLine="true"
- android:padding="20dip"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
-
- </LinearLayout>
-
-</merge>
diff --git a/fmapp2/res/layout/rename_dialog.xml b/fmapp2/res/layout/rename_dialog.xml
index bef5432..65ee7d8 100644
--- a/fmapp2/res/layout/rename_dialog.xml
+++ b/fmapp2/res/layout/rename_dialog.xml
@@ -44,6 +44,7 @@
android:maxLength="16">
<requestFocus />
</EditText>
+
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -52,13 +53,13 @@
<Button android:id="@+id/save"
android:layout_width="120dp"
android:layout_height="wrap_content"
- android:text="@string/button_ok"
+ android:text="@android:string/ok"
android:layout_alignParentLeft="true" />
<Button android:id="@+id/cancel"
android:layout_width="120dp"
android:layout_height="wrap_content"
- android:text="@string/button_cancel"
+ android:text="@android:string/cancel"
android:layout_alignParentRight="true" />
</RelativeLayout>
diff --git a/fmapp2/res/layout/station_info.xml b/fmapp2/res/layout/station_info.xml
index fc7d62e..0bee765 100644
--- a/fmapp2/res/layout/station_info.xml
+++ b/fmapp2/res/layout/station_info.xml
@@ -29,13 +29,16 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:id="@+id/station_info"
+ android:animateLayoutChanges="true"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:orientation="vertical"
+ android:layout_gravity="center"
android:gravity="top">
<RelativeLayout android:id="@+id/top_most"
+ android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@@ -48,144 +51,157 @@
android:layout_alignParentLeft="true"
android:visibility="gone" />
- <TextView android:id="@+id/sleep_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/count_down"
- android:textSize="14sp"
- android:layout_marginLeft="25dp"
- android:textStyle="bold"
- android:visibility="invisible"
- android:text="@string/default_sleep" />
-
- <TextView android:id="@+id/record_msg_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawableLeft="@drawable/recorder_start"
- android:layout_marginLeft="20dp"
- android:textSize="14sp"
- android:textStyle="bold"
- android:clickable="true"
- android:visibility="invisible"
- android:text="@string/default_record"/>
<TextView android:id="@+id/stereo_text_tv"
android:textAppearance="?android:attr/textAppearanceSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingRight="16dp"
+ android:visibility="invisible"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:layout_alignBaseline="@id/signal_level"
android:textSize="13sp"
- android:text="@string/default_audio"/>
+ android:text="@string/default_blank"/>
</RelativeLayout>
- <LinearLayout android:id="@+id/station_frequency_row"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical"
- android:paddingTop="5dp"
- android:paddingBottom="5dp"
- android:layout_alignWithParentIfMissing="true"
- android:gravity="center">
-
- <TextView android:id="@+id/call_sign_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/station_id_string" />
-
- <TextView android:id="@+id/pty_tv"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="14sp"
- android:paddingTop="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="2dp"
- android:paddingLeft="2dp"
- android:text="@string/pty_string" />
-
- </LinearLayout>
-
<RelativeLayout android:id="@+id/second_layout"
- android:layout_width="fill_parent"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="2dp"
- android:layout_marginBottom="2dp"
+ android:layout_gravity="center"
+ android:gravity="center"
android:layout_marginLeft="2dp"
android:layout_marginRight="2dp">
<TextView android:id="@+id/prog_frequency_tv"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textSize="25dp"
- android:gravity="center"
- android:layout_toLeftOf="@+id/btn_forward"
- android:layout_toRightOf="@+id/btn_back"
- android:text="@string/frequency_string"/>
+ android:textColor="@android:color/white"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="46sp"
+ android:textStyle="bold"
+ android:gravity="center"
+ android:clickable="true"
+ android:focusable="true"
+ android:text="@string/default_blank"/>
<ImageView android:id="@+id/btn_back"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="15dp"
- android:layout_alignParentLeft="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_left"/>
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="15dp"
+ android:layout_centerVertical="true"
+ android:layout_alignParentLeft="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:src="@drawable/btn_arrow_left"/>
<ImageView android:id="@+id/btn_forward"
- android:clickable="true"
- android:focusable="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingRight="15dp"
- android:layout_alignParentRight="true"
- android:visibility="visible"
- android:layout_alignWithParentIfMissing="true"
- android:src="@drawable/btn_arrow_right"/>
+ android:clickable="true"
+ android:focusable="true"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="15dp"
+ android:layout_centerVertical="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignWithParentIfMissing="true"
+ android:src="@drawable/btn_arrow_right"/>
</RelativeLayout>
+ <LinearLayout android:id="@+id/station_frequency_row"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:orientation="vertical">
+
+ <TextView android:id="@+id/call_sign_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ android:textSize="40sp"
+ android:alpha="0.5"
+ android:paddingRight="2dp"
+ android:paddingLeft="2dp"
+ android:text="@string/default_blank" />
+
+ <TextView android:id="@+id/pty_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="22sp"
+ android:textAllCaps="true"
+ android:paddingRight="2dp"
+ android:paddingLeft="2dp"
+ android:text="@string/default_blank" />
+
+ </LinearLayout>
+
<!-- Station Radio Text information display -->
<TextView android:id="@+id/radio_text_tv"
- android:layout_width="fill_parent"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
+ android:textSize="16sp"
android:singleLine="true"
android:textStyle="bold"
- android:paddingLeft="2dp"
- android:paddingRight="2dp"
- android:paddingBottom="5dp"
- android:paddingTop="20dp"
- android:gravity="center_horizontal"
- android:text="@string/radio_text_string"/>
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
+ android:paddingTop="10dp"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/default_blank"/>
<TextView android:id="@+id/eradio_text_tv"
- android:layout_width="fill_parent"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textSize="15sp"
+ android:textSize="16sp"
android:singleLine="true"
android:textStyle="bold"
android:paddingLeft="2dp"
android:paddingRight="2dp"
- android:paddingBottom="5dp"
android:gravity="center_horizontal"
- android:text="@string/eradio_text_string"/>
+ android:text="@string/default_blank"/>
+
+ <TextView android:id="@+id/prog_service_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:textSize="16sp"
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:text="@string/default_blank"/>
+
+ <TextView android:id="@+id/sleep_msg_tv"
+ android:textColor="@android:color/white"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:drawableLeft="@drawable/count_down"
+ android:layout_toRightOf="@+id/btn_onoff"
+ android:textSize="15sp"
+ android:drawablePadding="5dip"
+ android:paddingTop="5dp"
+ android:paddingBottom="5dp"
+ android:textStyle="bold"
+ android:visibility="invisible"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/default_blank" />
+
+ <TextView android:id="@+id/record_msg_tv"
+ android:textColor="@android:color/white"
+ android:visibility="invisible"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textSize="15sp"
+ android:singleLine="true"
+ android:textStyle="bold"
+ android:paddingTop="5dp"
+ android:paddingBottom="5dp"
+ android:drawablePadding="5dip"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/default_blank"/>
</LinearLayout>
diff --git a/fmapp2/res/layout/statusbar.xml b/fmapp2/res/layout/statusbar.xml
deleted file mode 100644
index 47e1a91..0000000
--- a/fmapp2/res/layout/statusbar.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="horizontal">
-
- <ImageView android:id="@+id/icon"
- android:layout_gravity="center_vertical"
- android:paddingLeft="10dp"
- android:paddingRight="10dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content">
- </ImageView>
-
- <TextView android:id="@+id/frequency"
- android:textAppearance="?android:attr/textAppearanceMediumInverse"
- android:textColor="@android:color/black"
- android:focusable="true"
- android:ellipsize="marquee"
- android:singleLine="true"
- android:layout_gravity="center"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</LinearLayout>
diff --git a/fmapp2/res/mipmap-anydpi/ic_launcher.xml b/fmapp2/res/mipmap-anydpi/ic_launcher.xml
new file mode 100644
index 0000000..d8649ba
--- /dev/null
+++ b/fmapp2/res/mipmap-anydpi/ic_launcher.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2018 The LineageOS 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.
+-->
+<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
+ <background android:drawable="@mipmap/ic_background"/>
+ <foreground android:drawable="@mipmap/ic_foreground"/>
+</adaptive-icon>
+
diff --git a/fmapp2/res/mipmap-hdpi/ic_background.png b/fmapp2/res/mipmap-hdpi/ic_background.png
new file mode 100644
index 0000000..0d8e474
--- /dev/null
+++ b/fmapp2/res/mipmap-hdpi/ic_background.png
Binary files differ
diff --git a/fmapp2/res/mipmap-hdpi/ic_foreground.png b/fmapp2/res/mipmap-hdpi/ic_foreground.png
new file mode 100644
index 0000000..8b45667
--- /dev/null
+++ b/fmapp2/res/mipmap-hdpi/ic_foreground.png
Binary files differ
diff --git a/fmapp2/res/mipmap-mdpi/ic_background.png b/fmapp2/res/mipmap-mdpi/ic_background.png
new file mode 100644
index 0000000..f043e12
--- /dev/null
+++ b/fmapp2/res/mipmap-mdpi/ic_background.png
Binary files differ
diff --git a/fmapp2/res/mipmap-mdpi/ic_foreground.png b/fmapp2/res/mipmap-mdpi/ic_foreground.png
new file mode 100644
index 0000000..df22bb7
--- /dev/null
+++ b/fmapp2/res/mipmap-mdpi/ic_foreground.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xhdpi/ic_background.png b/fmapp2/res/mipmap-xhdpi/ic_background.png
new file mode 100644
index 0000000..f0e6f4a
--- /dev/null
+++ b/fmapp2/res/mipmap-xhdpi/ic_background.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xhdpi/ic_foreground.png b/fmapp2/res/mipmap-xhdpi/ic_foreground.png
new file mode 100644
index 0000000..58f0716
--- /dev/null
+++ b/fmapp2/res/mipmap-xhdpi/ic_foreground.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xxhdpi/ic_background.png b/fmapp2/res/mipmap-xxhdpi/ic_background.png
new file mode 100644
index 0000000..14bbda7
--- /dev/null
+++ b/fmapp2/res/mipmap-xxhdpi/ic_background.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xxhdpi/ic_foreground.png b/fmapp2/res/mipmap-xxhdpi/ic_foreground.png
new file mode 100644
index 0000000..fdce776
--- /dev/null
+++ b/fmapp2/res/mipmap-xxhdpi/ic_foreground.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xxxhdpi/ic_background.png b/fmapp2/res/mipmap-xxxhdpi/ic_background.png
new file mode 100644
index 0000000..e4456c5
--- /dev/null
+++ b/fmapp2/res/mipmap-xxxhdpi/ic_background.png
Binary files differ
diff --git a/fmapp2/res/mipmap-xxxhdpi/ic_foreground.png b/fmapp2/res/mipmap-xxxhdpi/ic_foreground.png
new file mode 100644
index 0000000..c8a99d3
--- /dev/null
+++ b/fmapp2/res/mipmap-xxxhdpi/ic_foreground.png
Binary files differ
diff --git a/fmapp2/res/values-zh-rCN/arrays.xml b/fmapp2/res/values-zh-rCN/arrays.xml
deleted file mode 100644
index 788b807..0000000
--- a/fmapp2/res/values-zh-rCN/arrays.xml
+++ /dev/null
@@ -1,205 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--->
-<resources>
-
- <string-array name="ster_mon_entries">
- <item>立体声</item>
- <item>单声道</item>
- </string-array>
-
- <string-array name="record_durations_entries">
- <item>5 分钟</item>
- <item>15 分钟</item>
- <item>30 分钟</item>
- <item>直至停止</item>
- </string-array>
-
- <string-array name="sleep_duration_values">
- <item>15 分钟之后</item>
- <item>30 分钟之后</item>
- <item>45 分钟之后</item>
- <item>1 小时之后</item>
- </string-array>
-
- <string-array name="search_category_rbds_entries">
- <item>全部电台</item>
- <item>成人点击</item>
- <item>古典</item>
- <item>经典摇滚</item>
- <item>校园</item>
- <item>乡村</item>
- <item>紧急</item>
- <item>紧急 测试</item>
- <item>外语频道</item>
- <item>信息频道</item>
- <item>爵士</item>
- <item>新闻</item>
- <item>怀旧</item>
- <item>老歌</item>
- <item>个性</item>
- <item>公共频道</item>
- <item>宗教音乐</item>
- <item>宗教交流</item>
- <item>节奏布鲁斯</item>
- <item>摇滚</item>
- <item>轻音乐</item>
- <item>轻摇滚</item>
- <item>轻节奏布鲁斯</item>
- <item>体育</item>
- <item>交流</item>
- <item>前40</item>
- <item>天气</item>
- </string-array>
-
- <string-array name="search_category_rds_entries">
- <item>全部电台</item>
- <item>文化</item>
- <item>新闻时事</item>
- <item>儿童节目</item>
- <item>乡村音乐</item>
- <item>记录</item>
- <item>戏剧</item>
- <item>轻音乐</item>
- <item>教育</item>
- <item>紧急</item>
- <item>紧急测试</item>
- <item>经济</item>
- <item>民族音乐</item>
- <item>信息</item>
- <item>爵士音乐</item>
- <item>轻古典音乐</item>
- <item>休闲</item>
- <item>新闻</item>
- <item>民族音乐</item>
- <item>其他音乐</item>
- <item>怀旧</item>
- <item>听众来电</item>
- <item>流行音乐</item>
- <item>宗教</item>
- <item>摇滚音乐</item>
- <item>科学</item>
- <item>古典</item>
- <item>社会事务</item>
- <item>体育</item>
- <item>旅行</item>
- <item>变奏</item>
- <item>天气</item>
- </string-array>
-
-
- <string-array name="presetlist_edit_category">
- <item>重命名</item>
- <item>自动选择</item>
- <item>删除</item>
- </string-array>
-
-
- <string-array name="regional_band_entries">
- <item>北美</item>
- <item>欧洲</item>
- <item>日本</item>
- <item>日本 (宽频)</item>
- <item>澳大利亚</item>
- <item>奥地利</item>
- <item>比利时</item>
- <item>巴西</item>
- <item>中国</item>
- <item>捷克</item>
- <item>丹麦</item>
- <item>芬兰</item>
- <item>法国</item>
- <item>德国</item>
- <item>希腊</item>
- <item>香港</item>
- <item>印度</item>
- <item>爱尔兰</item>
- <item>意大利</item>
- <item>韩国</item>
- <item>墨西哥</item>
- <item>荷兰</item>
- <item>新西兰</item>
- <item>挪威</item>
- <item>波兰</item>
- <item>葡萄牙</item>
- <item>俄罗斯</item>
- <item>新加坡</item>
- <item>斯洛伐克</item>
- <item>西班牙</item>
- <item>瑞士</item>
- <item>瑞典</item>
- <item>台湾</item>
- <item>土耳其</item>
- <item>英国</item>
- <item>美国</item>
- <item>用户定义的频段</item>
- </string-array>
-
- <string-array name="regional_band_summary">
- <item>北美 (87.5MHz - 108.0MHz ,步长 200 Khz)</item>
- <item>欧洲 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>日本 (76.0MHz - 90.0MHz ,步长 100 Khz)</item>
- <item>日本 (宽频) (90.0MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>澳大利亚 (87.7MHz - 108.0MHz , 步长 100 Khz)</item>
- <item>奥地利 (87.5MHz - 108.0MHz , 步长 50 Khz)</item>
- <item>比利时 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>巴西 (87.5MHz - 108.0MHz ,步长 200 Khz)</item>
- <item>中国 (87.0MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>捷克 (87.5MHz - 108.0MHz , 步长 100 Khz)</item>
- <item>丹麦 (87.5MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>芬兰 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>法国 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>德国 (87.5MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>希腊 (87.5MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>香港 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>印度 (91.0MHz - 106.4MHz ,步长 100 Khz)</item>
- <item>爱尔兰 (87.5MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>意大利 (87.5MHz - 108.0MHz , 步长 50 Khz)</item>
- <item>韩国 (87.5MHz - 108.0MHz ,步长 200 Khz)</item>
- <item>墨西哥 (88.1MHz - 107.9MHz ,步长 200 Khz)</item>
- <item>荷兰 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>新西兰 (88.0MHz - 107.0MHz ,步长 100 Khz)</item>
- <item>挪威 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>波兰 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>葡萄牙 (87.5MHz - 108.0MHz ,步长 50 Khz)</item>
- <item>俄国 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>新加坡 (88.0MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>斯洛伐克 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>西班牙 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>瑞士 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>瑞典 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>台湾 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>土耳其 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>英国 (87.5MHz - 108.0MHz ,步长 100 Khz)</item>
- <item>美国 (88.1MHz - 107.9MHz ,步长 200 Khz)</item>
- <item>用户定义的频段</item>
- </string-array>
-</resources>
diff --git a/fmapp2/res/values-zh-rCN/strings.xml b/fmapp2/res/values-zh-rCN/strings.xml
deleted file mode 100644
index d32c0cd..0000000
--- a/fmapp2/res/values-zh-rCN/strings.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">调频收音机</string>
- <string name="menu_settings">设置</string>
- <string name="menu_record_start">开始录音</string>
- <string name="menu_record_stop">停止录音</string>
- <string name="menu_all_channels">全部频道</string>
- <string name="app_label_all_channels">全部频道</string>
- <string name="button_ok">确定</string>
- <string name="button_cancel">取消</string>
- <string name="button_delete">删除</string>
- <string name="error_sdcard_access">不能访问SD卡</string>
- <string name="fm_service_started">调频 服务</string>
- <string name="menu_sleep">自动关闭</string>
- <string name="menu_sleep_cancel">取消自动关闭</string>
- <string name="menu_scan_start">搜索</string>
- <string name="button_text_stop">停止</string>
- <string name="menu_scan_stop">停止搜索</string>
- <string name="msg_seeking">搜索 调频 电台</string>
- <string name="msg_scanning">搜索所有 调频 电台</string>
- <string name="msg_scanning_pty">搜索 "<xliff:g id="pty_name">%1$s</xliff:g>"</string>
- <string name="msg_noantenna">请插入耳机</string>
- <!-- The messsage shown when FM radio was turned on, headset was plugged out -->
- <string name="msg_headset_plug_out">收音机播放中拔出了耳机,收音机已经自动关闭。</string>
- <string name="dialog_sleep_title">收音机自动关闭</string>
- <string name="preset_name_dialog_title">输入名称 </string>
- <string name="preset_name_title">重命名</string>
- <string name="preset_search_title">搜索</string>
- <string name="preset_search_name">搜索 "<xliff:g id="preset_name">%1$s</xliff:g>"</string>
- <string name="preset_add">添加</string>
- <string name="preset_replace">替换</string>
- <string name="preset_tune">设定频率</string>
- <string name="preset_rename">重命名</string>
- <string name="preset_delete">删除</string>
- <string name="sel_band_menu">选择地区</string>
- <string name="settings_menu">设置</string>
- <string name="regional_band">地区</string>
- <string name="aud_output_mode">音频输出模式</string>
- <string name="sel_audio_output">选择音频输出</string>
- <string name="record_dur">录音时长</string>
- <string name="sel_rec_dur">选择录音时长</string>
- <string name="auto_select_af">备用频率</string>
- <string name="auto_select_af_enabled">自动选择开启</string>
- <string name="auto_select_af_disabled">自动选择关闭</string>
- <string name="settings_revert_confirm_title">确定清除设置</string>
- <string name="settings_revert_confirm_msg">将删除所有设置</string>
- <string name="settings_back_summary">Return to previous view</string>
- <string name="settings_revert_defaults_title">恢复出厂设置</string>
- <string name="settings_revert_defaults_summary">清除所有设置</string>
- <string name="audio_type_stereo">立体声</string>
- <string name="audio_type_mono">单声道</string>
- <string name="alert_dialog_ok">确定</string>
- <string name="alert_dialog_cancel">取消</string>
- <string name="alert_dialog_hint">输入一个名称</string>
- <string name="search_dialog_title">搜索电台</string>
- <string name="msg_search_title">调频 - <xliff:g id="frequency_string">%1$s</xliff:g></string>
- <string name="presetlist_prefix_name">调频 - </string>
- <string name="fm_command_timeout_title">超时</string>
- <string name="fm_tune_timeout_msg">打开调频电台无响应。
- 如果问题持续, 请重新启动FM收音机。</string>
- <string name="fm_command_failed_title">调频 操作失败</string>
- <string name="fm_cmd_failed_msg">调频 操作失败。如果问题持续, 请重新启动调频收音机。
- </string>
- <string name="fm_cmd_failed_msg_hdmi">调频 操作失败。 不支持 调频 和 HDMI 并发 。
- </string>
- <string name="fm_cmd_failed_call_on">调频 操作失败。通话期间禁止调频音频 </string>
-
- <string name="station_name">电台:</string>
- <string name="station_exists">此频率已存在!</string>
- <string name="stat_notif_frequency">调频 收音机 "<xliff:g id="frequency">%1$s</xliff:g>" MHz</string>
- <string name="cannot_startup_during_call">通话中不能启动调频!</string>
- <string name="cannot_startup_during_airplane">"飞行模式中不能启动调频!"</string>
- <string name="station_list_delete_station">删除:<xliff:g id="name">%s</xliff:g></string>
- <string name="station_list_delete_station_prompt">要删除 <xliff:g id="name">%s</xliff:g> 吗?</string>
- <string name="sdcard_no_space_cannot_recording">SD卡空间不足,不能录音</string>
- <string name="recording_stop_no_space">SD卡空间不足,录音停止</string>
- <string name="station_name_empty">电台名字不能为空,请新重输入</string>
- <string name="station_name_exist">已存在名为\"<xliff:g id="name">%s</xliff:g>\"的电台,请输入其他名称。</string>
- <!-- the title of rename dialog lack of translation -->
- <string name="dialog_presetlist_rename_title">"请输入名字"</string>
- <string name="menu_display_tags">显示标签</string>
- <string name="usr_def_band_min">下限频率(Mhz)</string>
- <string name="usr_def_band_max">更高的频率限制(Mhz)</string>
- <string name="sel_chanl_spacing">选择信道间隔</string>
- <string name="chanl_spacing">信道间隔</string>
- <string name="set">设置</string>
- <string name="cancel">取消</string>
- <string name="rt_plus_tags">标签</string>
- <string name="user_defind_band_msg">请输入有效的频段范围 76.0 - 108.0</string>
-</resources>
diff --git a/fmapp2/res/values-zh-rTW/strings.xml b/fmapp2/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 11a4cf7..0000000
--- a/fmapp2/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
- * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">調頻收音機</string>
- <string name="menu_settings">設定</string>
- <string name="menu_record_start">開始錄音</string>
- <string name="menu_record_stop">停止錄音</string>
- <string name="menu_all_channels">全部頻道</string>
- <string name="app_label_all_channels">全部頻道</string>
- <string name="button_ok">確定</string>
- <string name="button_cancel">取消</string>
- <string name="button_delete">取消</string>
- <string name="error_sdcard_access">不能訪問SD卡</string>
- <string name="fm_service_started">調頻 服務</string>
- <string name="menu_sleep">自動關閉</string>
- <string name="menu_sleep_cancel">取消自動關閉</string>
- <string name="menu_scan_start">搜索</string>
- <string name="button_text_stop">停止</string>
- <string name="menu_scan_stop">停止搜索</string>
- <string name="msg_seeking">搜索 調頻 電台</string>
- <string name="msg_scanning">搜索所有 調頻 電台</string>
- <string name="msg_scanning_pty">搜索 "<xliff:g id="pty_name">%1$s</xliff:g>"</string>
- <string name="msg_noantenna">請插入耳機</string>
- <string name="dialog_sleep_title">收音機自動關閉</string>
- <string name="preset_name_dialog_title">輸入名稱 </string>
- <string name="preset_name_title">重命名</string>
- <string name="preset_search_title">搜索</string>
- <string name="preset_search_name">搜索 "<xliff:g id="preset_name">%1$s</xliff:g>"</string>
- <string name="preset_add">添加</string>
- <string name="preset_replace">替換</string>
- <string name="preset_tune">設定頻率</string>
- <string name="preset_rename">重命名</string>
- <string name="preset_delete">刪除</string>
- <string name="sel_band_menu">選擇地區</string>
- <string name="settings_menu">設定</string>
- <string name="regional_band">地區</string>
- <string name="aud_output_mode">音頻輸出模式</string>
- <string name="sel_audio_output">選擇音頻輸出</string>
- <string name="record_dur">錄音時長</string>
- <string name="sel_rec_dur">選擇錄音時長</string>
- <string name="auto_select_af">備用頻率</string>
- <string name="auto_select_af_enabled">自動選擇開啟</string>
- <string name="auto_select_af_disabled">自動選擇關閉</string>
- <string name="settings_revert_confirm_title">確定清除設定</string>
- <string name="settings_revert_confirm_msg">將刪除所有設定</string>
- <string name="settings_revert_defaults_title">恢復出廠設定</string>
- <string name="settings_revert_defaults_summary">清除所有設定</string>
- <string name="audio_type_stereo">立體聲</string>
- <string name="audio_type_mono">單聲道</string>
- <string name="alert_dialog_ok">確定</string>
- <string name="alert_dialog_cancel">取消</string>
- <string name="search_dialog_title">搜索電台</string>
- <string name="fm_command_timeout_title">超時</string>
- <string name="fm_tune_timeout_msg">打開調頻 電台無響應。如果問題持續,請重新啟動調頻 收音機。</string>
- <string name="fm_command_failed_title">調頻 操作失敗</string>
- <string name="fm_cmd_failed_msg">調頻 操作失敗。如果問題持續,請重新啟動調頻 收音機。</string>
- <string name="fm_cmd_failed_msg_hdmi">調頻 操作失敗。不支持調頻和 HDMI 並發。 </string>
- <string name="fm_cmd_failed_call_on">調頻 操作失敗。通話期間禁止調頻音頻 </string>
- <string name="station_name">電台:</string>
- <string name="station_exists">此頻率已存在!</string>
- <string name="stat_notif_frequency">調頻 收音機 "<xliff:g id="frequency">%1$s</xliff:g>" MHz</string>
- <string name="cannot_startup_during_call">通话中不能启动調頻!</string>
- <string name="cannot_startup_during_airplane">"通話中不能啟動調頻!"</string>
- <string name="station_list_delete_station">删除:<xliff:g id="name">%s</xliff:g></string>
- <string name="station_list_delete_station_prompt">要删除 <xliff:g id="name">%s</xliff:g> 吗?</string>
- <string name="sdcard_no_space_cannot_recording">SD卡空間不足,不能錄音</string>
- <string name="recording_stop_no_space">SD卡空間不足,錄音停止</string>
- <string name="station_name_empty">電台名字不能為空,請新重輸入</string>
- <string name="station_name_exist">已存在名為\"<xliff:g id="name">%s</xliff:g>\"的電台,請輸入其他名稱。</string>
- <string name="dialog_presetlist_rename_title">請輸入名字</string>
- <string name="user_defind_band_msg">请输入有效的频段范围 76.0 - 108.0</string>
- <string name="FMRecording_reach_size_limit">已到达最长限制.</string>
- <string name="unable_to_store">无法保存已录音频</string>
-
-</resources>
diff --git a/fmapp2/res/values/arrays.xml b/fmapp2/res/values/arrays.xml
index cda326c..fc60d74 100644
--- a/fmapp2/res/values/arrays.xml
+++ b/fmapp2/res/values/arrays.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (c) 2009, 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014-2015 The CyanogenMod Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -33,7 +34,7 @@
<item>Mono</item>
</string-array>
- <string-array name="ster_mon_values">
+ <string-array name="ster_mon_values" translatable="false">
<item>0</item>
<item>1</item>
</string-array>
@@ -42,7 +43,7 @@
<item>Stereo</item>
</string-array>
- <string-array name="ster_values">
+ <string-array name="ster_values" translatable="false">
<item>0</item>
</string-array>
@@ -53,8 +54,7 @@
<item>Until stopped</item>
</string-array>
-
- <string-array name="record_duration_values">
+ <string-array name="record_duration_values" translatable="false">
<item>5</item>
<item>15</item>
<item>30</item>
@@ -65,48 +65,40 @@
<item>15 minutes</item>
<item>30 minutes</item>
<item>45 minutes</item>
- <item>1 Hour</item>
+ <item>1 hour</item>
</string-array>
- <!-- This array should be in seconds and should match the values above -->
- <string-array name="sleep_duration_values_seconds">
- <item>900</item>
- <item>1800</item>
- <item>2700</item>
- <item>3600</item>
+ <string-array name="search_category_rbds_entries" translatable="false">
+ <item>@string/typ_All_stations</item>
+ <item>@string/typ_Adult_hits</item>
+ <item>@string/typ_Classical</item>
+ <item>@string/typ_Classic_Rock</item>
+ <item>@string/typ_College</item>
+ <item>@string/typ_Country</item>
+ <item>@string/typ_Emergency</item>
+ <item>@string/typ_Emergency_test</item>
+ <item>@string/typ_Foreign_language</item>
+ <item>@string/typ_Information</item>
+ <item>@string/typ_Jazz</item>
+ <item>@string/typ_News</item>
+ <item>@string/typ_Nostalgia</item>
+ <item>@string/typ_Oldies</item>
+ <item>@string/typ_Personality</item>
+ <item>@string/typ_Public</item>
+ <item>@string/typ_Religious_music</item>
+ <item>@string/typ_Religious_talk</item>
+ <item>@string/typ_Rhythm_and_Blues</item>
+ <item>@string/typ_Rock</item>
+ <item>@string/typ_Soft</item>
+ <item>@string/typ_Soft_Rock</item>
+ <item>@string/typ_Soft_Rhythm_and_Blues</item>
+ <item>@string/typ_Sports</item>
+ <item>@string/typ_Talk</item>
+ <item>@string/typ_Top_40</item>
+ <item>@string/typ_Weather</item>
</string-array>
- <string-array name="search_category_rbds_entries">
- <item>All Stations</item>
- <item>Adult Hits</item>
- <item>Classical</item>
- <item>Classic Rock</item>
- <item>College</item>
- <item>Country</item>
- <item>Emergency</item>
- <item>Emergency Test</item>
- <item>Foreign Language</item>
- <item>Information</item>
- <item>Jazz</item>
- <item>News</item>
- <item>Nostalgia</item>
- <item>Oldies</item>
- <item>Personality</item>
- <item>Public</item>
- <item>Religious Music</item>
- <item>Religious Talk</item>
- <item>Rhythm and Blues</item>
- <item>Rock</item>
- <item>Soft</item>
- <item>Soft Rock</item>
- <item>Soft Rhythm and Blues</item>
- <item>Sports</item>
- <item>Talk</item>
- <item>Top 40</item>
- <item>Weather</item>
- </string-array>
-
- <string-array name="search_category_rbds_values">
+ <string-array name="search_category_rbds_values" translatable="false">
<item>0</item>
<item>7</item>
<item>15</item>
@@ -136,43 +128,42 @@
<item>29</item>
</string-array>
-
- <string-array name="search_category_rds_entries">
- <item>All Stations</item>
- <item>Culture</item>
- <item>Current Affairs</item>
- <item>Children programs</item>
- <item>Country Music</item>
- <item>Documentary</item>
- <item>Drama</item>
- <item>Easy Listening Music</item>
- <item>Education</item>
- <item>Emergency</item>
- <item>Emergency Test</item>
- <item>Finance</item>
- <item>Folk Music</item>
- <item>Information</item>
- <item>Jazz Music</item>
- <item>Light classical</item>
- <item>Leisure</item>
- <item>News</item>
- <item>National Music</item>
- <item>Other Music</item>
- <item>Oldies Music</item>
- <item>Phone In</item>
- <item>Pop Music</item>
- <item>Religion</item>
- <item>Rock Music</item>
- <item>Science</item>
- <item>Serious classical</item>
- <item>Social Affairs</item>
- <item>Sport</item>
- <item>Travel</item>
- <item>Varied</item>
- <item>Weather</item>
+ <string-array name="search_category_rds_entries" translatable="false">
+ <item>@string/typ_All_stations</item>
+ <item>@string/typ_Culture</item>
+ <item>@string/typ_Current_affairs</item>
+ <item>@string/typ_Children</item>
+ <item>@string/typ_Country</item>
+ <item>@string/typ_Documentary</item>
+ <item>@string/typ_Drama</item>
+ <item>@string/typ_Easy_listening</item>
+ <item>@string/typ_Education</item>
+ <item>@string/typ_Emergency</item>
+ <item>@string/typ_Emergency_test</item>
+ <item>@string/typ_Finance</item>
+ <item>@string/typ_Folk</item>
+ <item>@string/typ_Information</item>
+ <item>@string/typ_Jazz</item>
+ <item>@string/typ_Light_classical</item>
+ <item>@string/typ_Leisure</item>
+ <item>@string/typ_News</item>
+ <item>@string/typ_National</item>
+ <item>@string/typ_Other</item>
+ <item>@string/typ_Oldies</item>
+ <item>@string/typ_Phone_in</item>
+ <item>@string/typ_Pop</item>
+ <item>@string/typ_Religion</item>
+ <item>@string/typ_Rock</item>
+ <item>@string/typ_Science</item>
+ <item>@string/typ_Serious_classical</item>
+ <item>@string/typ_Social_affairs</item>
+ <item>@string/typ_Sport</item>
+ <item>@string/typ_Travel</item>
+ <item>@string/typ_Varied</item>
+ <item>@string/typ_Weather</item>
</string-array>
- <string-array name="search_category_rds_values">
+ <string-array name="search_category_rds_values" translatable="false">
<item>0</item>
<item>7</item>
<item>2</item>
@@ -207,54 +198,48 @@
<item>16</item>
</string-array>
- <string-array name="presetlist_edit_category">
- <item>Rename</item>
- <item>Auto-Select</item>
- <item>Delete</item>
+ <string-array name="regional_band_entries" translatable="false">
+ <item>@string/regional_band_entry_north_america</item>
+ <item>@string/regional_band_entry_europe</item>
+ <item>@string/regional_band_entry_japan</item>
+ <item>@string/regional_band_entry_japan_wide</item>
+ <item>@string/regional_band_entry_australia</item>
+ <item>@string/regional_band_entry_austria</item>
+ <item>@string/regional_band_entry_belgium</item>
+ <item>@string/regional_band_entry_brazil</item>
+ <item>@string/regional_band_entry_china</item>
+ <item>@string/regional_band_entry_czech_republic</item>
+ <item>@string/regional_band_entry_denmark</item>
+ <item>@string/regional_band_entry_finland</item>
+ <item>@string/regional_band_entry_france</item>
+ <item>@string/regional_band_entry_germany</item>
+ <item>@string/regional_band_entry_greece</item>
+ <item>@string/regional_band_entry_hong_kong</item>
+ <item>@string/regional_band_entry_india</item>
+ <item>@string/regional_band_entry_ireland</item>
+ <item>@string/regional_band_entry_italy</item>
+ <item>@string/regional_band_entry_korea</item>
+ <item>@string/regional_band_entry_mexico</item>
+ <item>@string/regional_band_entry_netherlands</item>
+ <item>@string/regional_band_entry_new_zealand</item>
+ <item>@string/regional_band_entry_norway</item>
+ <item>@string/regional_band_entry_poland</item>
+ <item>@string/regional_band_entry_portugal</item>
+ <item>@string/regional_band_entry_russia</item>
+ <item>@string/regional_band_entry_singapore</item>
+ <item>@string/regional_band_entry_slovakia</item>
+ <item>@string/regional_band_entry_spain</item>
+ <item>@string/regional_band_entry_switzerland</item>
+ <item>@string/regional_band_entry_sweden</item>
+ <item>@string/regional_band_entry_taiwan</item>
+ <item>@string/regional_band_entry_turkey</item>
+ <item>@string/regional_band_entry_united_kingdom</item>
+ <item>@string/regional_band_entry_united_states</item>
+ <item>@string/regional_band_entry_user_defined</item>
+ <item>@string/regional_band_entry_indonesia</item>
</string-array>
-
- <string-array name="regional_band_entries">
- <item>North America</item>
- <item>Europe</item>
- <item>Japan</item>
- <item>Japan (Wide)</item>
- <item>Australia</item>
- <item>Austria</item>
- <item>Belgium</item>
- <item>Brazil</item>
- <item>China</item>
- <item>Czech</item>
- <item>Denmark</item>
- <item>Finland</item>
- <item>France</item>
- <item>Germany</item>
- <item>Greece</item>
- <item>Hong Kong</item>
- <item>India</item>
- <item>Ireland</item>
- <item>Italy</item>
- <item>Korea</item>
- <item>Mexico</item>
- <item>Netherlands</item>
- <item>New Zealand</item>
- <item>Norway</item>
- <item>Poland</item>
- <item>Portugal</item>
- <item>Russia</item>
- <item>Singapore</item>
- <item>Slovakia</item>
- <item>Spain</item>
- <item>Switzerland</item>
- <item>Sweden</item>
- <item>Taiwan</item>
- <item>Turkey</item>
- <item>United Kingdom </item>
- <item>United States</item>
- <item>User Defined Band</item>
- </string-array>
-
- <string-array name="regional_band_values">
+ <string-array name="regional_band_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
@@ -292,156 +277,60 @@
<item>34</item>
<item>35</item>
<item>36</item>
+ <item>37</item>
</string-array>
- <string-array name="regional_band_summary">
- <item>North America (87.5MHz To 108.0MHz In 200 Khz Steps)</item>
- <item>Europe (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Japan (76.0MHz To 90.0MHz In 100 Khz Steps)</item>
- <item>Japan (Wide) (90.0MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Australia (87.7MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Austria (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Belgium (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Brazil (87.5MHz To 108.0MHz In 200 Khz Step)</item>
- <item>China (87.0MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Czech (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Denmark (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Finland (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>France (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Germany (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Greece (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Hong Kong (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>India (91.0MHz To 106.4MHz In 100 Khz Steps)</item>
- <item>Ireland (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Italy (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Korea (87.5MHz To 108.0MHz In 200 Khz Steps)</item>
- <item>Mexico (88.1MHz To 107.9MHz In 200 Khz Steps)</item>
- <item>Netherlands (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>New Zealand (88.0MHz To 107.0MHz In 100 Khz Steps)</item>
- <item>Norway (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Poland (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Portugal (87.5MHz To 108.0MHz In 50 Khz Steps)</item>
- <item>Russia (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Singapore (88.0MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Slovakia (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Spain (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Switzerland (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Sweden (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Taiwan (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>Turkey (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>United Kingdom (87.5MHz To 108.0MHz In 100 Khz Steps)</item>
- <item>United States (88.1MHz To 107.9MHz In 200 Khz Steps)</item>
- <item>User Defined Band</item>
+ <string-array name="regional_band_summary" translatable="false">
+ <item>@string/regional_band_summary_north_america</item>
+ <item>@string/regional_band_summary_europe</item>
+ <item>@string/regional_band_summary_japan</item>
+ <item>@string/regional_band_summary_japan_wide</item>
+ <item>@string/regional_band_summary_australia</item>
+ <item>@string/regional_band_summary_austria</item>
+ <item>@string/regional_band_summary_belgium</item>
+ <item>@string/regional_band_summary_brazil</item>
+ <item>@string/regional_band_summary_china</item>
+ <item>@string/regional_band_summary_czech_republic</item>
+ <item>@string/regional_band_summary_denmark</item>
+ <item>@string/regional_band_summary_finland</item>
+ <item>@string/regional_band_summary_france</item>
+ <item>@string/regional_band_summary_germany</item>
+ <item>@string/regional_band_summary_greece</item>
+ <item>@string/regional_band_summary_hong_kong</item>
+ <item>@string/regional_band_summary_india</item>
+ <item>@string/regional_band_summary_ireland</item>
+ <item>@string/regional_band_summary_italy</item>
+ <item>@string/regional_band_summary_korea</item>
+ <item>@string/regional_band_summary_mexico</item>
+ <item>@string/regional_band_summary_netherlands</item>
+ <item>@string/regional_band_summary_new_zealand</item>
+ <item>@string/regional_band_summary_norway</item>
+ <item>@string/regional_band_summary_poland</item>
+ <item>@string/regional_band_summary_portugal</item>
+ <item>@string/regional_band_summary_russia</item>
+ <item>@string/regional_band_summary_singapore</item>
+ <item>@string/regional_band_summary_slovakia</item>
+ <item>@string/regional_band_summary_spain</item>
+ <item>@string/regional_band_summary_switzerland</item>
+ <item>@string/regional_band_summary_sweden</item>
+ <item>@string/regional_band_summary_taiwan</item>
+ <item>@string/regional_band_summary_turkey</item>
+ <item>@string/regional_band_summary_united_kingdom</item>
+ <item>@string/regional_band_summary_united_states</item>
+ <item>@string/regional_band_summary_user_defined</item>
+ <item>@string/regional_band_summary_indonesia</item>
</string-array>
- <string-array name="rf_cfg">
- <item> Get Current Station Parameters</item>
- <item> Get Station Parameters Repeat 20 times</item>
- <item> Get Search station parameters</item>
- <item> Get FM Band sweep parameters</item>
- <item> Configure Performance Parameters</item>
- </string-array>
-
- <string-array name="cfg_rf1">
- <item> Set RSSI Threshold</item>
- <item> RF Statistics</item>
- </string-array>
-
- <string-array name="cfg_rf2">
- <item> Set SINR Samples Count</item>
- <item> Set SINR Threshold</item>
- <item> Set IntfDetoutLow Threshold</item>
- <item> Set IntfDetoutHigh Threshold</item>
- <item> Set SinrFirstStage</item>
- <item> Set RmssiFirstStage</item>
- <item> Set CF0Th12</item>
- <item> Set SearchAlgo Type</item>
- <item> Get SINR Samples Count</item>
- <item> Get SINR Threshold</item>
- <item> Get SinrFirstStage</item>
- <item> Get RmssiFirstStage</item>
- <item> Get CF0Th12</item>
- <item> Get Search Algo Type</item>
- <item> Set AfJmpRmssi Threshold</item>
- <item> Set GoodChRmssi Threshold</item>
- <item> Set AfJmpRmssi Samples count</item>
- <item> Get AfJmpRmssi Threshold</item>
- <item> Get GoodChRmssi Threshold</item>
- <item> Get AfJmpRmssi Samples count</item>
- <item> Set RXREPEAT Count</item>
- <item> Set Sig Blend SinrHi</item>
- <item> Get Sig Blend SinrHi</item>
- <item> Set Sig Blend RmssiHi</item>
- <item> Get Sig Blend RmssiHi</item>
- <item> RF Statistics</item>
- </string-array>
-
-
- <string-array name="cfg_rf3">
- <item> Set SINR Threshold</item>
- <item> Get SINR Threshold</item>
- <item> Set RSSI Threshold</item>
- <item> Get RSSI Threshold</item>
- <item> Set AFJumpRssi Threshold</item>
- <item> Get AFJumpRssi Threshold</item>
- <item> Set RDS FIFO count</item>
- <item> Get RDS FIFO count</item>
- <item> Set AfJmpRssi Samples count</item>
- <item> Get AfJmpRssi Samples count</item>
- <item> RF Statistics</item>
- </string-array>
-
- <string-array name="cfg_rf4">
- <item> Select Option</item>
- <item> Set SINR Samples Count</item>
- <item> Set SINR Threshold</item>
- <item> Set IntfDetoutLow Threshold</item>
- <item> Set IntfDetoutHigh Threshold</item>
- <item> Set SinrFirstStage</item>
- <item> Set RmssiFirstStage</item>
- <item> Set CF0Th12</item>
- <item> Set SearchAlgo Type</item>
- <item> Get SINR Samples Count</item>
- <item> Get SINR Threshold</item>
- <item> Get SinrFirstStage</item>
- <item> Get RmssiFirstStage</item>
- <item> Get CF0Th12</item>
- <item> Get Search Algo Type</item>
- <item> Set AfJmpRmssi Threshold</item>
- <item> Set GoodChRmssi Threshold</item>
- <item> Set AfJmpRmssi Samples count</item>
- <item> Get AfJmpRmssi Threshold</item>
- <item> Get GoodChRmssi Threshold</item>
- <item> Get AfJmpRmssi Samples count</item>
- <item> Set RXREPEAT Count</item>
- <item> Set Sig Blend SinrHi</item>
- <item> Get Sig Blend SinrHi</item>
- <item> Set Sig Blend RmssiHi</item>
- <item> Get Sig Blend RmssiHi</item>
- <item> RF Statistics</item>
- </string-array>
-
- <string-array name="stats_options">
- <item> Select the option</item>
- <item> Configure Performance parameters</item>
- <item> RF Statistics</item>
- </string-array>
-
- <string-array name="channel_spacing_val">
+ <string-array name="channel_spacing_val" translatable="false">
<item>2</item>
<item>1</item>
<item>0</item>
</string-array>
<string-array name="channel_spacing_entries">
- <item>50 Khz</item>
- <item>100 Khz</item>
- <item>200 Khz</item>
- </string-array>
-
- <string-array name="band_sweep_methods">
- <item>Manual</item>
- <item>From File</item>
+ <item>50 kHz</item>
+ <item>100 kHz</item>
+ <item>200 kHz</item>
</string-array>
</resources>
diff --git a/fmapp2/res/values/colors.xml b/fmapp2/res/values/colors.xml
new file mode 100644
index 0000000..c80e356
--- /dev/null
+++ b/fmapp2/res/values/colors.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="favorite_button_normal">#4DB6AC</color>
+ <color name="favorite_button_active">#00796B</color>
+ <color name="background_color">#4DB6AC</color>
+ <color name="picker_background_color">@color/primary</color>
+ <color name="white">#FAFAFA</color>
+ <!-- Material -->
+ <color name="primary">#00796B</color>
+ <color name="primary_dark">#004D40</color>
+ <color name="accent">#4DB6AC</color>
+</resources>
diff --git a/fmapp2/res/values/customize.xml b/fmapp2/res/values/customize.xml
index f4dcdbc..3216d42 100644
--- a/fmapp2/res/values/customize.xml
+++ b/fmapp2/res/values/customize.xml
@@ -39,12 +39,6 @@
<bool name="def_fm_country_location_enabled">false</bool>
<!--
- customize the the special carrier for fm,
- default value is false,true is for Micromax
- -->
- <bool name="def_fm_special_carrier_enabled">false</bool>
-
- <!--
customize the output list,true is stereo only, false is stereo and mono,
default value is false
-->
diff --git a/fmapp2/res/values/debug_arrays.xml b/fmapp2/res/values/debug_arrays.xml
new file mode 100644
index 0000000..d626cf5
--- /dev/null
+++ b/fmapp2/res/values/debug_arrays.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2009, 2011-2014 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014-2015 The CyanogenMod Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of The Linux Foundation nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<resources>
+ <string-array name="rf_cfg">
+ <item>Get Current Station Parameters</item>
+ <item>Get Station Parameters Repeat 20 times</item>
+ <item>Get Search station parameters</item>
+ <item>Get FM Band sweep parameters</item>
+ <item>Configure Performance Parameters</item>
+ </string-array>
+
+ <string-array name="cfg_rf1">
+ <item>Set FM RSSI Delta</item>
+ <item>Set Signal Threshold</item>
+ <item>RF Statistics</item>
+ </string-array>
+
+ <string-array name="cfg_rf2">
+ <item>Set SINR Samples Count</item>
+ <item>Set SINR Threshold</item>
+ <item>Set IntfDetoutLow Threshold</item>
+ <item>Set IntfDetoutHigh Threshold</item>
+ <item>Set SinrFirstStage</item>
+ <item>Set RmssiFirstStage</item>
+ <item>Set CF0Th12</item>
+ <item>Set SearchAlgo Type</item>
+ <item>Get SINR Samples Count</item>
+ <item>Get SINR Threshold</item>
+ <item>Get SinrFirstStage</item>
+ <item>Get RmssiFirstStage</item>
+ <item>Get CF0Th12</item>
+ <item>Get Search Algo Type</item>
+ <item>Set AfJmpRmssi Threshold</item>
+ <item>Set GoodChRmssi Threshold</item>
+ <item>Set AfJmpRmssi Samples count</item>
+ <item>Get AfJmpRmssi Threshold</item>
+ <item>Get GoodChRmssi Threshold</item>
+ <item>Get AfJmpRmssi Samples count</item>
+ <item>Set RXREPEAT Count</item>
+ <item>Set Sig Blend SinrHi</item>
+ <item>Get Sig Blend SinrHi</item>
+ <item>Set Sig Blend RmssiHi</item>
+ <item>Get Sig Blend RmssiHi</item>
+ <item>RF Statistics</item>
+ </string-array>
+
+ <string-array name="cfg_rf3">
+ <item>Set SINR Threshold</item>
+ <item>Get SINR Threshold</item>
+ <item>Set RSSI Threshold</item>
+ <item>Get RSSI Threshold</item>
+ <item>Set AFJumpRssi Threshold</item>
+ <item>Get AFJumpRssi Threshold</item>
+ <item>Set RDS FIFO count</item>
+ <item>Get RDS FIFO count</item>
+ <item>Set AfJmpRssi Samples count</item>
+ <item>Get AfJmpRssi Samples count</item>
+ <item>RF Statistics</item>
+ </string-array>
+
+ <string-array name="cfg_rf4">
+ <item> Select Option</item>
+ <item> Set SINR Samples Count</item>
+ <item> Set SINR Threshold</item>
+ <item> Set IntfDetoutLow Threshold</item>
+ <item> Set IntfDetoutHigh Threshold</item>
+ <item> Set SinrFirstStage</item>
+ <item> Set RmssiFirstStage</item>
+ <item> Set CF0Th12</item>
+ <item> Set SearchAlgo Type</item>
+ <item> Get SINR Samples Count</item>
+ <item> Get SINR Threshold</item>
+ <item> Get SinrFirstStage</item>
+ <item> Get RmssiFirstStage</item>
+ <item> Get CF0Th12</item>
+ <item> Get Search Algo Type</item>
+ <item> Set AfJmpRmssi Threshold</item>
+ <item> Set GoodChRmssi Threshold</item>
+ <item> Set AfJmpRmssi Samples count</item>
+ <item> Get AfJmpRmssi Threshold</item>
+ <item> Get GoodChRmssi Threshold</item>
+ <item> Get AfJmpRmssi Samples count</item>
+ <item> Set RXREPEAT Count</item>
+ <item> Set Sig Blend SinrHi</item>
+ <item> Get Sig Blend SinrHi</item>
+ <item> Set Sig Blend RmssiHi</item>
+ <item> Get Sig Blend RmssiHi</item>
+ <item> RF Statistics</item>
+ </string-array>
+
+ <string-array name="stats_options">
+ <item>Select the option</item>
+ <item>Configure Performance parameters</item>
+ <item>RF Statistics</item>
+ </string-array>
+
+ <string-array name="band_sweep_methods">
+ <item>Manual</item>
+ <item>From File</item>
+ </string-array>
+</resources>
diff --git a/fmapp2/res/values/debug_strings.xml b/fmapp2/res/values/debug_strings.xml
new file mode 100644
index 0000000..04c601f
--- /dev/null
+++ b/fmapp2/res/values/debug_strings.xml
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2009, 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014-2015 The CyanogenMod Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of The Linux Foundation nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="menu_stats">FM RF stats</string>
+
+ <string name="test_menu">Select Test</string>
+
+ <string name="test_prompt">Choose a test</string>
+ <string name="test_run">Run Test</string>
+ <string name="set_rmmsi_delta">Configure RMSSI Delta</string>
+ <string name="set_sigth">Configure Signal Th</string>
+ <string name="type_rd"></string>
+ <string name="enter_rssi">Enter RMSSI Delta</string>
+ <string name="enter_sigth">Enter Signal Th</string>
+ <string name="enter_SinrSmplsCnt">Enter SINR Samples Count</string>
+ <string name="set_SinrSmplsCnt">Configure SINR Samples</string>
+ <string name="enter_SinrTh">Enter SINR Threshold</string>
+ <string name="set_SinrTh">Configure SINR Threshold</string>
+ <string name="enter_IntfLowTh">Enter Intf Det Low Threshold</string>
+ <string name="set_IntfLowTh">Config Intf Det Low Threshold</string>
+ <string name="enter_IntfHighTh">Enter Intf Det High Threshold</string>
+ <string name="set_IntfHighTh">Config Intf Det High Threshold</string>
+
+ <string name="enter_SinrFirstStage">Enter Sinr First Stage</string>
+ <string name="set_SinrFirstStage">Config Sinr First Stage</string>
+ <string name="enter_RmssiFirstStage">Enter Rmssi First Stage</string>
+ <string name="set_RmssiFirstStage">Config Rmssi First Stage</string>
+ <string name="enter_CF0Th12">Enter CF0 Threshold</string>
+ <string name="set_CF0Th12">Config CF0 Threshold</string>
+ <string name="search_algo_mpx">MPX_DCC Algo</string>
+ <string name="search_algo_sinrint">SINR_INTF Algo</string>
+ <string name="enter_AfJmpRmssiTh">Enter Af Jump Rmssi Threshold</string>
+ <string name="set_AfJmpRmssiTh">Config Af Jump Rmssi Threshold</string>
+ <string name="enter_GdChRmssiTh">Enter Good Channel Rmssi Threshold</string>
+ <string name="set_GdChRmssiTh">Config Good Channel Rmssi Threshold</string>
+ <string name="enter_AfJmpRmssiSmplsCnt">Enter Af Jump Rmssi Samples count</string>
+ <string name="set_AfJmpRmssiSmplsCnt">Config Af Jump Rmssi Samples count</string>
+ <string name="enter_RxRePeatCount">Enter RxRePeat count</string>
+ <string name="set_RxRePeatCount">Config RxRePeat count</string>
+ <string name="enter_BlendSinrHi">Enter Sig Blend SinrHi value</string>
+ <string name="set_BlendSinrHi">Configure Sig Blend SinrHi value</string>
+ <string name="enter_BlendRmssiHi">Enter Sig Blend RmssiHi value</string>
+ <string name="set_BlendRmssiHi">Configure Sig Blend RmssiHi value</string>
+ <string name="enter_RssiTh">Enter RSSI Threshold</string>
+ <string name="set_RssiTh">Config RSSI Threshold</string>
+ <string name="enter_AfJumpRssiTh">Enter AF jump RSSI Threshold</string>
+ <string name="set_AfJumpRssiTh">Config AF jump RSSI Threshold</string>
+ <string name="set_RdsFifoCnt">Config RDS FIFO count</string>
+
+ <string name="band_method_prompt">Select Method</string>
+ <string name="enter_start_delay_time">Start Delay Time</string>
+ <string name="enter_dwell_time">Dwell Time</string>
+ <string name="band_sweep_setting">Sweep Setting</string>
+ <string name="band_sweep_setting_set">Set</string>
+ <string name="band_sweep_setting_cancel">Cancel</string>
+ <string name="band_sweep_choose">Choose Band Sweep Method</string>
+</resources>
diff --git a/fmapp2/res/drawable/station_border.xml b/fmapp2/res/values/integers.xml
similarity index 81%
rename from fmapp2/res/drawable/station_border.xml
rename to fmapp2/res/values/integers.xml
index 2aee777..a1698e1 100644
--- a/fmapp2/res/drawable/station_border.xml
+++ b/fmapp2/res/values/integers.xml
@@ -1,5 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
<!--
- * Copyright (c) 2009, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009, 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014 The CyanogenMod Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -25,9 +27,7 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
- <stroke android:width="1dp" android:color="#FFFFFFFF" />
- <padding android:left="1dp" android:top="1dp"
- android:right="1dp" android:bottom="1dp" />
- <corners android:radius="1dp" />
-</shape>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Look at FmSharedPreferences.java for index -->
+ <integer name="default_country_index">0</integer>
+</resources>
diff --git a/fmapp2/res/values/strings.xml b/fmapp2/res/values/strings.xml
index 3d490d0..788e744 100644
--- a/fmapp2/res/values/strings.xml
+++ b/fmapp2/res/values/strings.xml
@@ -1,204 +1,196 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2009, 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014-2015 The CyanogenMod Project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of The Linux Foundation nor
+ * the names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="app_name">FM Radio</string>
- <string name="tx_app_name">FM Tx</string>
+ <string name="tx_app_name">FM Transmitter</string>
- <string name="default_sleep"></string>
- <string name="menu_add_to_preset">Add to Presets</string>
- <string name="menu_settings">Settings</string>
- <string name="menu_record_start">Start Recording</string>
- <string name="menu_record_stop">Stop Recording</string>
- <string name="menu_all_channels">All Channels</string>
- <string name="app_label_all_channels">All Channels</string>
- <string name="button_ok">OK</string>
- <string name="button_cancel">Cancel</string>
- <string name="button_delete">Delete</string>
- <string name="error_sdcard_access">Unable to access SD card</string>
- <string name="fm_service_started">FM Service</string>
- <string name="menu_sleep">Sleep</string>
- <string name="menu_sleep_cancel">Cancel Sleep</string>
- <string name="menu_wired_headset">Wired Headset</string>
- <string name="menu_speaker_on">Enable Speaker</string>
- <string name="menu_display_tags">Show Tags</string>
- <string name="menu_speaker_off">Disable Speaker</string>
<string name="menu_scan_start">Scan</string>
- <string name="menu_scan_stop">Stop Searching</string>
- <string name="menu_stats">FM RF Stats</string>
+ <string name="menu_scan_stop">Stop searching</string>
+ <string name="menu_record_start">Record</string>
+ <string name="menu_record_stop">Stop recording</string>
+ <string name="menu_settings">Settings</string>
+ <string name="menu_sleep">Sleep</string>
+ <string name="menu_sleep_cancel">Cancel sleep</string>
+ <string name="menu_all_channels">All channels</string>
+ <string name="menu_display_tags">Show tags</string>
+
<string name="button_text_stop">Stop</string>
- <string name="msg_seeking">Searching FM Station</string>
- <string name="msg_scanning">Scanning for all FM Stations</string>
- <string name="msg_scanning_pty">Scanning for "<xliff:g id="pty_name">%1$s</xliff:g>"</string>
- <string name="msg_search_title">FM - <xliff:g id="frequency_string">%1$s</xliff:g></string>
- <string name="msg_searching">Searching for Strong Stations to create a Preset List </string>
- <string name="msg_searching_title">Auto-Select Presets</string>
- <string name="msg_weak_searching">Searching for frequencies to transmit</string>
+ <string name="msg_seeking">Searching FM station\u2026</string>
+ <string name="msg_scanning">Scanning for all FM stations\u2026</string>
+ <string name="msg_scanning_pty">Scanning for \'<xliff:g id="pty_name">%1$s</xliff:g>\'\u2026</string>
+ <string name="msg_search_title"><xliff:g id="frequency_string">%1$s</xliff:g> MHz</string>
+ <string name="msg_searching_title">Auto-selecting presets</string>
+ <string name="msg_searching">Searching for strong stations to create a presets list\u2026</string>
- <string name="msg_noantenna">Please plug in a Headset to use FM
- Radio </string>
- <string name="msg_headsetpluggedin">Disconnect all Headsets for using FM Tx</string>
- <string name="msg_callactive">FM Tx is not supported when there is active voice call</string>
- <string name="dialog_sleep_title">Select Auto-Off Sleep Time</string>
- <string name="preset_select_name">Select "<xliff:g id="preset_name">%1$s</xliff:g>"</string>
- <string name="presetlist_select_name">Select "<xliff:g id="presetlist_name">%1$s</xliff:g>"</string>
- <string name="presetlist_add_new">Add New List</string>
- <string name="dialog_presetlist_title">Preset Lists</string>
- <string name="presetlist_prefix_name">FM - </string>
- <string name="dialog_presetlist_rename_title">Enter a name </string>
- <string name="dialog_preset_rename_title">Enter a name </string>
- <string name="presetlist_delete_name">Delete "<xliff:g id="presetlist_name">%1$s</xliff:g>" and its Stations?</string>
- <string name="presetlist_autoselect_title">Confirm Auto-Select</string>
- <string name="presetlist_autoselect_name">Auto-Select will delete all the Presets in the list "<xliff:g id="presetlist_name">%1$s</xliff:g>", Continue?</string>
- <string name="fmtx_autoselect_name">Auto-Select will delete all the Presets, Continue?</string>
+ <string name="msg_noantenna">Please plug in a headset to use FM radio</string>
+ <string name="dialog_sleep_title">Auto-off sleep time</string>
+ <string name="presetlist_select_name">Select \'<xliff:g id="presetlist_name">%1$s</xliff:g>\'</string>
+ <string name="presetlist_add_new">Add new list</string>
+ <string name="dialog_presetlist_rename_title">Enter name</string>
+ <string name="presetlist_autoselect_title">Confirm auto-selection</string>
- <string name="enter_frequency">Tune to Station</string>
- <string name="enter_new_frequency_title">Enter Frequency </string>
-
- <string name="preset_now_playing">Now Playing </string>
- <string name="preset_pref_title">"<xliff:g id="preset_name">%1$s</xliff:g>"
- (<xliff:g id="preset_freq">%2$s</xliff:g>)</string>
- <string name="preset_delete_title">Delete Preset</string>
-
- <string name="preset_delete_name">Delete "<xliff:g id="preset_name">%1$s</xliff:g>"
- from "<xliff:g id="presetlist_name">%2$s</xliff:g>"</string>
-
- <string name="preset_confirm_delete_name">Delete "<xliff:g id="preset_name">%1$s</xliff:g>"
- from "<xliff:g id="presetlist_name">%2$s</xliff:g>" ?</string>
-
- <string name="preset_name_dialog_title">Enter a name </string>
- <string name="preset_name_summary">"<xliff:g id="preset_name">%1$s</xliff:g>" </string>
- <string name="preset_name_title">Rename</string>
-
- <string name="preset_search_title">Search</string>
- <string name="preset_search_name">Search for "<xliff:g id="preset_name">%1$s</xliff:g>"</string>
-
- <string name="preset_preference_title">FM Stations in "<xliff:g id="preset_name">%1$s</xliff:g>" </string>
-
- <string name="preset_empty_title">No Stations in the List</string>
- <string name="preset_empty_add_summary">Add Stations</string>
-
- <string name="preset_add">Add</string>
<string name="preset_replace">Replace</string>
<string name="preset_tune">Tune</string>
<string name="preset_rename">Rename</string>
<string name="preset_delete">Delete</string>
- <string name="preset_search">Search for "<xliff:g id="preset_pi">%1$s</xliff:g>"
- </string>
+ <string name="preset_search">Search for \'<xliff:g id="preset_pi">%1$s</xliff:g>\'</string>
- <string name="stat_notif_frequency">FM Radio Station "<xliff:g id="frequency">%1$s</xliff:g>" MHz</string>
- <string name="stat_notif_tx_frequency">FM Transmitting at: "<xliff:g id="frequency">%1$s</xliff:g>"</string>
+ <string name="stat_notif_frequency">\'<xliff:g id="frequency">%1$s</xliff:g>\' MHz</string>
+ <string name="regional_band">Regional band</string>
- <string name="sel_band_menu">Select Regional Band</string>
- <string name="test_menu">Select Test</string>
+ <string name="regional_band_entry_north_america">North America</string>
+ <string name="regional_band_entry_europe">Europe</string>
+ <string name="regional_band_entry_japan">Japan</string>
+ <string name="regional_band_entry_japan_wide">Japan (wide)</string>
+ <string name="regional_band_entry_australia">Australia</string>
+ <string name="regional_band_entry_austria">Austria</string>
+ <string name="regional_band_entry_belgium">Belgium</string>
+ <string name="regional_band_entry_brazil">Brazil</string>
+ <string name="regional_band_entry_china">China</string>
+ <string name="regional_band_entry_czech_republic">Czech Republic</string>
+ <string name="regional_band_entry_denmark">Denmark</string>
+ <string name="regional_band_entry_finland">Finland</string>
+ <string name="regional_band_entry_france">France</string>
+ <string name="regional_band_entry_germany">Germany</string>
+ <string name="regional_band_entry_greece">Greece</string>
+ <string name="regional_band_entry_hong_kong">Hong Kong</string>
+ <string name="regional_band_entry_india">India</string>
+ <string name="regional_band_entry_indonesia">Indonesia</string>
+ <string name="regional_band_entry_ireland">Ireland</string>
+ <string name="regional_band_entry_italy">Italy</string>
+ <string name="regional_band_entry_korea">Korea</string>
+ <string name="regional_band_entry_mexico">Mexico</string>
+ <string name="regional_band_entry_netherlands">Netherlands</string>
+ <string name="regional_band_entry_new_zealand">New Zealand</string>
+ <string name="regional_band_entry_norway">Norway</string>
+ <string name="regional_band_entry_poland">Poland</string>
+ <string name="regional_band_entry_portugal">Portugal</string>
+ <string name="regional_band_entry_russia">Russia</string>
+ <string name="regional_band_entry_singapore">Singapore</string>
+ <string name="regional_band_entry_slovakia">Slovakia</string>
+ <string name="regional_band_entry_spain">Spain</string>
+ <string name="regional_band_entry_switzerland">Switzerland</string>
+ <string name="regional_band_entry_sweden">Sweden</string>
+ <string name="regional_band_entry_taiwan">Taiwan</string>
+ <string name="regional_band_entry_turkey">Turkey</string>
+ <string name="regional_band_entry_united_kingdom">United Kingdom</string>
+ <string name="regional_band_entry_united_states">United States</string>
+ <string name="regional_band_entry_user_defined">User defined band</string>
- <string name="settings_menu">Settings</string>
- <string name="regional_band">Regional Band</string>
+ <string name="regional_band_summary_north_america">North America (87.5 to 108.0 MHz in 200 kHz steps)</string>
+ <string name="regional_band_summary_europe">Europe (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_japan">Japan (76.0 to 90.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_japan_wide">Japan (wide) (90.0 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_australia">Australia (87.7 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_austria">Austria (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_belgium">Belgium (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_brazil">Brazil (87.5 to 108.0 MHz in 200 kHz steps)</string>
+ <string name="regional_band_summary_china">China (87.0 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_czech_republic">Czech Republic (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_denmark">Denmark (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_finland">Finland (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_france">France (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_germany">Germany (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_greece">Greece (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_hong_kong">Hong Kong (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_india">India (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_indonesia">Indonesia (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_ireland">Ireland (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_italy">Italy (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_korea">Korea (87.5 to 108.0 MHz in 200 kHz steps)</string>
+ <string name="regional_band_summary_mexico">Mexico (88.1 to 107.9 MHz in 200 kHz steps)</string>
+ <string name="regional_band_summary_netherlands">Netherlands (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_new_zealand">New Zealand (88.0 to 107.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_norway">Norway (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_poland">Poland (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_portugal">Portugal (87.5 to 108.0 MHz in 50 kHz steps)</string>
+ <string name="regional_band_summary_russia">Russia (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_singapore">Singapore (88.0 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_slovakia">Slovakia (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_spain">Spain (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_switzerland">Switzerland (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_sweden">Sweden (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_taiwan">Taiwan (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_turkey">Turkey (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_united_kingdom">United Kingdom (87.5 to 108.0 MHz in 100 kHz steps)</string>
+ <string name="regional_band_summary_united_states">United States (88.1 to 107.9 MHz in 200 kHz steps)</string>
+ <string name="regional_band_summary_user_defined">User defined band</string>
- <string name="aud_output_mode">Audio Output Mode</string>
- <string name="sel_audio_output">Select Audio Output</string>
-
- <string name="record_dur">Record Duration</string>
- <string name="sel_rec_dur">Select Record Duration</string>
-
- <string name="auto_select_af">Alternate Frequency</string>
- <string name="auto_select_af_enabled">Auto Select Enabled</string>
- <string name="auto_select_af_disabled">Auto Select Disabled</string>
-
- <string name="fac_defaults">Revert to Factory Defaults</string>
- <string name="revert_to_fac">Revert to Factory Defaults</string>
- <string name="settings_back">Back</string>
-
- <string name="settings_revert_confirm_title">Confirm Reset Settings</string>
- <string name="settings_revert_confirm_msg">This will delete all settings including Presets</string>
-
- <string name="settings_back_summary">Return to previous view</string>
- <string name="settings_revert_defaults_title">Revert to Factory Defaults</string>
- <string name="settings_revert_defaults_summary">Reset all settings</string>
-
+ <string name="aud_output_mode">Audio output mode</string>
<string name="audio_type_stereo">Stereo</string>
<string name="audio_type_mono">Mono</string>
- <string name="default_band">United States</string>
- <string name="default_audio">Stereo</string>
- <string name="default_record_duration">5 minutes</string>
- <string name="factory_reset_dialog_title">Confirm Reset</string>
- <string name="factory_reset_dialog_message">This will delete all settings including Presets</string>
- <string name="station_move">Move</string>
- <string name="station_edit">Edit</string>
- <!-- alert to the user that USB storage must be available before using FM recording [CHAR LIMIT=NONE] -->
- <string name="no_storage">Mount SD card before start recording.</string>
- <!-- alert to the user that the USB storage is being disk-checked [CHAR LIMIT=30] -->
- <string name="preparing_sd">Preparing SD card</string>
- <!-- alert to the user that the FM fails to read or write the USB storage. [CHAR LIMIT=NONE] -->
- <string name="access_sd_fail">Couldn\'t access SD card.</string>
- <!-- Low-memory dialog message [CHAR LIMT=NONE] -->
- <string name="spaceIsLow_content">Your SD card storage is running out of space. Change the quality setting or delete some images or other files.</string>
- <!-- The messsage shown when FM record reaches size limit. -->
- <string name="FMRecording_reach_size_limit">Size limit reached.</string>
+ <string name="record_dur">Record duration</string>
- <string name="delete_station_title">Delete</string>
- <string name="find_af_station">Find</string>
- <string name="menu_add_list">Add List</string>
- <string name="menu_rename_list">Rename List</string>
- <string name="menu_reorder_list">Reorder List</string>
- <string name="menu_scan_for_preset">Scan for Presets</string>
- <string name="menu_delete_list">Delete List</string>
- <string name="alert_dialog_ok">Ok</string>
- <string name="alert_dialog_cancel">Cancel</string>
+ <string name="auto_select_af">Alternative frequency</string>
+
+ <string name="settings_revert_defaults_title">Revert to factory defaults</string>
+ <string name="settings_revert_defaults_summary">Reset all settings</string>
+
+ <string name="settings_revert_confirm_title">Confirm reset</string>
+ <string name="settings_revert_confirm_msg">This will clear all application settings, including saved presets. Continue?</string>
+
+ <!-- alert to the user that USB storage must be available before using FM recording [CHAR LIMIT=NONE] -->
+ <string name="no_storage">Mount SD card before starting recording.</string>
+ <!-- alert to the user that the USB storage is being disk-checked [CHAR LIMIT=30] -->
+ <string name="preparing_sd">Preparing SD card\u2026</string>
+ <!-- alert to the user that the FM fails to read or write the USB storage. [CHAR LIMIT=NONE] -->
+ <string name="access_sd_fail">Couldn\'t access SD card.</string>
+ <!-- Low-memory dialog message [CHAR LIMT=NONE] -->
+ <string name="spaceIsLow_content">Your SD card storage is running out of space. Change the quality setting or delete some other files to free up space.</string>
+ <!-- The messsage shown when FM record reaches size limit. -->
+ <string name="FMRecording_reach_size_limit">Size limit reached.</string>
+ <string name="menu_scan_for_preset">Scan for presets</string>
+
+ <!-- Off messages -->
+ <string name="fm_off">FM is turned off.</string>
+ <string name="fm_call">FM can\'t be used while calling.</string>
+
+
<!-- The messsage shown when long pressed on a station. -->
<string name="alert_dialog_hint">Enter a name</string>
- <string name="search_dialog_title">Scan Stations</string>
+ <string name="search_dialog_title">Scan stations</string>
- <string name="search_category_key">search_category_type</string>
- <string name="search_category">Select Search Type</string>
- <string name="search_category_title">Search Type</string>
- <string name="default_search_category">Seek</string>
- <string name="search_category_tune">Tune</string>
+ <string name="fm_command_timeout_title">Timeout</string>
+ <string name="fm_tune_timeout_msg">No response received to tune FM station. If the problem persists, please turn off FM and turn it back on.</string>
- <string name="search_category_type_key">search_category_value_type</string>
- <string name="search_category_type">Select Search by Program Type</string>
- <string name="search_category_type_title">Search by Program Type</string>
- <string name="default_search_category_type">All Stations</string>
+ <string name="fm_command_failed_title">FM operation failed</string>
+ <string name="fm_cmd_failed_msg">FM operation failed. If the problem persists, please turn off FM and turn it back on.</string>
+ <string name="fm_cmd_failed_msg_hdmi">FM operation failed. FM and HDMI concurrency is not supported.</string>
+ <string name="fm_cmd_failed_call_on">FM operation failed. FM audio is not allowed during call.</string>
- <string name="presets_back">Back</string>
- <string name="presets_back_summary">Return to previous view</string>
-
- <string name="nav_mode_presets">Presets</string>
- <string name="nav_mode_stations">Stations</string>
-
- <string name="prog_service_string"></string>
- <string name="radio_text_string">This is the long Radio Text String Message that needs to scroll</string>
- <string name="eradio_text_string">Extended Radio Text Message</string>
- <string name="pty_string"></string>
- <string name="frequency_string"></string>
- <string name="station_id_string"></string>
-
-
- <string name="fm_command_timeout_title">Timeout</string>
- <string name="fm_tune_timeout_msg">No response received to Tune FM
- Station. If problem persists, please turn off FM and turn it back
- on.</string>
-
- <string name="fm_command_failed_title">FM Operation failed</string>
- <string name="fm_cmd_failed_msg">FM operation failed. If problem
- persists, please turn off FM and turn it back on.
- </string>
- <string name="fm_cmd_failed_msg_hdmi">FM operation failed. FM and HDMI concurrecny is not supported.
- </string>
- <string name="fm_cmd_failed_call_on">FM operation failed. FM audio is not allowed during call. </string>
-
- <skip/>
<!-- Do not translate. Duration format. -->
- <string name="durationformat"><xliff:g id="format">%2$d:%5$02d</xliff:g></string>
+ <string name="durationformat" translatable="false"><xliff:g id="format">%2$d:%5$02d</xliff:g></string>
- <string name="default_record"></string>
- <string name="default_preset_list_name"> FM List </string>
- <string name="default_station"> FM </string>
- <string name="default_blank"> </string>
- <string name="add_station">+</string>
- <string name="stop_scanning">Stop Scanning</string>
- <string name="transmit_msg_string">Transmitting at:</string>
<!-- the name under which recordings will be visible in the media database is formatted like this -->
<string name="audio_db_title_format"><xliff:g id="format">yyyy-MM-dd HH:mm:ss</xliff:g></string>
<!-- all recordings will show up in the media database with this 'artist' name -->
@@ -207,73 +199,81 @@
<string name="audio_db_album_name">FM recordings</string>
<!-- all recordings will show up in the media database in a playlist with this name -->
<string name="audio_db_playlist_name">FM recordings</string>
- <string name="test_prompt">Choose a test</string>
- <string name="test_run">Run Test</string>
- <string name="set_rmmsi_delta">Configure RMSSI Delta</string>
- <string name="set_sigth">Configure Signal Th</string>
- <string name="type_rd"></string>
- <string name="srch_params">Configure RMSSI Delta</string>
- <string name="srch_params_1">Configure Signal Th </string>
- <string name="enter_rssi">Enter RMSSI Delta</string>
- <string name="enter_sigth">Enter Signal Th</string>
- <string name="enter_SinrSmplsCnt">Enter SINR Samples Count</string>
- <string name="set_SinrSmplsCnt">Configure SINR Samples</string>
- <string name="enter_SinrTh">Enter SINR Threshold</string>
- <string name="set_SinrTh">Configure SINR Threshold</string>
- <string name="enter_IntfLowTh">Enter Intf Det Low Threshold</string>
- <string name="set_IntfLowTh">Config Intf Det Low Threshold</string>
- <string name="enter_IntfHighTh">Enter Intf Det High Threshold</string>
- <string name="set_IntfHighTh">Config Intf Det High Threshold</string>
+
+ <string name="default_blank" translatable="false"></string>
+ <string name="add_station" translatable="false">+</string>
<string name="station_name">Station:</string>
<string name="station_exists">This frequency already exists!</string>
- <string name="station_list_delete_station">Delete:<xliff:g id="name">%s</xliff:g></string>
- <string name="station_list_delete_station_prompt">Are you sure to delete <xliff:g id="name">%s</xliff:g> .</string>
+ <string name="station_list_delete_station">Delete: <xliff:g id="name">%s</xliff:g></string>
+ <string name="station_list_delete_station_prompt">Are you sure you want to delete \'<xliff:g id="name">%s</xliff:g>\'?</string>
<string name="station_name_empty">Station name is empty, please input again.</string>
- <string name="station_name_exist">There is already a station named \"<xliff:g id="name">%s</xliff:g>\". Please input a different name.</string>
- <string name="enter_SinrFirstStage">Enter Sinr First Stage</string>
- <string name="set_SinrFirstStage">Config Sinr First Stage</string>
- <string name="enter_RmssiFirstStage">Enter Rmssi First Stage</string>
- <string name="set_RmssiFirstStage">Config Rmssi First Stage</string>
- <string name="enter_CF0Th12">Enter CF0 Threshold</string>
- <string name="set_CF0Th12">Config CF0 Threshold</string>
- <string name="search_algo_mpx">MPX_DCC Algo</string>
- <string name="search_algo_sinrint">SINR_INTF Algo</string>
- <string name="enter_AfJmpRmssiTh">Enter Af Jump Rmssi Threshold</string>
- <string name="set_AfJmpRmssiTh">Config Af Jump Rmssi Threshold</string>
- <string name="enter_GdChRmssiTh">Enter Good Channel Rmssi Threshold</string>
- <string name="set_GdChRmssiTh">Config Good Channel Rmssi Threshold</string>
- <string name="enter_AfJmpRmssiSmplsCnt">Enter Af Jump Rmssi Samples count</string>
- <string name="set_AfJmpRmssiSmplsCnt">Config Af Jump Rmssi Samples count</string>
+ <string name="station_name_exist">\'<xliff:g id="name">%s</xliff:g>\' is already in use, please enter a different name.</string>
+
<string name="rt_plus_tags">Tags</string>
- <string name="enter_RxRePeatCount">Enter RxRePeat count</string>
- <string name="set_RxRePeatCount">Config RxRePeat count</string>
- <string name="enter_BlendSinrHi">Enter Sig Blend SinrHi value</string>
- <string name="set_BlendSinrHi">Configure Sig Blend SinrHi value</string>
- <string name="enter_BlendRmssiHi">Enter Sig Blend RmssiHi value</string>
- <string name="set_BlendRmssiHi">Configure Sig Blend RmssiHi value</string>
- <string name="enter_RssiTh">Enter RSSI Threshold</string>
- <string name="set_RssiTh">Config RSSI Threshold</string>
- <string name="enter_AfJumpRssiTh">Enter AF jump RSSI Threshold</string>
- <string name="set_AfJumpRssiTh">Config AF jump RSSI Threshold</string>
- <string name="enter_RdsFifoCnt">Enter RDS FIFO count</string>
- <string name="set_RdsFifoCnt">Config RDS FIFO count</string>
- <string name="usr_def_band_min">Lower Freq Limit(In Mhz)</string>
- <string name="usr_def_band_max">Higher Freq Limit(In Mhz)</string>
- <string name="sel_chanl_spacing">Select Channel Spacing</string>
- <string name="chanl_spacing">Channel Spacing</string>
+ <string name="usr_def_band_min">Lowest frequency (MHz)</string>
+ <string name="usr_def_band_max">Highest frequency (MHz)</string>
+ <string name="chanl_spacing">Channel spacing</string>
- <string name="band_method_prompt">Select Method</string>
- <string name="enter_start_delay_time">Start Delay Time</string>
- <string name="enter_dwell_time">Dwell Time</string>
- <string name="band_sweep_setting">Sweep Setting</string>
- <string name="band_sweep_setting_set">Set</string>
- <string name="band_sweep_setting_cancel">Cancel</string>
- <string name="band_sweep_choose">Choose Band Sweep Method</string>
<string name="set">Set</string>
- <string name="cancel">Cancel</string>
- <string name="user_defind_band_msg">Enter Freq from range 76.0 - 108.0, with min 1 channel spacing and 100KHz space between max, min freq</string>
- <string name="save_record_file">FM Recorded file saved to "<xliff:g id="record_file">%1$s</xliff:g>"</string>
+ <string name="user_defind_band_msg">Enter frequency from 76.0 to 108.0 MHz with minimum 1 channel spacing and 100 kHz space between min and max frequency</string>
+ <string name="save_record_file">FM recorded file saved to \'<xliff:g id="record_file">%1$s</xliff:g>\'</string>
+ <string name="fm_search_no_results">No compatible stations found</string>
+ <!-- program types -->
+ <string name="typ_All_stations">All stations</string>
+ <string name="typ_Culture">Culture</string>
+ <string name="typ_Current_affairs">Current affairs</string>
+ <string name="typ_Children">Children programs</string>
+ <string name="typ_Country">Country music</string>
+ <string name="typ_Documentary">Documentary</string>
+ <string name="typ_Drama">Drama</string>
+ <string name="typ_Easy_listening">Easy listening music</string>
+ <string name="typ_Education">Education</string>
+ <string name="typ_Emergency">Emergency</string>
+ <string name="typ_Emergency_test">Emergency test</string>
+ <string name="typ_Finance">Finance</string>
+ <string name="typ_Folk">Folk music</string>
+ <string name="typ_Information">Information</string>
+ <string name="typ_Jazz">Jazz music</string>
+ <string name="typ_Light_classical">Light classical</string>
+ <string name="typ_Leisure">Leisure</string>
+ <string name="typ_News">News</string>
+ <string name="typ_National">National music</string>
+ <string name="typ_Other">Other music</string>
+ <string name="typ_Oldies">Oldies music</string>
+ <string name="typ_Phone_in">Phone in</string>
+ <string name="typ_Pop">Pop music</string>
+ <string name="typ_Religion">Religion</string>
+ <string name="typ_Rock">Rock music</string>
+ <string name="typ_Science">Science</string>
+ <string name="typ_Serious_classical">Serious classical</string>
+ <string name="typ_Social_affairs">Social affairs</string>
+ <string name="typ_Sport">Sport</string>
+ <string name="typ_Travel">Travel</string>
+ <string name="typ_Varied">Varied</string>
+ <string name="typ_Weather">Weather</string>
+
+ <!-- RBDS (North America) -->
+ <string name="typ_Adult_hits">Adult hits</string>
+ <string name="typ_Classical">Classical</string>
+ <string name="typ_Classic_Rock">Classic Rock</string>
+ <string name="typ_College">College</string>
+ <string name="typ_Foreign_language">Foreign language</string>
+ <string name="typ_Hiphop">Hip Hop</string>
+ <string name="typ_Nostalgia">Nostalgia</string>
+ <string name="typ_Personality">Personality</string>
+ <string name="typ_Public">Public</string>
+ <string name="typ_Religious_music">Religious music</string>
+ <string name="typ_Religious_talk">Religious talk</string>
+ <string name="typ_Rhythm_and_Blues">Rhythm and Blues</string>
+ <string name="typ_Spanish_music">Spanish music</string>
+ <string name="typ_Spanish_talk">Spanish talk</string>
+ <string name="typ_Soft">Soft</string>
+ <string name="typ_Soft_Rock">Soft Rock</string>
+ <string name="typ_Soft_Rhythm_and_Blues">Soft Rhythm and Blues</string>
+ <string name="typ_Sports">Sports</string>
+ <string name="typ_Talk">Talk</string>
+ <string name="typ_Top_40">Top 40</string>
</resources>
diff --git a/fmapp2/res/values/styles.xml b/fmapp2/res/values/styles.xml
index e9c9bcf..a53ced9 100644
--- a/fmapp2/res/values/styles.xml
+++ b/fmapp2/res/values/styles.xml
@@ -27,6 +27,11 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<resources>
+ <style name="FMTheme" parent="@android:Theme.Material">
+ <item name="android:colorPrimary">@color/primary</item>
+ <item name="android:colorPrimaryDark">@color/primary_dark</item>
+ <item name="android:colorAccent">@color/accent</item>
+ </style>
<style name="FMStationSeekBar">
<item name="android:indeterminateOnly">false</item>
<item name="android:progressDrawable">@android:drawable/progress_horizontal</item>
@@ -37,25 +42,46 @@
<item name="android:focusable">true</item>
</style>
+ <style name="ButtonStripButtons">
+ <item name="android:gravity">center</item>
+ <item name="android:layout_weight">1</item>
+ <item name="android:layout_width">80dp</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:text">@string/add_station</item>
+ <item name="android:textStyle">bold</item>
+ </style>
+
<style name="ButtonStripLeft">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_left</item>
- </style>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item> </style>
<style name="ButtonStripMiddle">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_middle</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
</style>
<style name="ButtonStripRight">
<item name="android:gravity">center</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:background">@drawable/btn_strip_trans_right</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:textColor">@color/white</item>
+ <item name="android:background">@drawable/preset_button_background</item>
+ <item name="android:singleLine">true</item>
</style>
</resources>
diff --git a/fmapp2/res/drawable/preset_page_button.xml b/fmapp2/res/values/transmit_strings.xml
similarity index 66%
rename from fmapp2/res/drawable/preset_page_button.xml
rename to fmapp2/res/values/transmit_strings.xml
index cb1457b..566af1d 100644
--- a/fmapp2/res/drawable/preset_page_button.xml
+++ b/fmapp2/res/values/transmit_strings.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- * Copyright (c) 2012, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2009, 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (C) 2014-2015 The CyanogenMod Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -26,10 +27,14 @@
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
- <selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false"
- android:drawable="@drawable/ic_btn_forward_dis" /> <!-- disabled -->
- <item android:state_enabled="true"
- android:drawable="@drawable/ic_btn_forward" /> <!-- enabled -->
- <item android:drawable="@drawable/ic_btn_forward" /> <!-- default -->
- </selector>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="msg_weak_searching">Searching for weakest frequencies to transmit\u2026</string>
+
+ <string name="msg_headsetpluggedin">Disconnect all headsets to use FM transmitter</string>
+ <string name="msg_callactive">FM transmit is not supported when there is an active voice call</string>
+ <string name="fmtx_autoselect_name">Auto-select will delete all the presets, continue?</string>
+
+ <string name="stat_notif_tx_frequency">Transmitting at: \'<xliff:g id="frequency">%1$s</xliff:g>\' MHz</string>
+
+ <string name="transmit_msg_string">Transmitting at:</string>
+</resources>
diff --git a/fmapp2/src/com/caf/fmradio/FMAdapterApp.java b/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
index dbc17c5..40a6731 100644
--- a/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
+++ b/fmapp2/src/com/caf/fmradio/FMAdapterApp.java
@@ -29,6 +29,7 @@
public class FMAdapterApp extends Application {
private static final String TAG = "FMAdapterApp";
private static final boolean DBG = true;
+ public static FMAdapterApp context = null; // Allow global access
//For Debugging only
private static int sRefCount=0;
@@ -39,6 +40,7 @@
public FMAdapterApp() {
super();
+ context = this;
if (DBG) {
synchronized (FMAdapterApp.class) {
sRefCount++;
diff --git a/fmapp2/src/com/caf/fmradio/FMRadio.java b/fmapp2/src/com/caf/fmradio/FMRadio.java
index 4c9ac20..800a373 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadio.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadio.java
@@ -28,6 +28,7 @@
package com.caf.fmradio;
+import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
@@ -98,6 +99,7 @@
import android.content.SharedPreferences;
import android.graphics.Color;
import android.graphics.Point;
+import android.graphics.drawable.ColorDrawable;
import android.Manifest;
import android.content.pm.PackageManager;
@@ -224,12 +226,14 @@
private TextView mSleepMsgTV;
private TextView mRecordingMsgTV;
+ private ImageView mFmSeeker;
+
private double mOutputFreq;
private int mPresetPageNumber = 0;
private int mStereo = -1;
private static boolean mFMStats = false;
-
+ private boolean mShowStationList = false;
/* Current Status Indicators */
private static boolean mRecording = false;
@@ -333,6 +337,17 @@
DisplayMetrics outMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(outMetrics );
+ getWindow().setBackgroundDrawableResource(R.color.background_color);
+
+ // Set up your ActionBar
+ final ActionBar actionBar = getActionBar();
+ actionBar.setDisplayShowHomeEnabled(false);
+ actionBar.setDisplayShowTitleEnabled(false);
+ actionBar.setDisplayShowCustomEnabled(true);
+ actionBar.setCustomView(R.layout.action_bar);
+
+ ((TextView) findViewById(R.id.title)).setText(R.string.app_name);
+
setContentView(R.layout.fmradio);
SavedDataAndState = (LoadedDataAndState)getLastNonConfigurationInstance();
@@ -372,15 +387,15 @@
mForwardButton = (ImageView)findViewById(R.id.btn_forward);
if (mForwardButton != null) {
mForwardButton.setOnClickListener(mForwardClickListener);
- mForwardButton.setOnLongClickListener(mForwardLongClickListener);
}
mBackButton = (ImageView)findViewById(R.id.btn_back);
if (mBackButton != null) {
mBackButton.setOnClickListener(mBackClickListener);
- mBackButton.setOnLongClickListener(mBackLongClickListener);
}
+ mFmSeeker = (ImageView)findViewById(R.id.fm_seeker);
+
/* 6 Preset Buttons */
mPresetButtons[0] = (Button)findViewById(R.id.presets_button_1);
mPresetButtons[1] = (Button)findViewById(R.id.presets_button_2);
@@ -538,13 +553,34 @@
mERadioTextScroller.stopScroll();
FmSharedPreferences.setTunedFrequency(mTunedStation.getFrequency());
mPrefs.Save();
+ if (mService != null) {
+ try {
+ mService.unregisterCallbacks();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
}
+ private void syncScanState() {
+ if (!mIsScaning || mService == null) {
+ return;
+ }
+ try {
+ if (!mService.isSearchInProgress()) {
+ mServiceCallbacks.onSearchComplete();
+ }
+ }catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ }
+
@Override
public void onResume() {
Log.d(LOGTAG, "FMRadio: onResume");
super.onResume();
+ syncScanState();
if (mService == null) {
Log.d(LOGTAG,"bind callback has not received yet - wait for 100ms");
@@ -668,7 +704,6 @@
MenuItem item;
boolean radioOn = isFmOn();
boolean recording = isRecording();
- boolean mSpeakerPhoneOn = isSpeakerEnabled();
boolean sleepActive = isSleepTimerActive();
boolean searchActive = isScanActive() || isSeekActive();
Log.d(LOGTAG, "onCreateOptionsmenu");
@@ -688,14 +723,12 @@
item = menu.add(0, MENU_RECORD_START, 0, R.string.menu_record_start)
.setIcon(R.drawable.ic_menu_record);
if (item != null) {
- item.setVisible(true);
- item.setEnabled((!recording) && radioOn);
+ item.setVisible((!recording) && radioOn);
}
item = menu.add(0, MENU_RECORD_STOP, 0, R.string.menu_record_stop)
.setIcon(R.drawable.ic_menu_record);
if (item != null) {
- item.setVisible(true);
- item.setEnabled(recording && radioOn);
+ item.setVisible(recording && radioOn);
}
}
/* Settings can be active */
@@ -740,7 +773,6 @@
boolean radioOn = isFmOn();
boolean recording = isRecording();
boolean RtPlusSupported = isRtPlusSupported();
- boolean mSpeakerPhoneOn = isSpeakerEnabled();
boolean searchActive = isScanActive() || isSeekActive();
item = menu.findItem(MENU_SCAN_START);
@@ -853,7 +885,7 @@
}
private void enableSpeaker() {
- //This method with toggle Speaker phone based on existing state .
+ //This method with toggle Speaker phone based on existing state .
boolean bSpeakerPhoneOn = isSpeakerEnabled();
if(mService != null) {
try {
@@ -1210,7 +1242,7 @@
if (bSearchActive) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(titleStr);
- builder.setIcon(R.drawable.ic_launcher_fmradio);
+ builder.setIcon(R.mipmap.ic_launcher);
View view = getLayoutInflater().inflate(R.layout.layout_dialog_progress,null);
builder.setView(view);
TextView tvMessage = (TextView)view.findViewById(R.id.id_tv_message);
@@ -1296,7 +1328,7 @@
R.layout.alert_dialog_text_entry, null);
dlgBuilder.setTitle(R.string.dialog_presetlist_rename_title);
dlgBuilder.setView(textEntryView);
- dlgBuilder.setPositiveButton(R.string.alert_dialog_ok,
+ dlgBuilder.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
//int curList = FmSharedPreferences.getCurrentListIndex();
@@ -1315,7 +1347,7 @@
closeDialog(DIALOG_PRESET_RENAME);
}
});
- dlgBuilder.setNegativeButton(R.string.alert_dialog_cancel,
+ dlgBuilder.setNegativeButton(android.R.string.cancel,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
closeDialog(DIALOG_PRESET_RENAME);
@@ -1329,7 +1361,7 @@
dlgBuilder.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.fm_command_timeout_title);
dlgBuilder.setMessage(R.string.fm_tune_timeout_msg);
- dlgBuilder.setPositiveButton(R.string.alert_dialog_ok,
+ dlgBuilder.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
@@ -1348,7 +1380,7 @@
.setTitle(R.string.fm_command_failed_title);
dlgBuilder.setMessage(R.string.fm_cmd_failed_msg);
- dlgBuilder.setPositiveButton(R.string.alert_dialog_ok,
+ dlgBuilder.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
@@ -1366,7 +1398,7 @@
.setTitle(R.string.fm_command_failed_title);
dlgBuilder.setMessage(R.string.fm_cmd_failed_call_on);
- dlgBuilder.setPositiveButton(R.string.alert_dialog_ok,
+ dlgBuilder.setPositiveButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
@@ -1402,35 +1434,15 @@
private View.OnClickListener mForwardClickListener =
new View.OnClickListener() {
public void onClick(View v) {
- int frequency = FmSharedPreferences.getNextTuneFrequency();
- Log.d(LOGTAG, "Tune Up: to " + frequency);
- tuneRadio(frequency);
+ SeekNextStation();
}
};
private View.OnClickListener mBackClickListener =
new View.OnClickListener() {
public void onClick(View v) {
- int frequency = FmSharedPreferences.getPrevTuneFrequency();
- Log.d(LOGTAG, "Tune Down: to " + frequency);
- tuneRadio(frequency);
- }
- };
-
- private View.OnLongClickListener mForwardLongClickListener =
- new View.OnLongClickListener() {
- public boolean onLongClick(View view) {
- SeekNextStation();
- return true;
- }
- };
-
- private View.OnLongClickListener mBackLongClickListener =
- new View.OnLongClickListener() {
- public boolean onLongClick(View view) {
SeekPreviousStation();
- return true;
- }
+ }
};
private View.OnClickListener mPresetsPageClickListener =
@@ -1465,7 +1477,7 @@
displayDialog(DIALOG_PRESET_OPTIONS);
}else {
addToPresets();
- view.startAnimation(mAnimation);
+ //view.startAnimation(mAnimation);
}
return true;
}
@@ -1484,7 +1496,6 @@
new View.OnClickListener() {
@Override
public void onClick(View v) {
- // TODO Auto-generated method stub
mSpeakerButton.setClickable(false);
mSpeakerButton.setOnClickListener(null);
mHandler.removeCallbacks(mEnableRadioTask);
@@ -1627,7 +1638,6 @@
bStatus = mService.fmOn();
if(bStatus) {
tuneRadio(FmSharedPreferences.getTunedFrequency());
- enableRadioOnOffUI();
}else {
Log.e(LOGTAG, "mService.fmOn failed");
mCommandFailed = CMD_FMON;
@@ -1785,8 +1795,7 @@
private void setRecordingStartImage() {
if(null != mRecordingMsgTV) {
- mRecordingMsgTV.setCompoundDrawablesWithIntrinsicBounds
- (R.drawable.recorder_start, 0, 0, 0);
+ mRecordingMsgTV.setCompoundDrawables(null, null, null, null);
}
}
@@ -1875,6 +1884,7 @@
FmSharedPreferences.addStation(selectedStation.getName(), selectedStation
.getFrequency(), currentList);
setupPresetLayout();
+ mPrefs.Save();
}
}
@@ -1893,6 +1903,7 @@
setMuteModeButtonImage(false);
}
if (bEnable) {
+ mFmSeeker.setVisibility(View.VISIBLE);
if (mRadioTextScroller != null) {
mRadioTextScroller.startScroll();
}
@@ -1917,6 +1928,7 @@
}
}
}else {
+ mFmSeeker.setVisibility(View.INVISIBLE);
if (mRadioTextScroller != null) {
mRadioTextScroller.stopScroll();
}
@@ -1925,7 +1937,7 @@
}
for (int nButton = 0; nButton < MAX_PRESETS_PER_PAGE; nButton++) {
if (mPresetButtons[nButton] != null) {
- mPresetButtons[nButton].setTextColor(Color.BLACK);
+ mPresetButtons[nButton].setTextColor(Color.WHITE);
}
}
}
@@ -1955,23 +1967,19 @@
}
if (mSleepMsgTV != null) {
mSleepMsgTV.setVisibility(((bEnable && isSleepTimerActive()) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (mRecordingMsgTV != null) {
mRecordingMsgTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
- }
- if (mRadioTextTV != null) {
- mRadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if(mERadioTextTV != null) {
mERadioTextTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (mProgramServiceTV != null) {
mProgramServiceTV.setVisibility(((bEnable == true) ? View.VISIBLE
- : View.INVISIBLE));
+ : View.GONE));
}
if (!isAntennaAvailable()) {
@@ -1985,11 +1993,12 @@
}
}else if (isCallActive()) {
if (mRadioTextTV != null) {
- mRadioTextTV.setText("");
- mRadioTextScroller.mOriginalString = "";
+ mRadioTextTV.setText(getString(R.string.fm_call));
+ mRadioTextScroller.mOriginalString = getString(R.string.fm_call);
}
if (mERadioTextTV != null) {
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextScroller.mOriginalString = "";
}
if (mOnOffButton != null) {
@@ -1997,11 +2006,16 @@
}
}else {
if (mRadioTextTV != null) {
- mRadioTextTV.setText("");
+ if (bEnable) {
+ mRadioTextTV.setText("");
+ } else {
+ mRadioTextTV.setText(getString(R.string.fm_off));
+ }
mRadioTextScroller.mOriginalString = "";
}
if (mERadioTextTV != null) {
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextScroller.mOriginalString = "";
}
if (mOnOffButton != null) {
@@ -2009,7 +2023,7 @@
}
}
- if (mStereoTV != null) {
+ if (false && mStereoTV != null) {
mStereoTV.setVisibility(((bEnable == true) ? View.VISIBLE
: View.INVISIBLE));
}
@@ -2064,6 +2078,29 @@
}
}
+ private void saveStations() {
+ List<Integer> scannedFrequencies = null;
+ try {
+ scannedFrequencies = mService.getScannedFrequencies();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ if (scannedFrequencies != null && scannedFrequencies.size() > 0) {
+ Collections.sort(scannedFrequencies);
+ SharedPreferences sp = getSharedPreferences(SCAN_STATION_PREFS_NAME, 0);
+ SharedPreferences.Editor editor = sp.edit();
+
+ int index = 0;
+ for (Integer freq : scannedFrequencies) {
+ index++;
+ editor.putString(STATION_NAME + index, index + "");
+ editor.putInt(STATION_FREQUENCY + index, freq);
+ }
+ editor.putInt(NUM_OF_STATIONS, index);
+ editor.commit();
+ }
+ }
+
private void setupPresetLayout() {
int numStations = FmSharedPreferences.getListStationCount();
int addedStations = 0;
@@ -2104,7 +2141,7 @@
private void updateStationInfoToUI() {
double frequency = mTunedStation.getFrequency() / 1000.0;
- mTuneStationFrequencyTV.setText("" + frequency + "MHz");
+ mTuneStationFrequencyTV.setText("" + frequency);
if ((mPicker != null) && mUpdatePickerValue) {
mPicker.setValue(((mTunedStation.getFrequency() - mPrefs.getLowerLimit())
/ mPrefs.getFrequencyStepSize()));
@@ -2113,6 +2150,7 @@
mProgramTypeTV.setText(mTunedStation.getPtyString());
mRadioTextTV.setText("");
mERadioTextTV.setText("");
+ mERadioTextTV.setVisibility(View.GONE);
mRadioTextScroller.mOriginalString = "";
mRadioTextScroller.mStringlength = 0;
mRadioTextScroller.mIteration = 0;
@@ -2401,7 +2439,7 @@
}
}
if(null != mSleepMsgTV) {
- mSleepMsgTV.setVisibility(View.INVISIBLE);
+ mSleepMsgTV.setVisibility(View.GONE);
}
}
@@ -2433,7 +2471,7 @@
}
private void updateExpiredSleepTime() {
- int vis = View.INVISIBLE;
+ int vis = View.GONE;
if (isSleepTimerActive()) {
long timeNow = ((SystemClock.elapsedRealtime()));
if (mSleepAtPhoneTime >= timeNow) {
@@ -2442,8 +2480,8 @@
mSleepMsgTV.setText(sleepMsg);
if (seconds < SLEEP_TOGGLE_SECONDS) {
int nowVis = mSleepMsgTV.getVisibility();
- vis = (nowVis == View.INVISIBLE) ? View.VISIBLE
- : View.INVISIBLE;
+ vis = (nowVis == View.GONE) ? View.VISIBLE
+ : View.GONE;
}else {
vis = View.VISIBLE;
}
@@ -2559,6 +2597,7 @@
mTunedStation.setPI(0);
mTunedStation.setPty(0);
updateStationInfoToUI();
+ enableRadioOnOffUI();
}catch (RemoteException e) {
e.printStackTrace();
}
@@ -2607,7 +2646,7 @@
mTunedStation.setPI(0);
mTunedStation.setRDSSupported(false);
mTunedStation.setPty(0);
- mRadioTextTV.setText("");
+ mRadioTextTV.setText(getString(R.string.fm_off));
mERadioTextTV.setText("");
mRadioTextScroller.mOriginalString = "";
mProgramServiceTV.setText("");
@@ -2616,6 +2655,7 @@
mERadioTextScroller.stopScroll();
mUpdatePickerValue = true;
updateStationInfoToUI();
+ enableRadioOnOffUI();
}
Runnable mRadioEnabled = new Runnable() {
@@ -2669,6 +2709,12 @@
updateSearchProgress();
resetFMStationInfoUI();
invalidateOptionsMenu();
+ saveStations();
+ if (mShowStationList) {
+ Intent stationListIntent = new Intent(FMRadio.this, StationListActivity.class);
+ startActivity(stationListIntent);
+ }
+ mShowStationList = false;
}
};
@@ -2712,7 +2758,7 @@
mRadioTextScroller.mOriginalString = str;
}else if(TextUtils.isEmpty(str)) { /* Rest the string to empty*/
mRadioTextTV.setText("");
- mRadioTextScroller.mOriginalString = "";
+ mRadioTextScroller.mOriginalString = getString(R.string.fm_off);
}else {
Log.v(LOGTAG, "mUpdateRadioText: Leaving old string " + mRadioTextTV.getText());
}
@@ -2756,6 +2802,7 @@
mERadioTextTV.setText("");
mERadioTextScroller.mOriginalString = "";
}else {
+ mERadioTextTV.setVisibility(View.GONE);
mERadioTextTV.setText(str);
mERadioTextScroller.mOriginalString = str;
}
@@ -3076,15 +3123,6 @@
Log.d(LOGTAG, "mServiceCallbacks.onTuneStatusChanged: ");
if (mIsScaning) {
Log.d(LOGTAG, "isScanning....................");
- SharedPreferences sp = getSharedPreferences(SCAN_STATION_PREFS_NAME, 0);
- SharedPreferences.Editor editor = sp.edit();
- int station_number = sp.getInt(NUM_OF_STATIONS, 0);
- station_number++;
- editor.putInt(NUM_OF_STATIONS, station_number);
- editor.putString(STATION_NAME + station_number, station_number + "");
- editor.putInt(STATION_FREQUENCY + station_number,
- FmSharedPreferences.getTunedFrequency());
- editor.commit();
}
cleanupTimeoutHandler();
mHandler.post(mUpdateStationInfo);
@@ -3113,6 +3151,26 @@
}
public void onSearchComplete() {
Log.d(LOGTAG, "mServiceCallbacks.onSearchComplete :");
+ if (mIsScaning) {
+ List<Integer> scannedFrequencies = null;
+ try {
+ scannedFrequencies = mService.getScannedFrequencies();
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ if (scannedFrequencies != null && !scannedFrequencies.isEmpty()) {
+ mShowStationList = true;
+ } else {
+ mHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ Toast t = Toast.makeText(FMRadio.this,
+ getString(R.string.fm_search_no_results), Toast.LENGTH_SHORT);
+ t.show();
+ }
+ });
+ }
+ }
mScanPty = 0;
mScanPtyIndex = 0;
mIsScaning = false;
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 861e4aa..0f6f12c 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -143,6 +143,7 @@
private int mServiceStartId = -1;
private boolean mServiceInUse = false;
private static boolean mMuted = false;
+ private static int mFreq = 0;
private static boolean mResumeAfterCall = false;
private static int mAudioDevice = AudioDeviceInfo.TYPE_WIRED_HEADPHONES;
MediaRecorder mRecorder = null;
@@ -163,6 +164,7 @@
private FMDeathRecipient mFMdr;
//PhoneStateListener instances corresponding to each
+ private ArrayList<Integer> mScannedFrequencies = new ArrayList<Integer>();
private FmRxRdsData mFMRxRDSData=null;
// interval after which we stop the service when idle
@@ -213,10 +215,13 @@
private boolean mIsSSRInProgressFromActivity = false;
private int mKeyActionDownCount = 0;
+ private Thread mRecordSinkThread = null;
private AudioTrack mAudioTrack = null;
+ private boolean mIsRecordSink = false;
private static final int AUDIO_FRAMES_COUNT_TO_IGNORE = 3;
private Object mEventWaitLock = new Object();
private boolean mIsFMDeviceLoopbackActive = false;
+ private Object mRecordSinkLock = new Object();
private File mStoragePath = null;
private static final int FM_OFF_FROM_APPLICATION = 1;
private static final int FM_OFF_FROM_ANTENNA = 2;
@@ -234,6 +239,17 @@
private boolean isfmOffFromApplication = false;
private AudioFocusRequest mGainFocusReq;
+ private AudioRoutingListener mRoutingListener = null;
+ private int mCurrentDevice = AudioDeviceInfo.TYPE_UNKNOWN; // current output device
+ private boolean mUseAudioSession = false;
+
+ private static final int AUDIO_SAMPLE_RATE = 44100;
+ private static final int AUDIO_CHANNEL_CONFIG = AudioFormat.CHANNEL_CONFIGURATION_STEREO;
+ private static final int AUDIO_ENCODING_FORMAT = AudioFormat.ENCODING_PCM_16BIT;
+ private static final int FM_RECORD_BUF_SIZE = AudioRecord.getMinBufferSize(AUDIO_SAMPLE_RATE,
+ AUDIO_CHANNEL_CONFIG, AUDIO_ENCODING_FORMAT);
+ private AudioRecord mAudioRecord = null;
+
public FMRadioService() {
}
@@ -279,6 +295,10 @@
mA2dpDeviceSupportInHal = valueStr.contains("=true");
Log.d(LOGTAG, " is A2DP device Supported In HAL"+mA2dpDeviceSupportInHal);
+ mUseAudioSession = SystemProperties.getBoolean("ro.vendor.fm.use_audio_session", false);
+ if (mUseAudioSession) {
+ mRoutingListener = new AudioRoutingListener();
+ }
mGainFocusReq = requestAudioFocus();
AudioManager mAudioManager =
(AudioManager) getSystemService(Context.AUDIO_SERVICE);
@@ -370,6 +390,161 @@
super.onDestroy();
}
+ private synchronized void CreateRecordSessions() {
+
+ if (mAudioRecord != null) {
+ mAudioRecord.stop();
+ }
+ if (mAudioTrack != null) {
+ mAudioTrack.stop();
+ }
+ mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.RADIO_TUNER,
+ AUDIO_SAMPLE_RATE, AUDIO_CHANNEL_CONFIG,
+ AUDIO_ENCODING_FORMAT, FM_RECORD_BUF_SIZE);
+
+ mAudioTrack = new AudioTrack.Builder()
+ .setAudioFormat(new AudioFormat.Builder()
+ .setEncoding(AUDIO_ENCODING_FORMAT)
+ .setSampleRate(AUDIO_SAMPLE_RATE)
+ .setChannelIndexMask(AUDIO_CHANNEL_CONFIG)
+ .build())
+ .setBufferSizeInBytes(FM_RECORD_BUF_SIZE)
+ .build();
+ Log.d(LOGTAG," adding RoutingChangedListener() ");
+ mAudioTrack.addOnRoutingChangedListener(mRoutingListener, null);
+
+ if (mMuted) {
+ mAudioTrack.setVolume(0.0f);
+ }
+ }
+
+ private synchronized void startRecordSink() {
+ Log.d(LOGTAG, "startRecordSink "
+ + AudioSystem.getForceUse(AudioSystem.FOR_MEDIA));
+
+ mIsRecordSink = true;
+ createRecordSinkThread();
+
+ }
+
+ private synchronized void createRecordSinkThread() {
+ if (mRecordSinkThread == null) {
+ mRecordSinkThread = new RecordSinkThread();
+ mRecordSinkThread.start();
+ Log.d(LOGTAG, "mRecordSinkThread started");
+ try {
+ synchronized (mRecordSinkLock) {
+ Log.d(LOGTAG, "waiting for play to complete");
+ mRecordSinkLock.wait();
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+ }
+ }
+
+ private synchronized void exitRecordSinkThread() {
+ if (isRecordSinking()) {
+ Log.d(LOGTAG, "stopRecordSink");
+ mAudioTrack.setPreferredDevice(null);
+ mIsRecordSink = false;
+ } else {
+ Log.d(LOGTAG, "exitRecordSinkThread called mRecordSinkThread not running");
+ return;
+ }
+ try {
+ Log.d(LOGTAG, "stopRecordSink waiting to join mRecordSinkThread");
+ mRecordSinkThread.join();
+ } catch (InterruptedException e) {
+ Log.d(LOGTAG, "Exception while mRecordSinkThread join");
+ }
+ mRecordSinkThread = null;
+ mAudioTrack = null;
+ mAudioRecord = null;
+ Log.d(LOGTAG, "exitRecordSinkThread completed");
+ }
+
+ private boolean isRecordSinking() {
+ return mIsRecordSink;
+ }
+
+ class RecordSinkThread extends Thread {
+ private int mCurrentFrame = 0;
+ private boolean isAudioFrameNeedIgnore() {
+ return mCurrentFrame < AUDIO_FRAMES_COUNT_TO_IGNORE;
+ }
+
+ @Override
+ public void run() {
+ try {
+ Log.d(LOGTAG, "RecordSinkThread: run started ");
+ byte[] buffer = new byte[FM_RECORD_BUF_SIZE];
+ while (isRecordSinking()) {
+ // Speaker mode or BT a2dp mode will come here and keep reading and writing.
+ // If we want FM sound output from speaker or BT a2dp, we must record data
+ // to AudioRecrd and write data to AudioTrack.
+ if (mAudioRecord.getRecordingState() == AudioRecord.RECORDSTATE_STOPPED) {
+ mAudioRecord.startRecording();
+ Log.d(LOGTAG, "RecordSinkThread: mAudioRecord.startRecording started");
+ }
+
+ if (mAudioTrack.getPlayState() == AudioTrack.PLAYSTATE_STOPPED) {
+ Log.d(LOGTAG, "RecordSinkThread: mAudioTrack.play executed");
+ mAudioTrack.play();
+ Log.d(LOGTAG, "RecordSinkThread: mAudioTrack.play completed");
+ synchronized (mRecordSinkLock) {
+ mRecordSinkLock.notify();
+ }
+ }
+ int size = mAudioRecord.read(buffer, 0, FM_RECORD_BUF_SIZE);
+ // check whether need to ignore first 3 frames audio data from AudioRecord
+ // to avoid pop noise.
+ if (isAudioFrameNeedIgnore()) {
+ mCurrentFrame += 1;
+ continue ;
+ }
+ if (size <= 0) {
+ Log.e(LOGTAG, "RecordSinkThread read data from AudioRecord "
+ + "error size: " + size);
+ continue;
+ }
+ byte[] tmpBuf = new byte[size];
+ System.arraycopy(buffer, 0, tmpBuf, 0, size);
+ // Check again to avoid noises, because RecordSink may be changed
+ // while AudioRecord is reading.
+ if (isRecordSinking()) {
+ mAudioTrack.write(tmpBuf, 0, tmpBuf.length);
+ } else {
+ mCurrentFrame = 0;
+ Log.d(LOGTAG, "RecordSinkThread: stopRecordSink called, "+
+ "stopping mAudioTrack and mAudioRecord ");
+ break;
+ }
+ }
+ } catch (Exception e) {
+ Log.d(LOGTAG, "RecordSinkThread.run, thread is interrupted, need exit thread");
+ } finally {
+ Log.d(LOGTAG, "RecordSinkThread: stopRecordSink called, " +
+ "stopping mAudioTrack and mAudioRecord ");
+ if (mAudioRecord.getRecordingState() == AudioRecord.RECORDSTATE_RECORDING) {
+ Log.d(LOGTAG, "RecordSinkThread: mAudioRecord.stop()");
+ mAudioRecord.stop();
+ Log.d(LOGTAG, "RecordSinkThread: mAudioRecord.stop() completed");
+ mAudioRecord.release();
+ Log.d(LOGTAG, "RecordSinkThread: mAudioRecord.release() completed");
+ }
+ if (mAudioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING) {
+ Log.d(LOGTAG, "RecordSinkThread: mAudioTrack.stop();");
+ mAudioTrack.stop();
+ Log.d(LOGTAG, "RecordSinkThread:mAudioTrack.stop() completed");
+ mAudioTrack.release();
+ Log.d(LOGTAG, "RecordSinkThread: mAudioTrack.release() completed");
+ }
+ }
+ }
+ }
+
private void setFMVolume(int mCurrentVolumeIndex) {
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
float decibels = audioManager.getStreamVolumeDb(AudioManager.STREAM_MUSIC,
@@ -430,6 +605,119 @@
return true;
}
+ private boolean configureFMDeviceLoopback_O(boolean enable) {
+ boolean success = true;
+ int status = AudioSystem.SUCCESS;
+
+ Log.d(LOGTAG, "configureFMDeviceLoopback enable:" + enable +
+ " DeviceLoopbackActive:" + mIsFMDeviceLoopbackActive);
+ if (enable && mIsFMDeviceLoopbackActive == false) {
+ status = AudioSystem.getDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,"");
+ Log.d(LOGTAG," FM hardwareLoopback Status = " + status);
+ if (status == AudioSystem.DEVICE_STATE_AVAILABLE) {
+ // This case usually happens, when FM is force killed through settings app
+ // and we don't get chance to disable Hardware LoopBack.
+ Log.d(LOGTAG," FM HardwareLoopBack Active, disable it first");
+ status = AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE, "", "",
+ AudioSystem.AUDIO_FORMAT_DEFAULT);
+ mCurrentDevice = AudioDeviceInfo.TYPE_WIRED_HEADSET;
+ }
+ status = AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_AVAILABLE, "", "",
+ AudioSystem.AUDIO_FORMAT_DEFAULT);
+ if (status != AudioSystem.SUCCESS) {
+ success = false;
+ Log.e(LOGTAG, "configureFMDeviceLoopback failed! status:" + status);
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE, "", "",
+ AudioSystem.AUDIO_FORMAT_DEFAULT);
+ mCurrentDevice = AudioDeviceInfo.TYPE_UNKNOWN;
+ } else {
+ mIsFMDeviceLoopbackActive = true;
+ }
+ } else if (!enable && mIsFMDeviceLoopbackActive == true) {
+ AudioSystem.setDeviceConnectionState(AudioSystem.DEVICE_OUT_FM,
+ AudioSystem.DEVICE_STATE_UNAVAILABLE, "", "",
+ AudioSystem.AUDIO_FORMAT_DEFAULT);
+ mIsFMDeviceLoopbackActive = false;
+ mCurrentDevice = AudioDeviceInfo.TYPE_UNKNOWN;
+ }
+
+ return success;
+ }
+
+ private boolean startApplicationLoopBack(int deviceType) {
+
+ // stop existing playback path before starting new one
+ Log.d(LOGTAG,"startApplicationLoopBack for device "+deviceType);
+
+ AudioDeviceInfo outputDevice = null;
+ AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS);
+ for (int index = 0; index < deviceList.length; index++) {
+ Log.d(LOGTAG,"startApplicationLoopBack dev_type " + deviceList[index].getType());
+ if (AudioDeviceInfo.TYPE_WIRED_HEADSET == deviceType ||
+ AudioDeviceInfo.TYPE_WIRED_HEADPHONES == deviceType) {
+ if (deviceList[index].getType() == AudioDeviceInfo.TYPE_WIRED_HEADSET ||
+ deviceList[index].getType() == AudioDeviceInfo.TYPE_WIRED_HEADPHONES) {
+ outputDevice = deviceList[index];
+ Log.d(LOGTAG,"startApplicationLoopBack found_dev "
+ + deviceList[index].getType());
+ break;
+ }
+ } else if (deviceList[index].getType() == deviceType) {
+ outputDevice = deviceList[index];
+ Log.d(LOGTAG,"startApplicationLoopBack found_dev "+ deviceList[index].getType());
+ break;
+ }
+ }
+ if (outputDevice == null) {
+ Log.d(LOGTAG,"no output device" + deviceType + " found");
+ return false;
+ }
+ if (mIsFMDeviceLoopbackActive) {
+ enableSlimbus(DISABLE_SLIMBUS_DATA_PORT);
+ configureFMDeviceLoopback_O(false);
+ }
+ if (!isRecordSinking()) {
+ CreateRecordSessions();
+ Log.d(LOGTAG,"creating AudioTrack session");
+ }
+ mCurrentDevice = outputDevice.getType();
+ mAudioTrack.setPreferredDevice(outputDevice);
+ Log.d(LOGTAG,"PreferredDevice is set to "+ outputDevice.getType());
+ if (!isRecordSinking()) {
+ startRecordSink();
+ }
+ return true;
+ }
+
+ private synchronized void configureAudioDataPath(boolean enable) {
+ Log.d(LOGTAG, "configureAudioDataPath:" + enable +
+ " mA2dpConnected:" + mA2dpConnected +
+ " isRecordSinking" + isRecordSinking() +
+ " mSpeakerPhoneOn:" + mSpeakerPhoneOn +
+ " mIsFMDeviceLoopbackActive:" + mIsFMDeviceLoopbackActive);
+
+ if (enable) {
+ Log.d(LOGTAG,"Start Hardware loop back for audio");
+ if (mStoppedOnFocusLoss == true) {
+ Log.d(LOGTAG, "FM does not have audio focus, not enabling audio path");
+ return;
+ }
+ if (!mIsFMDeviceLoopbackActive && !mA2dpConnected && !mSpeakerPhoneOn) {
+ // not on BT and device loop is also not active
+ enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+ exitRecordSinkThread();
+ configureFMDeviceLoopback_O(true);
+ }
+ } else {
+ //inform audio to disbale fm audio
+ configureFMDeviceLoopback_O(false);
+ exitRecordSinkThread();
+ }
+ }
+
private void setCurrentFMVolume() {
if(isFmOn()) {
AudioManager maudioManager =
@@ -1074,6 +1362,9 @@
if (mStoppedOnFactoryReset) {
mStoppedOnFactoryReset = false;
mSpeakerPhoneOn = false;
+ if (mUseAudioSession) {
+ configureAudioDataPath(true);
+ }
// In FM stop, the audio route is set to default audio device
}
String temp = mSpeakerPhoneOn ? "Speaker" : "WiredHeadset";
@@ -1083,7 +1374,11 @@
} else {
mAudioDevice = AudioDeviceInfo.TYPE_WIRED_HEADPHONES;
}
- configureFMDeviceLoopback(true);
+ if (mUseAudioSession) {
+ startApplicationLoopBack(mAudioDevice);
+ } else {
+ configureFMDeviceLoopback(true);
+ }
try {
if ((mServiceInUse) && (mCallbacks != null))
mCallbacks.onFmAudioPathStarted();
@@ -1094,7 +1389,11 @@
private void stopFM() {
Log.d(LOGTAG, "In stopFM");
- configureFMDeviceLoopback(false);
+ if (mUseAudioSession) {
+ configureAudioDataPath(false);
+ } else {
+ configureFMDeviceLoopback(false);
+ }
mPlaybackInProgress = false;
try {
if ((mServiceInUse) && (mCallbacks != null))
@@ -1107,7 +1406,11 @@
private void resetFM(){
Log.d(LOGTAG, "resetFM");
mPlaybackInProgress = false;
- configureFMDeviceLoopback(false);
+ if (mUseAudioSession) {
+ configureAudioDataPath(false);
+ } else {
+ configureFMDeviceLoopback(false);
+ }
}
private boolean getRecordServiceStatus() {
@@ -1204,11 +1507,11 @@
try {
if (getResources().getBoolean(R.bool.def_save_name_format_enabled)) {
String suffix = getResources().getString(R.string.def_save_name_suffix);
- suffix = "".equals(suffix) ? ".3gpp" : suffix;
+ suffix = "".equals(suffix) ? ".aac" : suffix;
String prefix = getResources().getString(R.string.def_save_name_prefix) + '-';
mSampleFile = createTempFile(prefix, suffix, sampleDir);
} else {
- mSampleFile = File.createTempFile("FMRecording", ".3gpp", sampleDir);
+ mSampleFile = File.createTempFile("FMRecording", ".aac", sampleDir);
}
} catch (IOException e) {
Log.e(LOGTAG, "Not able to access SD Card");
@@ -1462,6 +1765,8 @@
} catch (RemoteException e) {
e.printStackTrace();
}
+ } else if (mFreq > 0) {
+ tune(mFreq);
}
}
}
@@ -1537,6 +1842,20 @@
}
};
+ private class AudioRoutingListener implements AudioRouting.OnRoutingChangedListener {
+ public void onRoutingChanged(AudioRouting audioRouting) {
+ Log.d(LOGTAG," onRoutingChanged + currdevice " + mCurrentDevice);
+ AudioDeviceInfo routedDevice = audioRouting.getRoutedDevice();
+ // if routing is nowhere, we get routedDevice as null
+ if (routedDevice != null) {
+ Log.d(LOGTAG," Audio Routed to device id " + routedDevice.getType());
+ if (routedDevice.getType() != mCurrentDevice) {
+ startApplicationLoopBack(mCurrentDevice);
+ }
+ }
+ }
+ }
+
private Handler mDelayedStopHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
@@ -1692,15 +2011,6 @@
Log.d(LOGTAG,"startNotification");
synchronized (mNotificationLock) {
- RemoteViews views = new RemoteViews(getPackageName(), R.layout.statusbar);
- views.setImageViewResource(R.id.icon, R.drawable.stat_notify_fm);
- if (isFmOn())
- {
- views.setTextViewText(R.id.frequency, getTunedFrequencyString());
- } else {
- views.setTextViewText(R.id.frequency, "");
- }
-
Context context = getApplicationContext();
Notification notification;
NotificationManager notificationManager =
@@ -1713,8 +2023,9 @@
notificationManager.createNotificationChannel(notificationChannel);
notification = new Notification.Builder(context, FMRADIO_NOTIFICATION_CHANNEL)
- .setCustomContentView(views)
.setSmallIcon(R.drawable.stat_notify_fm)
+ .setContentTitle(isFmOn() ? getString(R.string.app_name) : "")
+ .setContentText(isFmOn() ? getTunedFrequencyString() : "")
.setContentIntent(PendingIntent.getActivity(this,
0, new Intent("com.caf.fmradio.FMRADIO_ACTIVITY"), 0))
.setOngoing(true)
@@ -2108,6 +2419,16 @@
return(mService.get().isA2DPConnected());
}
+ public boolean isSearchInProgress()
+ {
+ return(mService.get().isSearchInProgress());
+ }
+
+ public List<Integer> getScannedFrequencies()
+ {
+ return(mService.get().getScannedFrequencies());
+ }
+
public int getExtenCountryCode()
{
return(mService.get().getExtenCountryCode());
@@ -2236,13 +2557,12 @@
bStatus = enableAutoAF(FmSharedPreferences.getAutoAFSwitch());
Log.d(LOGTAG, "enableAutoAF done, Status :" + bStatus);
- /* There is no internal Antenna*/
- bStatus = mReceiver.setInternalAntenna(false);
- Log.d(LOGTAG, "setInternalAntenna done, Status :" + bStatus);
-
/* Read back to verify the internal Antenna mode*/
readInternalAntennaAvailable();
+ bStatus = mReceiver.setInternalAntenna(mInternalAntennaAvailable);
+ Log.d(LOGTAG, "setInternalAntenna done, Status :" + bStatus);
+
startNotification();
bStatus = true;
} else {
@@ -2444,6 +2764,15 @@
return(bStatus);
}
+ public List<Integer> getScannedFrequencies() {
+ return mScannedFrequencies;
+ }
+
+ public boolean isSearchInProgress() {
+ int state = mReceiver.getFMState();
+ return state == qcom.fmradio.FmTransceiver.FMState_Srch_InProg;
+ }
+
public boolean isSSRInProgress() {
return mIsSSRInProgress;
}
@@ -2495,11 +2824,15 @@
mAudioDevice = AudioDeviceInfo.TYPE_BUILTIN_SPEAKER;
outputDevice = "Speaker";
}
- mAudioDeviceType = mAudioDevice | AudioSystem.DEVICE_OUT_FM;
- AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
- String keyValPairs = new String("fm_routing="+mAudioDeviceType);
- Log.d(LOGTAG, "keyValPairs = "+keyValPairs);
- audioManager.setParameters(keyValPairs);
+ if (mUseAudioSession) {
+ startApplicationLoopBack(mAudioDevice);
+ } else {
+ mAudioDeviceType = mAudioDevice | AudioSystem.DEVICE_OUT_FM;
+ AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
+ String keyValPairs = new String("fm_routing=" + mAudioDeviceType);
+ Log.d(LOGTAG, "keyValPairs = " + keyValPairs);
+ audioManager.setParameters(keyValPairs);
+ }
enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
}
/*
@@ -2619,6 +2952,7 @@
{
mReceiver.setStation(frequency);
bCommandSent = true;
+ mFreq = frequency;
}
return bCommandSent;
}
@@ -2674,6 +3008,8 @@
*/
public boolean scan(int pty)
{
+ // Clear previously scanned frequencies
+ mScannedFrequencies.clear();
boolean bCommandSent=false;
if (mReceiver != null)
{
@@ -3188,6 +3524,9 @@
if(mReceiver != null) {
clearStationInfo();
}
+ if (isSearchInProgress()) {
+ mScannedFrequencies.add(frequency);
+ }
if(mCallbacks != null)
{
mCallbacks.onTuneStatusChanged();
diff --git a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
index 70a7d1c..a664f51 100644
--- a/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
+++ b/fmapp2/src/com/caf/fmradio/FmSharedPreferences.java
@@ -37,6 +37,7 @@
import android.content.Context;
import android.content.SharedPreferences;
+import android.telephony.TelephonyManager;
import qcom.fmradio.FmReceiver;
import qcom.fmradio.FmConfig;
import android.os.SystemProperties;
@@ -81,6 +82,8 @@
public static final int REGIONAL_BAND_UNITEDKINGDOM = 34;
public static final int REGIONAL_BAND_UNITED_STATES = 35;
public static final int REGIONAL_BAND_USER_DEFINED = 36;
+ public static final int REGIONAL_BAND_INDONESIA = 37;
+ // If you add to this list, add to getBand() below as well.
public static final int RECORD_DUR_INDEX_0_VAL = 5;
public static final int RECORD_DUR_INDEX_1_VAL = 15;
@@ -168,7 +171,8 @@
private static boolean mAFAutoSwitch = true;
private static int mRecordDuration = 0;
private static int mLastAudioMode = -1;
- private static boolean mSpecialCarrierFlag = false;
+
+ public static int mDefaultCountryIndex = REGIONAL_BAND_NORTH_AMERICA;
FmSharedPreferences(Context context){
mContext = context.getApplicationContext();
@@ -449,8 +453,6 @@
{
return;
}
- mSpecialCarrierFlag = mContext.getResources().getBoolean(
- R.bool.def_fm_special_carrier_enabled);
SharedPreferences sp = mContext.getSharedPreferences(SHARED_PREFS, Context.MODE_PRIVATE);
mTunedFrequency = sp.getInt(PREF_LAST_TUNED_FREQUENCY, DEFAULT_NO_FREQUENCY);
mRecordDuration = sp.getInt(LAST_RECORD_DURATION, RECORD_DUR_INDEX_0_VAL);
@@ -507,7 +509,9 @@
.getBoolean(R.bool.def_fm_country_location_enabled)) {
setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_INDIA));
} else {
- setCountry(sp.getInt(FMCONFIG_COUNTRY, REGIONAL_BAND_NORTH_AMERICA));
+ mDefaultCountryIndex =
+ getBand(mContext.getResources().getInteger(R.integer.default_country_index));
+ setCountry(sp.getInt(FMCONFIG_COUNTRY, mDefaultCountryIndex));
}
/* Last list the user was navigating */
mListIndex = sp.getInt(LAST_LIST_INDEX, 0);
@@ -581,7 +585,7 @@
setCountry(REGIONAL_BAND_CHINA);
//Others set north America.
} else {
- setCountry(REGIONAL_BAND_NORTH_AMERICA);
+ setCountry(mDefaultCountryIndex);
}
}
@@ -937,15 +941,9 @@
}
case REGIONAL_BAND_INDIA:
{
- if (mSpecialCarrierFlag) {
- /*87500 TO 108000 IN 100 KHZ STEPS*/
- mFMConfiguration.setLowerLimit(87500);
- mFMConfiguration.setUpperLimit(108000);
- } else {
- /*91000 TO 106400 IN 100 KHZ STEPS*/
- mFMConfiguration.setLowerLimit(91000);
- mFMConfiguration.setUpperLimit(106400);
- }
+ /*87500 TO 108000 IN 100 KHZ STEPS*/
+ mFMConfiguration.setLowerLimit(87500);
+ mFMConfiguration.setUpperLimit(108000);
mFrequencyBand_Stepsize = 100;
break;
}
@@ -1090,6 +1088,14 @@
mFrequencyBand_Stepsize = 200;
break;
}
+ case REGIONAL_BAND_INDONESIA:
+ {
+ /*INDONESIA : 87500 TO 108000 IN 100 KHZ STEPS*/
+ mFMConfiguration.setLowerLimit(87500);
+ mFMConfiguration.setUpperLimit(108000);
+ mFrequencyBand_Stepsize = 100;
+ break;
+ }
case REGIONAL_BAND_USER_DEFINED:
{
mFMConfiguration.setRadioBand(FmReceiver.FM_USER_DEFINED_BAND);
@@ -1174,4 +1180,100 @@
public static boolean getAutoAFSwitch() {
return mAFAutoSwitch;
}
+
+ /**
+ * Map country code to radio band. If country code is not found
+ * in the list, takes the default from resources.
+ */
+ private static int getBand(int deflt) {
+ // Try to determine the current location from the phone
+ // network. If unable, or not found in band list, try
+ // from locale. If that fails too, then use the default.
+ // TODO: Once a band is selected, the app remembers it in the
+ // shared preferences. This means the radio band isn't auto-updated
+ // if the user travels to a different country. A better approach would
+ // be to always call this code when the app starts up unless the user
+ // has explicitly set a band. In fact, "auto" should be one of the options.
+ // That will be the subject of another Jira, I think.
+ String countryCode;
+ int band;
+ try {
+ TelephonyManager tm = (TelephonyManager)
+ FMAdapterApp.context.getSystemService(Context.TELEPHONY_SERVICE);
+ countryCode = tm.getNetworkCountryIso();
+ if ((band = getBand(countryCode, -1)) >= 0) return band;
+ } catch (Exception e) {
+ // Failed, perhaps because of no sim card or inadequate permissions.
+ // Ignore it and carry on.
+ }
+ return getBand(Locale.getDefault().getCountry(), deflt);
+ }
+
+ /**
+ * Map a country code to an FM band code.
+ * @param country 2-letter country code
+ * @return band code or deflt on not found.
+ */
+ private static int getBand(String country, int deflt) {
+ // The order of country codes in this list is very strict; it
+ // needs to exactly correspond to the REGIONAL_BAND definitions
+ // at the top of this file. That is why there are two "JP"
+ // entries, one of which is unreachable, and why there is a
+ // placeholder for REGIONAL_BAND_USER_DEFINED.
+ // Some of these entries are intelligent guesses, e.g. my
+ // research indicates that Geurnsey, Jersey, and the Isle of Man
+ // use the same standards as GB.
+ // Many, many countries are not listed. Those will receive the
+ // default setting specified in the resources file.
+ final String[][] countries = {
+ {"CA"}, // REGIONAL_BAND_NORTH_AMERICA
+ {"AL", "AD", "AM", "AZ", "BY", "BA", "BG", "HR", "CY", "EE",
+ "GE", "HU", "IS", "KZ", "LV", "LI", "LT", "LU", "MK", "MT",
+ "MD", "MC", "ME", "RO", "SM", "RS", "SK", "SI", "UA", "VA"}, // REGIONAL_BAND_EUROPE
+ {"JP"}, // REGIONAL_BAND_JAPAN
+ {"JP"}, // REGIONAL_BAND_JAPAN_WIDE (not reached)
+ {"AU"}, // REGIONAL_BAND_AUSTRALIA
+ {"AT"}, // REGIONAL_BAND_AUSTRIA
+ {"BE"}, // REGIONAL_BAND_BELGIUM
+ {"BR"}, // REGIONAL_BAND_BRAZIL
+ {"CN"}, // REGIONAL_BAND_CHINA
+ {"CZ"}, // REGIONAL_BAND_CZECH
+ {"DK"}, // REGIONAL_BAND_DENMARK
+ {"FI"}, // REGIONAL_BAND_FINLAND
+ {"FR"}, // REGIONAL_BAND_FRANCE
+ {"DE"}, // REGIONAL_BAND_GERMANY
+ {"GR"}, // REGIONAL_BAND_GREECE
+ {"HK"}, // REGIONAL_BAND_HONGKONG
+ {"IN"}, // REGIONAL_BAND_INDIA
+ {"IE"}, // REGIONAL_BAND_IRELAND
+ {"IT"}, // REGIONAL_BAND_ITALY
+ {"KR"}, // REGIONAL_BAND_KOREA
+ {"MX"}, // REGIONAL_BAND_MEXICO
+ {"NL"}, // REGIONAL_BAND_NETHERLANDS
+ {"NZ"}, // REGIONAL_BAND_NEWZEALAND
+ {"NO","IS"}, // REGIONAL_BAND_NORWAY
+ {"PL"}, // REGIONAL_BAND_POLAND
+ {"PT"}, // REGIONAL_BAND_PORTUGAL
+ {"RU"}, // REGIONAL_BAND_RUSSIA
+ {"SG"}, // REGIONAL_BAND_SINGAPORE
+ {"SK"}, // REGIONAL_BAND_SLOVAKIA
+ {"ES"}, // REGIONAL_BAND_SPAIN
+ {"CH"}, // REGIONAL_BAND_SWITZERLAND
+ {"SE"}, // REGIONAL_BAND_SWEDEN
+ {"TW"}, // REGIONAL_BAND_TAIWAN
+ {"TR"}, // REGIONAL_BAND_TURKEY
+ {"GB","GG","IM","JE"}, // REGIONAL_BAND_UNITEDKINGDOM
+ {"US"}, // REGIONAL_BAND_UNITED_STATES
+ {"--"}, // REGIONAL_BAND_USER_DEFINED (handled elsewhere)
+ {"ID"}, // REGIONAL_BAND_INDONESIA
+ };
+ for (int band = 0; band < countries.length; ++band) {
+ for (String cc : countries[band]) {
+ if (cc.equalsIgnoreCase(country)) {
+ return band;
+ }
+ }
+ }
+ return deflt;
+ }
}
diff --git a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
index 505097f..4f3c3fb 100644
--- a/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
+++ b/fmapp2/src/com/caf/fmradio/HorizontalNumberPicker.java
@@ -30,6 +30,7 @@
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.Typeface;
import android.graphics.Paint.Align;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@@ -92,7 +93,7 @@
/**
* The coefficient by which to adjust (divide) the max fling velocity.
*/
- private static final int SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT = 8;
+ private static final int SELECTOR_MAX_FLING_VELOCITY_ADJUSTMENT = 4;
/**
* The the duration for adjusting the selector wheel.
@@ -138,36 +139,6 @@
private static final int SELECTOR_WHEEL_STATE_LARGE = 2;
/**
- * The alpha of the selector wheel when it is bright.
- */
- private static final int SELECTOR_WHEEL_BRIGHT_ALPHA = 255;
-
- /**
- * The alpha of the selector wheel when it is dimmed.
- */
- private static final int SELECTOR_WHEEL_DIM_ALPHA = 60;
-
- /**
- * The alpha for the increment/decrement button when it is transparent.
- */
- private static final int BUTTON_ALPHA_TRANSPARENT = 0;
-
- /**
- * The alpha for the increment/decrement button when it is opaque.
- */
- private static final int BUTTON_ALPHA_OPAQUE = 1;
-
- /**
- * The property for setting the selector paint.
- */
- private static final String PROPERTY_SELECTOR_PAINT_ALPHA = "selectorPaintAlpha";
-
- /**
- * The property for setting the increment/decrement button alpha.
- */
- private static final String PROPERTY_BUTTON_ALPHA = "alpha";
-
- /**
* The numbers accepted by the input text's {@link Filter}
*/
private static final char[] DIGIT_CHARACTERS = new char[] { '0', '1', '2',
@@ -247,7 +218,7 @@
/**
* The height of the text.
*/
- private int mTextSize = 20;
+ private int mTextSize = 60;
/**
* The height of the gap between text elements if the selector wheel.
*/
@@ -343,10 +314,6 @@
* The offset to middle of selector.
*/
private static final int SELECTOR_OFFSET_ZERO = 0;
- /**
- * The colors alpha of selector text.
- */
- private static final int SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE = 255;
private static float mDensity = 1.0f;
private static final float LDPI = 0.75f;
@@ -354,9 +321,9 @@
private static final float HDPI = 1.5f;
private static final float XHDPI = 2.0f;
- private float mScaleWidth = 2;
+ private float mScaleWidth = 5;
private float mScaleLengthShort = 10;
- private float mScaleLengthLong = 20;
+ private float mScaleLengthLong = 40;
private float mGapBetweenNumAndScale = 18;
private float mHdpiPositionAdjust = 18;
@@ -809,7 +776,6 @@
mBeginEditOnUpEvent = false;
mAdjustScrollerOnUpEvent = true;
if (mSelectorWheelState == SELECTOR_WHEEL_STATE_LARGE) {
- mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
boolean scrollersFinished = mFlingScroller.isFinished()
&& mAdjustScroller.isFinished();
if (!scrollersFinished) {
@@ -899,19 +865,19 @@
setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
return true;
}
-// VelocityTracker velocityTracker = mVelocityTracker;
-// velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
-// int initialVelocity=0;
-// if(!mHorizontal){
-// initialVelocity = (int) velocityTracker.getYVelocity();
-// }else{
-// initialVelocity = (int)velocityTracker.getXVelocity();
-// }
-// if (Math.abs(initialVelocity) > mMinimumFlingVelocity) {
-// // fling after up
-// fling(initialVelocity);
-// onScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
-// } else {
+ VelocityTracker velocityTracker = mVelocityTracker;
+ velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
+ int initialVelocity=0;
+ if(!mHorizontal){
+ initialVelocity = (int) velocityTracker.getYVelocity();
+ }else{
+ initialVelocity = (int)velocityTracker.getXVelocity();
+ }
+ if (Math.abs(initialVelocity) > mMinimumFlingVelocity) {
+ // fling after up
+ fling(initialVelocity);
+ onScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
+ } else {
if (mAdjustScrollerOnUpEvent) {
if (mFlingScroller.isFinished()
&& mAdjustScroller.isFinished()) {
@@ -920,7 +886,7 @@
} else {
postAdjustScrollerCommand(SHOW_INPUT_CONTROLS_DELAY_MILLIS);
}
-// }
+ }
mVelocityTracker.recycle();
mVelocityTracker = null;
break;
@@ -1492,13 +1458,10 @@
.get(selectorIndex);
if(i - mSelectorMiddleItemIndex > 0 ){
mSelectorWheelPaint.setColor(Color.WHITE);
- mSelectorWheelPaint.setAlpha((2*mSelectorMiddleItemIndex - i) * SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE / mSelectorMiddleItemIndex);
}else if(i - mSelectorMiddleItemIndex < 0 ){
mSelectorWheelPaint.setColor(Color.WHITE);
- mSelectorWheelPaint.setAlpha(i * SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE / mSelectorMiddleItemIndex);
}else{
- mSelectorWheelPaint.setColor(Color.RED);
- mSelectorWheelPaint.setAlpha(SELECTOR_TEXT_ALPHA_TRANSPARENT_NONE);
+ mSelectorWheelPaint.setColor(Color.WHITE);
}
try {
fNumber = Float.valueOf(scrollSelectorValue).floatValue();
@@ -1516,13 +1479,24 @@
bShowNumber = true;
fScaleLength = mScaleLengthLong * mDensity;
}
+ } else {
+ fWidthOfScale-=2;
}
if(bShowNumber){
- canvas.drawText(scrollSelectorValue, x, y, mSelectorWheelPaint);
+ float originalWidth = mSelectorWheelPaint.getStrokeWidth();
+ mSelectorWheelPaint.setTypeface(Typeface.DEFAULT_BOLD);
+ mSelectorWheelPaint.setStrokeWidth(2);
+ mSelectorWheelPaint.setStyle(Paint.Style.FILL_AND_STROKE);
+ canvas.drawText(scrollSelectorValue, x, mTextSize * 2, mSelectorWheelPaint);
+ mSelectorWheelPaint.setStyle(Paint.Style.FILL);
+ mSelectorWheelPaint.setStrokeWidth(originalWidth);
}
- canvas.drawRect(x, y+fGapBetweenNumAndScale, x+fWidthOfScale, y + fGapBetweenNumAndScale + fScaleLength , mSelectorWheelPaint);
-// }
+ float left = x;
+ float top = (mBottom - mTop) - fGapBetweenNumAndScale - fScaleLength;
+ float right = x+fWidthOfScale;
+ float bottom = (mBottom - mTop);
+ canvas.drawRect(left, top, right, bottom, mSelectorWheelPaint);
if (mHorizontal) {
x += mSelectorElementWidth;
} else {
@@ -1646,7 +1620,6 @@
*/
private void changeCurrentByOne(boolean increment) {
if (mFlingable) {
- mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
mPreviousScrollerY = 0;
mPreviousScrollerX = 0;
forceCompleteChangeCurrentByOneViaScroll();
@@ -1703,17 +1676,6 @@
}
/**
- * Sets the <code>alpha</code> of the {@link Paint} for drawing the selector
- * wheel.
- */
- @SuppressWarnings("unused")
- // Called via reflection
- private void setSelectorPaintAlpha(int alpha) {
- mSelectorWheelPaint.setAlpha(alpha);
- invalidate();
- }
-
- /**
* @return If the <code>event</code> is in the visible <code>view</code>.
*/
private boolean isEventInVisibleViewHitRect(MotionEvent event, View view) {
@@ -1730,7 +1692,6 @@
private void setSelectorWheelState(int selectorWheelState) {
mSelectorWheelState = selectorWheelState;
if (selectorWheelState == SELECTOR_WHEEL_STATE_LARGE) {
- mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
}
if (mFlingable && selectorWheelState == SELECTOR_WHEEL_STATE_LARGE
diff --git a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
index 70d906e..53ba0d6 100644
--- a/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
+++ b/fmapp2/src/com/caf/fmradio/IFMRadioService.aidl
@@ -75,6 +75,8 @@
boolean isSSRInProgress();
boolean isRtPlusSupported();
boolean isA2DPConnected();
+ boolean isSearchInProgress();
+ List getScannedFrequencies();
boolean getIntfDetLowTh();
boolean getIntfDetHighTh();
boolean getRxRepeatCount();
diff --git a/fmapp2/src/com/caf/fmradio/PresetStation.java b/fmapp2/src/com/caf/fmradio/PresetStation.java
index 698cdb6..7d09d01 100644
--- a/fmapp2/src/com/caf/fmradio/PresetStation.java
+++ b/fmapp2/src/com/caf/fmradio/PresetStation.java
@@ -30,6 +30,7 @@
import qcom.fmradio.FmReceiver;
import java.util.Locale;
+import android.content.res.Resources;
import android.text.TextUtils;
//import android.util.Log;
@@ -616,622 +617,49 @@
public static String parsePTY(int pty)
{
String ptyStr="";
+ Resources res = FMAdapterApp.context.getResources();
int rdsStd = FmSharedPreferences.getFMConfiguration().getRdsStd();
- if(rdsStd == FmReceiver.FM_RDS_STD_RBDS)
- {
- ptyStr = getRBDSPtyString(pty);
- }
- else if(rdsStd == FmReceiver.FM_RDS_STD_RDS)
- {
- ptyStr = getRDSPtyString(pty);
- }
- return (ptyStr);
+ int resid;
+ final int[][] typeCodes = { // RDS, RDBS
+ {0, 0},
+ {R.string.typ_News, R.string.typ_News},
+ {R.string.typ_Current_affairs, R.string.typ_Information},
+ {R.string.typ_Information, R.string.typ_Sports},
+ {R.string.typ_Sport, R.string.typ_Talk},
+ {R.string.typ_Education, R.string.typ_Rock},
+ {R.string.typ_Drama, R.string.typ_Classic_Rock},
+ {R.string.typ_Culture, R.string.typ_Adult_hits},
+ {R.string.typ_Science, R.string.typ_Soft_Rock},
+ {R.string.typ_Varied, R.string.typ_Top_40},
+ {R.string.typ_Pop, R.string.typ_Country},
+ {R.string.typ_Rock, R.string.typ_Oldies},
+ {R.string.typ_Easy_listening, R.string.typ_Soft},
+ {R.string.typ_Light_classical, R.string.typ_Nostalgia},
+ {R.string.typ_Serious_classical, R.string.typ_Jazz},
+ {R.string.typ_Other, R.string.typ_Classical},
+ {R.string.typ_Weather, R.string.typ_Rhythm_and_Blues},
+ {R.string.typ_Finance, R.string.typ_Soft_Rhythm_and_Blues},
+ {R.string.typ_Children, R.string.typ_Foreign_language},
+ {R.string.typ_Social_affairs, R.string.typ_Religious_music},
+ {R.string.typ_Religion, R.string.typ_Religious_talk},
+ {R.string.typ_Phone_in, R.string.typ_Personality},
+ {R.string.typ_Travel, R.string.typ_Public},
+ {R.string.typ_Leisure, R.string.typ_College},
+ {R.string.typ_Jazz, R.string.typ_Spanish_talk},
+ {R.string.typ_Country, R.string.typ_Spanish_music},
+ {R.string.typ_National, R.string.typ_Hiphop},
+ {R.string.typ_Oldies, 0},
+ {R.string.typ_Folk, 0},
+ {R.string.typ_Documentary, R.string.typ_Weather},
+ {R.string.typ_Emergency_test, R.string.typ_Emergency_test},
+ {R.string.typ_Emergency, R.string.typ_Emergency},
+ };
+ if (pty < 0 || pty >= typeCodes.length)
+ return ptyStr;
+ resid = typeCodes[pty][rdsStd == FmReceiver.FM_RDS_STD_RDS ? 0 : 1];
+ if (resid == 0)
+ return ptyStr;
+ String s = res.getString(resid);
+ return s;
}
-
- /**
- * get the Text String for the RBDS Program type Code
- */
- public static String getRBDSPtyString(int pty)
- {
- String ptyStr = "";
-
- switch (pty)
- {
- case 1:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "新聞";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "新闻";
- else
- ptyStr = "News";
- break;
- }
- case 2:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "資訊";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "信息频道";
- else
- ptyStr = "Information";
- break;
- }
- case 3:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "体育";
- else
- ptyStr = "Sports";
- break;
- }
- case 4:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "討論";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "交流";
- else
- ptyStr = "Talk";
- break;
- }
- case 5:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "搖滾";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "摇滚";
- else
- ptyStr = "Rock";
- break;
- }
- case 6:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "古典搖滾";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "经典摇滚";
- else
- ptyStr = "Classic Rock";
- break;
- }
- case 7:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "成人熱門精選";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "成人点击";
- else
- ptyStr = "Adult Hits";
- break;
- }
- case 8:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "輕柔搖滾樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "轻摇滚";
- else
- ptyStr = "Soft Rock";
- break;
- }
- case 9:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "前40首最熱門歌曲";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "前40";
- else
- ptyStr = "Top 40";
- break;
- }
- case 10:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "鄉村音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "乡村";
- else
- ptyStr = "Country";
- break;
- }
- case 11:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "懷舊";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "老歌";
- else
- ptyStr = "Oldies";
- break;
- }
- case 12:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "輕柔";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "轻音乐";
- else
- ptyStr = "Soft";
- break;
- }
- case 13:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "思鄉";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "怀旧";
- else
- ptyStr = "Nostalgia";
- break;
- }
- case 14:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "爵士樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "爵士";
- else
- ptyStr = "Jazz";
- break;
- }
- case 15:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "古典";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "古典";
- else
- ptyStr = "Classical";
- break;
- }
- case 16:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "節奏藍調";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "节奏布鲁斯";
- else
- ptyStr = "Rhythm and Blues";
- break;
- }
- case 17:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "輕柔節奏藍調";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "轻节奏布鲁斯";
- else
- ptyStr = "Soft Rhythm and Blues";
- break;
- }
- case 18:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "外語";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "外语频道";
- else
- ptyStr = "Foreign Language";
- break;
- }
- case 19:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "宗教音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "宗教音乐";
- else
- ptyStr = "Religious Music";
- break;
- }
- case 20:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "宗教討論";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "宗教交流";
- else
- ptyStr = "Religious Talk";
- break;
- }
- case 21:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "個人";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "个性";
- else
- ptyStr = "Personality";
- break;
- }
- case 22:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "公開";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "公共频道";
- else
- ptyStr = "Public";
- break;
- }
- case 23:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "學院";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "校园";
- else
- ptyStr = "College";
- break;
- }
- case 29:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "天氣";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "天气";
- else
- ptyStr = "Weather";
- break;
- }
- case 30:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "緊急測試";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "紧急 测试";
- else
- ptyStr = "Emergency Test";
- break;
- }
- case 31:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "緊急";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "紧急";
- else
- ptyStr = "Emergency";
- break;
- }
- default:
- {
- ptyStr = "";
- //Log.e(FMRadio.LOGTAG, "Unknown RBDS ProgramType [" + pty + "]");
- break;
- }
- }
- return ptyStr;
- }
-
- /** get the Text String for the Program type Code */
- public static String getRDSPtyString(int pty)
- {
- String ptyStr = "";
- switch (pty)
- {
- case 1:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "新聞";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "新闻";
- else
- ptyStr = "News";
- break;
- }
- case 2:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "新聞時事";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "新闻时事";
- else
- ptyStr = "Current Affairs";
- break;
- }
- case 3:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "資訊";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "信息";
- else
- ptyStr = "Information";
- break;
- }
- case 4:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "體育";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "体育";
- else
- ptyStr = "Sport";
- break;
- }
- case 5:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "教育";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "教育";
- else
- ptyStr = "Education";
- break;
- }
- case 6:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "戲劇";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "戏剧";
- else
- ptyStr = "Drama";
- break;
- }
- case 7:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "文化";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "文化";
- else
- ptyStr = "Culture";
- break;
- }
- case 8:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "科學";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "科学";
- else
- ptyStr = "Science";
- break;
- }
- case 9:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "多樣化";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "变奏";
- else
- ptyStr = "Varied";
- break;
- }
- case 10:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "流行音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "流行音乐";
- else
- ptyStr = "Pop Music";
- break;
- }
- case 11:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "搖滾樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "摇滚音乐";
- else
- ptyStr = "Rock Music";
- break;
- }
- case 12:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "輕音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "轻音乐";
- else
- ptyStr = "Easy Listening Music";
- break;
- }
- case 13:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "輕古典音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "轻古典音乐";
- else
- ptyStr = "Light classical";
- break;
- }
- case 14:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "正統古典";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "古典";
- else
- ptyStr = "Serious classical";
- break;
- }
- case 15:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "其他音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "其他音乐";
- else
- ptyStr = "Other Music";
- break;
- }
- case 16:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "天氣";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "天气";
- else
- ptyStr = "Weather";
- break;
- }
- case 17:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "財政";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "经济";
- else
- ptyStr = "Finance";
- break;
- }
- case 18:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "少兒節目";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "儿童节目";
- else
- ptyStr = "Children programs";
- break;
- }
- case 19:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "社會事務";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "社会事务";
- else
- ptyStr = "Social Affairs";
- break;
- }
- case 20:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "宗教";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "宗教";
- else
- ptyStr = "Religion";
- break;
- }
- case 21:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "聽眾來得";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "听众来电";
- else
- ptyStr = "Phone In";
- break;
- }
- case 22:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "旅遊";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "旅行";
- else
- ptyStr = "Travel";
- break;
- }
- case 23:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "休閒";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "休闲";
- else
- ptyStr = "Leisure";
- break;
- }
- case 24:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "爵士樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "爵士音乐";
- else
- ptyStr = "Jazz Music";
- break;
- }
- case 25:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "鄉村音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "乡村音乐";
- else
- ptyStr = "Country Music";
- break;
- }
- case 26:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "國樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "民族音乐";
- else
- ptyStr = "National Music";
- break;
- }
- case 27:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "懷舊金曲";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "怀旧";
- else
- ptyStr = "Oldies Music";
- break;
- }
- case 28:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "民俗音樂";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "民族音乐";
- else
- ptyStr = "Folk Music";
- break;
- }
- case 29:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "紀實";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "记录";
- else
- ptyStr = "Documentary";
- break;
- }
- case 30:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "緊急測試";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "紧急测试";
- else
- ptyStr = "Emergency Test";
- break;
- }
- case 31:
- {
- if (Locale.getDefault().toString().equals("zh_HK"))
- ptyStr = "緊急";
- else if (Locale.getDefault().toString().equals("zh_CN"))
- ptyStr = "紧急";
- else
- ptyStr = "Emergency";
- break;
- }
- default:
- {
- ptyStr = "";
- //Log.e(FMRadio.LOGTAG, "Unknown RDS ProgramType [" + pty + "]");
- break;
- }
- }
- return ptyStr;
- }
-
-
}
diff --git a/fmapp2/src/com/caf/fmradio/Settings.java b/fmapp2/src/com/caf/fmradio/Settings.java
index 6ad98e6..4a7c304 100644
--- a/fmapp2/src/com/caf/fmradio/Settings.java
+++ b/fmapp2/src/com/caf/fmradio/Settings.java
@@ -120,7 +120,7 @@
mBandPreference = new ListPreference(this);
mBandPreference.setEntries(R.array.regional_band_entries);
mBandPreference.setEntryValues(R.array.regional_band_values);
- mBandPreference.setDialogTitle(R.string.sel_band_menu);
+ mBandPreference.setDialogTitle(R.string.regional_band);
mBandPreference.setKey(REGIONAL_BAND_KEY);
mBandPreference.setTitle(R.string.regional_band);
index = FmSharedPreferences.getCountry();
@@ -135,7 +135,7 @@
mChannelSpacingPref = new ListPreference(this);
mChannelSpacingPref.setEntries(R.array.channel_spacing_entries);
mChannelSpacingPref.setEntryValues(R.array.channel_spacing_val);
- mChannelSpacingPref.setDialogTitle(R.string.sel_chanl_spacing);
+ mChannelSpacingPref.setDialogTitle(R.string.chanl_spacing);
mChannelSpacingPref.setTitle(R.string.chanl_spacing);
mChannelSpacingPref.setKey(CHAN_SPACING_KEY);
@@ -145,6 +145,7 @@
mUserBandMinPref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER |
InputType.TYPE_NUMBER_FLAG_DECIMAL);
mUserBandMinPref.setDialogTitle(R.string.usr_def_band_min);
+ mUserBandMinPref.getEditText().setSelectAllOnFocus(true);
mUserBandMaxPref = new EditTextPreference(this);
mUserBandMaxPref.setKey(USER_DEFINED_BAND_MAX_KEY);
@@ -152,6 +153,7 @@
mUserBandMaxPref.setDialogTitle(R.string.usr_def_band_max);
mUserBandMaxPref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER |
InputType.TYPE_NUMBER_FLAG_DECIMAL);
+ mUserBandMaxPref.getEditText().setSelectAllOnFocus(true);
setBandSummary(index);
@@ -181,7 +183,7 @@
index = 1;
}
}
- mAudioPreference.setDialogTitle(R.string.sel_audio_output);
+ mAudioPreference.setDialogTitle(R.string.aud_output_mode);
mAudioPreference.setKey(AUDIO_OUTPUT_KEY);
mAudioPreference.setTitle(R.string.aud_output_mode);
@@ -194,8 +196,6 @@
mAfPref = new CheckBoxPreference(this);
mAfPref.setKey(AUTO_AF);
mAfPref.setTitle(R.string.auto_select_af);
- mAfPref.setSummaryOn(R.string.auto_select_af_enabled);
- mAfPref.setSummaryOff(R.string.auto_select_af_disabled);
boolean bAFAutoSwitch = FmSharedPreferences.getAutoAFSwitch();
Log.d(LOGTAG, "createPreferenceHierarchy: bAFAutoSwitch: "
+ bAFAutoSwitch);
@@ -209,7 +209,7 @@
mRecordDurPreference = new ListPreference(this);
mRecordDurPreference.setEntries(R.array.record_durations_entries);
mRecordDurPreference.setEntryValues(R.array.record_duration_values);
- mRecordDurPreference.setDialogTitle(R.string.sel_rec_dur);
+ mRecordDurPreference.setDialogTitle(R.string.record_dur);
mRecordDurPreference.setKey(RECORD_DURATION_KEY);
mRecordDurPreference.setTitle(R.string.record_dur);
nRecordDuration = FmSharedPreferences.getRecordDuration();
@@ -279,7 +279,7 @@
if((index < 0) || (index >= summaryBandItems.length)) {
index = 0;
mBandPreference.setValueIndex(0);
- }else if((index + 1) == summaryBandItems.length) {
+ }else if(index == FmSharedPreferences.REGIONAL_BAND_USER_DEFINED) {
mChannelSpacingPref.setEnabled(true);
}else {
mChannelSpacingPref.setEnabled(false);
@@ -347,14 +347,10 @@
&& (noOfChannels > 0) && (band_width >= 100)) {
FmSharedPreferences.setLowerLimit((int)freq);
sendSettingsChangedIntent(FM_BAND_CHANGED);
- setBandSummary(summaryBandItems.length - 1);
+ setBandSummary(FmSharedPreferences.REGIONAL_BAND_USER_DEFINED);
clearStationList();
}else {
- if ((Locale.getDefault().toString().equals("zh_HK")))
- Toast.makeText(this,"請輸入有效的頻道範圍76.0-108.0",
- Toast.LENGTH_SHORT).show();
- else
- Toast.makeText(this, getString(R.string.user_defind_band_msg),
+ Toast.makeText(this, getString(R.string.user_defind_band_msg),
Toast.LENGTH_SHORT).show();
}
}else if(key.equals(USER_DEFINED_BAND_MAX_KEY)) {
@@ -375,14 +371,10 @@
&& (noOfChannels > 0) && (band_width >= 100)) {
FmSharedPreferences.setUpperLimit((int)freq);
sendSettingsChangedIntent(FM_BAND_CHANGED);
- setBandSummary(summaryBandItems.length - 1);
+ setBandSummary(FmSharedPreferences.REGIONAL_BAND_USER_DEFINED);
clearStationList();
}else {
- if ((Locale.getDefault().toString().equals("zh_HK")))
- Toast.makeText(this,"請輸入有效的頻道範圍76.0-108.0",
- Toast.LENGTH_SHORT).show();
- else
- Toast.makeText(this, getString(R.string.user_defind_band_msg),
+ Toast.makeText(this, getString(R.string.user_defind_band_msg),
Toast.LENGTH_SHORT).show();
}
}else {
@@ -467,7 +459,7 @@
R.drawable.alert_dialog_icon).setTitle(
R.string.settings_revert_confirm_title).setMessage(
R.string.settings_revert_confirm_msg).setPositiveButton(
- R.string.alert_dialog_ok,
+ android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
@@ -477,7 +469,7 @@
restoreSettingsDefault();
finish();
}
- }).setNegativeButton(R.string.alert_dialog_cancel,
+ }).setNegativeButton(android.R.string.cancel,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int whichButton) {
@@ -491,8 +483,7 @@
mBandPreference
.setValueIndex(FmSharedPreferences.REGIONAL_BAND_CHINA);
}else {
- mBandPreference
- .setValueIndex(FmSharedPreferences.REGIONAL_BAND_NORTH_AMERICA);
+ mBandPreference.setValueIndex(FmSharedPreferences.mDefaultCountryIndex);
}
if (mRxMode) {
mAudioPreference.setValueIndex(0);
@@ -506,8 +497,7 @@
FmSharedPreferences
.setCountry(FmSharedPreferences.REGIONAL_BAND_CHINA);
}else{
- FmSharedPreferences
- .setCountry(FmSharedPreferences.REGIONAL_BAND_NORTH_AMERICA);
+ FmSharedPreferences.setCountry(FmSharedPreferences.mDefaultCountryIndex);
}
}
mPrefs.Save();
@@ -540,7 +530,7 @@
}
}
private void setBandSummary(int index) {
- if((index + 1) == summaryBandItems.length) {
+ if(index == FmSharedPreferences.REGIONAL_BAND_USER_DEFINED) {
min_freq = FmSharedPreferences.getLowerLimit();
max_freq = FmSharedPreferences.getUpperLimit();
chan_spacing = FmSharedPreferences.getChSpacing();
diff --git a/fmapp2/src/com/caf/fmradio/StationListActivity.java b/fmapp2/src/com/caf/fmradio/StationListActivity.java
index 643fd57..8707fe2 100644
--- a/fmapp2/src/com/caf/fmradio/StationListActivity.java
+++ b/fmapp2/src/com/caf/fmradio/StationListActivity.java
@@ -165,7 +165,7 @@
menu.add(0, CONTEXT_MENU_RENAME, 0, getString(R.string.preset_rename));
menu.add(0, CONTEXT_MENU_DELETE, 0, getString(R.string.preset_delete));
mItemId = mi.position;
- menu.setHeaderTitle(getString(R.string.station_name)+getNameFromId(mItemId));
+ menu.setHeaderTitle(getString(R.string.station_name, getNameFromId(mItemId)));
}
@Override
@@ -192,7 +192,7 @@
load();
switch (id) {
case DIALOG_RENAME_ID:
- mRenameDialog.setTitle(getString(R.string.station_name)+getNameFromId(mItemId));
+ mRenameDialog.setTitle(getString(R.string.station_name, getNameFromId(mItemId)));
final EditText editText = (EditText) mRenameDialog
.findViewById(R.id.name);
editText.setText(getNameFromId(mItemId));
diff --git a/fmapp2/src/com/caf/hc_utils/FrequencyPickerDialog.java b/fmapp2/src/com/caf/hc_utils/FrequencyPickerDialog.java
index aca5fba..4f7102b 100644
--- a/fmapp2/src/com/caf/hc_utils/FrequencyPickerDialog.java
+++ b/fmapp2/src/com/caf/hc_utils/FrequencyPickerDialog.java
@@ -100,7 +100,7 @@
mCallBack = callback;
setButton(context.getString(R.string.set), this);
- setButton2(context.getString(R.string.cancel), (OnClickListener) null);
+ setButton2(context.getString(android.R.string.cancel), (OnClickListener) null);
setIcon(R.drawable.alert_dialog_icon);
LayoutInflater inflater =
diff --git a/fmapp2/src/com/caf/utils/FrequencyPickerDialog.java b/fmapp2/src/com/caf/utils/FrequencyPickerDialog.java
index 2b0b7b0..ed21966 100644
--- a/fmapp2/src/com/caf/utils/FrequencyPickerDialog.java
+++ b/fmapp2/src/com/caf/utils/FrequencyPickerDialog.java
@@ -100,7 +100,7 @@
mCallBack = callback;
setButton(DialogInterface.BUTTON_POSITIVE, context.getString(R.string.set), this);
- setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(R.string.cancel), (OnClickListener) null);
+ setButton(DialogInterface.BUTTON_NEGATIVE, context.getString(android.R.string.cancel), (OnClickListener) null);
setIcon(R.drawable.alert_dialog_icon);
LayoutInflater inflater =
diff --git a/helium/Android.bp b/helium/Android.bp
deleted file mode 100644
index b10722e..0000000
--- a/helium/Android.bp
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-cc_library_shared {
- name: "fm_helium",
-
- srcs: [
- "radio_helium_hal.c",
- "radio_helium_hal_cmds.c",
- ],
-
- shared_libs: [
- "libfm-hci",
- "libdl",
- "liblog",
- "libnativehelper",
- "libcutils",
- ],
-
- include_dirs: ["vendor/qcom/opensource/commonsys/fm/fm_hci"],
-
- system_ext_specific: true,
-
-}
diff --git a/jni/Android.bp b/jni/Android.bp
index 1d6e8e0..681ac51 100755
--- a/jni/Android.bp
+++ b/jni/Android.bp
@@ -12,13 +12,10 @@
"libnativehelper",
"liblog",
"libcutils",
- "libbtconfigstore",
],
include_dirs: [
- "vendor/qcom/opensource/commonsys-intf/bluetooth/include",
- "vendor/qcom/opensource/commonsys/bluetooth_ext/system_bt_ext/btconfigstore",
- "vendor/qcom/opensource/commonsys/fm/helium",
+ "vendor/qcom/opensource/fm-commonsys/helium",
],
}
diff --git a/jni/android_hardware_fm.cpp b/jni/android_hardware_fm.cpp
index 76490ee..03e89db 100644
--- a/jni/android_hardware_fm.cpp
+++ b/jni/android_hardware_fm.cpp
@@ -41,7 +41,6 @@
#include <dlfcn.h>
#include "android_runtime/Log.h"
#include "android_runtime/AndroidRuntime.h"
-#include "bt_configstore.h"
#include <vector>
#include "radio-helium.h"
@@ -157,11 +156,6 @@
void *lib_handle;
static int slimbus_flag = 0;
-static char soc_name[16];
-bool isSocNameAvailable = false;
-static bt_configstore_interface_t* bt_configstore_intf = NULL;
-static void *bt_configstore_lib_handle = NULL;
-
static JNIEnv *mCallbackEnv = NULL;
static jobject mCallbacksObj = NULL;
static bool mCallbacksObjCreated = false;
@@ -195,8 +189,6 @@
jmethodID method_enableSoftMuteCallback;
jmethodID method_FmReceiverJNICtor;
-int load_bt_configstore_lib();
-
static bool checkCallbackThread() {
JNIEnv* env = AndroidRuntime::getJNIEnv();
if (mCallbackEnv != env || mCallbackEnv == NULL)
@@ -648,18 +640,6 @@
};
/* native interface */
-static void get_property(int ptype, char *value)
-{
- std::vector<vendor_property_t> vPropList;
- bt_configstore_intf->get_vendor_properties(ptype, vPropList);
-
- for (auto&& vendorProp : vPropList) {
- if (vendorProp.type == ptype) {
- strlcpy(value, vendorProp.value,PROPERTY_VALUE_MAX);
- }
- }
-}
-
/********************************************************************
* Current JNI
*******************************************************************/
@@ -905,41 +885,6 @@
return err;
}
-static jboolean android_hardware_fmradio_FmReceiverJNI_getFmStatsPropNative
- (JNIEnv* env)
-{
- jboolean ret;
- char value[PROPERTY_VALUE_MAX] = {'\0'};
- get_property(FM_STATS_PROP, value);
- if (!strncasecmp(value, "true", sizeof("true"))) {
- ret = true;
- } else {
- ret = false;
- }
-
- return ret;
-}
-
-static jint android_hardware_fmradio_FmReceiverJNI_getFmCoexPropNative
-(JNIEnv * env, jobject thiz, jint fd, jint prop)
-{
- jint ret;
- int property = (int)prop;
- char value[PROPERTY_VALUE_MAX] = {'\0'};
-
- if (property == FMWAN_RATCONF) {
- get_property(FM_PROP_WAN_RATCONF, value);
- } else if (property == FMBTWLAN_LPFENABLER) {
- get_property(FM_PROP_BTWLAN_LPFENABLER, value);
- } else {
- ALOGE("%s: invalid get property prop = %d\n", __func__, property);
- }
-
- ret = atoi(value);
- ALOGI("%d:: ret = %d",property, ret);
- return ret;
-}
-
static jint android_hardware_fmradio_FmReceiverJNI_enableSoftMuteNative
(JNIEnv * env, jobject thiz, jint fd, jint val)
{
@@ -950,27 +895,6 @@
return err;
}
-static jstring android_hardware_fmradio_FmReceiverJNI_getSocNameNative
- (JNIEnv* env)
-{
- ALOGI("%s, bt_configstore_intf: %p isSocNameAvailable: %d",
- __FUNCTION__, bt_configstore_intf, isSocNameAvailable);
-
- if (bt_configstore_intf != NULL && isSocNameAvailable == false) {
- std::vector<vendor_property_t> vPropList;
-
- bt_configstore_intf->get_vendor_properties(BT_PROP_SOC_TYPE, vPropList);
- for (auto&& vendorProp : vPropList) {
- if (vendorProp.type == BT_PROP_SOC_TYPE) {
- strlcpy(soc_name, vendorProp.value, sizeof(soc_name));
- isSocNameAvailable = true;
- ALOGI("%s:: soc_name = %s",__func__, soc_name);
- }
- }
- }
- return env->NewStringUTF(soc_name);
-}
-
static void classInitNative(JNIEnv* env, jclass clazz) {
ALOGI("ClassInit native called \n");
@@ -1092,68 +1016,18 @@
(void*)android_hardware_fmradio_FmReceiverJNI_enableSlimbusNative},
{ "enableSoftMute", "(II)I",
(void*)android_hardware_fmradio_FmReceiverJNI_enableSoftMuteNative},
- {"getSocNameNative", "()Ljava/lang/String;",
- (void*) android_hardware_fmradio_FmReceiverJNI_getSocNameNative},
- {"getFmStatsPropNative", "()Z",
- (void*) android_hardware_fmradio_FmReceiverJNI_getFmStatsPropNative},
- { "getFmCoexPropNative", "(II)I",
- (void*)android_hardware_fmradio_FmReceiverJNI_getFmCoexPropNative},
};
int register_android_hardware_fm_fmradio(JNIEnv* env)
{
- ALOGI("%s, bt_configstore_intf", __FUNCTION__, bt_configstore_intf);
- if (bt_configstore_intf == NULL) {
- load_bt_configstore_lib();
- }
-
return jniRegisterNativeMethods(env, "qcom/fmradio/FmReceiverJNI", gMethods, NELEM(gMethods));
}
int deregister_android_hardware_fm_fmradio(JNIEnv* env)
{
- if (bt_configstore_lib_handle) {
- dlclose(bt_configstore_lib_handle);
- bt_configstore_lib_handle = NULL;
- bt_configstore_intf = NULL;
- }
return 0;
}
-int load_bt_configstore_lib() {
- const char* sym = BT_CONFIG_STORE_INTERFACE_STRING;
-
- bt_configstore_lib_handle = dlopen("libbtconfigstore.so", RTLD_NOW);
- if (!bt_configstore_lib_handle) {
- const char* err_str = dlerror();
- ALOGE("%s:: failed to load Bt Config store library, error= %s",
- __func__, (err_str) ? err_str : "error unknown");
- goto error;
- }
-
- // Get the address of the bt_configstore_interface_t.
- bt_configstore_intf = (bt_configstore_interface_t*)dlsym(bt_configstore_lib_handle, sym);
- if (!bt_configstore_intf) {
- ALOGE("%s:: failed to load symbol from bt config store library = %s",
- __func__, sym);
- goto error;
- }
-
- // Success.
- ALOGI("%s:: loaded HAL: bt_configstore_interface_t = %p , bt_configstore_lib_handle= %p",
- __func__, bt_configstore_intf, bt_configstore_lib_handle);
- return 0;
-
- error:
- if (bt_configstore_lib_handle) {
- dlclose(bt_configstore_lib_handle);
- bt_configstore_lib_handle = NULL;
- bt_configstore_intf = NULL;
- }
-
- return -EINVAL;
-}
-
} // end namespace
jint JNI_OnLoad(JavaVM *jvm, void *reserved)
diff --git a/qcom/fmradio/Android.bp b/qcom/fmradio/Android.bp
index 29817d8..30e0b98 100644
--- a/qcom/fmradio/Android.bp
+++ b/qcom/fmradio/Android.bp
@@ -9,3 +9,9 @@
installable: true,
srcs: ["**/*.java"],
}
+
+prebuilt_etc {
+ name: "qcom.fmradio.xml",
+ src: "qcom.fmradio.xml",
+ sub_dir: "permissions",
+}
diff --git a/qcom/fmradio/FmReceiver.java b/qcom/fmradio/FmReceiver.java
index 48e4d11..e45cc55 100644
--- a/qcom/fmradio/FmReceiver.java
+++ b/qcom/fmradio/FmReceiver.java
@@ -359,7 +359,7 @@
}
public static boolean isRomeChip() {
- String chip = FmReceiverJNI.getSocNameNative();
+ String chip = getSocName();
if (chip.equals("rome"))
return true;
else
@@ -1572,7 +1572,7 @@
int bytes_read;
String rt = "";
int rt_len;
- int i, j = 2;
+ int i, count, avail_tag_num = 0;
byte tag_code, tag_len, tag_start_pos;
rt_plus = FmReceiverJNI.getPsBuffer(rt_plus);
@@ -1585,14 +1585,20 @@
if ((rt != "") && (rt != null)) {
rt_len = rt.length();
mRdsData.setTagNums(0);
- for (i = 1; (i <= 2) && (j < rt_plus[LEN_IND]); i++) {
- tag_code = rt_plus[j++];
- tag_start_pos = rt_plus[j++];
- tag_len = rt_plus[j++];
+ avail_tag_num = (rt_plus[LEN_IND] - 2)/3;
+ if (avail_tag_num > 2) {
+ avail_tag_num = 2;
+ }
+ count = 1;
+ for (i = 0; i < avail_tag_num; i++) {
+ tag_code = rt_plus[2+3*i];
+ tag_start_pos = rt_plus[3+3*i];
+ tag_len = rt_plus[4+3*i];
if (((tag_len + tag_start_pos) <= rt_len) && (tag_code > 0)) {
mRdsData.setTagValue(rt.substring(tag_start_pos,
- (tag_len + tag_start_pos)), i);
- mRdsData.setTagCode(tag_code, i);
+ (tag_len + tag_start_pos)), count);
+ mRdsData.setTagCode(tag_code, count);
+ count++;
}
}
} else {
@@ -2898,15 +2904,22 @@
mControl.enableSoftMute(sFd, enable);
}
- public String getSocName() {
- return FmReceiverJNI.getSocNameNative();
+ public static String getSocName() {
+ return SystemProperties.get("vendor.bluetooth.soc");
}
public boolean getFmStatsProp() {
- return FmReceiverJNI.getFmStatsPropNative();
+ return SystemProperties.getBoolean("persist.fm.stats", false);
}
public int getFmWanWlanCoexProp(int property) {
- return FmReceiverJNI.getFmCoexPropNative(sFd, property);
+ switch (property) {
+ case WAN_RATCONF:
+ return SystemProperties.getInt("persist.fm_wan.ratconf", 0);
+ case BTWLAN_LPFENABLER:
+ return SystemProperties.getInt("persist.btwlan.lpfenabler", 0);
+ default:
+ return 0;
+ }
}
}
diff --git a/qcom/fmradio/FmReceiverJNI.java b/qcom/fmradio/FmReceiverJNI.java
index 298ed07..a1f82f2 100644
--- a/qcom/fmradio/FmReceiverJNI.java
+++ b/qcom/fmradio/FmReceiverJNI.java
@@ -470,7 +470,4 @@
static native int setSpurDataNative(int fd, short buff[], int len);
static native int enableSlimbus(int fd, int val);
static native int enableSoftMute(int fd, int val);
- static native String getSocNameNative();
- static native boolean getFmStatsPropNative();
- static native int getFmCoexPropNative(int fd, int property);
}
diff --git a/qcom/fmradio/FmTransceiver.java b/qcom/fmradio/FmTransceiver.java
index eee89d4..32152a0 100644
--- a/qcom/fmradio/FmTransceiver.java
+++ b/qcom/fmradio/FmTransceiver.java
@@ -28,6 +28,7 @@
package qcom.fmradio;
+import android.os.SystemProperties;
import android.util.Log;
import java.io.File;
@@ -329,13 +330,9 @@
*/
public boolean getInternalAntenna()
{
-
- int re = FmReceiverJNI.getControlNative (sFd, V4L2_CID_PRIVATE_TAVARUA_ANTENNA);
-
- if (re == 1)
- return true;
-
- return false;
+ return ((FmReceiverJNI.getControlNative(sFd,
+ V4L2_CID_PRIVATE_TAVARUA_ANTENNA) == 1) ||
+ SystemProperties.getBoolean("hw.fm.internal_antenna", false));
}
/*==============================================================
diff --git a/qcom/fmradio/qcom.fmradio.xml b/qcom/fmradio/qcom.fmradio.xml
new file mode 100644
index 0000000..6a55cc6
--- /dev/null
+++ b/qcom/fmradio/qcom.fmradio.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<permissions>
+ <library name="qcom.fmradio"
+ file="/system/framework/qcom.fmradio.jar" />
+</permissions>