From 68ea0c3c1375c9a14a0851b90899f36b5d355403 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Wed, 26 Dec 2018 19:55:07 -0800 Subject: Update signature files to the new format The new format is described in tools/metalava/FORMAT.md. Fixes: 116589402 Switch signature files over to the v2 format Fixes: 112626813 Drop "synchronized" modifier from the signature format Fixes: 122358225 Omit overriding methods that only differ in final [...] Fixes: 73088715 API Review: Need doclava to output nullability Fixes: 79739773 API Review: Metalava enforcing constants are constant Exempt-From-Owner-Approval: Large-scale tooling change Test: make sdk, make update-api, make checkapi Change-Id: Ia248aece5250e84e47c815c601133b698bf644c2 --- test-base/api/current.txt | 237 ++++++++++++++++++++------------------- test-base/api/removed.txt | 1 + test-base/api/system-current.txt | 1 + test-base/api/system-removed.txt | 1 + test-base/api/test-current.txt | 1 + test-base/api/test-removed.txt | 1 + 6 files changed, 125 insertions(+), 117 deletions(-) (limited to 'test-base') diff --git a/test-base/api/current.txt b/test-base/api/current.txt index 91fcca5cac25..750fb5988327 100644 --- a/test-base/api/current.txt +++ b/test-base/api/current.txt @@ -1,84 +1,87 @@ +// Signature format: 2.0 package android.test { - public deprecated class AndroidTestCase extends junit.framework.TestCase { - ctor public AndroidTestCase(); - method public void assertActivityRequiresPermission(java.lang.String, java.lang.String, java.lang.String); - method public void assertReadingContentUriRequiresPermission(android.net.Uri, java.lang.String); - method public void assertWritingContentUriRequiresPermission(android.net.Uri, java.lang.String); - method public android.content.Context getContext(); - method protected void scrubClass(java.lang.Class) throws java.lang.IllegalAccessException; - method public void setContext(android.content.Context); - method public void testAndroidTestCaseSetupProperly(); - field protected android.content.Context mContext; + @Deprecated public class AndroidTestCase extends junit.framework.TestCase { + ctor @Deprecated public AndroidTestCase(); + method @Deprecated public void assertActivityRequiresPermission(String, String, String); + method @Deprecated public void assertReadingContentUriRequiresPermission(android.net.Uri, String); + method @Deprecated public void assertWritingContentUriRequiresPermission(android.net.Uri, String); + method @Deprecated public android.content.Context getContext(); + method @Deprecated protected void scrubClass(Class) throws java.lang.IllegalAccessException; + method @Deprecated public void setContext(android.content.Context); + method @Deprecated @android.test.suitebuilder.annotation.Suppress public void testAndroidTestCaseSetupProperly(); + field @Deprecated protected android.content.Context mContext; } - public abstract deprecated class FlakyTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface FlakyTest { + method @Deprecated public abstract int tolerance() default 1; } - public deprecated class InstrumentationTestCase extends junit.framework.TestCase { - ctor public InstrumentationTestCase(); - method public android.app.Instrumentation getInstrumentation(); - method public deprecated void injectInsrumentation(android.app.Instrumentation); - method public void injectInstrumentation(android.app.Instrumentation); - method public final T launchActivity(java.lang.String, java.lang.Class, android.os.Bundle); - method public final T launchActivityWithIntent(java.lang.String, java.lang.Class, android.content.Intent); - method public void runTestOnUiThread(java.lang.Runnable) throws java.lang.Throwable; - method public void sendKeys(java.lang.String); - method public void sendKeys(int...); - method public void sendRepeatedKeys(int...); + @Deprecated public class InstrumentationTestCase extends junit.framework.TestCase { + ctor @Deprecated public InstrumentationTestCase(); + method @Deprecated public android.app.Instrumentation getInstrumentation(); + method @Deprecated public void injectInsrumentation(android.app.Instrumentation); + method @Deprecated public void injectInstrumentation(android.app.Instrumentation); + method @Deprecated public final T launchActivity(String, Class, android.os.Bundle); + method @Deprecated public final T launchActivityWithIntent(String, Class, android.content.Intent); + method @Deprecated public void runTestOnUiThread(Runnable) throws java.lang.Throwable; + method @Deprecated public void sendKeys(String); + method @Deprecated public void sendKeys(int...); + method @Deprecated public void sendRepeatedKeys(int...); } - public deprecated class InstrumentationTestSuite extends junit.framework.TestSuite { - ctor public InstrumentationTestSuite(android.app.Instrumentation); - ctor public InstrumentationTestSuite(java.lang.String, android.app.Instrumentation); - ctor public InstrumentationTestSuite(java.lang.Class, android.app.Instrumentation); - method public void addTestSuite(java.lang.Class); + @Deprecated public class InstrumentationTestSuite extends junit.framework.TestSuite { + ctor @Deprecated public InstrumentationTestSuite(android.app.Instrumentation); + ctor @Deprecated public InstrumentationTestSuite(String, android.app.Instrumentation); + ctor @Deprecated public InstrumentationTestSuite(Class, android.app.Instrumentation); + method @Deprecated public void addTestSuite(Class); } - public abstract deprecated interface PerformanceTestCase { - method public abstract boolean isPerformanceOnly(); - method public abstract int startPerformance(android.test.PerformanceTestCase.Intermediates); + @Deprecated public interface PerformanceTestCase { + method @Deprecated public boolean isPerformanceOnly(); + method @Deprecated public int startPerformance(android.test.PerformanceTestCase.Intermediates); } - public static abstract interface PerformanceTestCase.Intermediates { - method public abstract void addIntermediate(java.lang.String); - method public abstract void addIntermediate(java.lang.String, long); - method public abstract void finishTiming(boolean); - method public abstract void setInternalIterations(int); - method public abstract void startTiming(boolean); + @Deprecated public static interface PerformanceTestCase.Intermediates { + method @Deprecated public void addIntermediate(String); + method @Deprecated public void addIntermediate(String, long); + method @Deprecated public void finishTiming(boolean); + method @Deprecated public void setInternalIterations(int); + method @Deprecated public void startTiming(boolean); } - public abstract deprecated class RepetitiveTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface RepetitiveTest { + method @Deprecated public abstract int numIterations() default 1; } - public abstract deprecated class UiThreadTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target(java.lang.annotation.ElementType.METHOD) public @interface UiThreadTest { } } package android.test.suitebuilder.annotation { - public abstract deprecated class LargeTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface LargeTest { } - public abstract deprecated class MediumTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface MediumTest { } - public abstract deprecated class SmallTest implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface SmallTest { } - public abstract deprecated class Smoke implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Smoke { } - public abstract deprecated class Suppress implements java.lang.annotation.Annotation { + @Deprecated @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @java.lang.annotation.Target({java.lang.annotation.ElementType.METHOD, java.lang.annotation.ElementType.TYPE}) public @interface Suppress { } } package com.android.internal.util { - public abstract deprecated interface Predicate { - method public abstract boolean apply(T); + @Deprecated public interface Predicate { + method @Deprecated public boolean apply(T); } } @@ -87,117 +90,117 @@ package junit.framework { public class Assert { ctor protected Assert(); - method public static void assertEquals(java.lang.String, java.lang.Object, java.lang.Object); - method public static void assertEquals(java.lang.Object, java.lang.Object); - method public static void assertEquals(java.lang.String, java.lang.String, java.lang.String); - method public static void assertEquals(java.lang.String, java.lang.String); - method public static void assertEquals(java.lang.String, double, double, double); + method public static void assertEquals(String, Object, Object); + method public static void assertEquals(Object, Object); + method public static void assertEquals(String, String, String); + method public static void assertEquals(String, String); + method public static void assertEquals(String, double, double, double); method public static void assertEquals(double, double, double); - method public static void assertEquals(java.lang.String, float, float, float); + method public static void assertEquals(String, float, float, float); method public static void assertEquals(float, float, float); - method public static void assertEquals(java.lang.String, long, long); + method public static void assertEquals(String, long, long); method public static void assertEquals(long, long); - method public static void assertEquals(java.lang.String, boolean, boolean); + method public static void assertEquals(String, boolean, boolean); method public static void assertEquals(boolean, boolean); - method public static void assertEquals(java.lang.String, byte, byte); + method public static void assertEquals(String, byte, byte); method public static void assertEquals(byte, byte); - method public static void assertEquals(java.lang.String, char, char); + method public static void assertEquals(String, char, char); method public static void assertEquals(char, char); - method public static void assertEquals(java.lang.String, short, short); + method public static void assertEquals(String, short, short); method public static void assertEquals(short, short); - method public static void assertEquals(java.lang.String, int, int); + method public static void assertEquals(String, int, int); method public static void assertEquals(int, int); - method public static void assertFalse(java.lang.String, boolean); + method public static void assertFalse(String, boolean); method public static void assertFalse(boolean); - method public static void assertNotNull(java.lang.Object); - method public static void assertNotNull(java.lang.String, java.lang.Object); - method public static void assertNotSame(java.lang.String, java.lang.Object, java.lang.Object); - method public static void assertNotSame(java.lang.Object, java.lang.Object); - method public static void assertNull(java.lang.Object); - method public static void assertNull(java.lang.String, java.lang.Object); - method public static void assertSame(java.lang.String, java.lang.Object, java.lang.Object); - method public static void assertSame(java.lang.Object, java.lang.Object); - method public static void assertTrue(java.lang.String, boolean); + method public static void assertNotNull(Object); + method public static void assertNotNull(String, Object); + method public static void assertNotSame(String, Object, Object); + method public static void assertNotSame(Object, Object); + method public static void assertNull(Object); + method public static void assertNull(String, Object); + method public static void assertSame(String, Object, Object); + method public static void assertSame(Object, Object); + method public static void assertTrue(String, boolean); method public static void assertTrue(boolean); - method public static void fail(java.lang.String); + method public static void fail(String); method public static void fail(); - method public static void failNotEquals(java.lang.String, java.lang.Object, java.lang.Object); - method public static void failNotSame(java.lang.String, java.lang.Object, java.lang.Object); - method public static void failSame(java.lang.String); - method public static java.lang.String format(java.lang.String, java.lang.Object, java.lang.Object); + method public static void failNotEquals(String, Object, Object); + method public static void failNotSame(String, Object, Object); + method public static void failSame(String); + method public static String format(String, Object, Object); } public class AssertionFailedError extends java.lang.AssertionError { ctor public AssertionFailedError(); - ctor public AssertionFailedError(java.lang.String); + ctor public AssertionFailedError(String); } public class ComparisonFailure extends junit.framework.AssertionFailedError { - ctor public ComparisonFailure(java.lang.String, java.lang.String, java.lang.String); - method public java.lang.String getActual(); - method public java.lang.String getExpected(); + ctor public ComparisonFailure(String, String, String); + method public String getActual(); + method public String getExpected(); } - public abstract interface Protectable { - method public abstract void protect() throws java.lang.Throwable; + public interface Protectable { + method public void protect() throws java.lang.Throwable; } - public abstract interface Test { - method public abstract int countTestCases(); - method public abstract void run(junit.framework.TestResult); + public interface Test { + method public int countTestCases(); + method public void run(junit.framework.TestResult); } public abstract class TestCase extends junit.framework.Assert implements junit.framework.Test { ctor public TestCase(); - ctor public TestCase(java.lang.String); + ctor public TestCase(String); method public int countTestCases(); method protected junit.framework.TestResult createResult(); - method public java.lang.String getName(); + method public String getName(); method public junit.framework.TestResult run(); method public void run(junit.framework.TestResult); method public void runBare() throws java.lang.Throwable; method protected void runTest() throws java.lang.Throwable; - method public void setName(java.lang.String); + method public void setName(String); method protected void setUp() throws java.lang.Exception; method protected void tearDown() throws java.lang.Exception; } public class TestFailure { - ctor public TestFailure(junit.framework.Test, java.lang.Throwable); - method public java.lang.String exceptionMessage(); + ctor public TestFailure(junit.framework.Test, Throwable); + method public String exceptionMessage(); method public junit.framework.Test failedTest(); method public boolean isFailure(); - method public java.lang.Throwable thrownException(); - method public java.lang.String trace(); + method public Throwable thrownException(); + method public String trace(); field protected junit.framework.Test fFailedTest; - field protected java.lang.Throwable fThrownException; + field protected Throwable fThrownException; } - public abstract interface TestListener { - method public abstract void addError(junit.framework.Test, java.lang.Throwable); - method public abstract void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); - method public abstract void endTest(junit.framework.Test); - method public abstract void startTest(junit.framework.Test); + public interface TestListener { + method public void addError(junit.framework.Test, Throwable); + method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); + method public void endTest(junit.framework.Test); + method public void startTest(junit.framework.Test); } public class TestResult { ctor public TestResult(); - method public synchronized void addError(junit.framework.Test, java.lang.Throwable); - method public synchronized void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); - method public synchronized void addListener(junit.framework.TestListener); + method public void addError(junit.framework.Test, Throwable); + method public void addFailure(junit.framework.Test, junit.framework.AssertionFailedError); + method public void addListener(junit.framework.TestListener); method public void endTest(junit.framework.Test); - method public synchronized int errorCount(); - method public synchronized java.util.Enumeration errors(); - method public synchronized int failureCount(); - method public synchronized java.util.Enumeration failures(); - method public synchronized void removeListener(junit.framework.TestListener); + method public int errorCount(); + method public java.util.Enumeration errors(); + method public int failureCount(); + method public java.util.Enumeration failures(); + method public void removeListener(junit.framework.TestListener); method protected void run(junit.framework.TestCase); - method public synchronized int runCount(); + method public int runCount(); method public void runProtected(junit.framework.Test, junit.framework.Protectable); - method public synchronized boolean shouldStop(); + method public boolean shouldStop(); method public void startTest(junit.framework.Test); - method public synchronized void stop(); - method public synchronized boolean wasSuccessful(); + method public void stop(); + method public boolean wasSuccessful(); field protected java.util.Vector fErrors; field protected java.util.Vector fFailures; field protected java.util.Vector fListeners; @@ -206,24 +209,24 @@ package junit.framework { public class TestSuite implements junit.framework.Test { ctor public TestSuite(); - ctor public TestSuite(java.lang.Class); - ctor public TestSuite(java.lang.Class, java.lang.String); - ctor public TestSuite(java.lang.String); - ctor public TestSuite(java.lang.Class...); - ctor public TestSuite(java.lang.Class[], java.lang.String); + ctor public TestSuite(Class); + ctor public TestSuite(Class, String); + ctor public TestSuite(String); + ctor public TestSuite(Class...); + ctor public TestSuite(Class[], String); method public void addTest(junit.framework.Test); - method public void addTestSuite(java.lang.Class); + method public void addTestSuite(Class); method public int countTestCases(); - method public static junit.framework.Test createTest(java.lang.Class, java.lang.String); - method public java.lang.String getName(); - method public static java.lang.reflect.Constructor getTestConstructor(java.lang.Class) throws java.lang.NoSuchMethodException; + method public static junit.framework.Test createTest(Class, String); + method public String getName(); + method public static java.lang.reflect.Constructor getTestConstructor(Class) throws java.lang.NoSuchMethodException; method public void run(junit.framework.TestResult); method public void runTest(junit.framework.Test, junit.framework.TestResult); - method public void setName(java.lang.String); + method public void setName(String); method public junit.framework.Test testAt(int); method public int testCount(); method public java.util.Enumeration tests(); - method public static junit.framework.Test warning(java.lang.String); + method public static junit.framework.Test warning(String); } } diff --git a/test-base/api/removed.txt b/test-base/api/removed.txt index e69de29bb2d1..d802177e249b 100644 --- a/test-base/api/removed.txt +++ b/test-base/api/removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0 diff --git a/test-base/api/system-current.txt b/test-base/api/system-current.txt index e69de29bb2d1..d802177e249b 100644 --- a/test-base/api/system-current.txt +++ b/test-base/api/system-current.txt @@ -0,0 +1 @@ +// Signature format: 2.0 diff --git a/test-base/api/system-removed.txt b/test-base/api/system-removed.txt index e69de29bb2d1..d802177e249b 100644 --- a/test-base/api/system-removed.txt +++ b/test-base/api/system-removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0 diff --git a/test-base/api/test-current.txt b/test-base/api/test-current.txt index e69de29bb2d1..d802177e249b 100644 --- a/test-base/api/test-current.txt +++ b/test-base/api/test-current.txt @@ -0,0 +1 @@ +// Signature format: 2.0 diff --git a/test-base/api/test-removed.txt b/test-base/api/test-removed.txt index e69de29bb2d1..d802177e249b 100644 --- a/test-base/api/test-removed.txt +++ b/test-base/api/test-removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0 -- cgit v1.2.3