l.smali

.class public final Lcom/imo/android/imoim/web/l;
.super Ljava/lang/Object;
.source "SourceFile"


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

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

    return-void
.end method

.method static a(Ljava/lang/String;)I
    .registers 4

    const/4 v0, 0x0

    .line 26
    :try_start_1
    new-instance v1, Landroid/media/ExifInterface;

    invoke-direct {v1, p0}, Landroid/media/ExifInterface;-><init>(Ljava/lang/String;)V

    const-string p0, "Orientation"

    const/4 v2, 0x1

    .line 27
    invoke-virtual {v1, p0, v2}, Landroid/media/ExifInterface;->getAttributeInt(Ljava/lang/String;I)I

    move-result p0
    :try_end_d
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_d} :catch_22

    const/4 v1, 0x3

    if-eq p0, v1, :cond_20

    const/4 v1, 0x6

    if-eq p0, v1, :cond_1d

    const/16 v1, 0x8

    if-eq p0, v1, :cond_18

    goto :goto_22

    :cond_18
    const/16 p0, 0x10e

    const/16 v0, 0x10e

    goto :goto_22

    :cond_1d
    const/16 v0, 0x5a

    goto :goto_22

    :cond_20
    const/16 v0, 0xb4

    :catch_22
    :goto_22
    return v0
.end method

.method static a(Landroid/graphics/Bitmap;Ljava/lang/String;)Z
    .registers 5

    const/4 v0, 0x0

    if-eqz p0, :cond_2f

    if-nez p1, :cond_6

    goto :goto_2f

    .line 71
    :cond_6
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const/4 p1, 0x0

    .line 74
    :try_start_c
    new-instance v2, Ljava/io/FileOutputStream;

    invoke-direct {v2, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_11
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_11} :catch_29
    .catchall {:try_start_c .. :try_end_11} :catchall_22

    .line 75
    :try_start_11
    sget-object p1, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v1, 0x64

    invoke-virtual {p0, p1, v1, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    move-result v0
    :try_end_19
    .catch Ljava/lang/Exception; {:try_start_11 .. :try_end_19} :catch_20
    .catchall {:try_start_11 .. :try_end_19} :catchall_1d

    .line 82
    :try_start_19
    invoke-virtual {v2}, Ljava/io/OutputStream;->close()V
    :try_end_1c
    .catch Ljava/io/IOException; {:try_start_19 .. :try_end_1c} :catch_2f

    goto :goto_2f

    :catchall_1d
    move-exception p0

    move-object p1, v2

    goto :goto_23

    :catch_20
    move-object p1, v2

    goto :goto_2a

    :catchall_22
    move-exception p0

    :goto_23
    if-eqz p1, :cond_28

    :try_start_25
    invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
    :try_end_28
    .catch Ljava/io/IOException; {:try_start_25 .. :try_end_28} :catch_28

    .line 85
    :catch_28
    :cond_28
    throw p0

    :catch_29
    nop

    :goto_2a
    if-eqz p1, :cond_2f

    .line 82
    :try_start_2c
    invoke-virtual {p1}, Ljava/io/OutputStream;->close()V
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_2c .. :try_end_2f} :catch_2f

    :catch_2f
    :cond_2f
    :goto_2f
    return v0
.end method