Constraint.smali

.class public final Lcom/firebase/jobdispatcher/Constraint;
.super Ljava/lang/Object;
.source "Constraint.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/firebase/jobdispatcher/Constraint$JobConstraint;
    }
.end annotation


# static fields
.field public static final ALL_CONSTRAINTS:[I
    .annotation build Landroidx/annotation/VisibleForTesting;
    .end annotation
.end field

.field public static final DEVICE_CHARGING:I = 0x4

.field public static final DEVICE_IDLE:I = 0x8

.field public static final ON_ANY_NETWORK:I = 0x2

.field public static final ON_UNMETERED_NETWORK:I = 0x1


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    const/4 v0, 0x4

    new-array v0, v0, [I

    fill-array-data v0, :array_a

    sput-object v0, Lcom/firebase/jobdispatcher/Constraint;->ALL_CONSTRAINTS:[I

    return-void

    nop

    :array_a
    .array-data 4
        0x2
        0x1
        0x4
        0x8
    .end array-data
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method public static compact([I)I
    .registers 5

    const/4 v0, 0x0

    if-nez p0, :cond_4

    return v0

    :cond_4
    array-length v1, p0

    const/4 v2, 0x0

    :goto_6
    if-ge v0, v1, :cond_e

    aget v3, p0, v0

    or-int/2addr v2, v3

    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    :cond_e
    return v2
.end method

.method public static uncompact(I)[I
    .registers 8

    sget-object v0, Lcom/firebase/jobdispatcher/Constraint;->ALL_CONSTRAINTS:[I

    array-length v1, v0

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    :goto_6
    if-ge v3, v1, :cond_15

    aget v5, v0, v3

    and-int v6, p0, v5

    if-ne v6, v5, :cond_10

    const/4 v5, 0x1

    goto :goto_11

    :cond_10
    const/4 v5, 0x0

    :goto_11
    add-int/2addr v4, v5

    add-int/lit8 v3, v3, 0x1

    goto :goto_6

    :cond_15
    new-array v0, v4, [I

    sget-object v1, Lcom/firebase/jobdispatcher/Constraint;->ALL_CONSTRAINTS:[I

    array-length v3, v1

    const/4 v4, 0x0

    :goto_1b
    if-ge v2, v3, :cond_2b

    aget v5, v1, v2

    and-int v6, p0, v5

    if-ne v6, v5, :cond_28

    add-int/lit8 v6, v4, 0x1

    aput v5, v0, v4

    move v4, v6

    :cond_28
    add-int/lit8 v2, v2, 0x1

    goto :goto_1b

    :cond_2b
    return-object v0
.end method