AssetsZoneRulesInitializer.smali

.class public final Lcom/jakewharton/threetenabp/AssetsZoneRulesInitializer;
.super Ltq/g;
.source "AssetsZoneRulesInitializer.java"


# instance fields
.field public final context:Landroid/content/Context;


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

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 2

    invoke-direct {p0}, Ltq/g;-><init>()V

    iput-object p1, p0, Lcom/jakewharton/threetenabp/AssetsZoneRulesInitializer;->context:Landroid/content/Context;

    return-void
.end method


# virtual methods
.method public initializeProviders()V
    .registers 5

    const/4 v0, 0x0

    :try_start_1
    iget-object v1, p0, Lcom/jakewharton/threetenabp/AssetsZoneRulesInitializer;->context:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v1

    const-string v2, "org/threeten/bp/TZDB.dat"

    invoke-virtual {v1, v2}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v0

    new-instance v1, Ltq/c;

    invoke-direct {v1, v0}, Ltq/c;-><init>(Ljava/io/InputStream;)V
    :try_end_12
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_12} :catch_1d
    .catchall {:try_start_1 .. :try_end_12} :catchall_1b

    if-eqz v0, :cond_17

    :try_start_14
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    :try_end_17
    .catch Ljava/io/IOException; {:try_start_14 .. :try_end_17} :catch_17

    :catch_17
    :cond_17
    invoke-static {v1}, Ltq/h;->a(Ltq/h;)V

    return-void

    :catchall_1b
    move-exception v1

    goto :goto_26

    :catch_1d
    move-exception v1

    :try_start_1e
    new-instance v2, Ljava/lang/IllegalStateException;

    const-string v3, "TZDB.dat missing from assets."

    invoke-direct {v2, v3, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    throw v2
    :try_end_26
    .catchall {:try_start_1e .. :try_end_26} :catchall_1b

    :goto_26
    if-eqz v0, :cond_2b

    :try_start_28
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    :try_end_2b
    .catch Ljava/io/IOException; {:try_start_28 .. :try_end_2b} :catch_2b

    :catch_2b
    :cond_2b
    throw v1
.end method