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

Commit 14628e49 authored by markchien's avatar markchien
Browse files

Remove no-op TetheringEventCallback default function

From API guideline: for platform code and libraries targeting Java 8 or
later, should prefer interfaces in cases where the default implementation
is stateless. Remove no-op default funnction call in
HotspotControllerImpl, then change TetheringEventCallback from abstruct
class to interface with default methods.

Bug: 151243337
Test: m, atest
Change-Id: I694f9110cffb7be8e4fd99bf6ac29e8a47131326
parent 7d528431
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof
            new TetheringManager.TetheringEventCallback() {
                @Override
                public void onTetheringSupported(boolean supported) {
                    super.onTetheringSupported(supported);
                    if (mIsTetheringSupported != supported) {
                        mIsTetheringSupported = supported;
                        fireHotspotAvailabilityChanged();
@@ -75,7 +74,6 @@ public class HotspotControllerImpl implements HotspotController, WifiManager.Sof
                @Override
                public void onTetherableInterfaceRegexpsChanged(
                        TetheringManager.TetheringInterfaceRegexps reg) {
                    super.onTetherableInterfaceRegexpsChanged(reg);
                    final boolean newValue = reg.getTetherableWifiRegexs().size() != 0;
                    if (mHasTetherableWifiRegexs != newValue) {
                        mHasTetherableWifiRegexs = newValue;