Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f2e0f03 authored by Jeremy Klein's avatar Jeremy Klein
Browse files

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
parent eb3e7b3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3124,7 +3124,7 @@ package android.net {
  }
  }
  public static interface ConnectivityManager.OnTetheringEntitlementResultListener {
  public static interface ConnectivityManager.OnTetheringEntitlementResultListener {
    method public void onEntitlementResult(int);
    method public void onTetheringEntitlementResult(int);
  }
  }
  public abstract static class ConnectivityManager.OnTetheringEventCallback {
  public abstract static class ConnectivityManager.OnTetheringEventCallback {
+2 −2
Original line number Original line Diff line number Diff line
@@ -2805,7 +2805,7 @@ public class ConnectivityManager {
         *         {@link #TETHER_ERROR_PROVISION_FAILED}, or
         *         {@link #TETHER_ERROR_PROVISION_FAILED}, or
         *         {@link #TETHER_ERROR_ENTITLEMENT_UNKONWN}.
         *         {@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) {
            protected void onReceiveResult(int resultCode, Bundle resultData) {
                Binder.withCleanCallingIdentity(() ->
                Binder.withCleanCallingIdentity(() ->
                            executor.execute(() -> {
                            executor.execute(() -> {
                                listener.onEntitlementResult(resultCode);
                                listener.onTetheringEntitlementResult(resultCode);
                            }));
                            }));
            }
            }
        };
        };