mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
246 lines
8.2 KiB
Smali
246 lines
8.2 KiB
Smali
.class public final Landroidx/media3/datasource/DataSourceBitmapLoader;
|
|
.super Ljava/lang/Object;
|
|
.source "DataSourceBitmapLoader.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/media3/common/util/BitmapLoader;
|
|
|
|
|
|
# static fields
|
|
.field public static final DEFAULT_EXECUTOR_SERVICE:Lcom/google/common/base/Supplier;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/base/Supplier<",
|
|
"Lcom/google/common/util/concurrent/ListeningExecutorService;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field private final dataSourceFactory:Landroidx/media3/datasource/DataSource$Factory;
|
|
|
|
.field private final listeningExecutorService:Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 47
|
|
new-instance v0, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda1;
|
|
|
|
invoke-direct {v0}, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda1;-><init>()V
|
|
|
|
.line 48
|
|
invoke-static {v0}, Lcom/google/common/base/Suppliers;->memoize(Lcom/google/common/base/Supplier;)Lcom/google/common/base/Supplier;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Landroidx/media3/datasource/DataSourceBitmapLoader;->DEFAULT_EXECUTOR_SERVICE:Lcom/google/common/base/Supplier;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 2
|
|
|
|
sget-object v0, Landroidx/media3/datasource/DataSourceBitmapLoader;->DEFAULT_EXECUTOR_SERVICE:Lcom/google/common/base/Supplier;
|
|
|
|
.line 59
|
|
invoke-interface {v0}, Lcom/google/common/base/Supplier;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
invoke-static {v0}, Landroidx/media3/common/util/Assertions;->checkStateNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
new-instance v1, Landroidx/media3/datasource/DefaultDataSource$Factory;
|
|
|
|
invoke-direct {v1, p1}, Landroidx/media3/datasource/DefaultDataSource$Factory;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-direct {p0, v0, v1}, Landroidx/media3/datasource/DataSourceBitmapLoader;-><init>(Lcom/google/common/util/concurrent/ListeningExecutorService;Landroidx/media3/datasource/DataSource$Factory;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/google/common/util/concurrent/ListeningExecutorService;Landroidx/media3/datasource/DataSource$Factory;)V
|
|
.locals 0
|
|
|
|
.line 70
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/media3/datasource/DataSourceBitmapLoader;->listeningExecutorService:Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
iput-object p2, p0, Landroidx/media3/datasource/DataSourceBitmapLoader;->dataSourceFactory:Landroidx/media3/datasource/DataSource$Factory;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static decode([B)Landroid/graphics/Bitmap;
|
|
.locals 2
|
|
|
|
.line 87
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v1, v0}, Landroid/graphics/BitmapFactory;->decodeByteArray([BII)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
const-string v0, "Could not decode image data"
|
|
|
|
.line 88
|
|
invoke-static {v1, v0}, Landroidx/media3/common/util/Assertions;->checkArgument(ZLjava/lang/Object;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic lambda$decodeBitmap$1([B)Landroid/graphics/Bitmap;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/Exception;
|
|
}
|
|
.end annotation
|
|
|
|
.line 77
|
|
invoke-static {p0}, Landroidx/media3/datasource/DataSourceBitmapLoader;->decode([B)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic lambda$static$0()Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
.locals 1
|
|
|
|
.line 49
|
|
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/common/util/concurrent/MoreExecutors;->listeningDecorator(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static load(Landroidx/media3/datasource/DataSource;Landroid/net/Uri;)Landroid/graphics/Bitmap;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 93
|
|
new-instance v0, Landroidx/media3/datasource/DataSpec;
|
|
|
|
invoke-direct {v0, p1}, Landroidx/media3/datasource/DataSpec;-><init>(Landroid/net/Uri;)V
|
|
|
|
.line 94
|
|
invoke-interface {p0, v0}, Landroidx/media3/datasource/DataSource;->open(Landroidx/media3/datasource/DataSpec;)J
|
|
|
|
.line 95
|
|
invoke-static {p0}, Landroidx/media3/datasource/DataSourceUtil;->readToEnd(Landroidx/media3/datasource/DataSource;)[B
|
|
|
|
move-result-object p0
|
|
|
|
.line 96
|
|
invoke-static {p0}, Landroidx/media3/datasource/DataSourceBitmapLoader;->decode([B)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public decodeBitmap([B)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"([B)",
|
|
"Lcom/google/common/util/concurrent/ListenableFuture<",
|
|
"Landroid/graphics/Bitmap;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object p0, p0, Landroidx/media3/datasource/DataSourceBitmapLoader;->listeningExecutorService:Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
.line 77
|
|
new-instance v0, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda0;
|
|
|
|
invoke-direct {v0, p1}, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda0;-><init>([B)V
|
|
|
|
invoke-interface {p0, v0}, Lcom/google/common/util/concurrent/ListeningExecutorService;->submit(Ljava/util/concurrent/Callable;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method synthetic lambda$loadBitmap$2$androidx-media3-datasource-DataSourceBitmapLoader(Landroid/net/Uri;)Landroid/graphics/Bitmap;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/Exception;
|
|
}
|
|
.end annotation
|
|
|
|
.line 0
|
|
iget-object p0, p0, Landroidx/media3/datasource/DataSourceBitmapLoader;->dataSourceFactory:Landroidx/media3/datasource/DataSource$Factory;
|
|
|
|
.line 83
|
|
invoke-interface {p0}, Landroidx/media3/datasource/DataSource$Factory;->createDataSource()Landroidx/media3/datasource/DataSource;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0, p1}, Landroidx/media3/datasource/DataSourceBitmapLoader;->load(Landroidx/media3/datasource/DataSource;Landroid/net/Uri;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public loadBitmap(Landroid/net/Uri;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/net/Uri;",
|
|
")",
|
|
"Lcom/google/common/util/concurrent/ListenableFuture<",
|
|
"Landroid/graphics/Bitmap;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Landroidx/media3/datasource/DataSourceBitmapLoader;->listeningExecutorService:Lcom/google/common/util/concurrent/ListeningExecutorService;
|
|
|
|
.line 83
|
|
new-instance v1, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda2;
|
|
|
|
invoke-direct {v1, p0, p1}, Landroidx/media3/datasource/DataSourceBitmapLoader$$ExternalSyntheticLambda2;-><init>(Landroidx/media3/datasource/DataSourceBitmapLoader;Landroid/net/Uri;)V
|
|
|
|
invoke-interface {v0, v1}, Lcom/google/common/util/concurrent/ListeningExecutorService;->submit(Ljava/util/concurrent/Callable;)Lcom/google/common/util/concurrent/ListenableFuture;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|