Rename entitlement callback to adhere to API guidelines.

The method for OnTetheringEntitlementResultListener needs to be
onTetheringEntitlementResult in order to meet our API guidelines:

"Use Listener when there is a single callback method and there will
never be any others. It should be an interface whose name is the same
as the callback method plus Listener."

Bug: 126392011
Change-Id: I9a883765541ae853c4eb3bd52c9d93a7af16e661
Test: Manual build
This commit is contained in:
Jeremy Klein
2019-03-12 13:32:08 -07:00
parent dce527fbd6
commit 7e7c742ad7

View File

@@ -2805,7 +2805,7 @@ public class ConnectivityManager {
* {@link #TETHER_ERROR_PROVISION_FAILED}, or
* {@link #TETHER_ERROR_ENTITLEMENT_UNKONWN}.
*/
void onEntitlementResult(@EntitlementResultCode int resultCode);
void onTetheringEntitlementResult(@EntitlementResultCode int resultCode);
}
/**
@@ -2855,7 +2855,7 @@ public class ConnectivityManager {
protected void onReceiveResult(int resultCode, Bundle resultData) {
Binder.withCleanCallingIdentity(() ->
executor.execute(() -> {
listener.onEntitlementResult(resultCode);
listener.onTetheringEntitlementResult(resultCode);
}));
}
};