commit | b112f26ccef2ddcca67f14fd53b9ad297e452a4a | [log] [tgz] |
---|---|---|
author | Michael Wright <michaelwr@google.com> | Thu May 24 13:41:50 2018 +0100 |
committer | Michael Wright <michaelwr@google.com> | Thu May 24 14:15:04 2018 +0100 |
tree | 1aa17797708a5bea34f1a2c487b714532c520046 | |
parent | 9ed0da42b3d827b5de251676dcd35e8fb5c33a5c [diff] |
Use TCM context if application context is unavailble. In TextClassificationManager, we use the application context to reduce the likelihood of leaking the underlying Activity. Unfortunately, some places (e.g. auto, system_server) don't actually provide us an application context, so we need to fall back to whatever context was passed in to TCM in the first place. Bug: 80188317 Test: none Change-Id: Ib4b2e6ed543d3ed56cefd8f56717855158cdc0fe