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

Commit b0f030f0 authored by Hall Liu's avatar Hall Liu Committed by android-build-merger
Browse files

Merge "Inform NitzStateMachine of airplane mode changes" am: 3aac7122

am: 2433af63

Change-Id: I59e26508d2c3d6e03cb1c4a379cd1f1f6780ec5e
parents 043d41cb 2433af63
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;
    }