branch develop updated (8c00081 -> 03d2edc)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository say-my-texts. See http://git.chorem.org/say-my-texts.git from 8c00081 merge new a64f697 - use audio focus to pause the musis stream instead of muting it - project file architecture modification - refs #1103 try to use material design with appcompat - fixes #1157 Say the name of the caller - refactoring new 03d2edc cont The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 03d2edc041f5cff7004df17e658d98506e73a4aa Author: Kevin Morin <morin@codelutin.com> Date: Thu Jan 29 14:53:15 2015 +0100 cont commit a64f69740230c8854d822e3c756eba997d4f7d56 Author: Kevin Morin <morin@codelutin.com> Date: Thu Jan 29 14:47:45 2015 +0100 - use audio focus to pause the musis stream instead of muting it - project file architecture modification - refs #1103 try to use material design with appcompat - fixes #1157 Say the name of the caller - refactoring Summary of changes: .gitignore | 3 +- AndroidManifest.xml | 28 ++-- pom.xml | 42 +++++- .../ab_bottom_solid_heisendroid.9.png | Bin 145 -> 0 bytes res/drawable-hdpi/ab_solid_heisendroid.9.png | Bin 152 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 145 -> 0 bytes res/drawable-hdpi/ab_texture_tile_heisendroid.png | Bin 135 -> 0 bytes res/drawable-hdpi/ab_transparent_heisendroid.9.png | Bin 151 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 96 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 109 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 110 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 146 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 143 -> 0 bytes res/drawable-hdpi/list_focused_heisendroid.9.png | Bin 117 -> 0 bytes res/drawable-hdpi/list_pressed_heisendroid.9.png | Bin 96 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 958 -> 0 bytes res/drawable-hdpi/progress_bg_heisendroid.9.png | Bin 107 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 843 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 110 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 283 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 274 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 418 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 334 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 94 -> 0 bytes res/drawable-hdpi/tab_selected_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 95 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 88 -> 0 bytes res/drawable-hdpi/tab_unselected_heisendroid.9.png | Bin 91 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 88 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 119 -> 0 bytes res/drawable-mdpi/ab_solid_heisendroid.9.png | Bin 125 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 125 -> 0 bytes res/drawable-mdpi/ab_texture_tile_heisendroid.png | Bin 100 -> 0 bytes res/drawable-mdpi/ab_transparent_heisendroid.9.png | Bin 121 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 94 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 107 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 114 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 120 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 119 -> 0 bytes res/drawable-mdpi/list_focused_heisendroid.9.png | Bin 104 -> 0 bytes res/drawable-mdpi/list_pressed_heisendroid.9.png | Bin 94 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 666 -> 0 bytes res/drawable-mdpi/progress_bg_heisendroid.9.png | Bin 100 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 540 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 100 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 231 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 220 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 308 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 259 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 98 -> 0 bytes res/drawable-mdpi/tab_selected_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 90 -> 0 bytes res/drawable-mdpi/tab_unselected_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 91 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 172 -> 0 bytes res/drawable-xhdpi/ab_solid_heisendroid.9.png | Bin 176 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 167 -> 0 bytes res/drawable-xhdpi/ab_texture_tile_heisendroid.png | Bin 118 -> 0 bytes .../ab_transparent_heisendroid.9.png | Bin 170 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 104 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 114 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 116 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 173 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 173 -> 0 bytes res/drawable-xhdpi/list_focused_heisendroid.9.png | Bin 125 -> 0 bytes res/drawable-xhdpi/list_pressed_heisendroid.9.png | Bin 99 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 1500 -> 0 bytes res/drawable-xhdpi/progress_bg_heisendroid.9.png | Bin 111 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 1079 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 111 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 344 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 331 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 516 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 442 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 96 -> 0 bytes res/drawable-xhdpi/tab_selected_heisendroid.9.png | Bin 92 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 97 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 89 -> 0 bytes .../tab_unselected_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 89 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 231 -> 0 bytes res/drawable-xxhdpi/ab_solid_heisendroid.9.png | Bin 228 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 223 -> 0 bytes .../ab_texture_tile_heisendroid.png | Bin 267 -> 0 bytes .../ab_transparent_heisendroid.9.png | Bin 253 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 106 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 105 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 119 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 230 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 226 -> 0 bytes res/drawable-xxhdpi/list_focused_heisendroid.9.png | Bin 123 -> 0 bytes res/drawable-xxhdpi/list_pressed_heisendroid.9.png | Bin 107 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 4099 -> 0 bytes res/drawable-xxhdpi/progress_bg_heisendroid.9.png | Bin 121 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 1478 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 121 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 361 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 362 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 531 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 519 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 100 -> 0 bytes res/drawable-xxhdpi/tab_selected_heisendroid.9.png | Bin 96 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 100 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_unselected_heisendroid.9.png | Bin 95 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 90 -> 0 bytes .../ab_background_textured_heisendroid.xml | 21 --- res/drawable/btn_cab_done_heisendroid.xml | 27 ---- res/drawable/progress_horizontal_heisendroid.xml | 35 ----- res/drawable/selectable_background_heisendroid.xml | 25 ---- res/drawable/spinner_background_ab_heisendroid.xml | 28 ---- res/drawable/tab_indicator_ab_heisendroid.xml | 37 ----- res/layout/preferences.xml | 35 +++++ res/values-fr/strings.xml | 5 +- res/values/preference_keys.xml | 4 +- res/values/strings.xml | 9 +- res/values/styles_heisendroid.xml | 88 ------------ res/values/themes.xml | 18 +++ res/xml/preferences.xml | 12 +- .../android/saymytexts/SayMyTextService.java | 150 ++++++++++++++------- .../android/saymytexts/SayMyTextsApplication.java | 2 +- .../android/saymytexts/SettingsActivity.java | 23 +++- .../BootCompletedBroadcastReceiver.java | 0 .../DeviceConnectionBroadcastReceiver.java | 0 .../DictateSmsBroadcastReceiver.java | 38 +----- .../NewTextBroadcastReceiver.java | 38 +----- .../SayNextActionBroadcastReceiver.java | 41 +----- .../android/saymytexts/model/Configuration.java | 121 +++++++++++++++++ .../org/chorem/android/saymytexts/model}/SMS.java | 2 +- .../utils/SayMyTextsRecognitionListener.java | 72 ++++++++++ .../android/saymytexts/utils}/SayMyTextsUtils.java | 35 ++++- 132 files changed, 490 insertions(+), 449 deletions(-) delete mode 100644 res/drawable-hdpi/ab_bottom_solid_heisendroid.9.png delete mode 100644 res/drawable-hdpi/ab_solid_heisendroid.9.png delete mode 100644 res/drawable-hdpi/ab_stacked_solid_heisendroid.9.png delete mode 100644 res/drawable-hdpi/ab_texture_tile_heisendroid.png delete mode 100644 res/drawable-hdpi/ab_transparent_heisendroid.9.png delete mode 100644 res/drawable-hdpi/btn_cab_done_default_heisendroid.9.png delete mode 100644 res/drawable-hdpi/btn_cab_done_focused_heisendroid.9.png delete mode 100644 res/drawable-hdpi/btn_cab_done_pressed_heisendroid.9.png delete mode 100644 res/drawable-hdpi/cab_background_bottom_heisendroid.9.png delete mode 100644 res/drawable-hdpi/cab_background_top_heisendroid.9.png delete mode 100644 res/drawable-hdpi/list_focused_heisendroid.9.png delete mode 100644 res/drawable-hdpi/list_pressed_heisendroid.9.png delete mode 100644 res/drawable-hdpi/menu_dropdown_panel_heisendroid.9.png delete mode 100644 res/drawable-hdpi/progress_bg_heisendroid.9.png delete mode 100644 res/drawable-hdpi/progress_primary_heisendroid.9.png delete mode 100644 res/drawable-hdpi/progress_secondary_heisendroid.9.png delete mode 100644 res/drawable-hdpi/spinner_ab_default_heisendroid.9.png delete mode 100644 res/drawable-hdpi/spinner_ab_disabled_heisendroid.9.png delete mode 100644 res/drawable-hdpi/spinner_ab_focused_heisendroid.9.png delete mode 100644 res/drawable-hdpi/spinner_ab_pressed_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_selected_focused_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_selected_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_selected_pressed_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_unselected_focused_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_unselected_heisendroid.9.png delete mode 100644 res/drawable-hdpi/tab_unselected_pressed_heisendroid.9.png delete mode 100644 res/drawable-mdpi/ab_bottom_solid_heisendroid.9.png delete mode 100644 res/drawable-mdpi/ab_solid_heisendroid.9.png delete mode 100644 res/drawable-mdpi/ab_stacked_solid_heisendroid.9.png delete mode 100644 res/drawable-mdpi/ab_texture_tile_heisendroid.png delete mode 100644 res/drawable-mdpi/ab_transparent_heisendroid.9.png delete mode 100644 res/drawable-mdpi/btn_cab_done_default_heisendroid.9.png delete mode 100644 res/drawable-mdpi/btn_cab_done_focused_heisendroid.9.png delete mode 100644 res/drawable-mdpi/btn_cab_done_pressed_heisendroid.9.png delete mode 100644 res/drawable-mdpi/cab_background_bottom_heisendroid.9.png delete mode 100644 res/drawable-mdpi/cab_background_top_heisendroid.9.png delete mode 100644 res/drawable-mdpi/list_focused_heisendroid.9.png delete mode 100644 res/drawable-mdpi/list_pressed_heisendroid.9.png delete mode 100644 res/drawable-mdpi/menu_dropdown_panel_heisendroid.9.png delete mode 100644 res/drawable-mdpi/progress_bg_heisendroid.9.png delete mode 100644 res/drawable-mdpi/progress_primary_heisendroid.9.png delete mode 100644 res/drawable-mdpi/progress_secondary_heisendroid.9.png delete mode 100644 res/drawable-mdpi/spinner_ab_default_heisendroid.9.png delete mode 100644 res/drawable-mdpi/spinner_ab_disabled_heisendroid.9.png delete mode 100644 res/drawable-mdpi/spinner_ab_focused_heisendroid.9.png delete mode 100644 res/drawable-mdpi/spinner_ab_pressed_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_selected_focused_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_selected_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_selected_pressed_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_unselected_focused_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_unselected_heisendroid.9.png delete mode 100644 res/drawable-mdpi/tab_unselected_pressed_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/ab_bottom_solid_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/ab_solid_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/ab_stacked_solid_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/ab_texture_tile_heisendroid.png delete mode 100644 res/drawable-xhdpi/ab_transparent_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/btn_cab_done_default_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/btn_cab_done_focused_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/btn_cab_done_pressed_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/cab_background_bottom_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/cab_background_top_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/list_focused_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/list_pressed_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/menu_dropdown_panel_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/progress_bg_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/progress_primary_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/progress_secondary_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/spinner_ab_default_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/spinner_ab_disabled_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/spinner_ab_focused_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/spinner_ab_pressed_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_selected_focused_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_selected_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_selected_pressed_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_unselected_focused_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_unselected_heisendroid.9.png delete mode 100644 res/drawable-xhdpi/tab_unselected_pressed_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/ab_bottom_solid_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/ab_solid_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/ab_stacked_solid_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/ab_texture_tile_heisendroid.png delete mode 100644 res/drawable-xxhdpi/ab_transparent_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/btn_cab_done_default_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/btn_cab_done_focused_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/btn_cab_done_pressed_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/cab_background_bottom_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/cab_background_top_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/list_focused_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/list_pressed_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/menu_dropdown_panel_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/progress_bg_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/progress_primary_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/progress_secondary_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/spinner_ab_default_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/spinner_ab_disabled_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/spinner_ab_focused_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/spinner_ab_pressed_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_selected_focused_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_selected_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_selected_pressed_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_unselected_focused_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_unselected_heisendroid.9.png delete mode 100644 res/drawable-xxhdpi/tab_unselected_pressed_heisendroid.9.png delete mode 100644 res/drawable/ab_background_textured_heisendroid.xml delete mode 100644 res/drawable/btn_cab_done_heisendroid.xml delete mode 100644 res/drawable/progress_horizontal_heisendroid.xml delete mode 100644 res/drawable/selectable_background_heisendroid.xml delete mode 100644 res/drawable/spinner_background_ab_heisendroid.xml delete mode 100644 res/drawable/tab_indicator_ab_heisendroid.xml create mode 100644 res/layout/preferences.xml delete mode 100644 res/values/styles_heisendroid.xml create mode 100644 res/values/themes.xml rename src/{ => main/java}/org/chorem/android/saymytexts/SayMyTextService.java (83%) rename src/{ => main/java}/org/chorem/android/saymytexts/SayMyTextsApplication.java (97%) rename src/{ => main/java}/org/chorem/android/saymytexts/SettingsActivity.java (92%) rename src/{ => main/java}/org/chorem/android/saymytexts/broadcastreceiver/BootCompletedBroadcastReceiver.java (100%) rename src/{ => main/java}/org/chorem/android/saymytexts/broadcastreceiver/DeviceConnectionBroadcastReceiver.java (100%) rename src/{ => main/java}/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java (76%) rename src/{ => main/java}/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java (66%) rename src/{ => main/java}/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java (84%) create mode 100644 src/main/java/org/chorem/android/saymytexts/model/Configuration.java rename src/{org/chorem/android/saymytexts => main/java/org/chorem/android/saymytexts/model}/SMS.java (97%) create mode 100644 src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsRecognitionListener.java rename src/{org/chorem/android/saymytexts => main/java/org/chorem/android/saymytexts/utils}/SayMyTextsUtils.java (79%) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository say-my-texts. See http://git.chorem.org/say-my-texts.git commit a64f69740230c8854d822e3c756eba997d4f7d56 Author: Kevin Morin <morin@codelutin.com> Date: Thu Jan 29 14:47:45 2015 +0100 - use audio focus to pause the musis stream instead of muting it - project file architecture modification - refs #1103 try to use material design with appcompat - fixes #1157 Say the name of the caller - refactoring --- .gitignore | 3 +- AndroidManifest.xml | 28 ++-- pom.xml | 42 +++++- .../ab_bottom_solid_heisendroid.9.png | Bin 145 -> 0 bytes res/drawable-hdpi/ab_solid_heisendroid.9.png | Bin 152 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 145 -> 0 bytes res/drawable-hdpi/ab_texture_tile_heisendroid.png | Bin 135 -> 0 bytes res/drawable-hdpi/ab_transparent_heisendroid.9.png | Bin 151 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 96 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 109 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 110 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 146 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 143 -> 0 bytes res/drawable-hdpi/list_focused_heisendroid.9.png | Bin 117 -> 0 bytes res/drawable-hdpi/list_pressed_heisendroid.9.png | Bin 96 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 958 -> 0 bytes res/drawable-hdpi/progress_bg_heisendroid.9.png | Bin 107 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 843 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 110 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 283 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 274 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 418 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 334 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 94 -> 0 bytes res/drawable-hdpi/tab_selected_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 95 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 88 -> 0 bytes res/drawable-hdpi/tab_unselected_heisendroid.9.png | Bin 91 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 88 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 119 -> 0 bytes res/drawable-mdpi/ab_solid_heisendroid.9.png | Bin 125 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 125 -> 0 bytes res/drawable-mdpi/ab_texture_tile_heisendroid.png | Bin 100 -> 0 bytes res/drawable-mdpi/ab_transparent_heisendroid.9.png | Bin 121 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 94 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 107 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 114 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 120 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 119 -> 0 bytes res/drawable-mdpi/list_focused_heisendroid.9.png | Bin 104 -> 0 bytes res/drawable-mdpi/list_pressed_heisendroid.9.png | Bin 94 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 666 -> 0 bytes res/drawable-mdpi/progress_bg_heisendroid.9.png | Bin 100 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 540 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 100 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 231 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 220 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 308 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 259 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 98 -> 0 bytes res/drawable-mdpi/tab_selected_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 90 -> 0 bytes res/drawable-mdpi/tab_unselected_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 91 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 172 -> 0 bytes res/drawable-xhdpi/ab_solid_heisendroid.9.png | Bin 176 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 167 -> 0 bytes res/drawable-xhdpi/ab_texture_tile_heisendroid.png | Bin 118 -> 0 bytes .../ab_transparent_heisendroid.9.png | Bin 170 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 104 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 114 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 116 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 173 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 173 -> 0 bytes res/drawable-xhdpi/list_focused_heisendroid.9.png | Bin 125 -> 0 bytes res/drawable-xhdpi/list_pressed_heisendroid.9.png | Bin 99 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 1500 -> 0 bytes res/drawable-xhdpi/progress_bg_heisendroid.9.png | Bin 111 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 1079 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 111 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 344 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 331 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 516 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 442 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 96 -> 0 bytes res/drawable-xhdpi/tab_selected_heisendroid.9.png | Bin 92 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 97 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 89 -> 0 bytes .../tab_unselected_heisendroid.9.png | Bin 99 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 89 -> 0 bytes .../ab_bottom_solid_heisendroid.9.png | Bin 231 -> 0 bytes res/drawable-xxhdpi/ab_solid_heisendroid.9.png | Bin 228 -> 0 bytes .../ab_stacked_solid_heisendroid.9.png | Bin 223 -> 0 bytes .../ab_texture_tile_heisendroid.png | Bin 267 -> 0 bytes .../ab_transparent_heisendroid.9.png | Bin 253 -> 0 bytes .../btn_cab_done_default_heisendroid.9.png | Bin 106 -> 0 bytes .../btn_cab_done_focused_heisendroid.9.png | Bin 105 -> 0 bytes .../btn_cab_done_pressed_heisendroid.9.png | Bin 119 -> 0 bytes .../cab_background_bottom_heisendroid.9.png | Bin 230 -> 0 bytes .../cab_background_top_heisendroid.9.png | Bin 226 -> 0 bytes res/drawable-xxhdpi/list_focused_heisendroid.9.png | Bin 123 -> 0 bytes res/drawable-xxhdpi/list_pressed_heisendroid.9.png | Bin 107 -> 0 bytes .../menu_dropdown_panel_heisendroid.9.png | Bin 4099 -> 0 bytes res/drawable-xxhdpi/progress_bg_heisendroid.9.png | Bin 121 -> 0 bytes .../progress_primary_heisendroid.9.png | Bin 1478 -> 0 bytes .../progress_secondary_heisendroid.9.png | Bin 121 -> 0 bytes .../spinner_ab_default_heisendroid.9.png | Bin 361 -> 0 bytes .../spinner_ab_disabled_heisendroid.9.png | Bin 362 -> 0 bytes .../spinner_ab_focused_heisendroid.9.png | Bin 531 -> 0 bytes .../spinner_ab_pressed_heisendroid.9.png | Bin 519 -> 0 bytes .../tab_selected_focused_heisendroid.9.png | Bin 100 -> 0 bytes res/drawable-xxhdpi/tab_selected_heisendroid.9.png | Bin 96 -> 0 bytes .../tab_selected_pressed_heisendroid.9.png | Bin 100 -> 0 bytes .../tab_unselected_focused_heisendroid.9.png | Bin 90 -> 0 bytes .../tab_unselected_heisendroid.9.png | Bin 95 -> 0 bytes .../tab_unselected_pressed_heisendroid.9.png | Bin 90 -> 0 bytes .../ab_background_textured_heisendroid.xml | 21 --- res/drawable/btn_cab_done_heisendroid.xml | 27 ---- res/drawable/progress_horizontal_heisendroid.xml | 35 ----- res/drawable/selectable_background_heisendroid.xml | 25 ---- res/drawable/spinner_background_ab_heisendroid.xml | 28 ---- res/drawable/tab_indicator_ab_heisendroid.xml | 37 ----- res/layout/preferences.xml | 35 +++++ res/values-fr/strings.xml | 5 +- res/values/preference_keys.xml | 4 +- res/values/strings.xml | 9 +- res/values/styles_heisendroid.xml | 88 ------------ res/values/themes.xml | 18 +++ res/xml/preferences.xml | 12 +- .../android/saymytexts/SayMyTextService.java | 150 ++++++++++++++------- .../android/saymytexts/SayMyTextsApplication.java | 2 +- .../android/saymytexts/SettingsActivity.java | 23 +++- .../BootCompletedBroadcastReceiver.java | 0 .../DeviceConnectionBroadcastReceiver.java | 0 .../DictateSmsBroadcastReceiver.java | 34 +---- .../NewTextBroadcastReceiver.java | 38 +----- .../SayNextActionBroadcastReceiver.java | 44 ++---- .../android/saymytexts/model/Configuration.java | 121 +++++++++++++++++ .../org/chorem/android/saymytexts/model}/SMS.java | 2 +- .../utils/SayMyTextsRecognitionListener.java | 72 ++++++++++ .../android/saymytexts/utils}/SayMyTextsUtils.java | 35 ++++- 132 files changed, 495 insertions(+), 443 deletions(-) diff --git a/.gitignore b/.gitignore index d2a9c44..ab198db 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ /*.iws /*/*.iws /*~ -/*/*~ \ No newline at end of file +/*/*~ +/*/gen-external-apklibs \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml index eeab057..3448c5a 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -6,18 +6,21 @@ android:description="@string/app_description" android:installLocation="auto"> - <uses-sdk android:minSdkVersion="16" + <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17"/> - <uses-permission android:name="android.permission.RECEIVE_SMS" /> - <uses-permission android:name="android.permission.SEND_SMS"/> - <uses-permission android:name="android.permission.READ_PHONE_STATE" /> - <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> - <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="android.permission.BLUETOOTH" /> - <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.CALL_PHONE" /> + <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> + <uses-permission android:name="android.permission.READ_CONTACTS" /> + <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> + <uses-permission android:name="android.permission.RECEIVE_SMS" /> + <uses-permission android:name="android.permission.RECORD_AUDIO" /> + <uses-permission android:name="android.permission.SEND_SMS"/> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.WRITE_SETTINGS"/> <uses-feature android:name="android.hardware.telephony" android:required="true"/> @@ -26,9 +29,9 @@ <application android:name=".SayMyTextsApplication" android:label="@string/app_name" android:description="@string/app_description" - android:theme="@style/Theme.Heisendroid" android:icon="@drawable/ic_launcher_heisendroid" - android:logo="@drawable/ic_menu_logo"> + android:logo="@drawable/ic_menu_logo" + android:theme="@style/Theme.SayMyTextsTheme"> <activity android:name=".SettingsActivity" android:label="@string/app_name" @@ -56,9 +59,14 @@ </intent-filter> </receiver> + <receiver android:name=".broadcastreceiver.MediaButtonIntentReceiver"> + <intent-filter> + <action android:name="android.intent.action.MEDIA_BUTTON" /> + </intent-filter> + </receiver> + <!-- Crash report dialog--> <activity android:name="org.acra.CrashReportDialog" - android:theme="@style/Theme.Heisendroid" android:launchMode="singleInstance" android:excludeFromRecents="true" android:finishOnTaskLaunch="true" diff --git a/pom.xml b/pom.xml index d349d67..1181079 100644 --- a/pom.xml +++ b/pom.xml @@ -133,10 +133,41 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>android.support</groupId> + <artifactId>compatibility-v4</artifactId> + <version>21.0.3</version> + </dependency> + + <dependency> + <groupId>android.support</groupId> + <artifactId>compatibility-v7-appcompat</artifactId> + <version>21.0.3</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>android.support</groupId> + <artifactId>compatibility-v7-appcompat</artifactId> + <version>21.0.3</version> + <type>apklib</type> + </dependency> + <!--<dependency>--> - <!--<groupId>com.android.support</groupId>--> - <!--<artifactId>support-v4</artifactId>--> - <!--<version>19.0.1</version>--> + <!--<groupId>cn.kongnannan</groupId>--> + <!--<artifactId>preferencefragment</artifactId>--> + <!--<version>1.1</version>--> + <!--<type>aar</type>--> + <!--<exclusions>--> + <!--<exclusion>--> + <!--<groupId>com.android.support</groupId>--> + <!--<artifactId>support-v4</artifactId>--> + <!--</exclusion>--> + <!--<exclusion>--> + <!--<groupId>com.android.support</groupId>--> + <!--<artifactId>appcompat-v7</artifactId>--> + <!--</exclusion>--> + <!--</exclusions>--> <!--</dependency>--> <dependency> @@ -148,15 +179,14 @@ </dependencies> <build> - <sourceDirectory>src</sourceDirectory> <resources> <resource> <directory>res</directory> <filtering>false</filtering> </resource> </resources> - <plugins> + <plugins> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> @@ -172,7 +202,7 @@ </executions> <configuration> <sdk> - <platform>16</platform> + <platform>21</platform> </sdk> <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> <resourceDirectory>${project.basedir}/res</resourceDirectory> diff --git a/res/drawable-hdpi/ab_bottom_solid_heisendroid.9.png b/res/drawable-hdpi/ab_bottom_solid_heisendroid.9.png deleted file mode 100644 index 1c5e150..0000000 Binary files a/res/drawable-hdpi/ab_bottom_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/ab_solid_heisendroid.9.png b/res/drawable-hdpi/ab_solid_heisendroid.9.png deleted file mode 100644 index a795149..0000000 Binary files a/res/drawable-hdpi/ab_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/ab_stacked_solid_heisendroid.9.png b/res/drawable-hdpi/ab_stacked_solid_heisendroid.9.png deleted file mode 100644 index ddbe3da..0000000 Binary files a/res/drawable-hdpi/ab_stacked_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/ab_texture_tile_heisendroid.png b/res/drawable-hdpi/ab_texture_tile_heisendroid.png deleted file mode 100644 index 23108cc..0000000 Binary files a/res/drawable-hdpi/ab_texture_tile_heisendroid.png and /dev/null differ diff --git a/res/drawable-hdpi/ab_transparent_heisendroid.9.png b/res/drawable-hdpi/ab_transparent_heisendroid.9.png deleted file mode 100644 index 89d9760..0000000 Binary files a/res/drawable-hdpi/ab_transparent_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/btn_cab_done_default_heisendroid.9.png b/res/drawable-hdpi/btn_cab_done_default_heisendroid.9.png deleted file mode 100644 index f33511a..0000000 Binary files a/res/drawable-hdpi/btn_cab_done_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/btn_cab_done_focused_heisendroid.9.png b/res/drawable-hdpi/btn_cab_done_focused_heisendroid.9.png deleted file mode 100644 index 1c7111e..0000000 Binary files a/res/drawable-hdpi/btn_cab_done_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/btn_cab_done_pressed_heisendroid.9.png b/res/drawable-hdpi/btn_cab_done_pressed_heisendroid.9.png deleted file mode 100644 index 6a401d9..0000000 Binary files a/res/drawable-hdpi/btn_cab_done_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/cab_background_bottom_heisendroid.9.png b/res/drawable-hdpi/cab_background_bottom_heisendroid.9.png deleted file mode 100644 index 8c0acfd..0000000 Binary files a/res/drawable-hdpi/cab_background_bottom_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/cab_background_top_heisendroid.9.png b/res/drawable-hdpi/cab_background_top_heisendroid.9.png deleted file mode 100644 index 3824b47..0000000 Binary files a/res/drawable-hdpi/cab_background_top_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/list_focused_heisendroid.9.png b/res/drawable-hdpi/list_focused_heisendroid.9.png deleted file mode 100644 index 4e554ec..0000000 Binary files a/res/drawable-hdpi/list_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/list_pressed_heisendroid.9.png b/res/drawable-hdpi/list_pressed_heisendroid.9.png deleted file mode 100644 index f6b3335..0000000 Binary files a/res/drawable-hdpi/list_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/menu_dropdown_panel_heisendroid.9.png b/res/drawable-hdpi/menu_dropdown_panel_heisendroid.9.png deleted file mode 100644 index 10682aa..0000000 Binary files a/res/drawable-hdpi/menu_dropdown_panel_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/progress_bg_heisendroid.9.png b/res/drawable-hdpi/progress_bg_heisendroid.9.png deleted file mode 100644 index 04d5e30..0000000 Binary files a/res/drawable-hdpi/progress_bg_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/progress_primary_heisendroid.9.png b/res/drawable-hdpi/progress_primary_heisendroid.9.png deleted file mode 100644 index e7b571b..0000000 Binary files a/res/drawable-hdpi/progress_primary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/progress_secondary_heisendroid.9.png b/res/drawable-hdpi/progress_secondary_heisendroid.9.png deleted file mode 100644 index 7d84a89..0000000 Binary files a/res/drawable-hdpi/progress_secondary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/spinner_ab_default_heisendroid.9.png b/res/drawable-hdpi/spinner_ab_default_heisendroid.9.png deleted file mode 100644 index a4c9572..0000000 Binary files a/res/drawable-hdpi/spinner_ab_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/spinner_ab_disabled_heisendroid.9.png b/res/drawable-hdpi/spinner_ab_disabled_heisendroid.9.png deleted file mode 100644 index 2b82465..0000000 Binary files a/res/drawable-hdpi/spinner_ab_disabled_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/spinner_ab_focused_heisendroid.9.png b/res/drawable-hdpi/spinner_ab_focused_heisendroid.9.png deleted file mode 100644 index c2d365b..0000000 Binary files a/res/drawable-hdpi/spinner_ab_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/spinner_ab_pressed_heisendroid.9.png b/res/drawable-hdpi/spinner_ab_pressed_heisendroid.9.png deleted file mode 100644 index 7f5bb88..0000000 Binary files a/res/drawable-hdpi/spinner_ab_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_selected_focused_heisendroid.9.png b/res/drawable-hdpi/tab_selected_focused_heisendroid.9.png deleted file mode 100644 index 4cbdf3e..0000000 Binary files a/res/drawable-hdpi/tab_selected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_selected_heisendroid.9.png b/res/drawable-hdpi/tab_selected_heisendroid.9.png deleted file mode 100644 index 4bd74dc..0000000 Binary files a/res/drawable-hdpi/tab_selected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_selected_pressed_heisendroid.9.png b/res/drawable-hdpi/tab_selected_pressed_heisendroid.9.png deleted file mode 100644 index 72a4df4..0000000 Binary files a/res/drawable-hdpi/tab_selected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_unselected_focused_heisendroid.9.png b/res/drawable-hdpi/tab_unselected_focused_heisendroid.9.png deleted file mode 100644 index 297f09f..0000000 Binary files a/res/drawable-hdpi/tab_unselected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_unselected_heisendroid.9.png b/res/drawable-hdpi/tab_unselected_heisendroid.9.png deleted file mode 100644 index 9b7b2e7..0000000 Binary files a/res/drawable-hdpi/tab_unselected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-hdpi/tab_unselected_pressed_heisendroid.9.png b/res/drawable-hdpi/tab_unselected_pressed_heisendroid.9.png deleted file mode 100644 index f444922..0000000 Binary files a/res/drawable-hdpi/tab_unselected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/ab_bottom_solid_heisendroid.9.png b/res/drawable-mdpi/ab_bottom_solid_heisendroid.9.png deleted file mode 100644 index c6e0561..0000000 Binary files a/res/drawable-mdpi/ab_bottom_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/ab_solid_heisendroid.9.png b/res/drawable-mdpi/ab_solid_heisendroid.9.png deleted file mode 100644 index 49aeab0..0000000 Binary files a/res/drawable-mdpi/ab_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/ab_stacked_solid_heisendroid.9.png b/res/drawable-mdpi/ab_stacked_solid_heisendroid.9.png deleted file mode 100644 index f97a93b..0000000 Binary files a/res/drawable-mdpi/ab_stacked_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/ab_texture_tile_heisendroid.png b/res/drawable-mdpi/ab_texture_tile_heisendroid.png deleted file mode 100644 index 751ef61..0000000 Binary files a/res/drawable-mdpi/ab_texture_tile_heisendroid.png and /dev/null differ diff --git a/res/drawable-mdpi/ab_transparent_heisendroid.9.png b/res/drawable-mdpi/ab_transparent_heisendroid.9.png deleted file mode 100644 index 28c830c..0000000 Binary files a/res/drawable-mdpi/ab_transparent_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/btn_cab_done_default_heisendroid.9.png b/res/drawable-mdpi/btn_cab_done_default_heisendroid.9.png deleted file mode 100644 index 87cdba6..0000000 Binary files a/res/drawable-mdpi/btn_cab_done_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/btn_cab_done_focused_heisendroid.9.png b/res/drawable-mdpi/btn_cab_done_focused_heisendroid.9.png deleted file mode 100644 index 8ca8684..0000000 Binary files a/res/drawable-mdpi/btn_cab_done_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/btn_cab_done_pressed_heisendroid.9.png b/res/drawable-mdpi/btn_cab_done_pressed_heisendroid.9.png deleted file mode 100644 index 710d171..0000000 Binary files a/res/drawable-mdpi/btn_cab_done_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/cab_background_bottom_heisendroid.9.png b/res/drawable-mdpi/cab_background_bottom_heisendroid.9.png deleted file mode 100644 index 41dda2f..0000000 Binary files a/res/drawable-mdpi/cab_background_bottom_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/cab_background_top_heisendroid.9.png b/res/drawable-mdpi/cab_background_top_heisendroid.9.png deleted file mode 100644 index 7070314..0000000 Binary files a/res/drawable-mdpi/cab_background_top_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/list_focused_heisendroid.9.png b/res/drawable-mdpi/list_focused_heisendroid.9.png deleted file mode 100644 index f81092b..0000000 Binary files a/res/drawable-mdpi/list_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/list_pressed_heisendroid.9.png b/res/drawable-mdpi/list_pressed_heisendroid.9.png deleted file mode 100644 index 2fbf946..0000000 Binary files a/res/drawable-mdpi/list_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/menu_dropdown_panel_heisendroid.9.png b/res/drawable-mdpi/menu_dropdown_panel_heisendroid.9.png deleted file mode 100644 index acf52bb..0000000 Binary files a/res/drawable-mdpi/menu_dropdown_panel_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/progress_bg_heisendroid.9.png b/res/drawable-mdpi/progress_bg_heisendroid.9.png deleted file mode 100644 index c3160ad..0000000 Binary files a/res/drawable-mdpi/progress_bg_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/progress_primary_heisendroid.9.png b/res/drawable-mdpi/progress_primary_heisendroid.9.png deleted file mode 100644 index bb7e818..0000000 Binary files a/res/drawable-mdpi/progress_primary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/progress_secondary_heisendroid.9.png b/res/drawable-mdpi/progress_secondary_heisendroid.9.png deleted file mode 100644 index 67869a9..0000000 Binary files a/res/drawable-mdpi/progress_secondary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/spinner_ab_default_heisendroid.9.png b/res/drawable-mdpi/spinner_ab_default_heisendroid.9.png deleted file mode 100644 index 382c044..0000000 Binary files a/res/drawable-mdpi/spinner_ab_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/spinner_ab_disabled_heisendroid.9.png b/res/drawable-mdpi/spinner_ab_disabled_heisendroid.9.png deleted file mode 100644 index 751030b..0000000 Binary files a/res/drawable-mdpi/spinner_ab_disabled_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/spinner_ab_focused_heisendroid.9.png b/res/drawable-mdpi/spinner_ab_focused_heisendroid.9.png deleted file mode 100644 index a2645ab..0000000 Binary files a/res/drawable-mdpi/spinner_ab_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/spinner_ab_pressed_heisendroid.9.png b/res/drawable-mdpi/spinner_ab_pressed_heisendroid.9.png deleted file mode 100644 index ebeec01..0000000 Binary files a/res/drawable-mdpi/spinner_ab_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_selected_focused_heisendroid.9.png b/res/drawable-mdpi/tab_selected_focused_heisendroid.9.png deleted file mode 100644 index a223e75..0000000 Binary files a/res/drawable-mdpi/tab_selected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_selected_heisendroid.9.png b/res/drawable-mdpi/tab_selected_heisendroid.9.png deleted file mode 100644 index e9d4956..0000000 Binary files a/res/drawable-mdpi/tab_selected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_selected_pressed_heisendroid.9.png b/res/drawable-mdpi/tab_selected_pressed_heisendroid.9.png deleted file mode 100644 index 6e71696..0000000 Binary files a/res/drawable-mdpi/tab_selected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_unselected_focused_heisendroid.9.png b/res/drawable-mdpi/tab_unselected_focused_heisendroid.9.png deleted file mode 100644 index abea8da..0000000 Binary files a/res/drawable-mdpi/tab_unselected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_unselected_heisendroid.9.png b/res/drawable-mdpi/tab_unselected_heisendroid.9.png deleted file mode 100644 index 6ca134a..0000000 Binary files a/res/drawable-mdpi/tab_unselected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-mdpi/tab_unselected_pressed_heisendroid.9.png b/res/drawable-mdpi/tab_unselected_pressed_heisendroid.9.png deleted file mode 100644 index cce572f..0000000 Binary files a/res/drawable-mdpi/tab_unselected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/ab_bottom_solid_heisendroid.9.png b/res/drawable-xhdpi/ab_bottom_solid_heisendroid.9.png deleted file mode 100644 index cd366c8..0000000 Binary files a/res/drawable-xhdpi/ab_bottom_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/ab_solid_heisendroid.9.png b/res/drawable-xhdpi/ab_solid_heisendroid.9.png deleted file mode 100644 index f042203..0000000 Binary files a/res/drawable-xhdpi/ab_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/ab_stacked_solid_heisendroid.9.png b/res/drawable-xhdpi/ab_stacked_solid_heisendroid.9.png deleted file mode 100644 index f1b1a6c..0000000 Binary files a/res/drawable-xhdpi/ab_stacked_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/ab_texture_tile_heisendroid.png b/res/drawable-xhdpi/ab_texture_tile_heisendroid.png deleted file mode 100644 index 5cae3f1..0000000 Binary files a/res/drawable-xhdpi/ab_texture_tile_heisendroid.png and /dev/null differ diff --git a/res/drawable-xhdpi/ab_transparent_heisendroid.9.png b/res/drawable-xhdpi/ab_transparent_heisendroid.9.png deleted file mode 100644 index bf8e847..0000000 Binary files a/res/drawable-xhdpi/ab_transparent_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/btn_cab_done_default_heisendroid.9.png b/res/drawable-xhdpi/btn_cab_done_default_heisendroid.9.png deleted file mode 100644 index 7d4f651..0000000 Binary files a/res/drawable-xhdpi/btn_cab_done_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/btn_cab_done_focused_heisendroid.9.png b/res/drawable-xhdpi/btn_cab_done_focused_heisendroid.9.png deleted file mode 100644 index b8d84e9..0000000 Binary files a/res/drawable-xhdpi/btn_cab_done_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/btn_cab_done_pressed_heisendroid.9.png b/res/drawable-xhdpi/btn_cab_done_pressed_heisendroid.9.png deleted file mode 100644 index ea667af..0000000 Binary files a/res/drawable-xhdpi/btn_cab_done_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/cab_background_bottom_heisendroid.9.png b/res/drawable-xhdpi/cab_background_bottom_heisendroid.9.png deleted file mode 100644 index 6f7d574..0000000 Binary files a/res/drawable-xhdpi/cab_background_bottom_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/cab_background_top_heisendroid.9.png b/res/drawable-xhdpi/cab_background_top_heisendroid.9.png deleted file mode 100644 index 37060fb..0000000 Binary files a/res/drawable-xhdpi/cab_background_top_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/list_focused_heisendroid.9.png b/res/drawable-xhdpi/list_focused_heisendroid.9.png deleted file mode 100644 index 14a34b2..0000000 Binary files a/res/drawable-xhdpi/list_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/list_pressed_heisendroid.9.png b/res/drawable-xhdpi/list_pressed_heisendroid.9.png deleted file mode 100644 index 3a44617..0000000 Binary files a/res/drawable-xhdpi/list_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/menu_dropdown_panel_heisendroid.9.png b/res/drawable-xhdpi/menu_dropdown_panel_heisendroid.9.png deleted file mode 100644 index 7cc285b..0000000 Binary files a/res/drawable-xhdpi/menu_dropdown_panel_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/progress_bg_heisendroid.9.png b/res/drawable-xhdpi/progress_bg_heisendroid.9.png deleted file mode 100644 index 288f260..0000000 Binary files a/res/drawable-xhdpi/progress_bg_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/progress_primary_heisendroid.9.png b/res/drawable-xhdpi/progress_primary_heisendroid.9.png deleted file mode 100644 index be9c19b..0000000 Binary files a/res/drawable-xhdpi/progress_primary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/progress_secondary_heisendroid.9.png b/res/drawable-xhdpi/progress_secondary_heisendroid.9.png deleted file mode 100644 index 7e70a90..0000000 Binary files a/res/drawable-xhdpi/progress_secondary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/spinner_ab_default_heisendroid.9.png b/res/drawable-xhdpi/spinner_ab_default_heisendroid.9.png deleted file mode 100644 index adbf47d..0000000 Binary files a/res/drawable-xhdpi/spinner_ab_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/spinner_ab_disabled_heisendroid.9.png b/res/drawable-xhdpi/spinner_ab_disabled_heisendroid.9.png deleted file mode 100644 index 8c819a4..0000000 Binary files a/res/drawable-xhdpi/spinner_ab_disabled_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/spinner_ab_focused_heisendroid.9.png b/res/drawable-xhdpi/spinner_ab_focused_heisendroid.9.png deleted file mode 100644 index 057e06b..0000000 Binary files a/res/drawable-xhdpi/spinner_ab_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/spinner_ab_pressed_heisendroid.9.png b/res/drawable-xhdpi/spinner_ab_pressed_heisendroid.9.png deleted file mode 100644 index be89a77..0000000 Binary files a/res/drawable-xhdpi/spinner_ab_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_selected_focused_heisendroid.9.png b/res/drawable-xhdpi/tab_selected_focused_heisendroid.9.png deleted file mode 100644 index 9200ede..0000000 Binary files a/res/drawable-xhdpi/tab_selected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_selected_heisendroid.9.png b/res/drawable-xhdpi/tab_selected_heisendroid.9.png deleted file mode 100644 index d3fe12f..0000000 Binary files a/res/drawable-xhdpi/tab_selected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_selected_pressed_heisendroid.9.png b/res/drawable-xhdpi/tab_selected_pressed_heisendroid.9.png deleted file mode 100644 index 0063d77..0000000 Binary files a/res/drawable-xhdpi/tab_selected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_unselected_focused_heisendroid.9.png b/res/drawable-xhdpi/tab_unselected_focused_heisendroid.9.png deleted file mode 100644 index 7b357fa..0000000 Binary files a/res/drawable-xhdpi/tab_unselected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_unselected_heisendroid.9.png b/res/drawable-xhdpi/tab_unselected_heisendroid.9.png deleted file mode 100644 index eedf423..0000000 Binary files a/res/drawable-xhdpi/tab_unselected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/tab_unselected_pressed_heisendroid.9.png b/res/drawable-xhdpi/tab_unselected_pressed_heisendroid.9.png deleted file mode 100644 index dcc5014..0000000 Binary files a/res/drawable-xhdpi/tab_unselected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ab_bottom_solid_heisendroid.9.png b/res/drawable-xxhdpi/ab_bottom_solid_heisendroid.9.png deleted file mode 100644 index 4847418..0000000 Binary files a/res/drawable-xxhdpi/ab_bottom_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ab_solid_heisendroid.9.png b/res/drawable-xxhdpi/ab_solid_heisendroid.9.png deleted file mode 100644 index af2859f..0000000 Binary files a/res/drawable-xxhdpi/ab_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ab_stacked_solid_heisendroid.9.png b/res/drawable-xxhdpi/ab_stacked_solid_heisendroid.9.png deleted file mode 100644 index 7d6fbb9..0000000 Binary files a/res/drawable-xxhdpi/ab_stacked_solid_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ab_texture_tile_heisendroid.png b/res/drawable-xxhdpi/ab_texture_tile_heisendroid.png deleted file mode 100644 index 28d1762..0000000 Binary files a/res/drawable-xxhdpi/ab_texture_tile_heisendroid.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ab_transparent_heisendroid.9.png b/res/drawable-xxhdpi/ab_transparent_heisendroid.9.png deleted file mode 100644 index e13e7a8..0000000 Binary files a/res/drawable-xxhdpi/ab_transparent_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/btn_cab_done_default_heisendroid.9.png b/res/drawable-xxhdpi/btn_cab_done_default_heisendroid.9.png deleted file mode 100644 index a389add..0000000 Binary files a/res/drawable-xxhdpi/btn_cab_done_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/btn_cab_done_focused_heisendroid.9.png b/res/drawable-xxhdpi/btn_cab_done_focused_heisendroid.9.png deleted file mode 100644 index 395a6d7..0000000 Binary files a/res/drawable-xxhdpi/btn_cab_done_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/btn_cab_done_pressed_heisendroid.9.png b/res/drawable-xxhdpi/btn_cab_done_pressed_heisendroid.9.png deleted file mode 100644 index 22d9eb2..0000000 Binary files a/res/drawable-xxhdpi/btn_cab_done_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/cab_background_bottom_heisendroid.9.png b/res/drawable-xxhdpi/cab_background_bottom_heisendroid.9.png deleted file mode 100644 index 5443052..0000000 Binary files a/res/drawable-xxhdpi/cab_background_bottom_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/cab_background_top_heisendroid.9.png b/res/drawable-xxhdpi/cab_background_top_heisendroid.9.png deleted file mode 100644 index 0203297..0000000 Binary files a/res/drawable-xxhdpi/cab_background_top_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/list_focused_heisendroid.9.png b/res/drawable-xxhdpi/list_focused_heisendroid.9.png deleted file mode 100644 index 15df31b..0000000 Binary files a/res/drawable-xxhdpi/list_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/list_pressed_heisendroid.9.png b/res/drawable-xxhdpi/list_pressed_heisendroid.9.png deleted file mode 100644 index 2daa16e..0000000 Binary files a/res/drawable-xxhdpi/list_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/menu_dropdown_panel_heisendroid.9.png b/res/drawable-xxhdpi/menu_dropdown_panel_heisendroid.9.png deleted file mode 100644 index c891108..0000000 Binary files a/res/drawable-xxhdpi/menu_dropdown_panel_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/progress_bg_heisendroid.9.png b/res/drawable-xxhdpi/progress_bg_heisendroid.9.png deleted file mode 100644 index 29fed19..0000000 Binary files a/res/drawable-xxhdpi/progress_bg_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/progress_primary_heisendroid.9.png b/res/drawable-xxhdpi/progress_primary_heisendroid.9.png deleted file mode 100644 index 2ad9e20..0000000 Binary files a/res/drawable-xxhdpi/progress_primary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/progress_secondary_heisendroid.9.png b/res/drawable-xxhdpi/progress_secondary_heisendroid.9.png deleted file mode 100644 index a352cdc..0000000 Binary files a/res/drawable-xxhdpi/progress_secondary_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/spinner_ab_default_heisendroid.9.png b/res/drawable-xxhdpi/spinner_ab_default_heisendroid.9.png deleted file mode 100644 index db9b56a..0000000 Binary files a/res/drawable-xxhdpi/spinner_ab_default_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/spinner_ab_disabled_heisendroid.9.png b/res/drawable-xxhdpi/spinner_ab_disabled_heisendroid.9.png deleted file mode 100644 index f6485cf..0000000 Binary files a/res/drawable-xxhdpi/spinner_ab_disabled_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/spinner_ab_focused_heisendroid.9.png b/res/drawable-xxhdpi/spinner_ab_focused_heisendroid.9.png deleted file mode 100644 index e3e8528..0000000 Binary files a/res/drawable-xxhdpi/spinner_ab_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/spinner_ab_pressed_heisendroid.9.png b/res/drawable-xxhdpi/spinner_ab_pressed_heisendroid.9.png deleted file mode 100644 index 66c6be0..0000000 Binary files a/res/drawable-xxhdpi/spinner_ab_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_selected_focused_heisendroid.9.png b/res/drawable-xxhdpi/tab_selected_focused_heisendroid.9.png deleted file mode 100644 index c7781ce..0000000 Binary files a/res/drawable-xxhdpi/tab_selected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_selected_heisendroid.9.png b/res/drawable-xxhdpi/tab_selected_heisendroid.9.png deleted file mode 100644 index ab30b59..0000000 Binary files a/res/drawable-xxhdpi/tab_selected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_selected_pressed_heisendroid.9.png b/res/drawable-xxhdpi/tab_selected_pressed_heisendroid.9.png deleted file mode 100644 index 4f3d976..0000000 Binary files a/res/drawable-xxhdpi/tab_selected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_unselected_focused_heisendroid.9.png b/res/drawable-xxhdpi/tab_unselected_focused_heisendroid.9.png deleted file mode 100644 index bd20a61..0000000 Binary files a/res/drawable-xxhdpi/tab_unselected_focused_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_unselected_heisendroid.9.png b/res/drawable-xxhdpi/tab_unselected_heisendroid.9.png deleted file mode 100644 index 0afdc99..0000000 Binary files a/res/drawable-xxhdpi/tab_unselected_heisendroid.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/tab_unselected_pressed_heisendroid.9.png b/res/drawable-xxhdpi/tab_unselected_pressed_heisendroid.9.png deleted file mode 100644 index 11e0d46..0000000 Binary files a/res/drawable-xxhdpi/tab_unselected_pressed_heisendroid.9.png and /dev/null differ diff --git a/res/drawable/ab_background_textured_heisendroid.xml b/res/drawable/ab_background_textured_heisendroid.xml deleted file mode 100644 index 08c195e..0000000 --- a/res/drawable/ab_background_textured_heisendroid.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ab_texture_tile_heisendroid" - android:tileMode="repeat" /> \ No newline at end of file diff --git a/res/drawable/btn_cab_done_heisendroid.xml b/res/drawable/btn_cab_done_heisendroid.xml deleted file mode 100644 index 6f97ed5..0000000 --- a/res/drawable/btn_cab_done_heisendroid.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_pressed="true" - android:drawable="@drawable/btn_cab_done_pressed_heisendroid" /> - <item android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/btn_cab_done_focused_heisendroid" /> - <item android:state_enabled="true" - android:drawable="@drawable/btn_cab_done_default_heisendroid" /> -</selector> diff --git a/res/drawable/progress_horizontal_heisendroid.xml b/res/drawable/progress_horizontal_heisendroid.xml deleted file mode 100644 index 0b6008d..0000000 --- a/res/drawable/progress_horizontal_heisendroid.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:id="@android:id/background" - android:drawable="@drawable/progress_bg_heisendroid" /> - - <item android:id="@android:id/secondaryProgress"> - <scale android:scaleWidth="100%" - android:drawable="@drawable/progress_secondary_heisendroid" /> - </item> - - <item android:id="@android:id/progress"> - <scale android:scaleWidth="100%" - android:drawable="@drawable/progress_primary_heisendroid" /> - </item> - -</layer-list> diff --git a/res/drawable/selectable_background_heisendroid.xml b/res/drawable/selectable_background_heisendroid.xml deleted file mode 100644 index 442cddc..0000000 --- a/res/drawable/selectable_background_heisendroid.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android" - android:exitFadeDuration="@android:integer/config_mediumAnimTime" > - <item android:state_pressed="false" android:state_focused="true" android:drawable="@drawable/list_focused_heisendroid" /> - <item android:state_pressed="true" android:drawable="@drawable/list_pressed_heisendroid" /> - <item android:drawable="@android:color/transparent" /> -</selector> \ No newline at end of file diff --git a/res/drawable/spinner_background_ab_heisendroid.xml b/res/drawable/spinner_background_ab_heisendroid.xml deleted file mode 100644 index 0324ad3..0000000 --- a/res/drawable/spinner_background_ab_heisendroid.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:state_enabled="false" - android:drawable="@drawable/spinner_ab_disabled_heisendroid" /> - <item android:state_pressed="true" - android:drawable="@drawable/spinner_ab_pressed_heisendroid" /> - <item android:state_pressed="false" android:state_focused="true" - android:drawable="@drawable/spinner_ab_focused_heisendroid" /> - <item android:drawable="@drawable/spinner_ab_default_heisendroid" /> -</selector> diff --git a/res/drawable/tab_indicator_ab_heisendroid.xml b/res/drawable/tab_indicator_ab_heisendroid.xml deleted file mode 100644 index 063f051..0000000 --- a/res/drawable/tab_indicator_ab_heisendroid.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <!-- Non focused states --> - <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@android:color/transparent" /> - <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_heisendroid" /> - - <!-- Focused states --> - <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/tab_unselected_focused_heisendroid" /> - <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_heisendroid" /> - - <!-- Pressed --> - <!-- Non focused states --> - <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_heisendroid" /> - <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_heisendroid" /> - - <!-- Focused states --> - <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_heisendroid" /> - <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_heisendroid" /> -</selector> diff --git a/res/layout/preferences.xml b/res/layout/preferences.xml new file mode 100644 index 0000000..b2afeec --- /dev/null +++ b/res/layout/preferences.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2006 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!-- Layout used by PreferenceScreen. This is inflated inside + android.R.layout.preference. --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <android.support.v7.widget.Toolbar + android:id="@+id/my_toolbar" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?attr/actionBarSize"/> + + <FrameLayout android:id="@android:id/content" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1"/> + +</LinearLayout> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 45ff85c..90f8f69 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -6,10 +6,13 @@ Vous pouvez également répondre à l\'expéditeur soit en l\'appelant soit en dictant la réponse.</string> <string name="sms_received">Nouveau message de %1$s : %2$s.</string> + <string name="call_received">appel de %s</string> <!-- Preferences --> - <string name="preferences_settings_label">Paramètres</string> + <string name="preferences_settings_sms_label">SMS</string> + <string name="preferences_settings_ringtone_label">Sonnerie</string> <string name="preference_reading_profile_label">Lecture des SMS</string> + <string name="preference_reading_caller_profile_label">Nom de l\'appelant avant la sonnerie</string> <string name="preference_enable_interaction_label">Interaction</string> <string name="preference_enable_interaction_sublabel">appel ou réponse</string> <string name="preference_voice_recognizer_max_attempt_number_label">Nombre maximum d\'essais</string> diff --git a/res/values/preference_keys.xml b/res/values/preference_keys.xml index f4da704..8028cf4 100644 --- a/res/values/preference_keys.xml +++ b/res/values/preference_keys.xml @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="preference_reading_profile_key">reading_profile</string> + <string name="preference_reading_caller_profile_key">reading_caller_profile</string> <string name="preference_enable_interaction_key">enable_interaction</string> <string name="preference_enable_heisendroid_mode_key">enable_heisendroid_mode</string> <string name="preference_voice_recognizer_max_attempt_number_key">preference_voice_recognizer_max_attempt_number</string> -<<<<<<< HEAD -======= <string name="preference_block_equals_sms_key">preference_block_equals_sms_key</string> ->>>>>>> feature/notification <string name="preference_notifications_key">preference_notifications_key</string> <string name="preference_test_sms_key">test_sms</string> <string name="preference_version_key">version</string> diff --git a/res/values/strings.xml b/res/values/strings.xml index a572357..38b8904 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -6,18 +6,17 @@ You also can reply to the sender by calling him or by dictating the reply.</string> <string name="sms_received">New message from %1$s: %2$s.</string> + <string name="call_received">%s is calling</string> <!-- Preferences --> - <string name="preferences_settings_label">Settings</string> + <string name="preferences_settings_sms_label">SMS</string> + <string name="preferences_settings_ringtone_label">Ringtone</string> <string name="preference_reading_profile_label">SMS reading</string> + <string name="preference_reading_caller_profile_label">Caller\'s name before the ringtone</string> <string name="preference_enable_interaction_label">Interaction</string> <string name="preference_enable_interaction_sublabel">call or answer</string> <string name="preference_voice_recognizer_max_attempt_number_label">Maximum attempt number</string> <string name="preference_enable_heisendroid_mode_label">Heisendroid mode</string> -<<<<<<< HEAD -======= - <string name="preference_block_equals_sms_label">Block the \"=\" SMS</string> ->>>>>>> feature/notification <string name="preference_notifications_label">Notifications</string> <string name="preference_test_sms_label">Test by sending an SMS to myself</string> <string name="test_sms_content">Heisendroïd</string> diff --git a/res/values/styles_heisendroid.xml b/res/values/styles_heisendroid.xml deleted file mode 100644 index cdea970..0000000 --- a/res/values/styles_heisendroid.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- File created by the Android Action Bar Style Generator - - Copyright (C) 2011 The Android Open Source Project - Copyright (C) 2012 readyState Software Ltd - - 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. ---> - -<resources> - - <style name="Theme.Heisendroid" parent="@android:style/Theme.Holo.Light.DarkActionBar"> - <item name="android:actionBarItemBackground">@drawable/selectable_background_heisendroid</item> - <item name="android:popupMenuStyle">@style/PopupMenu.Heisendroid</item> - <item name="android:dropDownListViewStyle">@style/DropDownListView.Heisendroid</item> - <item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Heisendroid</item> - <item name="android:actionDropDownStyle">@style/DropDownNav.Heisendroid</item> - <item name="android:actionBarStyle">@style/ActionBar.Solid.Heisendroid</item> - <item name="android:actionModeBackground">@drawable/cab_background_top_heisendroid</item> - <item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_heisendroid</item> - <item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Heisendroid</item> - - <!-- Light.DarkActionBar specific --> - <item name="android:actionBarWidgetTheme">@style/Theme.Heisendroid.Widget</item> - - </style> - - <style name="ActionBar.Solid.Heisendroid" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse"> - <item name="android:background">@drawable/ab_background_textured_heisendroid</item> - <item name="android:backgroundStacked">@drawable/ab_stacked_solid_heisendroid</item> - <item name="android:backgroundSplit">@drawable/ab_background_textured_heisendroid</item> - <item name="android:progressBarStyle">@style/ProgressBar.Heisendroid</item> - </style> - - <style name="ActionBar.Transparent.Heisendroid" parent="@android:style/Widget.Holo.ActionBar"> - <item name="android:background">@drawable/ab_transparent_heisendroid</item> - <item name="android:progressBarStyle">@style/ProgressBar.Heisendroid</item> - </style> - - <style name="PopupMenu.Heisendroid" parent="@android:style/Widget.Holo.ListPopupWindow"> - <item name="android:popupBackground">@drawable/menu_dropdown_panel_heisendroid</item> - </style> - - <style name="DropDownListView.Heisendroid" parent="@android:style/Widget.Holo.ListView.DropDown"> - <item name="android:listSelector">@drawable/selectable_background_heisendroid</item> - </style> - - <style name="ActionBarTabStyle.Heisendroid" parent="@android:style/Widget.Holo.ActionBar.TabView"> - <item name="android:background">@drawable/tab_indicator_ab_heisendroid</item> - </style> - - <style name="DropDownNav.Heisendroid" parent="@android:style/Widget.Holo.Spinner"> - <item name="android:background">@drawable/spinner_background_ab_heisendroid</item> - <item name="android:popupBackground">@drawable/menu_dropdown_panel_heisendroid</item> - <item name="android:dropDownSelector">@drawable/selectable_background_heisendroid</item> - </style> - - <style name="ProgressBar.Heisendroid" parent="@android:style/Widget.Holo.ProgressBar.Horizontal"> - <item name="android:progressDrawable">@drawable/progress_horizontal_heisendroid</item> - </style> - - <style name="ActionButton.CloseMode.Heisendroid" parent="@android:style/Widget.Holo.ActionButton.CloseMode"> - <item name="android:background">@drawable/btn_cab_done_heisendroid</item> - </style> - - <!-- this style is only referenced in a Light.DarkActionBar based theme --> - <style name="Theme.Heisendroid.Widget" parent="@android:style/Theme.Holo"> - <item name="android:popupMenuStyle">@style/PopupMenu.Heisendroid</item> - <item name="android:dropDownListViewStyle">@style/DropDownListView.Heisendroid</item> - </style> - - <!--<style name="DialogWindowTitle">--> - <!--<item name="android:maxLines">1</item>--> - <!--<item name="android:scrollHorizontally">true</item>--> - <!--<item name="android:textAppearance">@style/TextAppearance.DialogWindowTitle</item>--> - <!--</style>--> - -</resources> \ No newline at end of file diff --git a/res/values/themes.xml b/res/values/themes.xml new file mode 100644 index 0000000..bff51ec --- /dev/null +++ b/res/values/themes.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> + +<resources> + + <style name="Theme.SayMyTextsTheme" parent="Theme.AppCompat.Light"> + <!-- Here we setting appcompat’s actionBarStyle --> + <!--<item name="actionBarStyle">@style/MyActionBarStyle</item>--> + + <!-- ...and here we setting appcompat’s color theming attrs --> + <item name="colorPrimary">#88FF88</item> + <item name="colorPrimaryDark">#00FF00</item> + <!--<item name="android:windowNoTitle">true</item>--> + <item name="windowActionBar">false</item> + + <!-- The rest of your attributes --> + </style> + +</resources> \ No newline at end of file diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 18f2bf8..20cf403 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -2,7 +2,7 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <PreferenceCategory android:title="@string/preferences_settings_label"> + <PreferenceCategory android:title="@string/preferences_settings_sms_label"> <ListPreference android:key="@string/preference_reading_profile_key" android:title="@string/preference_reading_profile_label" @@ -42,6 +42,16 @@ </PreferenceCategory> + <PreferenceCategory android:title="@string/preferences_settings_ringtone_label"> + + <ListPreference android:key="@string/preference_reading_caller_profile_key" + android:title="@string/preference_reading_caller_profile_label" + android:entries="@array/preferences_reading_profile_entries" + android:entryValues="@array/preferences_reading_profile_values" + android:defaultValue="anyDeviceConnected"/> + + </PreferenceCategory> + <PreferenceCategory android:title="@string/preferences_about_label" android:persistent="false"> diff --git a/src/org/chorem/android/saymytexts/SayMyTextService.java b/src/main/java/org/chorem/android/saymytexts/SayMyTextService.java similarity index 83% rename from src/org/chorem/android/saymytexts/SayMyTextService.java rename to src/main/java/org/chorem/android/saymytexts/SayMyTextService.java index 331f270..3e43a96 100644 --- a/src/org/chorem/android/saymytexts/SayMyTextService.java +++ b/src/main/java/org/chorem/android/saymytexts/SayMyTextService.java @@ -48,6 +48,9 @@ import android.widget.Toast; import org.chorem.android.saymytexts.broadcastreceiver.DeviceConnectionBroadcastReceiver; import org.chorem.android.saymytexts.broadcastreceiver.DictateSmsBroadcastReceiver; import org.chorem.android.saymytexts.broadcastreceiver.SayNextActionBroadcastReceiver; +import org.chorem.android.saymytexts.model.Configuration; +import org.chorem.android.saymytexts.model.SMS; +import org.chorem.android.saymytexts.utils.SayMyTextsUtils; import java.util.ArrayList; import java.util.HashMap; @@ -93,32 +96,13 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList protected static final int NOTIFICATION_ID = 42; - protected int maxAttemptNumber; - - /** is reading enabled according to the settings */ - protected boolean readingActive = false; - - /** is the reading profile "always read" */ - protected boolean alwaysRead = false; - - protected String readingProfile; - - protected boolean heisendroidModeEnabled; - - protected boolean interactionEnabled; - - protected boolean notificationsEnabled; - - protected boolean notificationsCancelable; + protected Configuration configuration = new Configuration(); protected AudioManager audioManager; /** null if the texttospeech is not initialized */ protected Boolean canSpeak = null; - // true if music was playing when the first message in queue arrived - protected boolean musicWasActive; - // true if the speaker was on when the first message in queue arrived protected boolean speakerWasOn; @@ -138,13 +122,41 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList * Listener to call state change */ protected final PhoneStateListener callStateListener = new PhoneStateListener() { + @Override public void onCallStateChanged(int state, String incomingNumber) { + + switch (state) { + case TelephonyManager.CALL_STATE_RINGING: + final String contactName = SayMyTextsUtils.getContactDisplayNameByNumber(getApplicationContext(), incomingNumber); + + if (SayMyTextsApplication.LOG_ENABLED) { + Log.d(TAG, "should say " + contactName); + } + + if (configuration.isReadingCallerActive()) { + String ringtone = getString(R.string.call_received, contactName); + + textToSpeech.setLanguage(Locale.getDefault()); + textToSpeech.setSpeechRate(1f); + textToSpeech.setPitch(1f); + + HashMap<String, String> params = new HashMap<>(); + params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, OTHER_UTTERANCE_ID); + params.put(TextToSpeech.Engine.KEY_PARAM_STREAM, String.valueOf(AudioManager.STREAM_RING)); + + textToSpeech.speak(ringtone, TextToSpeech.QUEUE_ADD, params); + } + break; + } + super.onCallStateChanged(state, incomingNumber); + if (canSpeak != null) { setCanSpeak(state == TelephonyManager.CALL_STATE_IDLE); } } + }; @Override @@ -167,27 +179,32 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); String key = getString(R.string.preference_voice_recognizer_max_attempt_number_key); String maxAttemptValue = sharedPref.getString(key, null); + int maxAttemptNumber; try { maxAttemptNumber = Integer.parseInt(maxAttemptValue); } catch (NumberFormatException e) { maxAttemptNumber = 3; } + configuration.setMaxAttemptNumber(maxAttemptNumber); String[] readingProfileValues = getResources().getStringArray(R.array.preferences_reading_profile_values); String readingProfileKey = getString(R.string.preference_reading_profile_key); - readingProfile = sharedPref.getString(readingProfileKey, readingProfileValues[0]); + configuration.setReadingProfile(sharedPref.getString(readingProfileKey, readingProfileValues[0])); + + String readingCallerProfileKey = getString(R.string.preference_reading_caller_profile_key); + configuration.setReadingCallerProfile(sharedPref.getString(readingCallerProfileKey, readingProfileValues[0])); String heisendroidModeEnabledKey = getString(R.string.preference_enable_heisendroid_mode_key); - heisendroidModeEnabled = sharedPref.getBoolean(heisendroidModeEnabledKey, true); + configuration.setHeisendroidModeEnabled(sharedPref.getBoolean(heisendroidModeEnabledKey, true)); String interactionPrefKey = getString(R.string.preference_enable_interaction_key); - interactionEnabled = sharedPref.getBoolean(interactionPrefKey, true); + configuration.setInteractionEnabled(sharedPref.getBoolean(interactionPrefKey, true)); String[] notificationsValues = getResources().getStringArray(R.array.preferences_notifications_values); String notificationMode = sharedPref.getString(key, notificationsValues[1]); - notificationsEnabled = !notificationMode.equals(notificationsValues[0]); - notificationsCancelable = !notificationMode.equals(notificationsValues[2]); + configuration.setNotificationsEnabled(!notificationMode.equals(notificationsValues[0])); + configuration.setNotificationsCancelable(!notificationMode.equals(notificationsValues[2])); updateReadingEnabled(); @@ -258,7 +275,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList break; case ACTION_REASK_ACTION: - askForActionAfterReading(sms, !bluetoothDevices.isEmpty(), ++attemptNumber); + askForActionAfterReading(sms, !bluetoothDevices.isEmpty(), attemptNumber + 1); break; case ACTION_DICTATE_SMS: @@ -268,7 +285,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList case ACTION_CONFIRM_SMS_SENDING: // if a message has just been dictated final String dictatedMessage = intent.getStringExtra(INTENT_EXTRA_DICTATED_MESSAGE); - askSendingConfirmation(dictatedMessage, sms, ++attemptNumber); + askSendingConfirmation(dictatedMessage, sms, attemptNumber + 1); break; case ACTION_READ_NEXT_SMS: @@ -276,17 +293,12 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList break; default: - if (readingActive) { + if (configuration.isReadingActive()) { if (!Boolean.FALSE.equals(canSpeak)) { - musicWasActive = audioManager.isMusicActive(); speakerWasOn = audioManager.isSpeakerphoneOn(); - if (musicWasActive) { - audioManager.setStreamMute(AudioManager.STREAM_MUSIC, musicWasActive); - } - // if read but no external device is connected, play through the speaker - if (alwaysRead && !headsetPlugged && bluetoothDevices.isEmpty()) { + if (configuration.isAlwaysRead() && !headsetPlugged && bluetoothDevices.isEmpty()) { audioManager.setMode(AudioManager.MODE_IN_CALL); audioManager.setSpeakerphoneOn(true); } @@ -330,6 +342,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList */ protected void setCanSpeak(Boolean canSpeak) { this.canSpeak = canSpeak; + if (Boolean.TRUE.equals(canSpeak)) { if (!awaitingTexts.isEmpty()) { SMS sms = awaitingTexts.remove(0); @@ -339,12 +352,16 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList if (!bluetoothDevices.isEmpty()) { audioManager.stopBluetoothSco(); } - if (musicWasActive) { - audioManager.setStreamMute(AudioManager.STREAM_MUSIC, false); - } audioManager.setSpeakerphoneOn(speakerWasOn); audioManager.setMode(AudioManager.MODE_NORMAL); + audioManager.abandonAudioFocus(null); } + } else { + int result = audioManager.requestAudioFocus(null, + // Use the music stream. + AudioManager.STREAM_VOICE_CALL, + // Request permanent focus. + AudioManager.AUDIOFOCUS_GAIN_TRANSIENT); } } @@ -428,6 +445,9 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList HashMap<String, String> params = new HashMap<>(); params.put(TextToSpeech.Engine.KEY_PARAM_STREAM, String.valueOf(AudioManager.STREAM_VOICE_CALL)); + boolean heisendroidModeEnabled = configuration.isHeisendroidModeEnabled(); + boolean interactionEnabled = configuration.isInteractionEnabled(); + if (heisendroidModeEnabled) { textToSpeech.setLanguage(Locale.US); textToSpeech.setSpeechRate(0.3f); @@ -498,7 +518,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList textToSpeech.speak(getString(R.string.voice_not_recognized), TextToSpeech.QUEUE_ADD, params); } - if (attemptNumber <= maxAttemptNumber) { + if (attemptNumber <= configuration.getMaxAttemptNumber()) { params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, btConnected ? BT_ASK_NEXT_ACTION_UTTERANCE_ID : ASK_NEXT_ACTION_UTTERANCE_ID); textToSpeech.speak(getString(R.string.ask_next_action), TextToSpeech.QUEUE_ADD, params); @@ -541,7 +561,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList textToSpeech.speak(getString(R.string.voice_not_recognized), TextToSpeech.QUEUE_ADD, params); } - if (attemptNumber <= maxAttemptNumber) { + if (attemptNumber <= configuration.getMaxAttemptNumber()) { params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, OTHER_UTTERANCE_ID); textToSpeech.setLanguage(Locale.getDefault()); textToSpeech.setSpeechRate(1f); @@ -593,7 +613,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList textToSpeech.speak(getString(R.string.voice_not_recognized), TextToSpeech.QUEUE_ADD, params); } - if (attemptNumber <= maxAttemptNumber) { + if (attemptNumber <= configuration.getMaxAttemptNumber()) { params.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, OTHER_UTTERANCE_ID); String text = getString(R.string.send_sms_confirmation, message); textToSpeech.speak(text, TextToSpeech.QUEUE_ADD, params); @@ -608,30 +628,38 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { if (key.equals(getString(R.string.preference_voice_recognizer_max_attempt_number_key))) { String maxAttemptValue = sharedPreferences.getString(key, null); + int maxAttemptNumber; try { maxAttemptNumber = Integer.parseInt(maxAttemptValue); } catch (NumberFormatException e) { maxAttemptNumber = 3; } + configuration.setMaxAttemptNumber(maxAttemptNumber); } else if (key.equals(getString(R.string.preference_reading_profile_key))) { String[] readingProfileValues = getResources().getStringArray(R.array.preferences_reading_profile_values); - readingProfile = sharedPreferences.getString(key, readingProfileValues[0]); + configuration.setReadingProfile(sharedPreferences.getString(key, readingProfileValues[0])); + updateReadingEnabled(); + + } else if (key.equals(getString(R.string.preference_reading_caller_profile_key))) { + String[] readingProfileValues = + getResources().getStringArray(R.array.preferences_reading_profile_values); + configuration.setReadingCallerProfile(sharedPreferences.getString(key, readingProfileValues[0])); updateReadingEnabled(); } else if (key.equals(getString(R.string.preference_enable_heisendroid_mode_key))) { - heisendroidModeEnabled = sharedPreferences.getBoolean(key, true); + configuration.setHeisendroidModeEnabled(sharedPreferences.getBoolean(key, true)); } else if (key.equals(getString(R.string.preference_enable_interaction_key))) { - interactionEnabled = sharedPreferences.getBoolean(key, true); + configuration.setInteractionEnabled(sharedPreferences.getBoolean(key, true)); } else if (key.equals(getString(R.string.preference_notifications_key))) { String[] notificationsValues = getResources().getStringArray(R.array.preferences_notifications_values); String notificationMode = sharedPreferences.getString(key, notificationsValues[1]); - notificationsEnabled = !notificationMode.equals(notificationsValues[0]); - notificationsCancelable = !notificationMode.equals(notificationsValues[2]); + configuration.setNotificationsEnabled(!notificationMode.equals(notificationsValues[0])); + configuration.setNotificationsCancelable(!notificationMode.equals(notificationsValues[2])); updateReadingEnabled(); } } @@ -642,7 +670,9 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList String desc = null; // always read - alwaysRead = readingProfileValues[0].equals(readingProfile); + String readingProfile = configuration.getReadingProfile(); + boolean alwaysRead = readingProfileValues[0].equals(readingProfile); + boolean readingActive; if (alwaysRead) { readingActive = true; desc = readingProfileEntries[0]; @@ -670,6 +700,28 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList readingActive = false; desc = readingProfileEntries[3]; } + configuration.setReadingActive(readingActive); + + // always read + String readingCallerProfile = configuration.getReadingCallerProfile(); + boolean alwaysReadCaller = readingProfileValues[0].equals(readingCallerProfile); + boolean readingCallerActive; + if (alwaysReadCaller) { + readingCallerActive = true; + } + // if a bt device or a headset is connected + else if (readingProfileValues[1].equals(readingCallerProfile)) { + readingCallerActive = headsetPlugged || !bluetoothDevices.isEmpty(); + } + // if a headset is connected + else if (readingProfileValues[2].equals(readingCallerProfile)) { + readingCallerActive = headsetPlugged; + } + // never read + else { + readingCallerActive = false; + } + configuration.setReadingCallerActive(readingCallerActive); updateNotification(desc); } @@ -677,7 +729,7 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList protected void updateNotification(String content) { NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); - if (notificationsEnabled && readingActive) { + if (configuration.isNotificationsEnabled() && configuration.isReadingActive()) { BitmapDrawable logo = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher_heisendroid); Notification.Builder builder = new Notification.Builder(this) .setLargeIcon(logo.getBitmap()) @@ -689,8 +741,8 @@ public class SayMyTextService extends Service implements TextToSpeech.OnInitList PendingIntent resultPendingIntent = PendingIntent.getActivity(this, 0, settingsIntent, PendingIntent.FLAG_UPDATE_CURRENT); builder.setContentIntent(resultPendingIntent); - Notification notification = builder.build(); - if (!notificationsCancelable) { + Notification notification = builder.getNotification(); + if (!configuration.isNotificationsCancelable()) { notification.flags = Notification.FLAG_NO_CLEAR; } diff --git a/src/org/chorem/android/saymytexts/SayMyTextsApplication.java b/src/main/java/org/chorem/android/saymytexts/SayMyTextsApplication.java similarity index 97% rename from src/org/chorem/android/saymytexts/SayMyTextsApplication.java rename to src/main/java/org/chorem/android/saymytexts/SayMyTextsApplication.java index 6cf167b..2813bd6 100644 --- a/src/org/chorem/android/saymytexts/SayMyTextsApplication.java +++ b/src/main/java/org/chorem/android/saymytexts/SayMyTextsApplication.java @@ -47,7 +47,7 @@ public class SayMyTextsApplication extends Application { private static final String TAG = "SayMyTextsApplication"; - public static final boolean LOG_ENABLED = false; + public static final boolean LOG_ENABLED = true; @Override public void onCreate() { diff --git a/src/org/chorem/android/saymytexts/SettingsActivity.java b/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java similarity index 92% rename from src/org/chorem/android/saymytexts/SettingsActivity.java rename to src/main/java/org/chorem/android/saymytexts/SettingsActivity.java index 20a7c15..ff3bb9f 100644 --- a/src/org/chorem/android/saymytexts/SettingsActivity.java +++ b/src/main/java/org/chorem/android/saymytexts/SettingsActivity.java @@ -24,9 +24,7 @@ package org.chorem.android.saymytexts; * #L% */ -import android.app.Activity; import android.app.AlertDialog; -import android.app.Application; import android.app.PendingIntent; import android.content.ActivityNotFoundException; import android.content.Context; @@ -42,12 +40,15 @@ import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.SwitchPreference; import android.speech.tts.TextToSpeech; +import android.support.v7.app.ActionBarActivity; +import android.support.v7.widget.Toolbar; import android.telephony.SmsManager; import android.telephony.TelephonyManager; import android.text.InputType; import android.util.Log; import android.widget.EditText; import android.widget.Toast; +import org.chorem.android.saymytexts.utils.SayMyTextsUtils; /** * Activity to set settings @@ -55,7 +56,7 @@ import android.widget.Toast; * @author Kevin Morin (Code Lutin) * @since 1.0 */ -public class SettingsActivity extends Activity { +public class SettingsActivity extends ActionBarActivity { private static final String TAG = "SettingsActivity"; @@ -65,6 +66,12 @@ public class SettingsActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + setContentView(R.layout.preferences); + + Toolbar toolbar = (Toolbar) findViewById(R.id.my_toolbar); + setSupportActionBar(toolbar); +// getSupportActionBar().setDisplayHomeAsUpEnabled(true); + getFragmentManager().beginTransaction() .replace(android.R.id.content, new SettingsFragment()) .commit(); @@ -147,6 +154,11 @@ public class SettingsActivity extends Activity { CharSequence summary = listPreference.getEntry(); listPreference.setSummary(summary); + key = getString(R.string.preference_reading_caller_profile_key); + listPreference = (ListPreference) findPreference(key); + summary = listPreference.getEntry(); + listPreference.setSummary(summary); + key = getString(R.string.preference_enable_interaction_key); SwitchPreference switchPreference = (SwitchPreference) findPreference(key); boolean enabled = SayMyTextsUtils.checkVoiceRecognition(context); @@ -194,6 +206,11 @@ public class SettingsActivity extends Activity { CharSequence summary = preference.getEntry(); preference.setSummary(summary); + } else if (getString(R.string.preference_reading_caller_profile_key).equals(key)) { + ListPreference preference = (ListPreference) findPreference(key); + CharSequence summary = preference.getEntry(); + preference.setSummary(summary); + } else if (getString(R.string.preference_enable_interaction_key).equals(key)) { SwitchPreference switchPreference = (SwitchPreference) findPreference(key); boolean enabled = sharedPreferences.getBoolean(key, switchPreference.isChecked()); diff --git a/src/org/chorem/android/saymytexts/broadcastreceiver/BootCompletedBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/BootCompletedBroadcastReceiver.java similarity index 100% rename from src/org/chorem/android/saymytexts/broadcastreceiver/BootCompletedBroadcastReceiver.java rename to src/main/java/org/chorem/android/saymytexts/broadcastreceiver/BootCompletedBroadcastReceiver.java diff --git a/src/org/chorem/android/saymytexts/broadcastreceiver/DeviceConnectionBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DeviceConnectionBroadcastReceiver.java similarity index 100% rename from src/org/chorem/android/saymytexts/broadcastreceiver/DeviceConnectionBroadcastReceiver.java rename to src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DeviceConnectionBroadcastReceiver.java diff --git a/src/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java similarity index 80% rename from src/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java rename to src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java index cc1ea31..f8f2087 100644 --- a/src/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java +++ b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java @@ -27,16 +27,15 @@ package org.chorem.android.saymytexts.broadcastreceiver; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import android.media.AudioManager; import android.media.ToneGenerator; import android.os.Bundle; -import android.speech.RecognitionListener; import android.speech.RecognizerIntent; import android.speech.SpeechRecognizer; import android.util.Log; -import org.chorem.android.saymytexts.SMS; import org.chorem.android.saymytexts.SayMyTextService; import org.chorem.android.saymytexts.SayMyTextsApplication; +import org.chorem.android.saymytexts.model.SMS; +import org.chorem.android.saymytexts.utils.SayMyTextsRecognitionListener; import java.util.List; @@ -62,30 +61,10 @@ public class DictateSmsBroadcastReceiver extends BroadcastReceiver { if (sms != null) { SpeechRecognizer speechRecognizer = SpeechRecognizer.createSpeechRecognizer(context); - speechRecognizer.setRecognitionListener(new RecognitionListener() { - - private ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_VOICE_CALL, ToneGenerator.MAX_VOLUME); + speechRecognizer.setRecognitionListener(new SayMyTextsRecognitionListener(context, intent, sms) { @Override - public void onReadyForSpeech(Bundle params) { - } - - @Override - public void onBeginningOfSpeech() { - } - - @Override - public void onRmsChanged(float rmsdB) { - } - - @Override - public void onBufferReceived(byte[] buffer) {} - - @Override - public void onEndOfSpeech() {} - - @Override - public void onError(int error) { + protected void onError(Context context, Intent intent, SMS sms, int error) { if (SayMyTextsApplication.LOG_ENABLED) { Log.d(TAG, "onError " + error); } @@ -114,11 +93,6 @@ public class DictateSmsBroadcastReceiver extends BroadcastReceiver { } } - @Override - public void onPartialResults(Bundle partialResults) {} - - @Override - public void onEvent(int eventType, Bundle params) {} }); Intent recognizeIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); diff --git a/src/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java similarity index 66% rename from src/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java rename to src/main/java/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java index 51ab4c8..b331623 100644 --- a/src/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java +++ b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/NewTextBroadcastReceiver.java @@ -25,19 +25,15 @@ package org.chorem.android.saymytexts.broadcastreceiver; */ import android.content.BroadcastReceiver; -import android.content.ContentResolver; import android.content.Context; import android.content.Intent; -import android.database.Cursor; -import android.net.Uri; import android.os.Bundle; -import android.provider.BaseColumns; -import android.provider.ContactsContract; import android.telephony.SmsMessage; import android.util.Log; -import org.chorem.android.saymytexts.SMS; +import org.chorem.android.saymytexts.model.SMS; import org.chorem.android.saymytexts.SayMyTextService; import org.chorem.android.saymytexts.SayMyTextsApplication; +import org.chorem.android.saymytexts.utils.SayMyTextsUtils; /** * Receives the SMSs and if the headset is plugged, start the service to say it out loud. @@ -71,7 +67,7 @@ public class NewTextBroadcastReceiver extends BroadcastReceiver { // Get the Sender Phone Number String senderPhoneNumber = msgs[0].getDisplayOriginatingAddress(); - String senderName = getContactDisplayNameByNumber(context, senderPhoneNumber); + String senderName = SayMyTextsUtils.getContactDisplayNameByNumber(context, senderPhoneNumber); SMS sms = new SMS(senderPhoneNumber, senderName, messageReceived); if (SayMyTextsApplication.LOG_ENABLED) { @@ -84,32 +80,4 @@ public class NewTextBroadcastReceiver extends BroadcastReceiver { } } } - - /** - * Finds the contact name in the contact book - * @param number the number of the contact - * @return the name if the contact is known, the number otherwise - */ - protected String getContactDisplayNameByNumber(Context context, String number) { - Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); - String name = number; - - ContentResolver contentResolver = context.getContentResolver(); - Cursor contactLookup = contentResolver.query(uri, - new String[] { BaseColumns._ID, ContactsContract.PhoneLookup.DISPLAY_NAME }, - null, null, null); - - try { - if (contactLookup != null && contactLookup.getCount() > 0) { - contactLookup.moveToNext(); - name = contactLookup.getString(contactLookup.getColumnIndex(ContactsContract.Data.DISPLAY_NAME)); - } - } finally { - if (contactLookup != null) { - contactLookup.close(); - } - } - - return name; - } } diff --git a/src/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java similarity index 85% rename from src/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java rename to src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java index 3e146fc..efbea78 100644 --- a/src/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java +++ b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java @@ -28,19 +28,18 @@ import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; -import android.media.AudioManager; import android.media.ToneGenerator; import android.net.Uri; import android.os.Bundle; -import android.speech.RecognitionListener; import android.speech.RecognizerIntent; import android.speech.SpeechRecognizer; import android.telephony.SmsManager; import android.util.Log; import org.chorem.android.saymytexts.R; -import org.chorem.android.saymytexts.SMS; import org.chorem.android.saymytexts.SayMyTextService; import org.chorem.android.saymytexts.SayMyTextsApplication; +import org.chorem.android.saymytexts.model.SMS; +import org.chorem.android.saymytexts.utils.SayMyTextsRecognitionListener; import java.util.List; @@ -67,36 +66,19 @@ public class SayNextActionBroadcastReceiver extends BroadcastReceiver { final SMS sms = (SMS) intent.getSerializableExtra(INTENT_EXTRA_SMS); if (sms != null) { - SpeechRecognizer speechRecognizer = SpeechRecognizer.createSpeechRecognizer(context); - speechRecognizer.setRecognitionListener(new RecognitionListener() { - - private ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_VOICE_CALL, ToneGenerator.MAX_VOLUME); - - @Override - public void onReadyForSpeech(Bundle params) { - } - - @Override - public void onBeginningOfSpeech() { - } - - @Override - public void onRmsChanged(float rmsdB) { - } + final SpeechRecognizer speechRecognizer = SpeechRecognizer.createSpeechRecognizer(context); + speechRecognizer.setRecognitionListener(new SayMyTextsRecognitionListener(context, intent, sms) { @Override - public void onBufferReceived(byte[] buffer) {} - - @Override - public void onEndOfSpeech() {} - - @Override - public void onError(int error) { + protected void onError(Context context, Intent intent, SMS sms, int error) { if (SayMyTextsApplication.LOG_ENABLED) { - Log.d(TAG, "onError " + error); + Log.d(TAG, "onError " + error + " : " + errorFired); } tg.startTone(ToneGenerator.TONE_PROP_NACK); - reaskAction(context, intent, sms); + if (!errorFired) { + reaskAction(context, intent, sms); + } + errorFired = true; } @Override @@ -163,12 +145,6 @@ public class SayNextActionBroadcastReceiver extends BroadcastReceiver { reaskAction(context, intent, sms); } } - - @Override - public void onPartialResults(Bundle partialResults) {} - - @Override - public void onEvent(int eventType, Bundle params) {} }); Intent recognizeIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); diff --git a/src/main/java/org/chorem/android/saymytexts/model/Configuration.java b/src/main/java/org/chorem/android/saymytexts/model/Configuration.java new file mode 100644 index 0000000..95b9753 --- /dev/null +++ b/src/main/java/org/chorem/android/saymytexts/model/Configuration.java @@ -0,0 +1,121 @@ +package org.chorem.android.saymytexts.model; + +/** + * @author Kevin Morin (Code Lutin) + * @since 3.13 + */ +public class Configuration { + + protected int maxAttemptNumber; + + /** is reading enabled according to the settings */ + protected boolean readingActive = false; + + protected boolean readingCallerActive = false; + + /** is the reading profile "always read" */ + protected boolean alwaysRead = false; + + protected boolean alwaysReadCaller = false; + + protected String readingProfile; + + protected String readingCallerProfile; + + protected boolean heisendroidModeEnabled; + + protected boolean interactionEnabled; + + protected boolean notificationsEnabled; + + protected boolean notificationsCancelable; + + + public int getMaxAttemptNumber() { + return maxAttemptNumber; + } + + public void setMaxAttemptNumber(int maxAttemptNumber) { + this.maxAttemptNumber = maxAttemptNumber; + } + + public boolean isReadingActive() { + return readingActive; + } + + public void setReadingActive(boolean readingActive) { + this.readingActive = readingActive; + } + + public boolean isReadingCallerActive() { + return readingCallerActive; + } + + public void setReadingCallerActive(boolean readingCallerActive) { + this.readingCallerActive = readingCallerActive; + } + + public boolean isAlwaysRead() { + return alwaysRead; + } + + public void setAlwaysRead(boolean alwaysRead) { + this.alwaysRead = alwaysRead; + } + + public boolean isAlwaysReadCaller() { + return alwaysReadCaller; + } + + public void setAlwaysReadCaller(boolean alwaysReadCaller) { + this.alwaysReadCaller = alwaysReadCaller; + } + + public String getReadingProfile() { + return readingProfile; + } + + public void setReadingProfile(String readingProfile) { + this.readingProfile = readingProfile; + } + + public String getReadingCallerProfile() { + return readingCallerProfile; + } + + public void setReadingCallerProfile(String readingCallerProfile) { + this.readingCallerProfile = readingCallerProfile; + } + + public boolean isHeisendroidModeEnabled() { + return heisendroidModeEnabled; + } + + public void setHeisendroidModeEnabled(boolean heisendroidModeEnabled) { + this.heisendroidModeEnabled = heisendroidModeEnabled; + } + + public boolean isInteractionEnabled() { + return interactionEnabled; + } + + public void setInteractionEnabled(boolean interactionEnabled) { + this.interactionEnabled = interactionEnabled; + } + + public boolean isNotificationsEnabled() { + return notificationsEnabled; + } + + public void setNotificationsEnabled(boolean notificationsEnabled) { + this.notificationsEnabled = notificationsEnabled; + } + + public boolean isNotificationsCancelable() { + return notificationsCancelable; + } + + public void setNotificationsCancelable(boolean notificationsCancelable) { + this.notificationsCancelable = notificationsCancelable; + } +} diff --git a/src/org/chorem/android/saymytexts/SMS.java b/src/main/java/org/chorem/android/saymytexts/model/SMS.java similarity index 97% rename from src/org/chorem/android/saymytexts/SMS.java rename to src/main/java/org/chorem/android/saymytexts/model/SMS.java index 951817c..ced83d7 100644 --- a/src/org/chorem/android/saymytexts/SMS.java +++ b/src/main/java/org/chorem/android/saymytexts/model/SMS.java @@ -1,4 +1,4 @@ -package org.chorem.android.saymytexts; +package org.chorem.android.saymytexts.model; /* * #%L diff --git a/src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsRecognitionListener.java b/src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsRecognitionListener.java new file mode 100644 index 0000000..e1ca710 --- /dev/null +++ b/src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsRecognitionListener.java @@ -0,0 +1,72 @@ +package org.chorem.android.saymytexts.utils; + +import android.content.Context; +import android.content.Intent; +import android.media.AudioManager; +import android.media.ToneGenerator; +import android.os.Bundle; +import android.speech.RecognitionListener; +import android.util.Log; +import org.chorem.android.saymytexts.SayMyTextsApplication; +import org.chorem.android.saymytexts.model.SMS; + +/** + * @author Kevin Morin (Code Lutin) + * @since x.x + */ +public abstract class SayMyTextsRecognitionListener implements RecognitionListener { + + private static final String TAG = "SayMyTextsRecognitionListener"; + + protected Context context; + protected Intent intent; + protected SMS sms; + + protected ToneGenerator tg = new ToneGenerator(AudioManager.STREAM_VOICE_CALL, ToneGenerator.MAX_VOLUME); + protected boolean errorFired = false; + + public SayMyTextsRecognitionListener(Context context, Intent intent, SMS sms) { + this.context = context; + this.intent = intent; + this.sms = sms; + } + + @Override + public void onReadyForSpeech(Bundle params) { + } + + @Override + public void onBeginningOfSpeech() { + } + + @Override + public void onRmsChanged(float rmsdB) { + } + + @Override + public void onBufferReceived(byte[] buffer) {} + + @Override + public void onEndOfSpeech() {} + + @Override + public void onError(int error) { + if (SayMyTextsApplication.LOG_ENABLED) { + Log.d(TAG, "onError " + error + " : " + errorFired); + } + tg.startTone(ToneGenerator.TONE_PROP_NACK); + if (!errorFired) { + onError(context, intent, sms, error); + } + errorFired = true; + } + + @Override + public void onPartialResults(Bundle partialResults) {} + + @Override + public void onEvent(int eventType, Bundle params) {} + + protected abstract void onError(Context context, Intent intent, SMS sms, int error); + +} diff --git a/src/org/chorem/android/saymytexts/SayMyTextsUtils.java b/src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsUtils.java similarity index 79% rename from src/org/chorem/android/saymytexts/SayMyTextsUtils.java rename to src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsUtils.java index c7c3c27..fca6636 100644 --- a/src/org/chorem/android/saymytexts/SayMyTextsUtils.java +++ b/src/main/java/org/chorem/android/saymytexts/utils/SayMyTextsUtils.java @@ -1,4 +1,4 @@ -package org.chorem.android.saymytexts; +package org.chorem.android.saymytexts.utils; /* * #%L @@ -24,13 +24,18 @@ package org.chorem.android.saymytexts; * #L% */ +import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; +import android.database.Cursor; import android.media.AudioFormat; import android.media.AudioManager; import android.media.AudioTrack; +import android.net.Uri; +import android.provider.BaseColumns; +import android.provider.ContactsContract; import android.speech.RecognizerIntent; import java.util.ArrayList; @@ -49,7 +54,6 @@ public class SayMyTextsUtils { return activities.size() > 0; } - public static final double QUAVER_DURATION = 0.25; public static final double BLACK_DURATION = 0.5; public static final double POINTED_BLACK_DURATION = 0.75; @@ -144,4 +148,31 @@ public class SayMyTextsUtils { audioTrack.play(); } + /** + * Finds the contact name in the contact book + * @param number the number of the contact + * @return the name if the contact is known, the number otherwise + */ + public static String getContactDisplayNameByNumber(Context context, String number) { + Uri uri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number)); + String name = number; + + ContentResolver contentResolver = context.getContentResolver(); + Cursor contactLookup = contentResolver.query(uri, + new String[] { BaseColumns._ID, ContactsContract.PhoneLookup.DISPLAY_NAME }, + null, null, null); + + try { + if (contactLookup != null && contactLookup.getCount() > 0) { + contactLookup.moveToNext(); + name = contactLookup.getString(contactLookup.getColumnIndex(ContactsContract.Data.DISPLAY_NAME)); + } + } finally { + if (contactLookup != null) { + contactLookup.close(); + } + } + + return name; + } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository say-my-texts. See http://git.chorem.org/say-my-texts.git commit 03d2edc041f5cff7004df17e658d98506e73a4aa Author: Kevin Morin <morin@codelutin.com> Date: Thu Jan 29 14:53:15 2015 +0100 cont --- .../broadcastreceiver/DictateSmsBroadcastReceiver.java | 4 ---- .../broadcastreceiver/SayNextActionBroadcastReceiver.java | 9 +-------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java index f8f2087..751a660 100644 --- a/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java +++ b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/DictateSmsBroadcastReceiver.java @@ -65,10 +65,6 @@ public class DictateSmsBroadcastReceiver extends BroadcastReceiver { @Override protected void onError(Context context, Intent intent, SMS sms, int error) { - if (SayMyTextsApplication.LOG_ENABLED) { - Log.d(TAG, "onError " + error); - } - tg.startTone(ToneGenerator.TONE_PROP_NACK); reaskToDictate(context, intent, sms); } diff --git a/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java index efbea78..d7a2e14 100644 --- a/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java +++ b/src/main/java/org/chorem/android/saymytexts/broadcastreceiver/SayNextActionBroadcastReceiver.java @@ -71,14 +71,7 @@ public class SayNextActionBroadcastReceiver extends BroadcastReceiver { @Override protected void onError(Context context, Intent intent, SMS sms, int error) { - if (SayMyTextsApplication.LOG_ENABLED) { - Log.d(TAG, "onError " + error + " : " + errorFired); - } - tg.startTone(ToneGenerator.TONE_PROP_NACK); - if (!errorFired) { - reaskAction(context, intent, sms); - } - errorFired = true; + reaskAction(context, intent, sms); } @Override -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm