OSDN Git Service

Add support for carrier "associated" apps.
authorJeff Davidson <jpd@google.com>
Thu, 21 Jul 2016 19:35:10 +0000 (12:35 -0700)
committerJeff Davidson <jpd@google.com>
Tue, 26 Jul 2016 21:54:53 +0000 (14:54 -0700)
commit24b9d960071ecf24f1b7edf799f6a4edf20f2b95
treebbc9d0ac4e942fad6dcdffba9081eef943937bf1
parent0eadbe6d369844485d36e45f2b4ca9770828ae52
Add support for carrier "associated" apps.

The platform currently supports the notion of default carrier apps.
These apps are set to DISABLED_UNTIL_USED until a SIM is inserted
which grants them carrier privileges, at which point they are enabled.
Apps are not touched if they have been updated from the version on
/system or if their state has been modified externally (e.g. by the
user).

This CL extends this notion to associated apps, which may not have
carrier privileges themselves, but should be enabled/disabled
alongside a particular carrier app. This should include helper apps
that should not be visible to users who don't use the given carrier
unless the user explicitly enables the app.

As additional protection, we add a check to ensure that we never
disable apps after the first time we've run. Since we need to store
this information in secure settings, we also move the call site from
PackageManagerService#main() to PackageManagerService#systemReady(),
which enables use of secure settings but still occurs before
third-party apps can be started.

Bug: 30141427
Change-Id: Iee72ba4e70e5ca97999c9147a65af82c670a23e8
core/java/android/provider/Settings.java
core/java/com/android/server/SystemConfig.java
services/core/java/com/android/server/pm/PackageManagerService.java
telephony/java/com/android/internal/telephony/CarrierAppUtils.java