Merge "Apilint: No longer flag interface callbacks"

am: 26968d81f8

Change-Id: I5754aa7c70d583e88b7837a61aa998678843c118
This commit is contained in:
Adrian Roos
2019-03-05 15:22:53 -08:00
committed by android-build-merger

View File

@@ -826,7 +826,6 @@ def verify_method_names(clazz):
@verifier
def verify_callbacks(clazz):
"""Verify Callback classes.
All callback classes must be abstract.
All methods must follow onFoo() naming style."""
if clazz.fullname == "android.speech.tts.SynthesisCallback": return
@@ -836,9 +835,6 @@ def verify_callbacks(clazz):
warn(clazz, None, "L1", "Class should be named FooCallback")
if clazz.name.endswith("Callback"):
if "interface" in clazz.split:
error(clazz, None, "CL3", "Callbacks must be abstract class to enable extension in future API levels")
for m in clazz.methods:
if not re.match("on[A-Z][a-z]*", m.name):
error(clazz, m, "L1", "Callback method names must be onFoo() style")