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

Commit 2294e0d5 authored by Sarah Chin's avatar Sarah Chin Committed by Sarah Kim
Browse files

Create APIs to check satelite controller enabled and demo mode on

Create nonblocking API calls to check whether satellite is enabled and
whether satellite demo mode is enabled.

Test: manual, CTS, unit tests, verify voice call on live network
Bug: 278578254
Change-Id: I5c1f6e7f89bfe5acdb3e0f91c077cbebd227ed1d
parent 18e251ef
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -886,6 +886,17 @@ public class SatelliteController extends Handler {
        sendRequestAsync(CMD_IS_SATELLITE_ENABLED, result, SatelliteServiceUtils.getPhone());
    }

    /**
     * Get whether the satellite modem is enabled.
     * This will return the cached value instead of querying the satellite modem.
     *
     * @return {@code true} if the satellite modem is enabled and {@code false} otherwise.
     */
    public boolean isSatelliteEnabled() {
        if (mIsSatelliteEnabled == null) return false;
        return mIsSatelliteEnabled;
    }

    /**
     * Request to get whether the satellite service demo mode is enabled.
     *
@@ -920,6 +931,15 @@ public class SatelliteController extends Handler {
        result.send(SatelliteManager.SATELLITE_ERROR_NONE, bundle);
    }

    /**
     * Get whether the satellite service demo mode is enabled.
     *
     * @return {@code true} if the satellite demo mode is enabled and {@code false} otherwise.
     */
    public boolean isDemoModeEnabled() {
        return mIsDemoModeEnabled;
    }

    /**
     * Request to get whether the satellite service is supported on the device.
     *