Many places across the platform query package details without
gracefully handling packages or components that go missing for
various reasons. This can cause annoying user data loss, such as
resetting back to built-in apps or dropping of accounts, etc.
This change verifies that system callers have thought about these
edge cases by logging if they use default matching behaviors without
explicitly marking themselves as being "triaged." (The logging is
currently disabled by default.)
Also creates explicit definitions of supported flags for various
incoming PackageManager calls, and defines a clear distinction
between flag types:
-- GET-style flags are used to request additional data that may have
been elided to save wire space.
-- MATCH-style flags are used to include components or packages that
would have otherwise been omitted from a result set by current system
state.
There are a handful of existing GET flags that better fit under the
MATCH definition, so this change clones them to new constants and
marks the old ones as deprecated.
Fixes bug in JobSchedulerService to consider jobs from apps on
external storage. Revert some dialer behavior back to being
untriaged.
Change-Id: I9b6ab0968241e3479bddbd78de0c51e3b9917318
Create distinct flags for encryption aware, unaware, and both, and
name them like the other MATCH_ flags.
Start adding logic to help triage all system internal callers to
verify that they've done their homework and thought about how to
handle apps while locked. Call sites in the system should either
ask for explicit matching behavior, or explicitly use the DEFAULT
match flag to indicate that they've been triaged to use the
default state-based matching.
Bug: 26250295
Change-Id: I86214e5c4f71a6dc72f06930800388713aecd107
The platform grants runtime permissions by default to apps on the
system image that provide core device use cases which a user expects
to work out-of-the-box. We are now adding a test to ensure that
OEMs cannot pregrant premissions on non approved components.
bug:23043018
Change-Id: Id76717cce0ee59678956bd0be347d3c045fe4c51
Add commands accessible via adb shell that can be used for CTS tests
without the need for adb root
*set-phone-account-enabled
*set-phone-account-disabled
*set-default-dialer
*get-default-dialer
Modify enablePhoneAccount/setDefaultDialer to indicate success.
Remove now unused functionality in ProtectedEnableAccountPreferenceActivity
and ProtectedChangeDefaultDialerActivity.
Bug: 21583012
Change-Id: I542d145cc969334c004b8344fbbb01f278256f9d
First part of a set of changes to make the default dialer work
across multiple users. This initial CL should not affect any
user-facing behavior, just add new methods.
Bug: 20696062
Change-Id: If1651240e185b4c09e960260c822c9265069fb9a
The previous code worked with ComponentNames because it was
based off existing code for the default SMS application.
We only really need the package name however, so simplify the
code by storing and retrieving the package name directly.
Bug: 20304458
Change-Id: Icabd3a9f0f8166c105360494b601160d13767fad
Will be used by various system components to determine if a
given package name is a privileged Dialer
Bug: 20333102
Bug: 20304411
Change-Id: I1e5bcbde8ee9a5dc6936b118b1b78f32d97737a6
getDefaultDialerPackage is a public API and will be used by
apps to determine if they are the default dialer.
getSystemDialerPackage is a hidden API and is only used by
system components.
Also add new public string constants to allow apps to show
a dialog requesting that the user change the current default
dialer.
Bug: 20304458
Change-Id: I121d36741474c1fe171c372fb766a6c128228c9c