Skip to content

Commit

Permalink
Fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Sep 5, 2024
1 parent 05476ba commit 7fdd404
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@
android:label="@string/wpi_cammie_title"
android:parentActivityName=".wpi.cammie.CammieActivity"
android:screenOrientation="fullSensor"
android:theme="@style/Zeus.Material.Cammie" />
android:theme="@style/Zeus.Material.Cammie"
tools:ignore="DiscouragedApi" />

<activity
android:name=".wpi.door.NfcIntentReceiverActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package be.ugent.zeus.hydra.common.utils;

import android.os.Build;
import androidx.annotation.RequiresApi;
import androidx.test.filters.SdkSuppress;

import org.junit.Test;

Expand All @@ -32,7 +32,7 @@
/**
* @author Niko Strijbol
*/
@RequiresApi(api = Build.VERSION_CODES.KITKAT)
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.KITKAT)
public class StringUtilsTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
package be.ugent.zeus.hydra.feed.cards.dismissal;

import android.content.Context;
import androidx.annotation.RequiresApi;
import androidx.room.Room;
import androidx.test.core.app.ApplicationProvider;
import androidx.test.ext.junit.runners.AndroidJUnit4;
Expand All @@ -47,7 +46,6 @@

import static be.ugent.zeus.hydra.testing.Assert.assertCollectionEquals;
import static be.ugent.zeus.hydra.testing.Assert.assertThat;
import static be.ugent.zeus.hydra.testing.Assert.samePropertyValuesAs;
import static be.ugent.zeus.hydra.testing.Utils.generate;
import static be.ugent.zeus.hydra.testing.Utils.getRandom;
import static org.hamcrest.Matchers.empty;
Expand All @@ -59,8 +57,6 @@
*
* @author Niko Strijbol
*/
// Request an older version of Android, since the SQLite version in Robolectric does not follow Android releases.
@RequiresApi(api = 26)
@RunWith(AndroidJUnit4.class)
@LooperMode(LooperMode.Mode.PAUSED)
@Config(application = TestApp.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package be.ugent.zeus.hydra.feed.commands;

import android.os.Build;
import androidx.annotation.RequiresApi;
import androidx.test.filters.SdkSuppress;

import java.util.HashSet;
import java.util.List;
Expand All @@ -38,7 +38,7 @@
/**
* @author Niko Strijbol
*/
@RequiresApi(api = Build.VERSION_CODES.N)
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.N)
public class MemoryDismissalDao extends DismissalDao {

private final Set<CardDismissal> dismissals = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
package be.ugent.zeus.hydra.testing.matcher;

import android.os.Build;
import androidx.annotation.RequiresApi;
import androidx.test.filters.SdkSuppress;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
Expand All @@ -37,13 +37,12 @@
*
* @author Niko Strijbol
*/
@RequiresApi(api = Build.VERSION_CODES.N)
@SdkSuppress(minSdkVersion = Build.VERSION_CODES.N)
class Fields<T> {

private final Class<T> clazz;

private final Collection<String> ignoredFields;
private List<Field> results;

Fields(Class<T> clazz) {
this.clazz = clazz;
Expand Down

0 comments on commit 7fdd404

Please sign in to comment.