Commit b213dbd
committed
SystemUI: Fix shutter sound
* When shutter sound for camera is forced on as required in some states,
(config_camera_sound_forced, set via mcc/mnc), we also want to
(or should) play it when a screenshot is taken from the preview
instead of an actual picture
* This change is loosely based on
https://android-review.googlesource.com/c/platform/frameworks/base/+/1517742/
but uses publicly available APIs
Testing:
- Set config_camera_sound_forced to true and push a build to device
- Turn down all stream volumes to muted
- Take screenshot of any normal screen
-> No sound played
- Open camera, take screenshot
-> Sound played
- Turn up volume and repeat the screenshots
-> Sound played in all cases
Change-Id: Iacbb577c64f73b79cdfae7fb0487fc6a34ffe41c1 parent 24463ec commit b213dbd
1 file changed
Lines changed: 37 additions & 2 deletions
Lines changed: 37 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
| |||
329 | 334 | | |
330 | 335 | | |
331 | 336 | | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
| |||
1255 | 1263 | | |
1256 | 1264 | | |
1257 | 1265 | | |
| 1266 | + | |
| 1267 | + | |
1258 | 1268 | | |
1259 | 1269 | | |
1260 | 1270 | | |
| |||
1266 | 1276 | | |
1267 | 1277 | | |
1268 | 1278 | | |
1269 | | - | |
1270 | | - | |
| 1279 | + | |
| 1280 | + | |
1271 | 1281 | | |
1272 | 1282 | | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
1273 | 1308 | | |
1274 | 1309 | | |
0 commit comments