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

Commit 805b6bbe authored by Mike Lockwood's avatar Mike Lockwood
Browse files

UsbManager: Don't display activity picker if there are no apps available for an accessory



Change-Id: I3ef569121e8d7d45584dbca9761451cbdf99a3e9
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent cb067ef5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -669,8 +669,11 @@ class UsbDeviceSettingsManager {
            defaultPackage = mAccessoryPreferenceMap.get(new AccessoryFilter(accessory));
        }

        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 &&