Merge "Stop using c.a.i.u.Predicate outside test-runner" am: ee2fb3c59e
am: 847df2cafc
Change-Id: I3d5f64b3551df8d5b3af1a18dfd63147fa186df7
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user