Commit graph android_hardware_sony_SonyO.../ModemConfig
Message SHA1
ModemConfig: Drop notification importance from LOW to MIN
Hide the icon from the statusbar as well. It's not relevant to see here,
just in the notification shade is enough.

Signed-off-by: Marijn Suijten <marijns95@gmail.com>

Marijn Suijten   commited 2020-06-07 11:16:48 +02:00
c7583ac3c8
ModemConfig: Show a grouped notification per slot
Otherwise the notifcation for slot 1 would hide the one for slot 0, if
both are available.

Signed-off-by: Marijn Suijten <marijns95@gmail.com>

Marijn Suijten   commited 2020-06-06 18:07:44 +02:00
16b7b8391e
ModemConfig: Deal with null|empty strings from TelephonyManager
Some of these strings are (temporarily) empty, eg. while the SIM is
locked. Make sure we do not crash in these instances, and rather wait
for the time these become available.

Signed-off-by: Marijn Suijten <marijns95@gmail.com>

Marijn Suijten   commited 2020-06-06 13:22:16 +02:00
0d8dc0c542
ModemConfig: Fix warning in translated string
res/values-it/strings.xml:6: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

LuK1337   authored and   Marijn Suijten   commited 2020-06-06 13:22:16 +02:00
5ed9020953
ModemConfig: Add a simple notification showing to-be-flashed firmware
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>

Marijn Suijten   commited 2020-06-05 01:03:31 +02:00
6ff9b1f132
ModemConfig: Add privapp whitelist xml
LuK1337   authored and   Marijn Suijten   commited 2020-06-05 00:56:12 +02:00
6343ef61fb
ModemConfig: Sort by most specific config first; take first match
Marijn Suijten   commited 2020-06-05 00:56:12 +02:00
bd2a2b1109
REVERTME: ModemConfig: Use platform APIs for SystemProperties
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>

Marijn Suijten   commited 2020-06-05 00:56:11 +02:00
822920ff5b
ModemConfig: Register subchange with SubscriptionManager instead
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>

Marijn Suijten   commited 2020-06-05 00:55:53 +02:00
05d50c9738
ModemConfig: Receive subId, resolve config and trigger modem FW flash
Signed-off-by: Marijn Suijten <marijns95@gmail.com>

Marijn Suijten   commited 2020-06-05 00:33:33 +02:00
9f0ec9dcb2
ModemConfig: Add service provider resource xml
This xml is extracted from an overlay using the python script in this
repository.

Signed-off-by: Marijn Suijten <marijns95@gmail.com>

Marijn Suijten   commited 2020-05-21 00:58:00 +02:00
d4e49a851c
ModemConfig: Add service_providers.xml extractor from stock overlay
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>

Marijn Suijten   commited 2020-05-21 00:58:00 +02:00
1f742ecc01