Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

StartingAlertService Wakelock...

OP hlb3

23rd October 2011, 11:56 AM   |  #1  
hlb3's Avatar
OP Senior Member
Thanks Meter: 24
 
226 posts
Join Date:Joined: Jul 2011
So it appears the calendar app has some sort of a bug in it. I have noticed it a few times now, before a reminder in the calendar goes off, a wakelock pops up in betterbatterystats that says 'StartingAlertService' (Calendar). This most recent time it kept my phone awake for over an hour before I killed the calendar. Anybody else notice this? And more important, have a way to fix it?

Sent from my Galaxy S II using Tapatalk
23rd October 2011, 01:03 PM   |  #2  
Member
Flag Hagerstown, MD
Thanks Meter: 19
 
79 posts
Join Date:Joined: Aug 2007
More
I actually noticed this on mine for a couple days in a row not to long ago. Haven't seen it again but i've been keeping an eye out. Curious to know why?

Sent from my SAMSUNG-SGH-I777 using XDA App
24th October 2011, 12:07 AM   |  #3  
Member
Flag Urbana
Thanks Meter: 6
 
92 posts
Join Date:Joined: Jul 2011
More
I found the source code that call the wakelock of StartingAlertService here.
I am not a dev, but I can see that in order for the wakelock to be released, there are 2 IF statements that have to be satisfied. I think the problem might be there. Any Devs here would like to share any insights??
24th October 2011, 02:26 AM   |  #4  
Senior Recognized Developer
Flag Owego, NY
Thanks Meter: 24,759
 
13,519 posts
Join Date:Joined: Aug 2007
Donate to Me
More
Had it happen to me once too... I'll look at the code if I can find some time.

Looks like the first if is a simple "is there a wakelock"

The second one appears to be "is something done with doing stuff".
Last edited by Entropy512; 24th October 2011 at 02:30 AM.
24th October 2011, 05:52 AM   |  #5  
Senior Member
Flag Taipei
Thanks Meter: 97
 
173 posts
Join Date:Joined: Sep 2011
More
We've had this problem on the international Galaxy S II for a while now. There is a thread on it here: http://forum.xda-developers.com/show....php?t=1192696

One problem I see is that the source is for the Android AOSP calendar, which is probably different from the Samsung calendar (just like the Email app is different). I haven't tried the AOSP calendar but typically the Samsung apps have more features. You would have to edit the smali files to fix the Samsung app (or do a crude replacement hack like my Exchange wakelock hack, and pray that it works).

In the meantime, my solution was to just uninstall Calendar. Works great, but now I have no calendar. Other users have uninstalled Calendar and used replacement calendar apps without the wakelock issue, so you could try that.

EDIT: I also noticed that one user mentioned that this bug only happens when Calendar notifications are set to "Off." Kinda counterintuitive, but try setting Calendar notifications to something other than "Off" and see if that fixes the problem.
Last edited by claimui; 24th October 2011 at 06:26 AM.
The Following User Says Thank You to claimui For This Useful Post: [ View ]
24th October 2011, 05:16 PM   |  #6  
Member
Flag Urbana
Thanks Meter: 6
 
92 posts
Join Date:Joined: Jul 2011
More
Will continue testing
29th October 2011, 08:41 AM   |  #7  
hlb3's Avatar
OP Senior Member
Thanks Meter: 24
 
226 posts
Join Date:Joined: Jul 2011
Came across this earlier today: http://forum.xda-developers.com/show...php?p=16699746

I pushed that Calender.apk and froze the TW Calender in Titanium, I set a number of events like normal and so far I have not see the StartingAlertService Wakelock pop up at all, I'll continue to test for a few days and see what happens.

Sent from my Toshiba THRiVE using Tapatalk
29th October 2011, 08:47 AM   |  #8  
mbze430's Avatar
Senior Member
Flag Los Angeles Area
Thanks Meter: 156
 
1,337 posts
Join Date:Joined: Feb 2007
More
I am surprised this was caught so late. I actually seen this problem 2 days after I bought the ATT SGS2... but I read over in the Intl forum, and decided it was best to get a more "complete" calendar replacement.
29th October 2011, 11:33 AM   |  #9  
Senior Member
Flag Taipei
Thanks Meter: 97
 
173 posts
Join Date:Joined: Sep 2011
More
Quote:
Originally Posted by claimui

EDIT: I also noticed that one user mentioned that this bug only happens when Calendar notifications are set to "Off." Kinda counterintuitive, but try setting Calendar notifications to something other than "Off" and see if that fixes the problem.

UPDATE: I think setting the Calendar notification setting to "Alert" avoids the wakelock issue. When I set it to "Status bar notification" or "Off", I get the wakelock. Give it a try and see if it helps.

Personally I'd rather just have the status bar notifications though. Having to dismiss the popup alert is a pain.

Using the original Android Calendar might be one solution, but I actually like the Samsung apps. Maybe we can just replace the relevant smali file, like I did with my Samsung Email app "fix".

UPDATE 2: Setting the Calendar notification setting to "Alert" seemed to help, but I eventually got another wakelock. So we still need a more reliable solution to this issue.
Last edited by claimui; 3rd November 2011 at 05:46 AM.
29th October 2011, 07:53 PM   |  #10  
hlb3's Avatar
OP Senior Member
Thanks Meter: 24
 
226 posts
Join Date:Joined: Jul 2011
Ill give that a shot also, I like the Samsung app better as well.


Sent from my Toshiba THRiVE using Tapatalk

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes