mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-16 02:47:17 +01:00
71 lines
4.3 KiB
Java
71 lines
4.3 KiB
Java
package androidx.compose.runtime.internal;
|
|
|
|
import androidx.compose.runtime.ComposeCompilerApi;
|
|
import androidx.compose.runtime.InternalComposeApi;
|
|
import androidx.compose.runtime.MutableState;
|
|
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
|
|
import androidx.compose.runtime.State;
|
|
import androidx.exifinterface.media.ExifInterface;
|
|
import com.amazon.alexa.ra.core.data.fragments.SmartFragmentContent;
|
|
import java.util.HashMap;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000.\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\b\u0010\f\u001a\u00020\rH\u0007\u001a)\u0010\u000e\u001a\b\u0012\u0004\u0012\u0002H\u00100\u000f\"\u0004\b\u0000\u0010\u00102\u0006\u0010\u0011\u001a\u00020\u00022\u0006\u0010\u0006\u001a\u0002H\u0010H\u0007¢\u0006\u0002\u0010\u0012\u001a\u001a\u0010\u0013\u001a\u00020\r2\u0006\u0010\u0011\u001a\u00020\u00022\b\u0010\u0006\u001a\u0004\u0018\u00010\u0004H\u0007\":\u0010\u0000\u001a.\u0012\u0004\u0012\u00020\u0002\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00040\u00030\u0001j\u0016\u0012\u0004\u0012\u00020\u0002\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00040\u0003`\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\"&\u0010\b\u001a\u00020\u00072\u0006\u0010\u0006\u001a\u00020\u00078\u0006@BX\u0087\u000e¢\u0006\u000e\n\u0000\u0012\u0004\b\t\u0010\n\u001a\u0004\b\b\u0010\u000b¨\u0006\u0014"}, d2 = {"liveLiteralCache", "Ljava/util/HashMap;", "", "Landroidx/compose/runtime/MutableState;", "", "Lkotlin/collections/HashMap;", "value", "", "isLiveLiteralsEnabled", "isLiveLiteralsEnabled$annotations", "()V", "()Z", "enableLiveLiterals", "", "liveLiteral", "Landroidx/compose/runtime/State;", ExifInterface.GPS_DIRECTION_TRUE, "key", "(Ljava/lang/String;Ljava/lang/Object;)Landroidx/compose/runtime/State;", "updateLiveLiteralValue", SmartFragmentContent.RUNTIME}, k = 2, mv = {2, 0, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nLiveLiteral.kt\nKotlin\n*S Kotlin\n*F\n+ 1 LiveLiteral.kt\nandroidx/compose/runtime/internal/LiveLiteralKt\n+ 2 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,92:1\n381#2,7:93\n381#2,7:100\n*S KotlinDebug\n*F\n+ 1 LiveLiteral.kt\nandroidx/compose/runtime/internal/LiveLiteralKt\n*L\n76#1:93,7\n84#1:100,7\n*E\n"})
|
|
/* loaded from: classes13.dex */
|
|
public final class LiveLiteralKt {
|
|
private static boolean isLiveLiteralsEnabled;
|
|
|
|
@NotNull
|
|
private static final HashMap<String, MutableState<Object>> liveLiteralCache = new HashMap<>();
|
|
|
|
@InternalComposeApi
|
|
public static final void enableLiveLiterals() {
|
|
isLiveLiteralsEnabled = true;
|
|
}
|
|
|
|
public static final boolean isLiveLiteralsEnabled() {
|
|
return isLiveLiteralsEnabled;
|
|
}
|
|
|
|
@ComposeCompilerApi
|
|
@InternalComposeApi
|
|
@NotNull
|
|
public static final <T> State<T> liveLiteral(@NotNull String str, T t) {
|
|
HashMap<String, MutableState<Object>> hashMap = liveLiteralCache;
|
|
MutableState<Object> mutableState = hashMap.get(str);
|
|
if (mutableState == null) {
|
|
mutableState = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(t, null, 2, null);
|
|
hashMap.put(str, mutableState);
|
|
}
|
|
mutableState.getClass();
|
|
return mutableState;
|
|
}
|
|
|
|
@InternalComposeApi
|
|
public static final void updateLiveLiteralValue(@NotNull String str, @Nullable Object obj) {
|
|
boolean z;
|
|
HashMap<String, MutableState<Object>> hashMap = liveLiteralCache;
|
|
MutableState<Object> mutableState = hashMap.get(str);
|
|
if (mutableState == null) {
|
|
mutableState = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(obj, null, 2, null);
|
|
hashMap.put(str, mutableState);
|
|
z = false;
|
|
} else {
|
|
z = true;
|
|
}
|
|
MutableState<Object> mutableState2 = mutableState;
|
|
if (z) {
|
|
mutableState2.setValue(obj);
|
|
}
|
|
}
|
|
|
|
@ComposeCompilerApi
|
|
@InternalComposeApi
|
|
public static /* synthetic */ void isLiveLiteralsEnabled$annotations() {
|
|
}
|
|
}
|