Files
rr3-apk/decompiled-community/sources/com/google/android/exoplayer2/ui/CanvasSubtitleOutput.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

70 lines
2.4 KiB
Java

package com.google.android.exoplayer2.ui;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
import androidx.annotation.Nullable;
import com.amazonaws.handlers.HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0;
import com.google.android.exoplayer2.ui.SubtitleView;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
final class CanvasSubtitleOutput extends View implements SubtitleView.Output {
public float bottomPaddingFraction;
public List cues;
public final List painters;
public CaptionStyleCompat style;
public float textSize;
public int textSizeType;
public CanvasSubtitleOutput(Context context) {
this(context, null);
}
public CanvasSubtitleOutput(Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
this.painters = new ArrayList();
this.cues = Collections.emptyList();
this.textSizeType = 0;
this.textSize = 0.0533f;
this.style = CaptionStyleCompat.DEFAULT;
this.bottomPaddingFraction = 0.08f;
}
@Override // com.google.android.exoplayer2.ui.SubtitleView.Output
public void update(List list, CaptionStyleCompat captionStyleCompat, float f, int i, float f2) {
this.cues = list;
this.style = captionStyleCompat;
this.textSize = f;
this.textSizeType = i;
this.bottomPaddingFraction = f2;
while (this.painters.size() < list.size()) {
this.painters.add(new SubtitlePainter(getContext()));
}
invalidate();
}
@Override // android.view.View
public void dispatchDraw(Canvas canvas) {
List list = this.cues;
if (list.isEmpty()) {
return;
}
int height = getHeight();
int paddingLeft = getPaddingLeft();
int paddingTop = getPaddingTop();
int width = getWidth() - getPaddingRight();
int paddingBottom = height - getPaddingBottom();
if (paddingBottom <= paddingTop || width <= paddingLeft) {
return;
}
if (SubtitleViewUtils.resolveTextSize(this.textSizeType, this.textSize, height, paddingBottom - paddingTop) > 0.0f && list.size() > 0) {
HandlerChainFactory$$ExternalSyntheticThrowCCEIfNotNull0.m(list.get(0));
throw null;
}
}
}