5,593,650 Members 40,435 Now Online
XDA Developers Android and Mobile Development Forum

StartingAlertService Wakelock...

Tip us?
 
hlb3
Old
#1  
hlb3's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 206
Join Date: Jul 2011
Default StartingAlertService Wakelock...

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
-International Galaxy Note II
-Toshiba Thrive
 
marnel47
Old
#2  
Member
Thanks Meter 19
Posts: 79
Join Date: Aug 2007
Location: Hagerstown, MD
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
 
wltklah
Old
#3  
Member
Thanks Meter 6
Posts: 92
Join Date: Jul 2011
Location: Urbana
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??
I9100 CM9 4.0.4 Latest Nightly with LPF Radio
 
Entropy512
Old
(Last edited by Entropy512; 24th October 2011 at 01:30 AM.)
#4  
Senior Recognized Developer
Thanks Meter 23382
Posts: 12,770
Join Date: Aug 2007
Location: Owego, NY

 
DONATE TO ME
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".
*so much sig updating needed*

My Github profile - Some Android stuff, some AVR stuff

An excellent post on "noobs vs. developers"

A few opinions on kernel development "good practices"

Note: I have chosen not to use XDA's "friends" feature - I will reject all incoming "friend" requests.

Code:
<MikeyMike01> Smali is a spawn of hell
<shoman94> ^^^ +!
Code:
<Entropy512> gotta be careful not to step on each other's work.  :)
<Bumble-Bee> thats true
<jerdog> compeete for donations
 
claimui
Old
(Last edited by claimui; 24th October 2011 at 05:26 AM.)
#5  
Senior Member
Thanks Meter 95
Posts: 173
Join Date: Sep 2011
Location: Taipei
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.
The Following User Says Thank You to claimui For This Useful Post: [ Click to Expand ]
 
wltklah
Old
#6  
Member
Thanks Meter 6
Posts: 92
Join Date: Jul 2011
Location: Urbana
Will continue testing
I9100 CM9 4.0.4 Latest Nightly with LPF Radio
 
hlb3
Old
#7  
hlb3's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 206
Join Date: 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
-International Galaxy Note II
-Toshiba Thrive
 
mbze430
Old
#8  
mbze430's Avatar
Senior Member
Thanks Meter 149
Posts: 1,242
Join Date: Feb 2007
Location: Los Angeles Area
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.
 
claimui
Old
(Last edited by claimui; 3rd November 2011 at 04:46 AM.)
#9  
Senior Member
Thanks Meter 95
Posts: 173
Join Date: Sep 2011
Location: Taipei
Quote:
Originally Posted by claimui View Post
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.
 
hlb3
Old
#10  
hlb3's Avatar
Senior Member - OP
Thanks Meter 21
Posts: 206
Join Date: Jul 2011
Ill give that a shot also, I like the Samsung app better as well.


Sent from my Toshiba THRiVE using Tapatalk
-International Galaxy Note II
-Toshiba Thrive

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes