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

Commit 1f13872a authored by Mike Lockwood's avatar Mike Lockwood
Browse files

UsbAlsaManager: Fix NPE when running in emulator

Bug: 20537358
Change-Id: I46693e45eb6127118cbd54fc3490dc58840b5797
parent ec32ac95
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -142,10 +142,12 @@ public final class UsbAlsaManager {

        // add existing alsa devices
        File[] files = new File(ALSA_DIRECTORY).listFiles();
        if (files != null) {
            for (int i = 0; i < files.length; i++) {
                alsaFileAdded(files[i].getName());
            }
        }
    }

    // Notifies AudioService when a device is added or removed
    // audioDevice - the AudioDevice that was added or removed