OSDN Git Service

Rename entitlement callback to adhere to API guidelines.
authorJeremy Klein <jlklein@google.com>
Tue, 12 Mar 2019 20:32:08 +0000 (13:32 -0700)
committerJeremy Klein <jlklein@google.com>
Tue, 12 Mar 2019 20:36:21 +0000 (13:36 -0700)
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

api/system-current.txt
core/java/android/net/ConnectivityManager.java

index b89a1da..87fd50f 100644 (file)
@@ -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 {
index b7ba970..99b5664 100644 (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);
                             }));
             }
         };