apkfuckery/com.discord/smali/androidx/savedstate/Recreator$SavedStateProvider.smali
2019-12-06 04:29:40 +01:00

83 lines
2.2 KiB
Smali

.class public final Landroidx/savedstate/Recreator$SavedStateProvider;
.super Ljava/lang/Object;
.source "Recreator.java"
# interfaces
.implements Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/savedstate/Recreator;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "SavedStateProvider"
.end annotation
# instance fields
.field public final mClasses:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Landroidx/savedstate/SavedStateRegistry;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
iput-object v0, p0, Landroidx/savedstate/Recreator$SavedStateProvider;->mClasses:Ljava/util/Set;
const-string v0, "androidx.savedstate.Restarter"
invoke-virtual {p1, v0, p0}, Landroidx/savedstate/SavedStateRegistry;->registerSavedStateProvider(Ljava/lang/String;Landroidx/savedstate/SavedStateRegistry$SavedStateProvider;)V
return-void
.end method
# virtual methods
.method public add(Ljava/lang/String;)V
.locals 1
iget-object v0, p0, Landroidx/savedstate/Recreator$SavedStateProvider;->mClasses:Ljava/util/Set;
invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
return-void
.end method
.method public saveState()Landroid/os/Bundle;
.locals 3
.annotation build Landroidx/annotation/NonNull;
.end annotation
new-instance v0, Landroid/os/Bundle;
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V
new-instance v1, Ljava/util/ArrayList;
iget-object v2, p0, Landroidx/savedstate/Recreator$SavedStateProvider;->mClasses:Ljava/util/Set;
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
const-string v2, "classes_to_restore"
invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putStringArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V
return-object v0
.end method