Debug RILJ wakelocks on Smdk4210Ril:
Original author's commit message: ------------------------------------ There is a battery drain due to a wakelock being held for an unspecified length of time. BetterBatteryStats shows it to be RILJ holding the wakelock. I've narrowed it down to a RIL request named RIL_REQUEST_SET_TTY_MODE. I dumped out RILJ.mRequestsList during the held wakelock and I see this request staying around and waiting for a response from the RIL. It's as if the RIL is not responding to this request and I don't see RILReceiver processing a response to this request. One thing to note is that RIL_REQUEST_SET_TTY_MODE is generated when we see EVENT_TTY_PREFERRED_MODE_CHANGED from PhoneApp. This happens when the phone boots up and also when you plug in a pair of headphones. Thus this wakelock can be reproduced by plugging in a pair of headphones. To work around this, I've added logic to perform a lazy removal of RILRequests that haven't received a response in the existing wake lock timeout (60 seconds.) The removal itself is done as part of findAndRemoveRequestFromList(). Since new RIL requests are appended to this list, we're guaranteed that the stale TTY requests will eventually be removed either when the existing timeout fires, or through this new lazy removal ------------------------------------ Additional comments from Andrew Dodd: There seem to be all sorts of things that can cause similar behavior. Rather than purge requests known to have issues, we just print them so we can fix root cause. Change-Id: I0a80ba8fb5a1811ab1d8f78e3b8d1bcbfc627377
Loading
Please register or sign in to comment