usb: dump flag value in the constructor

Dump flag value in the construtor for easier debugging. Feature flags
are not expected to change in runtime, dumping the value once should
be enough.

Bug: 296119135
Test: manual test
Change-Id: Ie5aca2dff23e59704fb306833cde0e592b9f430d
(cherry picked from commit 9164eae7cdee032381d8bf045fbbed33f62b00bf)
This commit is contained in:
Roy Luo 2024-01-04 01:15:16 +00:00
parent d662abbfbc
commit 291642b702
2 changed files with 8 additions and 0 deletions

View file

@ -564,6 +564,11 @@ Usb::Usb()
ALOGE("pthread_condattr_destroy failed: %s", strerror(errno)); ALOGE("pthread_condattr_destroy failed: %s", strerror(errno));
abort(); abort();
} }
ALOGI("feature flag enable_usb_data_compliance_warning: %d",
usb_flags::enable_usb_data_compliance_warning());
ALOGI("feature flag enable_input_power_limited_warning: %d",
usb_flags::enable_input_power_limited_warning());
} }
ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role, ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role,

View file

@ -164,6 +164,9 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
ALOGE("pthread creation failed %d", errno); ALOGE("pthread creation failed %d", errno);
abort(); abort();
} }
ALOGI("feature flag enable_report_usb_data_compliance_warning: %d",
usb_flags::enable_report_usb_data_compliance_warning());
} }
UsbDataSessionMonitor::~UsbDataSessionMonitor() {} UsbDataSessionMonitor::~UsbDataSessionMonitor() {}