16 Updated patches.
[webos-internals:shivaramv-modifications.git] / camera / camera-simple-shutter-sound-off.patch
1 diff --git a/usr/palm/applications/com.palm.app.camera/app/controllers/capture-assistant.js b/usr/palm/applications/com.palm.app.camera/app/controllers/capture-assistant.js
2 index 52ad9da..c7dccb4 100644
3 --- a/usr/palm/applications/com.palm.app.camera/app/controllers/capture-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.camera/app/controllers/capture-assistant.js
5 @@ -76,6 +76,7 @@ CaptureAssistant = Class.create({
6  
7                 
8                 this.controller.enableFullScreenMode(true);
9 +               this.mediaVolMuted(true);
10  
11  
12                 this.controller.sceneElement.addClassName('preview-off');
13 @@ -325,6 +326,8 @@ CaptureAssistant = Class.create({
14  
15                 Mojo.stopListening(this.controller.sceneElement, Mojo.Event.keypress, this.onKeyPressHandler);
16                 
17 +               this.mediaVolMuted(false);
18 +               
19                 this.stopIdleCheck();
20                 if (this._powerServiceEventRef) {
21                         this._powerServiceEventRef.cancel();
22 @@ -1121,6 +1124,7 @@ CaptureAssistant = Class.create({
23                         try{
24                                 if (!this.isFocused()){
25                                         this.cameraControl.freezePreview();
26 +                                       this.mediaVolMuted(false);
27         
28                                         GeoControl.stopTracking();
29                                 }
30 @@ -1162,6 +1166,7 @@ CaptureAssistant = Class.create({
31                         
32                         if (this.isFocused()) {
33                                 this.cameraControl.resumePreview();
34 +                               this.mediaVolMuted(true);
35                         }
36                 }.bind(this), 350);
37         },
38 @@ -1215,6 +1220,13 @@ CaptureAssistant = Class.create({
39                 return (this.controller.stageController.active && (this.controller.stageController.topScene().sceneName === 'capture'));
40         },
41  
42 +       mediaVolMuted: function(mute){
43 +               this.controller.serviceRequest('palm://com.palm.audio/system', {
44 +                       method:'setMuted',
45 +                       parameters:{muted:mute}
46 +               });
47 +       },
48 +
49         setPhotorollUpdating: function(busy){
50                 llog("setPhotorollUpdating: ", busy?"busy":"no busy");
51