Merge lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests into lp:indicator-sound/15.10
- re-add-integration-tests
- Merge into trunk.15.10
Status: | Superseded |
---|---|
Proposed branch: | lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests |
Merge into: | lp:indicator-sound/15.10 |
Diff against target: |
318 lines (+142/-31) 7 files modified
debian/changelog (+77/-0) debian/control (+11/-0) src/CMakeLists.txt (+1/-2) src/service.vala (+5/-2) src/volume-control-pulse.vala (+41/-22) src/volume-control.vala (+4/-1) tests/CMakeLists.txt (+3/-4) |
To merge this branch: | bzr merge lp:~xavi-garcia-mena/indicator-sound/re-add-integration-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavi Garcia | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+277233@code.launchpad.net |
This proposal has been superseded by a proposal from 2015-12-23.
Commit message
This branch re-adds the integration tests using gmenuharness.
Description of the change
This branch re-adds the integration tests using gmenuharness.
I'm approving myself as it was already approved previously as branch:
lp:~xavi-garcia-mena/indicator-sound/remove-warning-message-in-volume-notification
PS Jenkins bot (ps-jenkins) wrote : | # |
Xavi Garcia (xavi-garcia-mena) : | # |
- 510. By Xavi Garcia
-
Very simple change to make upstart try to respawn the process 30 times (instead of 2).
This is a workaround for the case when dbus session is not ready yet at startup.
Approved by: PS Jenkins bot, Charles Kerr - 511. By CI Train Bot Account
-
Releasing 12.10.2+
16.04.20151222- 0ubuntu1 - 512. By Xavi Garcia
-
Reverted to release 507
- 513. By Timo Jyrinki
-
Restore changelog entries for CI Train purposes but note that they should be ignored as they were reverted.
- 514. By Xavi Garcia
-
restore OSD notifications
- 515. By Xavi Garcia
-
Conflicts resolved with restored branch
- 516. By Xavi Garcia
-
removed extra line in debian/changelog
- 517. By Xavi Garcia
-
sync debian/changelog with pre-requisite branch
- 518. By Xavi Garcia
-
Rolling back to release 516
- 519. By Xavi Garcia
-
sync changelog with previous branch
- 520. By Xavi Garcia
-
re-added new stuff
- 521. By Xavi Garcia
-
remove changed in debian/changelog
- 522. By Xavi Garcia
-
[ Xavi Garcia ]
* Added OSD notifications to show output source when the volume or
source change (LP: #1382548, LP: #1415480, LP: #1484589)* debian/control:
Added the following build dependencies:
- cmake-extras (>= 0.4),
- google-mock (>= 1.6.0+svn437),
- libqtdbusmock1-dev (>= 0.3),
- libqtdbustest1-dev,
- libunity-api-dev,
- pulseaudio,
- qt5-default,
- qtbase5-dev,
- qtbase5-dev-tools,
- qtdeclarative5-dev,
- qtdeclarative5-dev-tools
* Added gmenuharness library for integration tests support.
New Files:
- src/gmenuharness/CMakeLists. txt
- src/gmenuharness/MatchResult. cpp
- src/gmenuharness/MatchUtils. cpp
- src/gmenuharness/MenuItemMatch er.cpp
- src/gmenuharness/MenuMatcher. cpp
- include/unity/gmenuharn ess/MatchResult .h
- include/unity/gmenuharn ess/MatchUtils. h
- include/unity/gmenuharn ess/MenuItemMat cher.h
- include/unity/gmenuharn ess/MenuMatcher .h
* Added integration tests using gmenuharness
New Files:
- tests/dbus-types/CMakeList s.txt
- tests/dbus-types/com. ubuntu. AccountsService .Sound. xml
- tests/dbus-types/dbus- types.h
- tests/dbus-types/org. PulseAudio. Ext.StreamResto re1.xml
- tests/dbus-types/org. freedesktop. Accounts. xml
- tests/dbus-types/org. freedesktop. DBus.Properties .xml
- tests/dbus-types/org. freedesktop. Notifications. xml
- tests/dbus-types/org. gtk.Actions. xml
- tests/dbus-types/pulseaudi o-volume. cpp
- tests/dbus-types/pulseaudi o-volume. h
- tests/integration/CMakeLists. txt
- tests/integration/indicator- sound-test- base.cpp
- tests/integration/indicator- sound-test- base.h
- tests/integration/main. cpp
- tests/integration/test- indicator. cpp
- tests/integration/touch- stream- restore. table
- tests/integration/utils/ dbus-pulse- volume. cpp
- tests/integration/utils/ dbus-pulse- volume. h
- tests/integration/utils/ get-volume. cpp
- tests/integration/utils/ set-volume. cpp
- tests/service-mocks/CMakeList s.txt
- tests/service-mocks/DBusPrope rtiesNotifier. cpp
- tests/service-mocks/DBusPrope rtiesNotifier. h
- tests/service-mocks/accounts- mock/AccountsDe fs.h
- tests/service-mocks/accounts- mock/AccountsMo ck.cpp
- tests/service-mocks/accounts- mock/AccountsMo ck.h
- tests/service-mocks/accounts- mock/AccountsSe rviceSoundMock. cpp
- tests/service-mocks/accounts- mock/AccountsSe rviceSoundMock. h
- tests/service-mocks/accounts- mock/CMakeLists .txt
- tests/service-mocks/accounts- mock/com. ubuntu. AccountsService .Sound. Mock.xml
- tests/service-mocks/accounts- mock/main. cpp
- tests/service-mocks/accounts- mock/org. freedesktop. Accounts. Mock.xml
- tests/service-mocks/media- player- mpris-mock/ CMakeLists. txt
- tests/service-mocks/media- player- mpris-mock/ MediaPlayerMpri sDefs.h
- tests/service-mocks/media- player- mpris-mock/ MediaPlayerMpri sMock.cpp
- tests/service-mocks/media- player- mpris-mock/ MediaPlayerMpri sMock.h
- tests/service-mocks/media- player- mpris-mock/ applications/ testplayer1. desktop
- tests/service-mocks/media- player- mpris-mock/ main.cpp
- tests/service-mocks/media- player- mpris-mock/ org.mpris. MediaPlayer2. Player. xml
- tests/service-mocks/media- player- mpris-mock/ org.mpris. MediaPlayer2. xml
- tests/service-mocks/media- player- mpris-mock/ player- update. cpp
Unmerged revisions
Preview Diff
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2015-11-03 17:47:10 +0000 | |||
3 | +++ debian/changelog 2015-11-23 11:30:56 +0000 | |||
4 | @@ -9,6 +9,83 @@ | |||
5 | 9 | 9 | ||
6 | 10 | -- Xavi Garcia <xavi.garcia.mena@canonical.com> Tue, 03 Nov 2015 17:47:10 +0000 | 10 | -- Xavi Garcia <xavi.garcia.mena@canonical.com> Tue, 03 Nov 2015 17:47:10 +0000 |
7 | 11 | 11 | ||
8 | 12 | indicator-sound (12.10.2+15.10.20151019-0ubuntu3) UNRELEASED; urgency=medium | ||
9 | 13 | |||
10 | 14 | [ Xavi Garcia ] | ||
11 | 15 | * Added OSD notifications to show output source when the volume or | ||
12 | 16 | source change (LP: #1382548, LP: #1415480, LP: #1484589) | ||
13 | 17 | |||
14 | 18 | * debian/control: | ||
15 | 19 | Added the following build dependencies: | ||
16 | 20 | - cmake-extras (>= 0.4), | ||
17 | 21 | - google-mock (>= 1.6.0+svn437), | ||
18 | 22 | - libqtdbusmock1-dev (>= 0.3), | ||
19 | 23 | - libqtdbustest1-dev, | ||
20 | 24 | - libunity-api-dev, | ||
21 | 25 | - pulseaudio, | ||
22 | 26 | - qt5-default, | ||
23 | 27 | - qtbase5-dev, | ||
24 | 28 | - qtbase5-dev-tools, | ||
25 | 29 | - qtdeclarative5-dev, | ||
26 | 30 | - qtdeclarative5-dev-tools | ||
27 | 31 | * Added gmenuharness library for integration tests support. | ||
28 | 32 | New Files: | ||
29 | 33 | - src/gmenuharness/CMakeLists.txt | ||
30 | 34 | - src/gmenuharness/MatchResult.cpp | ||
31 | 35 | - src/gmenuharness/MatchUtils.cpp | ||
32 | 36 | - src/gmenuharness/MenuItemMatcher.cpp | ||
33 | 37 | - src/gmenuharness/MenuMatcher.cpp | ||
34 | 38 | - include/unity/gmenuharness/MatchResult.h | ||
35 | 39 | - include/unity/gmenuharness/MatchUtils.h | ||
36 | 40 | - include/unity/gmenuharness/MenuItemMatcher.h | ||
37 | 41 | - include/unity/gmenuharness/MenuMatcher.h | ||
38 | 42 | * Added integration tests using gmenuharness | ||
39 | 43 | New Files: | ||
40 | 44 | - tests/dbus-types/CMakeLists.txt | ||
41 | 45 | - tests/dbus-types/com.ubuntu.AccountsService.Sound.xml | ||
42 | 46 | - tests/dbus-types/dbus-types.h | ||
43 | 47 | - tests/dbus-types/org.PulseAudio.Ext.StreamRestore1.xml | ||
44 | 48 | - tests/dbus-types/org.freedesktop.Accounts.xml | ||
45 | 49 | - tests/dbus-types/org.freedesktop.DBus.Properties.xml | ||
46 | 50 | - tests/dbus-types/org.freedesktop.Notifications.xml | ||
47 | 51 | - tests/dbus-types/org.gtk.Actions.xml | ||
48 | 52 | - tests/dbus-types/pulseaudio-volume.cpp | ||
49 | 53 | - tests/dbus-types/pulseaudio-volume.h | ||
50 | 54 | - tests/integration/CMakeLists.txt | ||
51 | 55 | - tests/integration/indicator-sound-test-base.cpp | ||
52 | 56 | - tests/integration/indicator-sound-test-base.h | ||
53 | 57 | - tests/integration/main.cpp | ||
54 | 58 | - tests/integration/test-indicator.cpp | ||
55 | 59 | - tests/integration/touch-stream-restore.table | ||
56 | 60 | - tests/integration/utils/dbus-pulse-volume.cpp | ||
57 | 61 | - tests/integration/utils/dbus-pulse-volume.h | ||
58 | 62 | - tests/integration/utils/get-volume.cpp | ||
59 | 63 | - tests/integration/utils/set-volume.cpp | ||
60 | 64 | - tests/service-mocks/CMakeLists.txt | ||
61 | 65 | - tests/service-mocks/DBusPropertiesNotifier.cpp | ||
62 | 66 | - tests/service-mocks/DBusPropertiesNotifier.h | ||
63 | 67 | - tests/service-mocks/accounts-mock/AccountsDefs.h | ||
64 | 68 | - tests/service-mocks/accounts-mock/AccountsMock.cpp | ||
65 | 69 | - tests/service-mocks/accounts-mock/AccountsMock.h | ||
66 | 70 | - tests/service-mocks/accounts-mock/AccountsServiceSoundMock.cpp | ||
67 | 71 | - tests/service-mocks/accounts-mock/AccountsServiceSoundMock.h | ||
68 | 72 | - tests/service-mocks/accounts-mock/CMakeLists.txt | ||
69 | 73 | - tests/service-mocks/accounts-mock/com.ubuntu.AccountsService.Sound.Mock.xml | ||
70 | 74 | - tests/service-mocks/accounts-mock/main.cpp | ||
71 | 75 | - tests/service-mocks/accounts-mock/org.freedesktop.Accounts.Mock.xml | ||
72 | 76 | - tests/service-mocks/media-player-mpris-mock/CMakeLists.txt | ||
73 | 77 | - tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h | ||
74 | 78 | - tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisMock.cpp | ||
75 | 79 | - tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisMock.h | ||
76 | 80 | - tests/service-mocks/media-player-mpris-mock/applications/testplayer1.desktop | ||
77 | 81 | - tests/service-mocks/media-player-mpris-mock/main.cpp | ||
78 | 82 | - tests/service-mocks/media-player-mpris-mock/org.mpris.MediaPlayer2.Player.xml | ||
79 | 83 | - tests/service-mocks/media-player-mpris-mock/org.mpris.MediaPlayer2.xml | ||
80 | 84 | - tests/service-mocks/media-player-mpris-mock/player-update.cpp | ||
81 | 85 | |||
82 | 86 | |||
83 | 87 | -- Xavi Garcia <xavi.garcia.mena@canonical.com> Wed, 11 Nov 2015 12:40:10 +0100 | ||
84 | 88 | |||
85 | 12 | indicator-sound (12.10.2+15.10.20151019-0ubuntu1) wily; urgency=medium | 89 | indicator-sound (12.10.2+15.10.20151019-0ubuntu1) wily; urgency=medium |
86 | 13 | 90 | ||
87 | 14 | [ Xavi Garcia Mena ] | 91 | [ Xavi Garcia Mena ] |
88 | 15 | 92 | ||
89 | === modified file 'debian/control' | |||
90 | --- debian/control 2015-11-03 16:21:43 +0000 | |||
91 | +++ debian/control 2015-11-23 11:30:56 +0000 | |||
92 | @@ -5,11 +5,13 @@ | |||
93 | 5 | XSBC-Original-Maintainer: Conor Curran <conor.curran@canonical.com> | 5 | XSBC-Original-Maintainer: Conor Curran <conor.curran@canonical.com> |
94 | 6 | Build-Depends: debhelper (>= 9.0), | 6 | Build-Depends: debhelper (>= 9.0), |
95 | 7 | cmake, | 7 | cmake, |
96 | 8 | cmake-extras (>= 0.4), | ||
97 | 8 | dbus, | 9 | dbus, |
98 | 9 | dbus-test-runner (>> 14.04.0+14.04.20150120.1), | 10 | dbus-test-runner (>> 14.04.0+14.04.20150120.1), |
99 | 10 | dh-translations, | 11 | dh-translations, |
100 | 11 | gir1.2-accountsservice-1.0, | 12 | gir1.2-accountsservice-1.0, |
101 | 12 | gnome-common, | 13 | gnome-common, |
102 | 14 | google-mock (>= 1.6.0+svn437), | ||
103 | 13 | gsettings-ubuntu-schemas, | 15 | gsettings-ubuntu-schemas, |
104 | 14 | autotools-dev, | 16 | autotools-dev, |
105 | 15 | valac (>= 0.20), | 17 | valac (>= 0.20), |
106 | @@ -18,13 +20,22 @@ | |||
107 | 18 | libgirepository1.0-dev, | 20 | libgirepository1.0-dev, |
108 | 19 | libglib2.0-dev (>= 2.22.3), | 21 | libglib2.0-dev (>= 2.22.3), |
109 | 20 | libgtest-dev, | 22 | libgtest-dev, |
110 | 23 | libqtdbusmock1-dev (>= 0.3), | ||
111 | 24 | libqtdbustest1-dev, | ||
112 | 25 | libunity-api-dev, | ||
113 | 21 | liburl-dispatcher1-dev, | 26 | liburl-dispatcher1-dev, |
114 | 22 | libpulse-dev (>= 1:4.0-0ubuntu21), | 27 | libpulse-dev (>= 1:4.0-0ubuntu21), |
115 | 23 | libpulse-mainloop-glib0 (>= 0.9.18), | 28 | libpulse-mainloop-glib0 (>= 0.9.18), |
116 | 24 | libnotify-dev, | 29 | libnotify-dev, |
117 | 25 | libgee-dev, | 30 | libgee-dev, |
118 | 26 | libxml2-dev, | 31 | libxml2-dev, |
119 | 32 | pulseaudio, | ||
120 | 27 | python3-dbusmock, | 33 | python3-dbusmock, |
121 | 34 | qt5-default, | ||
122 | 35 | qtbase5-dev, | ||
123 | 36 | qtbase5-dev-tools, | ||
124 | 37 | qtdeclarative5-dev, | ||
125 | 38 | qtdeclarative5-dev-tools, | ||
126 | 28 | Standards-Version: 3.9.4 | 39 | Standards-Version: 3.9.4 |
127 | 29 | Homepage: https://launchpad.net/indicator-sound | 40 | Homepage: https://launchpad.net/indicator-sound |
128 | 30 | # If you aren't a member of ~indicator-applet-developers but need to upload | 41 | # If you aren't a member of ~indicator-applet-developers but need to upload |
129 | 31 | 42 | ||
130 | === modified file 'src/CMakeLists.txt' | |||
131 | --- src/CMakeLists.txt 2015-11-03 16:21:43 +0000 | |||
132 | +++ src/CMakeLists.txt 2015-11-23 11:30:56 +0000 | |||
133 | @@ -207,5 +207,4 @@ | |||
134 | 207 | RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/indicator-sound/ | 207 | RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/indicator-sound/ |
135 | 208 | ) | 208 | ) |
136 | 209 | 209 | ||
139 | 210 | # Disable integration tests | 210 | add_subdirectory(gmenuharness) |
138 | 211 | # add_subdirectory(gmenuharness) | ||
140 | 212 | 211 | ||
141 | === modified file 'src/service.vala' | |||
142 | --- src/service.vala 2015-10-30 13:24:14 +0000 | |||
143 | +++ src/service.vala 2015-11-23 11:30:56 +0000 | |||
144 | @@ -40,7 +40,7 @@ | |||
145 | 40 | warn_notification.set_hint ("x-canonical-non-shaped-icon", "true"); | 40 | warn_notification.set_hint ("x-canonical-non-shaped-icon", "true"); |
146 | 41 | warn_notification.set_hint ("x-canonical-snap-decisions", "true"); | 41 | warn_notification.set_hint ("x-canonical-snap-decisions", "true"); |
147 | 42 | warn_notification.set_hint ("x-canonical-private-affirmative-tint", "true"); | 42 | warn_notification.set_hint ("x-canonical-private-affirmative-tint", "true"); |
149 | 43 | warn_notification.closed.connect((n) => { n.clear_actions(); }); | 43 | warn_notification.closed.connect((n) => { n.clear_actions(); waiting_user_approve_warn=false; }); |
150 | 44 | BusWatcher.watch_namespace (GLib.BusType.SESSION, | 44 | BusWatcher.watch_namespace (GLib.BusType.SESSION, |
151 | 45 | "org.freedesktop.Notifications", | 45 | "org.freedesktop.Notifications", |
152 | 46 | () => { debug("Notifications name appeared"); }, | 46 | () => { debug("Notifications name appeared"); }, |
153 | @@ -609,7 +609,10 @@ | |||
154 | 609 | var warn = loud | 609 | var warn = loud |
155 | 610 | && this.notify_server_supports_actions | 610 | && this.notify_server_supports_actions |
156 | 611 | && !this.volume_control.high_volume_approved; | 611 | && !this.volume_control.high_volume_approved; |
158 | 612 | 612 | if (waiting_user_approve_warn && volume_control.below_warning_volume) { | |
159 | 613 | volume_control.set_warning_volume(); | ||
160 | 614 | close_notification(warn_notification); | ||
161 | 615 | } | ||
162 | 613 | if (warn) { | 616 | if (warn) { |
163 | 614 | close_notification(info_notification); | 617 | close_notification(info_notification); |
164 | 615 | if (_pre_warn_volume == null) { | 618 | if (_pre_warn_volume == null) { |
165 | 616 | 619 | ||
166 | === modified file 'src/volume-control-pulse.vala' | |||
167 | --- src/volume-control-pulse.vala 2015-10-15 10:08:07 +0000 | |||
168 | +++ src/volume-control-pulse.vala 2015-11-23 11:30:56 +0000 | |||
169 | @@ -140,40 +140,45 @@ | |||
170 | 140 | 140 | ||
171 | 141 | VolumeControl.ActiveOutput ret_output = VolumeControl.ActiveOutput.SPEAKERS; | 141 | VolumeControl.ActiveOutput ret_output = VolumeControl.ActiveOutput.SPEAKERS; |
172 | 142 | /* Check if the current active port is headset/headphone */ | 142 | /* Check if the current active port is headset/headphone */ |
177 | 143 | /* There is not easy way to check if the port is a headset/headphone besides | 143 | /* There is not easy way to check if the port is a headset/headphone besides |
178 | 144 | * checking for the port name. On touch (with the pulseaudio droid element) | 144 | * checking for the port name. On touch (with the pulseaudio droid element) |
179 | 145 | * the headset/headphone port is called 'output-headset' and 'output-headphone'. | 145 | * the headset/headphone port is called 'output-headset' and 'output-headphone'. |
180 | 146 | * On the desktop this is usually called 'analog-output-headphones' */ | 146 | * On the desktop this is usually called 'analog-output-headphones' */ |
181 | 147 | |||
182 | 148 | // first of all check if we are in call mode | ||
183 | 149 | if (sink.active_port != null && sink.active_port.name == "output-speaker+wired_headphone") { | ||
184 | 150 | return VolumeControl.ActiveOutput.CALL_MODE; | ||
185 | 151 | } | ||
186 | 147 | // look if it's a headset/headphones | 152 | // look if it's a headset/headphones |
187 | 148 | if (sink.name == "indicator_sound_test_headphones" || | 153 | if (sink.name == "indicator_sound_test_headphones" || |
188 | 149 | (sink.active_port != null && | 154 | (sink.active_port != null && |
189 | 150 | (sink.active_port.name.contains("headset") || | 155 | (sink.active_port.name.contains("headset") || |
203 | 151 | sink.active_port.name.contains("headphone")))) { | 156 | sink.active_port.name.contains("headphone")))) { |
204 | 152 | _active_port_headphone = true; | 157 | _active_port_headphone = true; |
205 | 153 | // check if it's a bluetooth device | 158 | // check if it's a bluetooth device |
206 | 154 | var device_bus = sink.proplist.gets ("device.bus"); | 159 | var device_bus = sink.proplist.gets ("device.bus"); |
207 | 155 | if (device_bus != null && device_bus == "bluetooth") { | 160 | if (device_bus != null && device_bus == "bluetooth") { |
208 | 156 | ret_output = VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES; | 161 | ret_output = VolumeControl.ActiveOutput.BLUETOOTH_HEADPHONES; |
209 | 157 | } else if (device_bus != null && device_bus == "usb") { | 162 | } else if (device_bus != null && device_bus == "usb") { |
210 | 158 | ret_output = VolumeControl.ActiveOutput.USB_HEADPHONES; | 163 | ret_output = VolumeControl.ActiveOutput.USB_HEADPHONES; |
211 | 159 | } else if (device_bus != null && device_bus == "hdmi") { | 164 | } else if (device_bus != null && device_bus == "hdmi") { |
212 | 160 | ret_output = VolumeControl.ActiveOutput.HDMI_HEADPHONES; | 165 | ret_output = VolumeControl.ActiveOutput.HDMI_HEADPHONES; |
213 | 161 | } else { | 166 | } else { |
214 | 162 | ret_output = VolumeControl.ActiveOutput.HEADPHONES; | 167 | ret_output = VolumeControl.ActiveOutput.HEADPHONES; |
215 | 163 | } | 168 | } |
216 | 164 | } else { | 169 | } else { |
217 | 165 | // speaker | 170 | // speaker |
218 | 166 | _active_port_headphone = false; | 171 | _active_port_headphone = false; |
219 | 167 | var device_bus = sink.proplist.gets ("device.bus"); | 172 | var device_bus = sink.proplist.gets ("device.bus"); |
223 | 168 | if (device_bus != null && device_bus == "bluetooth") { | 173 | if (device_bus != null && device_bus == "bluetooth") { |
224 | 169 | ret_output = VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER; | 174 | ret_output = VolumeControl.ActiveOutput.BLUETOOTH_SPEAKER; |
225 | 170 | } else if (device_bus != null && device_bus == "usb") { | 175 | } else if (device_bus != null && device_bus == "usb") { |
226 | 171 | ret_output = VolumeControl.ActiveOutput.USB_SPEAKER; | 176 | ret_output = VolumeControl.ActiveOutput.USB_SPEAKER; |
227 | 172 | } else if (device_bus != null && device_bus == "hdmi") { | 177 | } else if (device_bus != null && device_bus == "hdmi") { |
228 | 173 | ret_output = VolumeControl.ActiveOutput.HDMI_SPEAKER; | 178 | ret_output = VolumeControl.ActiveOutput.HDMI_SPEAKER; |
229 | 174 | } else { | 179 | } else { |
230 | 175 | ret_output = VolumeControl.ActiveOutput.SPEAKERS; | 180 | ret_output = VolumeControl.ActiveOutput.SPEAKERS; |
232 | 176 | } | 181 | } |
233 | 177 | } | 182 | } |
234 | 178 | 183 | ||
235 | 179 | return ret_output; | 184 | return ret_output; |
236 | @@ -253,7 +258,9 @@ | |||
237 | 253 | 258 | ||
238 | 254 | // check if the output has changed, if so... emit a signal | 259 | // check if the output has changed, if so... emit a signal |
239 | 255 | VolumeControl.ActiveOutput active_output_now = active_output; | 260 | VolumeControl.ActiveOutput active_output_now = active_output; |
241 | 256 | if (active_output_now != active_output_before) { | 261 | if (active_output_now != active_output_before && |
242 | 262 | (active_output_now != VolumeControl.ActiveOutput.CALL_MODE && | ||
243 | 263 | active_output_before != VolumeControl.ActiveOutput.CALL_MODE)) { | ||
244 | 257 | this.active_output_changed (active_output_now); | 264 | this.active_output_changed (active_output_now); |
245 | 258 | if (active_output_now == VolumeControl.ActiveOutput.SPEAKERS) { | 265 | if (active_output_now == VolumeControl.ActiveOutput.SPEAKERS) { |
246 | 259 | _high_volume_approved = false; | 266 | _high_volume_approved = false; |
247 | @@ -738,6 +745,10 @@ | |||
248 | 738 | get { return this._high_volume; } | 745 | get { return this._high_volume; } |
249 | 739 | private set { this._high_volume = value; } | 746 | private set { this._high_volume = value; } |
250 | 740 | } | 747 | } |
251 | 748 | public override bool below_warning_volume { | ||
252 | 749 | get { return this._volume.volume < this._warning_volume_norms; } | ||
253 | 750 | private set { } | ||
254 | 751 | } | ||
255 | 741 | private void init_high_volume() { | 752 | private void init_high_volume() { |
256 | 742 | _settings.changed["warning-volume-enabled"].connect(() => update_high_volume_cache()); | 753 | _settings.changed["warning-volume-enabled"].connect(() => update_high_volume_cache()); |
257 | 743 | _settings.changed["warning-volume-decibels"].connect(() => update_high_volume_cache()); | 754 | _settings.changed["warning-volume-decibels"].connect(() => update_high_volume_cache()); |
258 | @@ -779,6 +790,14 @@ | |||
259 | 779 | } | 790 | } |
260 | 780 | } | 791 | } |
261 | 781 | 792 | ||
262 | 793 | public override void set_warning_volume() { | ||
263 | 794 | var vol = new VolumeControl.Volume(); | ||
264 | 795 | vol.volume = _warning_volume_norms; | ||
265 | 796 | vol.reason = _volume.reason; | ||
266 | 797 | debug("Setting warning level volume from %f down to %f", _volume.volume, vol.volume); | ||
267 | 798 | volume = vol; | ||
268 | 799 | } | ||
269 | 800 | |||
270 | 782 | /** HIGH VOLUME APPROVED PROPERTY **/ | 801 | /** HIGH VOLUME APPROVED PROPERTY **/ |
271 | 783 | 802 | ||
272 | 784 | private bool _high_volume_approved = false; | 803 | private bool _high_volume_approved = false; |
273 | 785 | 804 | ||
274 | === modified file 'src/volume-control.vala' | |||
275 | --- src/volume-control.vala 2015-10-05 10:10:49 +0000 | |||
276 | +++ src/volume-control.vala 2015-11-23 11:30:56 +0000 | |||
277 | @@ -36,7 +36,8 @@ | |||
278 | 36 | USB_SPEAKER, | 36 | USB_SPEAKER, |
279 | 37 | USB_HEADPHONES, | 37 | USB_HEADPHONES, |
280 | 38 | HDMI_SPEAKER, | 38 | HDMI_SPEAKER, |
282 | 39 | HDMI_HEADPHONES | 39 | HDMI_HEADPHONES, |
283 | 40 | CALL_MODE | ||
284 | 40 | } | 41 | } |
285 | 41 | 42 | ||
286 | 42 | public class Volume : Object { | 43 | public class Volume : Object { |
287 | @@ -48,6 +49,7 @@ | |||
288 | 48 | public virtual bool ready { get { return false; } set { } } | 49 | public virtual bool ready { get { return false; } set { } } |
289 | 49 | public virtual bool active_mic { get { return false; } set { } } | 50 | public virtual bool active_mic { get { return false; } set { } } |
290 | 50 | public virtual bool high_volume { get { return false; } protected set { } } | 51 | public virtual bool high_volume { get { return false; } protected set { } } |
291 | 52 | public virtual bool below_warning_volume { get { return false; } protected set { } } | ||
292 | 51 | public virtual bool mute { get { return false; } } | 53 | public virtual bool mute { get { return false; } } |
293 | 52 | public virtual bool is_playing { get { return false; } } | 54 | public virtual bool is_playing { get { return false; } } |
294 | 53 | public virtual VolumeControl.ActiveOutput active_output { get { return VolumeControl.ActiveOutput.SPEAKERS; } } | 55 | public virtual VolumeControl.ActiveOutput active_output { get { return VolumeControl.ActiveOutput.SPEAKERS; } } |
295 | @@ -59,6 +61,7 @@ | |||
296 | 59 | public virtual bool high_volume_approved { get { return false; } protected set { } } | 61 | public virtual bool high_volume_approved { get { return false; } protected set { } } |
297 | 60 | public virtual void approve_high_volume() { } | 62 | public virtual void approve_high_volume() { } |
298 | 61 | public virtual void clamp_to_high_volume() { } | 63 | public virtual void clamp_to_high_volume() { } |
299 | 64 | public virtual void set_warning_volume() { } | ||
300 | 62 | 65 | ||
301 | 63 | public abstract void set_mute (bool mute); | 66 | public abstract void set_mute (bool mute); |
302 | 64 | 67 | ||
303 | 65 | 68 | ||
304 | === modified file 'tests/CMakeLists.txt' | |||
305 | --- tests/CMakeLists.txt 2015-11-03 16:21:43 +0000 | |||
306 | +++ tests/CMakeLists.txt 2015-11-23 11:30:56 +0000 | |||
307 | @@ -281,7 +281,6 @@ | |||
308 | 281 | indicator-test | 281 | indicator-test |
309 | 282 | ) | 282 | ) |
310 | 283 | 283 | ||
315 | 284 | # Disable integration tests | 284 | add_subdirectory(integration) |
316 | 285 | # add_subdirectory(integration) | 285 | add_subdirectory(dbus-types) |
317 | 286 | # add_subdirectory(dbus-types) | 286 | add_subdirectory(service-mocks) |
314 | 287 | # add_subdirectory(service-mocks) | ||
318 | 288 | \ No newline at end of file | 287 | \ No newline at end of file |
PASSED: Continuous integration, rev:510 jenkins. qa.ubuntu. com/job/ indicator- sound-ci/ 288/ jenkins. qa.ubuntu. com/job/ indicator- sound-wily- amd64-ci/ 64 jenkins. qa.ubuntu. com/job/ indicator- sound-wily- armhf-ci/ 64 jenkins. qa.ubuntu. com/job/ indicator- sound-wily- armhf-ci/ 64/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/indicator- sound-ci/ 288/rebuild
http://