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

Commit c655da83 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move conflated utils to shared lib" into main

parents 82612236 4c43201d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ android_library {
        "SystemUILogLib",
        "SystemUIPluginLib",
        "SystemUISharedLib",
        "SystemUI-shared-utils",
        "SystemUI-statsd",
        "SettingsLib",
        "com_android_systemui_flags_lib",
@@ -263,6 +264,7 @@ android_library {
        "SystemUISharedLib",
        "SystemUICustomizationLib",
        "SystemUICustomizationTestUtils",
        "SystemUI-shared-utils",
        "SystemUI-statsd",
        "SettingsLib",
        "com_android_systemui_flags_lib",
+10 −4
Original line number Diff line number Diff line
@@ -16,14 +16,14 @@

package com.android.systemui.common.coroutine

import com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow as wrapped
import kotlin.experimental.ExperimentalTypeInference
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.ProducerScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.callbackFlow
import kotlin.experimental.ExperimentalTypeInference
import com.android.systemui.common.coroutine.conflatedCallbackFlow as wrapped

@Deprecated("Use com.android.systemui.common.coroutine.conflatedCallbackFlow instead")
@Deprecated("Use com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow instead")
object ConflatedCallbackFlow {

    /**
@@ -32,7 +32,13 @@ object ConflatedCallbackFlow {
     * consumer(s) of the values in the flow), the values are buffered and, if the buffer fills up,
     * we drop the oldest values automatically instead of suspending the producer.
     */
    @Deprecated("Use com.android.systemui.common.coroutine.conflatedCallbackFlow instead")
    @Deprecated(
        "Use com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow instead",
        ReplaceWith(
            "conflatedCallbackFlow",
            "com.android.systemui.utils.coroutines.flow.conflatedCallbackFlow"
        )
    )
    @OptIn(ExperimentalTypeInference::class)
    fun <T> conflatedCallbackFlow(
        @BuilderInference block: suspend ProducerScope<T>.() -> Unit,
+32 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2024 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

package {
    default_team: "trendy_team_system_ui_please_use_a_more_specific_subteam_if_possible_",
    default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
}

java_library {
    name: "SystemUI-shared-utils",
    srcs: [
        "src/**/*.java",
        "src/**/*.kt",
    ],
    static_libs: [
        "kotlin-stdlib",
        "kotlinx_coroutines",
    ],
}
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

@file:OptIn(ExperimentalTypeInference::class)

package com.android.systemui.common.coroutine
package com.android.systemui.utils.coroutines.flow

import kotlin.experimental.ExperimentalTypeInference
import kotlinx.coroutines.channels.ProducerScope
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

@file:OptIn(ExperimentalCoroutinesApi::class, ExperimentalTypeInference::class)

package com.android.systemui.common.coroutine
package com.android.systemui.utils.coroutines.flow

import kotlin.experimental.ExperimentalTypeInference
import kotlinx.coroutines.ExperimentalCoroutinesApi