Patch Phone Disable Various Call Sounds

From WebOS Internals
Revision as of 18:20, 22 July 2009 by Hopspitfire (talk | contribs)
Jump to navigation Jump to search

Disable sound when you miss a call

If you're like me, you want to use the alarm clock and hear SMS alerts in case the NOC is on fire, but you don't want some random spam call to wake you up. Even though you turned the ringer volume down, the missed call alert will use the system volume setting and be as loud as your alarm/SMS. How annoying. Here is a very simple trick to make those missed call notifications silent.

First

  1. Gain root access.
  2. Open the root file system to read/write with rootfs_open.
edit /usr/palm/applications/com.palm.app.phone/app/controllers/announcer-assistant.js (use nano or vi, etc.)

Look for the announceMissed method which will begin with the following line:

announceMissed: function(number, contact, timeStamp) {

Then scroll down and find this block

                // otherwise create a new one
                } else {
                        var height = (picture ? 186 : 186);
                        QDLogger.log( "announceMissed", "creating window of height " , height);
                        this.appControl.createStageWithCallback({
                                        lightweight: true,
                                        applicationStylesheets: ["stylesheets/phone.css"],
                                        name: stageName,
                                        "height": height
                                },

Now, after the height parameter, insert a new parameter called soundClass. The default for this is notification. We want to make it none, so....

                                        "height": height,
                                        "soundClass":'none'
                                },

Now restart the GUI. The luna rescan trick WILL NOT WORK with the phone app.

initctl stop LunaSysMgr && initctl start LunaSysMgr

Wait for the GUI to come back and then call your phone. Don't answer it, and then hang up...notice you'll still have your notification but no annoying loud ding.

Now remount read only

mount -o remount,ro /

Notes for coders

Another way you can mod this is to change the popupalert style stage, which is the 3rd, optional param to createStageWithCallback(). This 3rd param can take a variety of options. So far I've discovered: popupalert, dashboard, card, pin, emergency, activebanner, and banneralert. You can also just leave it blank. I tried them all. Some worked, some didn't. Emergency is probably best left for the 911 functionality. Banneralert, like popupalert will use a sound file by default. Dashboard is the tiny little icon tray that appears at the bottom when you have mail or missed calls. In my mind the best alternative to popupalert with sound off, would be to switch it to dashboard and then you just get a more subtle notification of a missed call. If you use dashboard, you need not add the soundClass param above.