New and Updated patches (egaudet)
[webos-internals:djcin7s-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 498f869..050fdc6 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 @@ -872,6 +872,7 @@ CaptureAssistant = Class.create({
6  
7                 this._idleCheckTimer = setTimeout(this._triggerIdleHandler,  this.cameraControl.prefs[CameraControl.PREFS.IDLEMAX]);
8                 this._powerService.stopScreenDim();
9 +               this.sysVolMute(true);
10         },
11         /**
12          * Stop checking for capture activity and re-enable the screen dim.
13 @@ -887,6 +888,7 @@ CaptureAssistant = Class.create({
14                         clearTimeout(this._idleCheckTimer);
15                         delete this._idleCheckTimer;
16                 }
17 +               this.sysVolMute(false);
18         },
19         /**
20          * Indicate that an event has occured and reset the screen-off check time.
21 @@ -897,6 +899,7 @@ CaptureAssistant = Class.create({
22                         clearTimeout(this._idleCheckTimer);
23                         this._idleCheckTimer = setTimeout(this._triggerIdleHandler,  this.cameraControl.prefs[CameraControl.PREFS.IDLEMAX]);
24  
25 +               this.sysVolMute(true);
26                 }
27                 else{
28                         this.startIdleCheck();
29 @@ -915,6 +918,12 @@ CaptureAssistant = Class.create({
30                 this._powerService.allowScreenDim();
31         },
32                         
33 +       sysVolMute: function(mute){
34 +               this.controller.serviceRequest('palm://com.palm.audio/system', {
35 +                       method:'setMuted',
36 +                       parameters:{muted:mute}
37 +               });
38 +       },
39  
40         /**
41          * Click handler for flashmode button.