Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb067ef5 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

UsbManager: Don't display activity picker if there are no apps available for a device



BUG: 3506988

Change-Id: Iaf3c50b9ba422e6bcd687338db996a4193441c97
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent b98d02b8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -615,8 +615,11 @@ class UsbDeviceSettingsManager {
            defaultPackage = mDevicePreferenceMap.get(new DeviceFilter(device));
        }

        if (defaultPackage != null) {
        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++) {
                ResolveInfo rInfo = matches.get(i);
                if (rInfo.activityInfo != null &&