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

Commit 5c14d32d authored by Jozef BABJAK's avatar Jozef BABJAK
Browse files

Fix for startup NPE.

Change-Id: I6928939d235faf544a85bb84bba2fa135ddc8e45
parent 08d9d9a4
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -128,6 +128,9 @@ class UsbObserver extends UEventObserver {


        try {
        try {
            File[] files = new File(USB_COMPOSITE_CLASS_PATH).listFiles();
            File[] files = new File(USB_COMPOSITE_CLASS_PATH).listFiles();
            if (files == null) {
                return; // nothing to do
            }
            for (int i = 0; i < files.length; i++) {
            for (int i = 0; i < files.length; i++) {
                File file = new File(files[i], "enable");
                File file = new File(files[i], "enable");
                FileReader reader = new FileReader(file);
                FileReader reader = new FileReader(file);