558 lines
14 KiB
Smali
558 lines
14 KiB
Smali
.class public Lpl/droidsonroids/gif/GifAnimationMetaData;
|
|
.super Ljava/lang/Object;
|
|
.source "GifAnimationMetaData.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/os/Parcelable;
|
|
.implements Ljava/io/Serializable;
|
|
|
|
|
|
# static fields
|
|
.field public static final CREATOR:Landroid/os/Parcelable$Creator;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroid/os/Parcelable$Creator<",
|
|
"Lpl/droidsonroids/gif/GifAnimationMetaData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final serialVersionUID:J = 0x4eff56d4f010140dL
|
|
|
|
|
|
# instance fields
|
|
.field private final mDuration:I
|
|
|
|
.field private final mHeight:I
|
|
|
|
.field private final mImageCount:I
|
|
|
|
.field private final mLoopCount:I
|
|
|
|
.field private final mWidth:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 290
|
|
new-instance v0, Lpl/droidsonroids/gif/GifAnimationMetaData$1;
|
|
|
|
invoke-direct {v0}, Lpl/droidsonroids/gif/GifAnimationMetaData$1;-><init>()V
|
|
|
|
sput-object v0, Lpl/droidsonroids/gif/GifAnimationMetaData;->CREATOR:Landroid/os/Parcelable$Creator;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/ContentResolver;Landroid/net/Uri;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 193
|
|
invoke-static {p1, p2, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->a(Landroid/content/ContentResolver;Landroid/net/Uri;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/res/AssetFileDescriptor;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 129
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->a(Landroid/content/res/AssetFileDescriptor;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/res/AssetManager;Ljava/lang/String;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 66
|
|
invoke-virtual {p1, p2}, Landroid/content/res/AssetManager;->openFd(Ljava/lang/String;)Landroid/content/res/AssetFileDescriptor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Landroid/content/res/AssetFileDescriptor;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/res/Resources;I)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Landroid/content/res/Resources$NotFoundException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 49
|
|
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->openRawResourceFd(I)Landroid/content/res/AssetFileDescriptor;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Landroid/content/res/AssetFileDescriptor;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/os/Parcel;)V
|
|
.locals 1
|
|
|
|
.line 282
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 283
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
.line 284
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
.line 285
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mHeight:I
|
|
|
|
.line 286
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mWidth:I
|
|
|
|
.line 287
|
|
invoke-virtual {p1}, Landroid/os/Parcel;->readInt()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method synthetic constructor <init>(Landroid/os/Parcel;Lpl/droidsonroids/gif/GifAnimationMetaData;)V
|
|
.locals 0
|
|
|
|
.line 282
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Landroid/os/Parcel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/File;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 97
|
|
invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->openFile(Ljava/lang/String;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/FileDescriptor;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 143
|
|
invoke-static {p1, v0, v1, v2}, Lpl/droidsonroids/gif/GifInfoHandle;->openFd(Ljava/io/FileDescriptor;JZ)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/io/InputStream;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 114
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->a(Ljava/io/InputStream;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 83
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->openFile(Ljava/lang/String;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/nio/ByteBuffer;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 175
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->openDirectByteBuffer(Ljava/nio/ByteBuffer;Z)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
.locals 1
|
|
|
|
.line 196
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 197
|
|
invoke-virtual {p1}, Lpl/droidsonroids/gif/GifInfoHandle;->e()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
.line 198
|
|
invoke-virtual {p1}, Lpl/droidsonroids/gif/GifInfoHandle;->g()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
.line 199
|
|
invoke-virtual {p1}, Lpl/droidsonroids/gif/GifInfoHandle;->a()V
|
|
|
|
.line 200
|
|
iget v0, p1, Lpl/droidsonroids/gif/GifInfoHandle;->a:I
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mWidth:I
|
|
|
|
.line 201
|
|
iget v0, p1, Lpl/droidsonroids/gif/GifInfoHandle;->b:I
|
|
|
|
iput v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mHeight:I
|
|
|
|
.line 202
|
|
iget p1, p1, Lpl/droidsonroids/gif/GifInfoHandle;->c:I
|
|
|
|
iput p1, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>([B)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 159
|
|
invoke-static {p1, v0}, Lpl/droidsonroids/gif/GifInfoHandle;->openByteArray([BZ)Lpl/droidsonroids/gif/GifInfoHandle;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lpl/droidsonroids/gif/GifAnimationMetaData;-><init>(Lpl/droidsonroids/gif/GifInfoHandle;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public describeContents()I
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getDuration()I
|
|
.locals 1
|
|
|
|
.line 247
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getHeight()I
|
|
.locals 1
|
|
|
|
.line 216
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mHeight:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getLoopCount()I
|
|
.locals 1
|
|
|
|
.line 233
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getNumberOfFrames()I
|
|
.locals 1
|
|
|
|
.line 223
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getWidth()I
|
|
.locals 1
|
|
|
|
.line 209
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mWidth:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isAnimated()Z
|
|
.locals 2
|
|
|
|
.line 255
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 6
|
|
|
|
.line 260
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, "Infinity"
|
|
|
|
goto :goto_0
|
|
|
|
.line 261
|
|
:cond_0
|
|
iget v0, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 262
|
|
:goto_0
|
|
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
const-string v2, "GIF: size: %dx%d, frames: %d, loops: %s, duration: %d"
|
|
|
|
const/4 v3, 0x5
|
|
|
|
.line 263
|
|
new-array v3, v3, [Ljava/lang/Object;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
.line 264
|
|
iget v5, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mWidth:I
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
iget v5, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mHeight:I
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const/4 v4, 0x2
|
|
|
|
iget v5, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v5
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const/4 v4, 0x3
|
|
|
|
aput-object v0, v3, v4
|
|
|
|
const/4 v0, 0x4
|
|
|
|
iget v4, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v3, v0
|
|
|
|
.line 262
|
|
invoke-static {v1, v2, v3}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 265
|
|
invoke-virtual {p0}, Lpl/droidsonroids/gif/GifAnimationMetaData;->isAnimated()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Animated "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public writeToParcel(Landroid/os/Parcel;I)V
|
|
.locals 0
|
|
|
|
.line 275
|
|
iget p2, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mLoopCount:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
.line 276
|
|
iget p2, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mDuration:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
.line 277
|
|
iget p2, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mHeight:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
.line 278
|
|
iget p2, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mWidth:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
.line 279
|
|
iget p2, p0, Lpl/droidsonroids/gif/GifAnimationMetaData;->mImageCount:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Parcel;->writeInt(I)V
|
|
|
|
return-void
|
|
.end method
|