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

Commit c3b0eddb authored by Wei Wang's avatar Wei Wang Committed by Android Git Automerger
Browse files

am 109682b6: Fix a bug that swapped LOW_POWER AND LOW_LATENCY for advertising.

* commit '109682b6':
  Fix a bug that swapped LOW_POWER AND LOW_LATENCY for advertising.
parents 694413d0 109682b6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -578,14 +578,14 @@ public class GattServiceStateMachine extends StateMachine {
    private long getAdvertisingIntervalUnit(AdvertiseSettings settings) {
        switch (settings.getMode()) {
            case AdvertiseSettings.ADVERTISE_MODE_LOW_POWER:
                return millsToUnit(ADVERTISING_INTERVAL_LOW_MILLS);
                return millsToUnit(ADVERTISING_INTERVAL_HIGH_MILLS);
            case AdvertiseSettings.ADVERTISE_MODE_BALANCED:
                return millsToUnit(ADVERTISING_INTERVAL_MEDIUM_MILLS);
            case AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY:
                return millsToUnit(ADVERTISING_INTERVAL_HIGH_MILLS);
                return millsToUnit(ADVERTISING_INTERVAL_LOW_MILLS);
            default:
                // Shouldn't happen, just in case.
                return millsToUnit(ADVERTISING_INTERVAL_LOW_MILLS);
                return millsToUnit(ADVERTISING_INTERVAL_HIGH_MILLS);
        }
    }