Skip to content

Commit

Permalink
Misc clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
bidetofevil committed Oct 23, 2023
1 parent e1a7278 commit 6e930cb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,7 @@ EmbraceInternalInterface getEmbraceInternalInterface() {
if (isStarted() && embraceInternalInterface != null) {
return embraceInternalInterface;
} else {
return EmbraceInternalInterfaceKt.getDefault();
return EmbraceInternalInterfaceKt.getDefaultImpl();
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ internal class EmbraceInternalInterfaceImpl(
embraceImpl.recordAndDeduplicateNetworkRequest(callId, embraceNetworkRequest)
}

/**
* Determine if a network call should be captured based on the network capture rules
*
* @param url the url of the network call
* @param method the method of the network call
* @return the network capture rule to apply or null
*/
override fun shouldCaptureNetworkBody(url: String, method: String): Boolean = embraceImpl.shouldCaptureNetworkCall(url, method)

override fun setProcessStartedByNotification() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.embrace.android.embracesdk.internal

import android.util.Pair
import io.embrace.android.embracesdk.Embrace
import io.embrace.android.embracesdk.InternalApi
import io.embrace.android.embracesdk.LogType
import io.embrace.android.embracesdk.network.EmbraceNetworkRequest
Expand All @@ -13,15 +14,15 @@ import io.embrace.android.embracesdk.network.http.NetworkCaptureData
@InternalApi
public interface EmbraceInternalInterface {
/**
* {@see Embrace#logInfo}
* See [Embrace.logInfo]
*/
public fun logInfo(
message: String,
properties: Map<String, Any>?
)

/**
* {@see Embrace#logWarning}
* See [Embrace.logWarning]
*/
public fun logWarning(
message: String,
Expand All @@ -30,7 +31,7 @@ public interface EmbraceInternalInterface {
)

/**
* {@see Embrace#logError}
* See [Embrace.logError]
*/
public fun logError(
message: String,
Expand All @@ -40,7 +41,7 @@ public interface EmbraceInternalInterface {
)

/**
* {@see Embrace#logHandledException}
* Backwards compatible way for hosted SDKs to log a handled exception with different log levels
*/
public fun logHandledException(
throwable: Throwable,
Expand Down Expand Up @@ -95,7 +96,7 @@ public interface EmbraceInternalInterface {
* Record a network request and overwrite any previously recorded request with the same callId
*
* @param callId the ID with which the request will be identified internally. The session will only contain one recorded
* request with a given ID - last writer wins.
* request with a given ID - last writer wins.
* @param embraceNetworkRequest the request to be recorded
*/
public fun recordAndDeduplicateNetworkRequest(
Expand Down Expand Up @@ -127,7 +128,7 @@ public interface EmbraceInternalInterface {
public fun isNetworkSpanForwardingEnabled(): Boolean
}

internal val default = object : EmbraceInternalInterface {
internal val defaultImpl = object : EmbraceInternalInterface {

override fun logInfo(message: String, properties: Map<String, Any>?) { }

Check warning on line 133 in embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt

View check run for this annotation

Codecov / codecov/patch

embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt#L133

Added line #L133 was not covered by tests

Expand Down

0 comments on commit 6e930cb

Please sign in to comment.