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

Commit c9b7cb2f authored by Paul McLean's avatar Paul McLean
Browse files

Replace parsing error stack dump with a more terse message

Bug: 147608995
Test: boot, connect PreSonus AudioBox 22VSL, pull log and examine.
Change-Id: I49629267c91cea5d6ba8a76af956cd3306c1d8b1
parent 8248661d
Loading
Loading
Loading
Loading
+20 −2
Original line number Diff line number Diff line
@@ -292,9 +292,27 @@ public final class UsbDescriptorParser {
                    // Clean up
                    descriptor.postParse(stream);
                } catch (Exception ex) {
                    // Clean up, compute error status
                    descriptor.postParse(stream);

                    // Report
                    Log.w(TAG, "Exception parsing USB descriptors. type:0x" + descriptor.getType()
                            + " status:" + descriptor.getStatus());
                    if (DEBUG) {
                        // Show full stack trace if debugging
                        Log.e(TAG, "Exception parsing USB descriptors.", ex);
                    }
                    StackTraceElement[] stackElems = ex.getStackTrace();
                    if (stackElems.length > 0) {
                        Log.i(TAG, "  class:" + stackElems[0].getClassName()
                                    + " @ " + stackElems[0].getLineNumber());
                    }
                    if (stackElems.length > 1) {
                        Log.i(TAG, "  class:" + stackElems[1].getClassName()
                                + " @ " + stackElems[1].getLineNumber());
                    }

                    // Clean up
                    // Finish up
                    descriptor.setStatus(UsbDescriptor.STATUS_PARSE_EXCEPTION);
                } finally {
                    mDescriptors.add(descriptor);