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

Commit 3aac7122 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Inform NitzStateMachine of airplane mode changes"

parents 507cd3a7 bc38fbb3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -58,6 +58,12 @@ public interface NitzStateMachine {
     */
    void handleNitzReceived(TimestampedValue<NitzData> nitzSignal);

    /**
     * Handle the user putting the device into or out of airplane mode
     * @param on true if airplane mode has been turned on, false if it's been turned off.
     */
    void handleAirplaneModeChanged(boolean on);

    /**
     * Dumps the current in-memory state to the supplied PrintWriter.
     */
+6 −0
Original line number Diff line number Diff line
@@ -300,6 +300,12 @@ public final class NitzStateMachineImpl implements NitzStateMachine {
        updateTimeFromNitz();
    }

    @Override
    public void handleAirplaneModeChanged(boolean on) {
        Rlog.d(LOG_TAG, "handleAirplaneModeChanged: on=" + on);
        // TODO
    }

    private void updateTimeFromNitz() {
        TimestampedValue<NitzData> nitzSignal = mLatestNitzSignal;
        try {
+4 −0
Original line number Diff line number Diff line
@@ -1746,6 +1746,10 @@ public class ServiceStateTracker extends Handler {
        }
    }

    public void onAirplaneModeChanged(boolean isAirplaneModeOn) {
        mNitzState.handleAirplaneModeChanged(isAirplaneModeOn);
    }

    protected Phone getPhone() {
        return mPhone;
    }