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

Commit 0cfdab15 authored by James Wei's avatar James Wei
Browse files

USB: Refine misleading error message

Bug: 154684729
Test: adb shell dumpsys usb; (check logcat)
Change-Id: Icc9b2b14569b61cf9e9eec1e99c6f928a187ecda
parent f3fcee4f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1282,6 +1282,9 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
            try {
                writeStringIfNotNull(dump, "kernel_state", UsbHandlerProto.KERNEL_STATE,
                        FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim());
            } catch (FileNotFoundException exNotFound) {
                Slog.w(TAG, "Ignore missing legacy kernel path in bugreport dump: "
                        + "kernel state:" + STATE_PATH);
            } catch (Exception e) {
                Slog.e(TAG, "Could not read kernel state", e);
            }
@@ -1290,6 +1293,9 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser
                writeStringIfNotNull(dump, "kernel_function_list",
                        UsbHandlerProto.KERNEL_FUNCTION_LIST,
                        FileUtils.readTextFile(new File(FUNCTIONS_PATH), 0, null).trim());
            } catch (FileNotFoundException exNotFound) {
                Slog.w(TAG, "Ignore missing legacy kernel path in bugreport dump: "
                        + "kernel function list:" + FUNCTIONS_PATH);
            } catch (Exception e) {
                Slog.e(TAG, "Could not read kernel function list", e);
            }