Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0ad9ab07 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Avoid null app context in StaticApplicationContextServiceFetcher.

StaticApplicationContextServiceFetcher passes the application
context to the services it creates, but sometimes the application
context can be null. Cases we've seen so far are:

- Apps that (incorrectly) call getSystemService in
  attachBaseContext. In this case the passed-in context is what
  will become the application context soon afterwards.
- ActivityThread$ApplicationThread.setHttpProxy. In this case the
  passed-in context is the system context.

In both of these cases the passed-in context is never freed, so
passing it in to the service will not result in a leak.

Bug: 27532714
Bug: 27502146
Bug: 27337770
Change-Id: I5971c67b0e699d1a77850be8a338a448a96ec7d7
parent 37127f86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment