Loading legacy-test/src/com/android/internal/util/Predicate.java +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ package com.android.internal.util; * strongly encouraged to state this fact clearly in their API documentation. * * @deprecated Use {@code java.util.function.Predicate} instead. * This must not be used outside frameworks/base/test-runner. */ @Deprecated public interface Predicate<T> { Loading services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.support.test.filters.MediumTest; import android.support.test.runner.AndroidJUnit4; import android.util.ArraySet; import com.android.internal.util.Predicate; import com.android.server.wm.TaskSnapshotPersister.RemoveObsoleteFilesQueueItem; import org.junit.Test; Loading Loading @@ -200,4 +199,16 @@ public class TaskSnapshotPersisterLoaderTest extends TaskSnapshotPersisterTestBa new File(sFilesDir.getPath() + "/snapshots/2_reduced.jpg")}; assertTrueForFiles(existsFiles, File::exists, " must exist"); } /** * Private predicate definition. * * This is needed because com.android.internal.util.Predicate is deprecated * and can only be used with classes fron android.test.runner. This cannot * use java.util.function.Predicate because that is not present on all API * versions that this test must run on. */ private interface Predicate<T> { boolean apply(T t); } } Loading
legacy-test/src/com/android/internal/util/Predicate.java +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ package com.android.internal.util; * strongly encouraged to state this fact clearly in their API documentation. * * @deprecated Use {@code java.util.function.Predicate} instead. * This must not be used outside frameworks/base/test-runner. */ @Deprecated public interface Predicate<T> { Loading
services/tests/servicestests/src/com/android/server/wm/TaskSnapshotPersisterLoaderTest.java +12 −1 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import android.support.test.filters.MediumTest; import android.support.test.runner.AndroidJUnit4; import android.util.ArraySet; import com.android.internal.util.Predicate; import com.android.server.wm.TaskSnapshotPersister.RemoveObsoleteFilesQueueItem; import org.junit.Test; Loading Loading @@ -200,4 +199,16 @@ public class TaskSnapshotPersisterLoaderTest extends TaskSnapshotPersisterTestBa new File(sFilesDir.getPath() + "/snapshots/2_reduced.jpg")}; assertTrueForFiles(existsFiles, File::exists, " must exist"); } /** * Private predicate definition. * * This is needed because com.android.internal.util.Predicate is deprecated * and can only be used with classes fron android.test.runner. This cannot * use java.util.function.Predicate because that is not present on all API * versions that this test must run on. */ private interface Predicate<T> { boolean apply(T t); } }