Skip to content

Commit

Permalink
fix (AndroidFileUploader.java): fix the order of the parameters of lo…
Browse files Browse the repository at this point in the history
…gMessageAdvertisement() so that it will be the one that the C# world expects when intercepting the call to this method
  • Loading branch information
ksidirop-laerdal committed Oct 15, 2024
1 parent 80ba0ef commit 023e160
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public EAndroidDeviceResetterState getState() {
}

private EAndroidDeviceResetterState _currentState = EAndroidDeviceResetterState.NONE;
private void setState(EAndroidDeviceResetterState newState) {
private void setState(final EAndroidDeviceResetterState newState) {
final EAndroidDeviceResetterState oldState = _currentState; //order

_currentState = newState; //order
Expand All @@ -99,15 +99,15 @@ public String getLastFatalErrorMessage() {
return _lastFatalErrorMessage;
}

public void fatalErrorOccurredAdvertisement(String errorMessage) {
public void fatalErrorOccurredAdvertisement(final String errorMessage) {
_lastFatalErrorMessage = errorMessage; //this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

public void logMessageAdvertisement(String message, String category, String level) {
public void logMessageAdvertisement(final String message, final String category, final String level) {
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

public void stateChangedAdvertisement(EAndroidDeviceResetterState oldState, EAndroidDeviceResetterState currentState) {
public void stateChangedAdvertisement(final EAndroidDeviceResetterState oldState, final EAndroidDeviceResetterState currentState) {
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private void ensureTransportIsInitializedExactlyOnce(int initialMtuSize)
if (_transport != null)
return;

logMessageAdvertisement(_remoteFilePathSanitized, "[AFU.ETIIEO.010] (Re)Initializing transport: initial-mtu-size=" + initialMtuSize, "FileUploader", "TRACE");
logMessageAdvertisement("[AFU.ETIIEO.010] (Re)Initializing transport: initial-mtu-size=" + initialMtuSize, "FileUploader", "TRACE", _remoteFilePathSanitized);

_transport = new McuMgrBleTransport(_context, _bluetoothDevice);

Expand All @@ -224,7 +224,7 @@ private EAndroidFileUploaderVerdict ensureFilesystemManagerIsInitializedExactlyO
if (_fileSystemManager != null) //already initialized
return EAndroidFileUploaderVerdict.SUCCESS;

logMessageAdvertisement(_remoteFilePathSanitized, "[AFU.EFMIIEO.010] (Re)Initializing filesystem-manager", "FileUploader", "TRACE");
logMessageAdvertisement("[AFU.EFMIIEO.010] (Re)Initializing filesystem-manager", "FileUploader", "TRACE", _remoteFilePathSanitized);

try
{
Expand Down Expand Up @@ -432,7 +432,7 @@ public void fileUploadProgressPercentageAndDataThroughputChangedAdvertisement(fi
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

public void logMessageAdvertisement(final String remoteFilePath, final String message, final String category, final String level)
public void logMessageAdvertisement(final String message, final String category, final String level, final String resource)
{
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ public String getLastFatalErrorMessage() {
return _lastFatalErrorMessage;
}

public void fatalErrorOccurredAdvertisement(String errorMessage) {
public void fatalErrorOccurredAdvertisement(final String errorMessage) {
_lastFatalErrorMessage = errorMessage; //this method is meant to be overridden by csharp binding libraries to intercept updates
}

public void logMessageAdvertisement(String message, String category, String level) {
public void logMessageAdvertisement(final String message, final String category, final String level) {
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

public void busyStateChangedAdvertisement(boolean busyNotIdle) {
public void busyStateChangedAdvertisement(final boolean busyNotIdle) {
//this method is intentionally empty its meant to be overridden by csharp binding libraries to intercept updates
}

Expand Down

0 comments on commit 023e160

Please sign in to comment.