CrackMe.apk
Download file
package com.google.android.exoplayer2.trackselection;
import android.os.SystemClock;
import com.google.android.exoplayer2.Timeline;
import com.google.android.exoplayer2.source.MediaSource;
import com.google.android.exoplayer2.source.TrackGroup;
import com.google.android.exoplayer2.source.chunk.MediaChunk;
import com.google.android.exoplayer2.source.chunk.MediaChunkIterator;
import com.google.android.exoplayer2.trackselection.ExoTrackSelection;
import com.google.android.exoplayer2.upstream.BandwidthMeter;
import java.util.List;
import java.util.Random;
public final class RandomTrackSelection extends BaseTrackSelection {
private final Random random;
private int selectedIndex;
public Object getSelectionData() {
return null;
}
public int getSelectionReason() {
return 3;
}
public static final class Factory implements ExoTrackSelection.Factory {
private final Random random;
public Factory() {
this.random = new Random();
}
public Factory(int i) {
this.random = new Random((long) i);
}
public ExoTrackSelection[] createTrackSelections(ExoTrackSelection.Definition[] definitionArr, BandwidthMeter bandwidthMeter, MediaSource.MediaPeriodId mediaPeriodId, Timeline timeline) {
return TrackSelectionUtil.createTrackSelectionsForDefinitions(definitionArr, new RandomTrackSelection$Factory$$ExternalSyntheticLambda0(this));
}
/* access modifiers changed from: package-private */
/* renamed from: lambda$createTrackSelections$0$com-google-android-exoplayer2-trackselection-RandomTrackSelection$Factory reason: not valid java name */
public /* synthetic */ ExoTrackSelection m110lambda$createTrackSelections$0$comgoogleandroidexoplayer2trackselectionRandomTrackSelection$Factory(ExoTrackSelection.Definition definition) {
return new RandomTrackSelection(definition.group, definition.tracks, definition.type, this.random);
}
}
public RandomTrackSelection(TrackGroup trackGroup, int[] iArr, int i, Random random2) {
super(trackGroup, iArr, i);
this.random = random2;
this.selectedIndex = random2.nextInt(this.length);
}
public void updateSelectedTrack(long j, long j2, long j3, List<? extends MediaChunk> list, MediaChunkIterator[] mediaChunkIteratorArr) {
long elapsedRealtime = SystemClock.elapsedRealtime();
int i = 0;
for (int i2 = 0; i2 < this.length; i2++) {
if (!isBlacklisted(i2, elapsedRealtime)) {
i++;
}
}
this.selectedIndex = this.random.nextInt(i);
if (i != this.length) {
int i3 = 0;
for (int i4 = 0; i4 < this.length; i4++) {
if (!isBlacklisted(i4, elapsedRealtime)) {
int i5 = i3 + 1;
if (this.selectedIndex == i3) {
this.selectedIndex = i4;
return;
}
i3 = i5;
}
}
}
}
public int getSelectedIndex() {
return this.selectedIndex;
}
}
Download file