In order to help our efforts finalizing the initial release, provide a
little bit of info to the user about the detected config and the
firmware path belonging to the installation.
TODO: This can be improved in various ways:
- Clear sony.modemswitcher.modem_name_*, and wait for it to change.
This variable contains the path so that we do not need to read it from
a file, including the default path (when the config is not found).
- Extend the notification (or start a Dialog/Activity onclick) to
display more diagnostic info.
Signed-off-by: Marijn Suijten <marijns95@gmail.com>
Unfortunately sysprop - which is the SDK-compliant repacement for
SystemProperties - does not work properly in Android Q. Specificially
a java library is not generated and passed to the java compiler when
building ModemConfig. This works flawlessly in Android R.
Use SystemProperties from the private API as a stop-gap solution, until
we either pick a build-system fix or move to R.
Signed-off-by: Marijn Suijten <marijns95@gmail.com>
DEFAULT_SUBSCRIPTION_CHANGED is not delivered often enough. When
swapping the same SIM between slots the selected subscription doesn't
change yet the firmware for the slot might need to be updated.
Registering this handler provides the ability to do so, but has to be
registered from a background service that consequently is to be started
by a BootReceiver.
Signed-off-by: Marijn Suijten <marijns95@gmail.com>
This overlay contains the necessary mappings from mcc/mnc/gid1/imsi/sp
to a configuration name. The configuration file under this name contains
a path to the actuall modem firmware that is supposed to be flashed.
Signed-off-by: Marijn Suijten <marijns95@gmail.com>