diff --git a/app/src/androidTest/java/org/schabi/newpipe/database/AppDatabaseTest.kt b/app/src/androidTest/java/org/schabi/newpipe/database/AppDatabaseTest.kt index 2b7dcdf7c..917a83bf2 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/database/AppDatabaseTest.kt +++ b/app/src/androidTest/java/org/schabi/newpipe/database/AppDatabaseTest.kt @@ -30,8 +30,9 @@ class AppDatabaseTest { private const val DEFAULT_SECOND_URL = "https://www.youtube.com/watch?v=ncQU6iBn5Fc" } - @get:Rule val testHelper = MigrationTestHelper(InstrumentationRegistry.getInstrumentation(), - AppDatabase::class.java.canonicalName, FrameworkSQLiteOpenHelperFactory()); + @get:Rule + val testHelper = MigrationTestHelper(InstrumentationRegistry.getInstrumentation(), + AppDatabase::class.java.canonicalName, FrameworkSQLiteOpenHelperFactory()) @Test fun migrateDatabaseFrom2to3() { @@ -72,7 +73,7 @@ class AppDatabaseTest { } testHelper.runMigrationsAndValidate(AppDatabase.DATABASE_NAME, Migrations.DB_VER_3, - true, Migrations.MIGRATION_2_3); + true, Migrations.MIGRATION_2_3) val migratedDatabaseV3 = getMigratedDatabase() val listFromDB = migratedDatabaseV3.streamDAO().all.blockingFirst() diff --git a/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java b/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java index 6e51136c0..ab20d2ff3 100644 --- a/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java +++ b/app/src/androidTest/java/org/schabi/newpipe/report/ErrorInfoTest.java @@ -1,8 +1,9 @@ package org.schabi.newpipe.report; import android.os.Parcel; -import androidx.test.filters.LargeTest; + import androidx.test.ext.junit.runners.AndroidJUnit4; +import androidx.test.filters.LargeTest; import org.junit.Test; import org.junit.runner.RunWith; @@ -12,15 +13,16 @@ import org.schabi.newpipe.report.ErrorActivity.ErrorInfo; import static org.junit.Assert.assertEquals; /** - * Instrumented tests for {@link ErrorInfo} + * Instrumented tests for {@link ErrorInfo}. */ @RunWith(AndroidJUnit4.class) @LargeTest public class ErrorInfoTest { @Test - public void errorInfo_testParcelable() { - ErrorInfo info = ErrorInfo.make(UserAction.USER_REPORT, "youtube", "request", R.string.general_error); + public void errorInfoTestParcelable() { + ErrorInfo info = ErrorInfo.make(UserAction.USER_REPORT, "youtube", "request", + R.string.general_error); // Obtain a Parcel object and write the parcelable object to it: Parcel parcel = Parcel.obtain(); info.writeToParcel(parcel, 0); @@ -34,4 +36,4 @@ public class ErrorInfoTest { parcel.recycle(); } -} \ No newline at end of file +} diff --git a/app/src/debug/java/org/schabi/newpipe/DebugApp.java b/app/src/debug/java/org/schabi/newpipe/DebugApp.java index 66f73d1e9..4d763aeb1 100644 --- a/app/src/debug/java/org/schabi/newpipe/DebugApp.java +++ b/app/src/debug/java/org/schabi/newpipe/DebugApp.java @@ -3,6 +3,7 @@ package org.schabi.newpipe; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; + import androidx.annotation.NonNull; import androidx.multidex.MultiDex; @@ -26,7 +27,7 @@ public class DebugApp extends App { private static final String TAG = DebugApp.class.toString(); @Override - protected void attachBaseContext(Context base) { + protected void attachBaseContext(final Context base) { super.attachBaseContext(base); MultiDex.install(this); } diff --git a/app/src/main/java/androidx/fragment/app/FragmentStatePagerAdapterMenuWorkaround.java b/app/src/main/java/androidx/fragment/app/FragmentStatePagerAdapterMenuWorkaround.java index 9fd32b735..11f457b6c 100644 --- a/app/src/main/java/androidx/fragment/app/FragmentStatePagerAdapterMenuWorkaround.java +++ b/app/src/main/java/androidx/fragment/app/FragmentStatePagerAdapterMenuWorkaround.java @@ -38,12 +38,15 @@ import java.util.ArrayList; * This is a copy from {@link androidx.fragment.app.FragmentStatePagerAdapter}. *

* It includes a workaround to fix the menu visibility when the adapter is restored. + *

*

* When restoring the state of this adapter, all the fragments' menu visibility were set to false, - * effectively disabling the menu from the user until he switched pages or another event that triggered the - * menu to be visible again happened. + * effectively disabling the menu from the user until he switched pages or another event + * that triggered the menu to be visible again happened. + *

*

- *
Check out the changes in: + * Check out the changes in: + *

*