Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove reference to junit in non test code #1116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ dependencies {
implementation 'androidx.legacy:legacy-support-core-ui:1.0.0'
implementation 'androidx.media:media:1.2.1'
implementation 'com.google.android.material:material:1.0.0'
implementation 'junit:junit:4.12'
testImplementation 'junit:junit:4.12'
compileOnly 'androidx.annotation:annotation:1.0.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@

import java.io.File;

import junit.framework.Assert;

/**
* The library activity where songs to play can be selected from the library.
*/
Expand Down Expand Up @@ -595,7 +593,10 @@ public void onClick(View view)
if (i == 1 && type == MediaUtils.TYPE_ALBUM) {
setLimiter(MediaUtils.TYPE_ARTIST, limiter.data.toString());
} else if (i > 0) {
Assert.assertEquals(MediaUtils.TYPE_FILE, limiter.type);
if(MediaUtils.TYPE_FILE != limiter.type) {
super.onClick(view);
return;
}
File file = (File)limiter.data;
int diff = limiter.names.length - i;
while (--diff != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import java.util.List;
import java.util.ListIterator;

import junit.framework.Assert;

/**
* Contains the list of currently playing songs, implements repeat and shuffle
* support, and contains methods to fetch more songs from the MediaStore.
Expand Down Expand Up @@ -565,7 +563,9 @@ private void reshuffleTimeline()
*/
public Song getSong(int delta)
{
Assert.assertTrue(delta >= -1 && delta <= 1);
if(!(delta >= -1 && delta <= 1)) {
return null;
}

ArrayList<Song> timeline = mSongs;
Song song;
Expand Down