From 6e930cbc390c3c363eb6145423278e8511ef9a68 Mon Sep 17 00:00:00 2001 From: Hanson Ho Date: Sun, 22 Oct 2023 23:00:36 -0700 Subject: [PATCH] Misc clean up --- .../io/embrace/android/embracesdk/EmbraceImpl.java | 2 +- .../embracesdk/EmbraceInternalInterfaceImpl.kt | 7 ------- .../embracesdk/internal/EmbraceInternalInterface.kt | 13 +++++++------ 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceImpl.java b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceImpl.java index 5dcc2b54ae..5da8762084 100644 --- a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceImpl.java +++ b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceImpl.java @@ -1572,7 +1572,7 @@ EmbraceInternalInterface getEmbraceInternalInterface() { if (isStarted() && embraceInternalInterface != null) { return embraceInternalInterface; } else { - return EmbraceInternalInterfaceKt.getDefault(); + return EmbraceInternalInterfaceKt.getDefaultImpl(); } } diff --git a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceInternalInterfaceImpl.kt b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceInternalInterfaceImpl.kt index dee3b6c899..08b65506bc 100644 --- a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceInternalInterfaceImpl.kt +++ b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/EmbraceInternalInterfaceImpl.kt @@ -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() { diff --git a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt index a4296c5549..15a3b4539a 100644 --- a/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt +++ b/embrace-android-sdk/src/main/java/io/embrace/android/embracesdk/internal/EmbraceInternalInterface.kt @@ -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 @@ -13,7 +14,7 @@ import io.embrace.android.embracesdk.network.http.NetworkCaptureData @InternalApi public interface EmbraceInternalInterface { /** - * {@see Embrace#logInfo} + * See [Embrace.logInfo] */ public fun logInfo( message: String, @@ -21,7 +22,7 @@ public interface EmbraceInternalInterface { ) /** - * {@see Embrace#logWarning} + * See [Embrace.logWarning] */ public fun logWarning( message: String, @@ -30,7 +31,7 @@ public interface EmbraceInternalInterface { ) /** - * {@see Embrace#logError} + * See [Embrace.logError] */ public fun logError( message: String, @@ -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, @@ -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( @@ -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?) { }