Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 46e65a9d authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Stop using c.a.i.u.Predicate outside test-runner" am: ee2fb3c5...

Merge "Merge "Stop using c.a.i.u.Predicate outside test-runner" am: ee2fb3c5 am: 847df2ca am: 3b24847d"
parents 21de2e86 ec754e9e
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -27,6 +27,7 @@ package com.android.internal.util;
 * strongly encouraged to state this fact clearly in their API documentation.
 * strongly encouraged to state this fact clearly in their API documentation.
 *
 *
 * @deprecated Use {@code java.util.function.Predicate} instead.
 * @deprecated Use {@code java.util.function.Predicate} instead.
 *             This must not be used outside frameworks/base/test-runner.
 */
 */
@Deprecated
@Deprecated
public interface Predicate<T> {
public interface Predicate<T> {
+12 −1
Original line number Original line Diff line number Diff line
@@ -32,7 +32,6 @@ import android.support.test.filters.MediumTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.runner.AndroidJUnit4;
import android.util.ArraySet;
import android.util.ArraySet;


import com.android.internal.util.Predicate;
import com.android.server.wm.TaskSnapshotPersister.RemoveObsoleteFilesQueueItem;
import com.android.server.wm.TaskSnapshotPersister.RemoveObsoleteFilesQueueItem;


import org.junit.Test;
import org.junit.Test;
@@ -200,4 +199,16 @@ public class TaskSnapshotPersisterLoaderTest extends TaskSnapshotPersisterTestBa
                new File(sFilesDir.getPath() + "/snapshots/2_reduced.jpg")};
                new File(sFilesDir.getPath() + "/snapshots/2_reduced.jpg")};
        assertTrueForFiles(existsFiles, File::exists, " must exist");
        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);
    }
}
}