Error Linter for Marking Activities and Services and Singleton
This linter makes marking android.app.Activity or android.app.Services
a @SysUISingleton an error. Doing this can cause crashes if Android
shuts one down and then starts a new one, as Dagger will cause it to
be erroneously reused.
The same check is partially extended to
android.content.BroadcastReceiverBroadcastReceiver, where it is
allowable to have them as singleton if we are constructing them
ourselves, but an error if we are relying on Android to construct them
from the manifest.
Fixes: 320471133
Flag: NA
Test: m SystemUI-core-lint && SingletonAndroidComponentDetectorTest
Change-Id: I398fe2d31d581add0ee613ea426620d74be6099e
5 files changed