diff options
author | Philip P. Moltmann <moltmann@google.com> | 2018-05-31 11:02:32 -0700 |
---|---|---|
committer | Philip P. Moltmann <moltmann@google.com> | 2018-05-31 11:12:32 -0700 |
commit | 66c5a8d2073d2076fc0e06237659143e8de52539 (patch) | |
tree | 997a12f42e04d60e3aa169b57355cce721da23c4 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | c4daa74f9a02c9ee9ef88b046fcaa74269ca1a70 (diff) |
Dump activities that handle when USB devices get plugged in
When a USB device or accessory gets plugged in the system might
automatically start activities that have a device/accessory filter set
to include the plugged in USB device.
Unfortunately we seen too many apps setting too broad of a filter and it
annoys the user that this apps wants to start every time the device gets
plugged in.
This change dumps the acitivity names and their filters so debugging
such issues is much easier.
To do this, there is some mild refactoring:
1. Split packageMatchesLocked into
- getDeviceFilters to resolve all device filters
- getAccessoryFilterer to resolve all accessories
- Check if a filter matches after resolving all filters. This is no
performance issue as usually there is only one or two filters per
activity.
2. Split queryIntentActivitiesForAllProfiles into
- A per user part, so that we can use the exact same intent-resolution
code for the dump-code
- And a loop over the per user part
Test: adb shell dumpsys usb
+ incident_report usb
+ verified that the output is as expected
Change-Id: I552c963b9a1b1c7df0adc6746af8cd42a4691cd6
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions