DO NOT MERGE: UsbManager: Don't display activity picker if there are no apps available for an accessory
Change-Id: I1aa578887e42aef375211eadece4c1fddaf234f8 Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
@ -394,8 +394,11 @@ class UsbDeviceSettingsManager {
|
|||||||
defaultPackage = mAccessoryPreferenceMap.get(new AccessoryFilter(accessory));
|
defaultPackage = mAccessoryPreferenceMap.get(new AccessoryFilter(accessory));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defaultPackage != null) {
|
|
||||||
int count = matches.size();
|
int count = matches.size();
|
||||||
|
// don't show the resolver activity if there are no choices available
|
||||||
|
if (count == 0) return;
|
||||||
|
|
||||||
|
if (defaultPackage != null) {
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
ResolveInfo rInfo = matches.get(i);
|
ResolveInfo rInfo = matches.get(i);
|
||||||
if (rInfo.activityInfo != null &&
|
if (rInfo.activityInfo != null &&
|
||||||
|
Reference in New Issue
Block a user