.class final Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1; .super Lkotlin/coroutines/jvm/internal/SuspendLambda; .source "SourceFile" # interfaces .implements Lkotlin/jvm/functions/Function3; # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Landroidx/datastore/preferences/SharedPreferencesMigrationKt;->getMigrationFunction()Lkotlin/jvm/functions/Function3; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = null .end annotation .annotation system Ldalvik/annotation/Signature; value = { "Lkotlin/coroutines/jvm/internal/SuspendLambda;", "Lkotlin/jvm/functions/Function3;" } .end annotation .annotation runtime Lkotlin/coroutines/jvm/internal/DebugMetadata; c = "androidx.datastore.preferences.SharedPreferencesMigrationKt$getMigrationFunction$1" f = "SharedPreferencesMigration.kt" l = {} m = "invokeSuspend" .end annotation # instance fields .field synthetic L$0:Ljava/lang/Object; .field synthetic L$1:Ljava/lang/Object; .field label:I # direct methods .method public constructor (Lkotlin/coroutines/Continuation;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lkotlin/coroutines/Continuation;", ")V" } .end annotation const/4 v0, 0x3 invoke-direct {p0, v0, p1}, Lkotlin/coroutines/jvm/internal/SuspendLambda;->(ILkotlin/coroutines/Continuation;)V return-void .end method # virtual methods .method public final invoke(Landroidx/datastore/migrations/SharedPreferencesView;Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroidx/datastore/migrations/SharedPreferencesView;", "Landroidx/datastore/preferences/core/Preferences;", "Lkotlin/coroutines/Continuation;", ")", "Ljava/lang/Object;" } .end annotation .line 0 new-instance v0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1; invoke-direct {v0, p3}, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->(Lkotlin/coroutines/Continuation;)V iput-object p1, v0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->L$0:Ljava/lang/Object; iput-object p2, v0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->L$1:Ljava/lang/Object; sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; invoke-virtual {v0, p1}, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 return-object p1 .end method .method public bridge synthetic invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .locals 0 .line 0 check-cast p1, Landroidx/datastore/migrations/SharedPreferencesView; check-cast p2, Landroidx/datastore/preferences/core/Preferences; check-cast p3, Lkotlin/coroutines/Continuation; invoke-virtual {p0, p1, p2, p3}, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->invoke(Landroidx/datastore/migrations/SharedPreferencesView;Landroidx/datastore/preferences/core/Preferences;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; move-result-object p1 return-object p1 .end method .method public final invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; .locals 5 invoke-static {}, Lkotlin/coroutines/intrinsics/IntrinsicsKt;->getCOROUTINE_SUSPENDED()Ljava/lang/Object; iget v0, p0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->label:I if-nez v0, :cond_b .line 102 invoke-static {p1}, Lkotlin/ResultKt;->throwOnFailure(Ljava/lang/Object;)V iget-object p1, p0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->L$0:Ljava/lang/Object; check-cast p1, Landroidx/datastore/migrations/SharedPreferencesView; iget-object v0, p0, Landroidx/datastore/preferences/SharedPreferencesMigrationKt$getMigrationFunction$1;->L$1:Ljava/lang/Object; check-cast v0, Landroidx/datastore/preferences/core/Preferences; .line 105 invoke-virtual {v0}, Landroidx/datastore/preferences/core/Preferences;->asMap()Ljava/util/Map; move-result-object v1 invoke-interface {v1}, Ljava/util/Map;->keySet()Ljava/util/Set; move-result-object v1 .line 155 new-instance v2, Ljava/util/ArrayList; const/16 v3, 0xa invoke-static {v1, v3}, Lkotlin/collections/CollectionsKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I move-result v3 invoke-direct {v2, v3}, Ljava/util/ArrayList;->(I)V .line 156 invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v1 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_0 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 .line 157 check-cast v3, Landroidx/datastore/preferences/core/Preferences$Key; .line 105 invoke-virtual {v3}, Landroidx/datastore/preferences/core/Preferences$Key;->getName()Ljava/lang/String; move-result-object v3 invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z goto :goto_0 .line 108 :cond_0 invoke-virtual {p1}, Landroidx/datastore/migrations/SharedPreferencesView;->getAll()Ljava/util/Map; move-result-object p1 .line 159 new-instance v1, Ljava/util/LinkedHashMap; invoke-direct {v1}, Ljava/util/LinkedHashMap;->()V .line 494 invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object p1 invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_1 :goto_1 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_2 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/util/Map$Entry; .line 108 invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v4 check-cast v4, Ljava/lang/String; invoke-interface {v2, v4}, Ljava/util/List;->contains(Ljava/lang/Object;)Z move-result v4 xor-int/lit8 v4, v4, 0x1 invoke-static {v4}, Lkotlin/coroutines/jvm/internal/Boxing;->boxBoolean(Z)Ljava/lang/Boolean; move-result-object v4 invoke-virtual {v4}, Ljava/lang/Boolean;->booleanValue()Z move-result v4 if-eqz v4, :cond_1 .line 496 invoke-interface {v3}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v4 invoke-interface {v3}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v3 invoke-interface {v1, v4, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_1 .line 110 :cond_2 invoke-virtual {v0}, Landroidx/datastore/preferences/core/Preferences;->toMutablePreferences()Landroidx/datastore/preferences/core/MutablePreferences; move-result-object p1 .line 111 invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v0 :cond_3 :goto_2 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v1 if-eqz v1, :cond_a invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/util/Map$Entry; invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v2 check-cast v2, Ljava/lang/String; invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v1 .line 113 instance-of v3, v1, Ljava/lang/Boolean; if-eqz v3, :cond_4 .line 114 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->booleanKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 .line 113 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 116 :cond_4 instance-of v3, v1, Ljava/lang/Float; if-eqz v3, :cond_5 .line 117 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->floatKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 .line 116 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 119 :cond_5 instance-of v3, v1, Ljava/lang/Integer; if-eqz v3, :cond_6 .line 120 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->intKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 .line 119 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 122 :cond_6 instance-of v3, v1, Ljava/lang/Long; if-eqz v3, :cond_7 .line 123 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->longKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 .line 122 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 125 :cond_7 instance-of v3, v1, Ljava/lang/String; if-eqz v3, :cond_8 .line 126 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->stringKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 .line 125 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 128 :cond_8 instance-of v3, v1, Ljava/util/Set; if-eqz v3, :cond_3 .line 131 invoke-static {v2}, Landroidx/datastore/preferences/core/PreferencesKeys;->stringSetKey(Ljava/lang/String;)Landroidx/datastore/preferences/core/Preferences$Key; move-result-object v2 if-eqz v1, :cond_9 .line 132 check-cast v1, Ljava/util/Set; .line 130 invoke-virtual {p1, v2, v1}, Landroidx/datastore/preferences/core/MutablePreferences;->set(Landroidx/datastore/preferences/core/Preferences$Key;Ljava/lang/Object;)V goto :goto_2 .line 132 :cond_9 new-instance p1, Ljava/lang/NullPointerException; const-string v0, "null cannot be cast to non-null type kotlin.collections.Set" invoke-direct {p1, v0}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .line 137 :cond_a invoke-virtual {p1}, Landroidx/datastore/preferences/core/Preferences;->toPreferences()Landroidx/datastore/preferences/core/Preferences; move-result-object p1 return-object p1 :cond_b new-instance p1, Ljava/lang/IllegalStateException; const-string v0, "call to \'resume\' before \'invoke\' with coroutine" invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method