Special carrier apps: Disable special carrier apps earlier in boot

The special carrier apps feature was originally introduced on Android M
by mimicking how the preinstalled carrier apps were handled. With
Android N a race condition can appear when the telephony stack is
initialised after a preinstalled carrier app has already started. Since
the decision to disable a preinstalled carrier app happens in the
telephony framework, once the stack has been initiliased, it is possible
than an already started app has to be killed because no rule is
matching. Such an event results in a popup being shown to the end-user
about an app crash.

The commit e68b127525c23e8e0cbe1e9dee75534d99e2833d protects the
preinstalled carrier apps against this possible event by disabling any
such app as soon as possible - before they can start. This patch copies
this mechanism to disable any special carrier apps at the same time.

Issue: FP2N-258
Issue: FP2P-409
Change-Id: I2878fa257717aae6ad9ec0be3dddea8366d04af7
(cherry picked from commit f86575730db85ce28b8020ce0ec765cdb137290e)
2 files changed