Add API for Tethering Mode changed and Update Tethering Info#7534
Add API for Tethering Mode changed and Update Tethering Info#7534Naveen1-Saini wants to merge 1 commit intoSamsung:mainfrom
Conversation
Code Review1. Missing license header in new file 2. Incorrect exception cref types in XML docs 3. Empty-string not validated in UpdateTetheringInfo |
JoonghyunCho
left a comment
There was a problem hiding this comment.
🤖 [AI Review]
PR #7534 — Add API for Tethering Mode changed and Update Tethering Info
🔴 Issue: exception cref tags reference enum values, not exception types
In TetheringExtensionManager.cs, both the ModeChanged event and UpdateTetheringInfo method use:
<exception cref="TetheringError.InvalidParam">...</exception>
<exception cref="TetheringError.InvalidOperation">...</exception>TetheringError is an enum, not an exception class. The cref attribute in <exception> tags must reference CLR exception types. Use the actual thrown types instead, for example:
<exception cref="System.ArgumentException">Thrown when SSID or passphrase is null or empty.</exception>
<exception cref="System.InvalidOperationException">Thrown when tethering is not active or the update fails.</exception>🟡 Suggestion: UpdateTetheringInfo should also guard against empty strings
The null checks in TetheringExtensionManagerImpl.UpdateTetheringInfo are good, but empty strings ("") passed to the native tethering_ext_update_tethering_info entry point may cause undefined or erroneous native behavior. Replace the null-only checks with string.IsNullOrEmpty:
if (string.IsNullOrEmpty(ssid))
throw new ArgumentException("SSID cannot be null or empty");
if (string.IsNullOrEmpty(passphrase))
throw new ArgumentException("Passphrase cannot be null or empty");🟡 Suggestion: Missing Apache 2.0 license header in TetheringExtensionModeChangedEventArgs.cs
Every other source file in the Tizen.Network.Tethering module begins with the standard Apache 2.0 license block, but the new TetheringExtensionModeChangedEventArgs.cs file starts directly with using System;. Please add the license header for consistency and legal compliance.
|
🤖 [AI Review] — Following up on @JoonghyunCho's review above, which has not yet received a response from the author. All three points raised are valid and should be addressed before merge:
@Naveen1-Saini Could you please address these items? Happy to clarify any of the points if needed. |
Description of Change
Tethering Mode State Callback
Event is triggered whenever the mode changed callback is received from the native Tethering C API
Dynamic SSID and Passphrase Update API
Updates the tethering information with new SSID (service set identifier) and passphrase.