From: Jeremy Klein Date: Tue, 12 Mar 2019 20:32:08 +0000 (-0700) Subject: Rename entitlement callback to adhere to API guidelines. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=9f2e0f035a7c1c9530d45942a78011134c1bd59f;p=android-x86%2Fframeworks-base.git 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 --- diff --git a/api/system-current.txt b/api/system-current.txt index b89a1da22ca2..87fd50f0e0e8 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -3124,7 +3124,7 @@ package android.net { } public static interface ConnectivityManager.OnTetheringEntitlementResultListener { - method public void onEntitlementResult(int); + method public void onTetheringEntitlementResult(int); } public abstract static class ConnectivityManager.OnTetheringEventCallback { diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index b7ba97024d83..99b5664d2e87 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -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); })); } };