Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7da508ad authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/33807171'] into 25Q3-release.

Change-Id: I047e72777e03eefe0e292235c42c2515fbbabe56
parents 1e7445ff f06ada42
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -27,14 +27,14 @@ import kotlin.collections.ArrayDeque
 * immediately. This defeats the intention behind [LogBuffer] and should only be used when
 * [LogBuffer]s are unavailable in a certain context.
 */
class LogcatOnlyMessageBuffer
@JvmOverloads
constructor(
class LogcatOnlyMessageBuffer(
    private val targetLogLevel: LogLevel,
    private val maxMessageCount: Int = DEFAULT_MESSAGE_MAX_COUNT,
    private val maxMessageCount: Int,
): MessageBuffer {
    private val messages = ArrayDeque<LogMessageImpl>(maxMessageCount)

    constructor(targetLogLevel: LogLevel) : this(targetLogLevel, DEFAULT_MESSAGE_MAX_COUNT)

    override fun obtain(
        tag: String,
        level: LogLevel,
@@ -65,6 +65,6 @@ constructor(
    }

    companion object {
        val DEFAULT_MESSAGE_MAX_COUNT = 4
        private const val DEFAULT_MESSAGE_MAX_COUNT = 4
    }
}