* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
892 lines
20 KiB
Smali
892 lines
20 KiB
Smali
.class final Lkotlin/collections/RingBuffer;
|
|
.super Lkotlin/collections/AbstractList;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/RandomAccess;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lkotlin/collections/AbstractList<",
|
|
"TT;>;",
|
|
"Ljava/util/RandomAccess;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
d1 = {
|
|
"\u0000<\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u000e\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010(\n\u0002\u0008\u0007\n\u0002\u0010\u0002\n\u0002\u0008\u0006\u0008\u0002\u0018\u0000*\u0004\u0008\u0000\u0010\u00012\u0008\u0012\u0004\u0012\u0002H\u00010\u00022\u00060\u0003j\u0002`\u0004B\u001f\u0012\u000e\u0010\u0005\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0006\u0012\u0006\u0010\u0008\u001a\u00020\t\u00a2\u0006\u0004\u0008\n\u0010\u000bB\u0011\u0008\u0016\u0012\u0006\u0010\u000c\u001a\u00020\t\u00a2\u0006\u0004\u0008\n\u0010\rJ\u0016\u0010\u0014\u001a\u00028\u00002\u0006\u0010\u0015\u001a\u00020\tH\u0096\u0002\u00a2\u0006\u0002\u0010\u0016J\u0006\u0010\u0017\u001a\u00020\u0018J\u000f\u0010\u0019\u001a\u0008\u0012\u0004\u0012\u00028\u00000\u001aH\u0096\u0002J\'\u0010\u001b\u001a\u0008\u0012\u0004\u0012\u0002H\u00010\u0006\"\u0004\u0008\u0001\u0010\u00012\u000c\u0010\u001c\u001a\u0008\u0012\u0004\u0012\u0002H\u00010\u0006H\u0014\u00a2\u0006\u0002\u0010\u001dJ\u0015\u0010\u001b\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0006H\u0014\u00a2\u0006\u0002\u0010\u001eJ\u0014\u0010\u001f\u001a\u0008\u0012\u0004\u0012\u00028\u00000\u00002\u0006\u0010 \u001a\u00020\tJ\u0013\u0010!\u001a\u00020\"2\u0006\u0010#\u001a\u00028\u0000\u00a2\u0006\u0002\u0010$J\u000e\u0010%\u001a\u00020\"2\u0006\u0010&\u001a\u00020\tJ\u0015\u0010\'\u001a\u00020\t*\u00020\t2\u0006\u0010&\u001a\u00020\tH\u0082\u0008R\u0018\u0010\u0005\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00070\u0006X\u0082\u0004\u00a2\u0006\u0004\n\u0002\u0010\u000eR\u000e\u0010\u000c\u001a\u00020\tX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\tX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u001e\u0010\u0011\u001a\u00020\t2\u0006\u0010\u0010\u001a\u00020\t@RX\u0096\u000e\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0012\u0010\u0013\u00a8\u0006("
|
|
}
|
|
d2 = {
|
|
"Lkotlin/collections/RingBuffer;",
|
|
"T",
|
|
"Lkotlin/collections/AbstractList;",
|
|
"Ljava/util/RandomAccess;",
|
|
"Lkotlin/collections/RandomAccess;",
|
|
"buffer",
|
|
"",
|
|
"",
|
|
"filledSize",
|
|
"",
|
|
"<init>",
|
|
"([Ljava/lang/Object;I)V",
|
|
"capacity",
|
|
"(I)V",
|
|
"[Ljava/lang/Object;",
|
|
"startIndex",
|
|
"value",
|
|
"size",
|
|
"getSize",
|
|
"()I",
|
|
"get",
|
|
"index",
|
|
"(I)Ljava/lang/Object;",
|
|
"isFull",
|
|
"",
|
|
"iterator",
|
|
"",
|
|
"toArray",
|
|
"array",
|
|
"([Ljava/lang/Object;)[Ljava/lang/Object;",
|
|
"()[Ljava/lang/Object;",
|
|
"expanded",
|
|
"maxCapacity",
|
|
"add",
|
|
"",
|
|
"element",
|
|
"(Ljava/lang/Object;)V",
|
|
"removeFirst",
|
|
"n",
|
|
"forward",
|
|
"kotlin-stdlib"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x2,
|
|
0x2,
|
|
0x0
|
|
}
|
|
xi = 0x30
|
|
.end annotation
|
|
|
|
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
|
|
value = {
|
|
"SMAP\nSlidingWindow.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SlidingWindow.kt\nkotlin/collections/RingBuffer\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,206:1\n204#1:208\n204#1:209\n204#1:210\n1#2:207\n*S KotlinDebug\n*F\n+ 1 SlidingWindow.kt\nkotlin/collections/RingBuffer\n*L\n106#1:208\n175#1:209\n188#1:210\n*E\n"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final buffer:[Ljava/lang/Object;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final capacity:I
|
|
|
|
.field private size:I
|
|
|
|
.field private startIndex:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(I)V
|
|
.locals 1
|
|
|
|
.line 19
|
|
new-array p1, p1, [Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, v0}, Lkotlin/collections/RingBuffer;-><init>([Ljava/lang/Object;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>([Ljava/lang/Object;I)V
|
|
.locals 2
|
|
.param p1 # [Ljava/lang/Object;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const-string v0, "buffer"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lkotlin/collections/AbstractList;-><init>()V
|
|
|
|
iput-object p1, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
if-ltz p2, :cond_1
|
|
|
|
.line 2
|
|
array-length v0, p1
|
|
|
|
if-gt p2, v0, :cond_0
|
|
|
|
.line 3
|
|
array-length p1, p1
|
|
|
|
iput p1, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
.line 4
|
|
iput p2, p0, Lkotlin/collections/RingBuffer;->size:I
|
|
|
|
return-void
|
|
|
|
.line 5
|
|
:cond_0
|
|
const-string v0, "ring buffer filled size: "
|
|
|
|
const-string v1, " cannot be larger than the buffer size: "
|
|
|
|
.line 6
|
|
invoke-static {p2, v0, v1}, Landroid/support/v4/media/a;->s(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p2
|
|
|
|
.line 7
|
|
array-length p1, p1
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
.line 8
|
|
:cond_1
|
|
const-string p1, "ring buffer filled size should not be negative but it is "
|
|
|
|
.line 9
|
|
invoke-static {p2, p1}, Landroid/support/v4/media/a;->e(ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 10
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public static final synthetic access$getBuffer$p(Lkotlin/collections/RingBuffer;)[Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 2
|
|
.line 3
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getCapacity$p(Lkotlin/collections/RingBuffer;)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget p0, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
.line 2
|
|
.line 3
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStartIndex$p(Lkotlin/collections/RingBuffer;)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget p0, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 2
|
|
.line 3
|
|
return p0
|
|
.end method
|
|
|
|
.method private final forward(II)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
add-int/2addr p1, p2
|
|
|
|
.line 2
|
|
invoke-static {p0}, Lkotlin/collections/RingBuffer;->access$getCapacity$p(Lkotlin/collections/RingBuffer;)I
|
|
|
|
.line 3
|
|
.line 4
|
|
.line 5
|
|
move-result p2
|
|
|
|
.line 6
|
|
rem-int/2addr p1, p2
|
|
|
|
.line 7
|
|
return p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final add(Ljava/lang/Object;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lkotlin/collections/RingBuffer;->isFull()Z
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result v0
|
|
|
|
.line 5
|
|
if-nez v0, :cond_0
|
|
|
|
.line 6
|
|
.line 7
|
|
iget-object v0, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 8
|
|
.line 9
|
|
iget v1, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 10
|
|
.line 11
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
move-result v2
|
|
|
|
.line 15
|
|
add-int/2addr v2, v1
|
|
|
|
.line 16
|
|
invoke-static {p0}, Lkotlin/collections/RingBuffer;->access$getCapacity$p(Lkotlin/collections/RingBuffer;)I
|
|
|
|
.line 17
|
|
.line 18
|
|
.line 19
|
|
move-result v1
|
|
|
|
.line 20
|
|
rem-int/2addr v2, v1
|
|
|
|
.line 21
|
|
aput-object p1, v0, v2
|
|
|
|
.line 22
|
|
.line 23
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 24
|
|
.line 25
|
|
.line 26
|
|
move-result p1
|
|
|
|
.line 27
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
.line 28
|
|
.line 29
|
|
iput p1, p0, Lkotlin/collections/RingBuffer;->size:I
|
|
|
|
.line 30
|
|
.line 31
|
|
return-void
|
|
|
|
.line 32
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
.line 33
|
|
.line 34
|
|
const-string v0, "ring buffer is full"
|
|
|
|
.line 35
|
|
.line 36
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 37
|
|
.line 38
|
|
.line 39
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final expanded(I)Lkotlin/collections/RingBuffer;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I)",
|
|
"Lkotlin/collections/RingBuffer<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget v0, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
.line 2
|
|
.line 3
|
|
shr-int/lit8 v1, v0, 0x1
|
|
|
|
.line 4
|
|
.line 5
|
|
add-int/2addr v0, v1
|
|
|
|
.line 6
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
.line 7
|
|
.line 8
|
|
invoke-static {v0, p1}, Lkotlin/ranges/RangesKt;->coerceAtMost(II)I
|
|
|
|
.line 9
|
|
.line 10
|
|
.line 11
|
|
move-result p1
|
|
|
|
.line 12
|
|
iget v0, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 13
|
|
.line 14
|
|
if-nez v0, :cond_0
|
|
|
|
.line 15
|
|
.line 16
|
|
iget-object v0, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 17
|
|
.line 18
|
|
invoke-static {v0, p1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result-object p1
|
|
|
|
.line 22
|
|
const-string v0, "copyOf(...)"
|
|
|
|
.line 23
|
|
.line 24
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
goto :goto_0
|
|
|
|
.line 28
|
|
:cond_0
|
|
new-array p1, p1, [Ljava/lang/Object;
|
|
|
|
.line 29
|
|
.line 30
|
|
invoke-virtual {p0, p1}, Lkotlin/collections/RingBuffer;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
.line 31
|
|
.line 32
|
|
.line 33
|
|
move-result-object p1
|
|
|
|
.line 34
|
|
:goto_0
|
|
new-instance v0, Lkotlin/collections/RingBuffer;
|
|
|
|
.line 35
|
|
.line 36
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 37
|
|
.line 38
|
|
.line 39
|
|
move-result v1
|
|
|
|
.line 40
|
|
invoke-direct {v0, p1, v1}, Lkotlin/collections/RingBuffer;-><init>([Ljava/lang/Object;I)V
|
|
|
|
.line 41
|
|
.line 42
|
|
.line 43
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public get(I)Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
sget-object v0, Lkotlin/collections/AbstractList;->Companion:Lkotlin/collections/AbstractList$Companion;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result v1
|
|
|
|
.line 7
|
|
invoke-virtual {v0, p1, v1}, Lkotlin/collections/AbstractList$Companion;->checkElementIndex$kotlin_stdlib(II)V
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
iget-object v0, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 11
|
|
.line 12
|
|
iget v1, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 13
|
|
.line 14
|
|
add-int/2addr v1, p1
|
|
|
|
.line 15
|
|
invoke-static {p0}, Lkotlin/collections/RingBuffer;->access$getCapacity$p(Lkotlin/collections/RingBuffer;)I
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
move-result p1
|
|
|
|
.line 19
|
|
rem-int/2addr v1, p1
|
|
|
|
.line 20
|
|
aget-object p1, v0, v1
|
|
|
|
.line 21
|
|
.line 22
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getSize()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lkotlin/collections/RingBuffer;->size:I
|
|
|
|
.line 2
|
|
.line 3
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isFull()Z
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result v0
|
|
|
|
.line 5
|
|
iget v1, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
.line 6
|
|
.line 7
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 8
|
|
.line 9
|
|
const/4 v0, 0x1
|
|
|
|
.line 10
|
|
return v0
|
|
|
|
.line 11
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 12
|
|
return v0
|
|
.end method
|
|
|
|
.method public iterator()Ljava/util/Iterator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Iterator<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lkotlin/collections/RingBuffer$iterator$1;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-direct {v0, p0}, Lkotlin/collections/RingBuffer$iterator$1;-><init>(Lkotlin/collections/RingBuffer;)V
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final removeFirst(I)V
|
|
.locals 5
|
|
|
|
.line 1
|
|
if-ltz p1, :cond_3
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result v0
|
|
|
|
.line 7
|
|
if-gt p1, v0, :cond_2
|
|
|
|
.line 8
|
|
.line 9
|
|
if-lez p1, :cond_1
|
|
|
|
.line 10
|
|
.line 11
|
|
iget v0, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 12
|
|
.line 13
|
|
add-int v1, v0, p1
|
|
|
|
.line 14
|
|
.line 15
|
|
invoke-static {p0}, Lkotlin/collections/RingBuffer;->access$getCapacity$p(Lkotlin/collections/RingBuffer;)I
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
move-result v2
|
|
|
|
.line 19
|
|
rem-int/2addr v1, v2
|
|
|
|
.line 20
|
|
const/4 v2, 0x0
|
|
|
|
.line 21
|
|
if-le v0, v1, :cond_0
|
|
|
|
.line 22
|
|
.line 23
|
|
iget-object v3, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 24
|
|
.line 25
|
|
iget v4, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
.line 26
|
|
.line 27
|
|
invoke-static {v3, v2, v0, v4}, Lkotlin/collections/ArraysKt___ArraysJvmKt;->fill([Ljava/lang/Object;Ljava/lang/Object;II)V
|
|
|
|
.line 28
|
|
.line 29
|
|
.line 30
|
|
iget-object v0, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 31
|
|
.line 32
|
|
const/4 v3, 0x0
|
|
|
|
.line 33
|
|
invoke-static {v0, v2, v3, v1}, Lkotlin/collections/ArraysKt___ArraysJvmKt;->fill([Ljava/lang/Object;Ljava/lang/Object;II)V
|
|
|
|
.line 34
|
|
.line 35
|
|
.line 36
|
|
goto :goto_0
|
|
|
|
.line 37
|
|
:cond_0
|
|
iget-object v3, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
.line 38
|
|
.line 39
|
|
invoke-static {v3, v2, v0, v1}, Lkotlin/collections/ArraysKt___ArraysJvmKt;->fill([Ljava/lang/Object;Ljava/lang/Object;II)V
|
|
|
|
.line 40
|
|
.line 41
|
|
.line 42
|
|
:goto_0
|
|
iput v1, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
.line 43
|
|
.line 44
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 45
|
|
.line 46
|
|
.line 47
|
|
move-result v0
|
|
|
|
.line 48
|
|
sub-int/2addr v0, p1
|
|
|
|
.line 49
|
|
iput v0, p0, Lkotlin/collections/RingBuffer;->size:I
|
|
|
|
.line 50
|
|
.line 51
|
|
:cond_1
|
|
return-void
|
|
|
|
.line 52
|
|
:cond_2
|
|
const-string v0, "n shouldn\'t be greater than the buffer size: n = "
|
|
|
|
.line 53
|
|
.line 54
|
|
const-string v1, ", size = "
|
|
|
|
.line 55
|
|
.line 56
|
|
invoke-static {p1, v0, v1}, Landroid/support/v4/media/a;->s(ILjava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 57
|
|
.line 58
|
|
.line 59
|
|
move-result-object p1
|
|
|
|
.line 60
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
.line 61
|
|
.line 62
|
|
.line 63
|
|
move-result v0
|
|
|
|
.line 64
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
.line 65
|
|
.line 66
|
|
.line 67
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
.line 68
|
|
.line 69
|
|
.line 70
|
|
move-result-object p1
|
|
|
|
.line 71
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
.line 72
|
|
.line 73
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
.line 74
|
|
.line 75
|
|
.line 76
|
|
move-result-object p1
|
|
|
|
.line 77
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 78
|
|
.line 79
|
|
.line 80
|
|
throw v0
|
|
|
|
.line 81
|
|
:cond_3
|
|
const-string v0, "n shouldn\'t be negative but it is "
|
|
|
|
.line 82
|
|
.line 83
|
|
invoke-static {p1, v0}, Landroid/support/v4/media/a;->e(ILjava/lang/String;)Ljava/lang/String;
|
|
|
|
.line 84
|
|
.line 85
|
|
.line 86
|
|
move-result-object p1
|
|
|
|
.line 87
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
.line 88
|
|
.line 89
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
.line 90
|
|
.line 91
|
|
.line 92
|
|
move-result-object p1
|
|
|
|
.line 93
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 94
|
|
.line 95
|
|
.line 96
|
|
throw v0
|
|
.end method
|
|
|
|
.method public toArray()[Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 8
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p0, v0}, Lkotlin/collections/RingBuffer;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
.locals 5
|
|
.param p1 # [Ljava/lang/Object;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">([TT;)[TT;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
const-string v0, "array"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 1
|
|
array-length v0, p1
|
|
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
move-result v1
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "copyOf(...)"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {p0}, Lkotlin/collections/AbstractCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
.line 3
|
|
iget v1, p0, Lkotlin/collections/RingBuffer;->startIndex:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
move v3, v2
|
|
|
|
:goto_0
|
|
if-ge v3, v0, :cond_1
|
|
|
|
.line 4
|
|
iget v4, p0, Lkotlin/collections/RingBuffer;->capacity:I
|
|
|
|
if-ge v1, v4, :cond_1
|
|
|
|
.line 5
|
|
iget-object v4, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
aget-object v4, v4, v1
|
|
|
|
aput-object v4, p1, v3
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
if-ge v3, v0, :cond_2
|
|
|
|
.line 6
|
|
iget-object v1, p0, Lkotlin/collections/RingBuffer;->buffer:[Ljava/lang/Object;
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
aput-object v1, p1, v3
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 7
|
|
:cond_2
|
|
invoke-static {v0, p1}, Lkotlin/collections/CollectionsKt__CollectionsJVMKt;->terminateCollectionToArray(I[Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|