summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2017-11-09 15:55:24 -0800
committerPhilip P. Moltmann <moltmann@google.com>2017-11-09 16:58:20 -0800
commit5a633c6e4d9661c574ac34e891da22ec62b5e383 (patch)
treedeb9c8586788c74ea0260fb2c54caff01d29b453 /tools/aapt2/java/JavaClassGenerator.cpp
parent3b382900a81a10498fc35e927086982bc8e18437 (diff)
Don't show "always use" when app can't be default
Each USB device can have one default handler. This app is launched when the device is plugged in. A default handler automatically gets permission to access the device when launched. All other apps have to request the permission to access the USB device via UsbManager.requestPermission. In the permission dialog there is an option to make the app the default app for the device. Of course this only makes sense if this app declares the right properties to be auto-launched. Hence check this and only then show this options. Also made the string in the dialogs easier to understand. AccessoryFilter and DeviceFilter needed to be copied so I can access them from system-ui. No code change in these classes. Test: requested permissions from app that could by the default for the device and from an app that could not. Also tested "confirm" flow that is executed when the device is plugged in and a app that might be default is installed. Bug: 67381583 Change-Id: I12eb7efed0ad107c70ae32433a5629108f252486
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions