Issue #1245

Fix issue #8470131: Process thrash kills battery

Added by My Self over 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Type of work:


I've researched a bit because of the battery consumption thread: and found inside the changelog from upper Android versions ( the following patch: with the following description:
Protect app widget broadcasts from abuse.
In this case the app was sending an APPWIDGET_UPDATE broadcast without specifying a target, which
(a) should not be allowed (you should not be able to send updates to other apps), and
(b) resulted in every single potential app widget in the system being launched... which was about 75 of them.

The source code has the following summarized comments:
"[...] we don't want apps to send this, but historically it has not been protected and apps may be using it
to poke their own app widget. So, instead of making it protected, just limit it to the caller."

With other words, this patch will limit the (APPWIDGET_UPDATE-)broadcasts (sent by the apps) to their own packages:

if (callerApp == null) {
String msg = "Permission Denial: not allowed to send broadcast " 

[this goes to the (a) from the headline-description]
and prevent every single potential app widget in the system from being launched, (triggered by this broadcasts) which drains the battery unnecessarily.
[which goes to the (b) from the headline-description].


Bugfix-8470131.patch (10.3 KB) Bugfix-8470131.patch My Self, 08/26/2015 11:32 AM

Updated by My Self over 6 years ago


Updated by My Self about 6 years ago

  • File Bugfix-8470131.patch added

I decided to attach the patch listed above, (and tested with the current Replicant 4.2 sources) on this ticket.
After flashing the patched Replicant, I've tested my productive device several months without any misbehavior.

@everyone: please review the patches and apply them if you like.


Updated by My Self almost 6 years ago

  • % Done changed from 0 to 100

Updated by Paul Kocialkowski almost 6 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Merged, thanks!


Updated by My Self almost 6 years ago

  • File deleted (Bugfix-8470131.patch)

Also available in: Atom PDF