CurrentSpanUtils$ScopeInSpan.smali

.class final Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;
.super Ljava/lang/Object;

# interfaces
.implements Lio/opencensus/common/Scope;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lio/opencensus/trace/CurrentSpanUtils;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1a
    name = "ScopeInSpan"
.end annotation


# instance fields
.field private final f:Lio/grpc/Context;

.field private final g:Lio/opencensus/trace/Span;

.field private final h:Z


# direct methods
.method private constructor <init>(Lio/opencensus/trace/Span;Z)V
    .registers 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->g:Lio/opencensus/trace/Span;

    iput-boolean p2, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->h:Z

    invoke-static {}, Lio/grpc/Context;->o()Lio/grpc/Context;

    move-result-object p2

    invoke-static {p2, p1}, Lio/opencensus/trace/unsafe/ContextUtils;->b(Lio/grpc/Context;Lio/opencensus/trace/Span;)Lio/grpc/Context;

    move-result-object p1

    invoke-virtual {p1}, Lio/grpc/Context;->e()Lio/grpc/Context;

    move-result-object p1

    iput-object p1, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->f:Lio/grpc/Context;

    return-void
.end method

.method synthetic constructor <init>(Lio/opencensus/trace/Span;ZLio/opencensus/trace/CurrentSpanUtils$1;)V
    .registers 4

    invoke-direct {p0, p1, p2}, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;-><init>(Lio/opencensus/trace/Span;Z)V

    return-void
.end method


# virtual methods
.method public close()V
    .registers 3

    invoke-static {}, Lio/grpc/Context;->o()Lio/grpc/Context;

    move-result-object v0

    iget-object v1, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->f:Lio/grpc/Context;

    invoke-virtual {v0, v1}, Lio/grpc/Context;->p(Lio/grpc/Context;)V

    iget-boolean v0, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->h:Z

    if-eqz v0, :cond_12

    iget-object v0, p0, Lio/opencensus/trace/CurrentSpanUtils$ScopeInSpan;->g:Lio/opencensus/trace/Span;

    invoke-virtual {v0}, Lio/opencensus/trace/Span;->f()V

    :cond_12
    return-void
.end method