15 Commits

Author SHA1 Message Date
Tony Mak
b401a94d84 Make getInstalledDialerApplications to query for specific user
BUG=26634502

Change-Id: I8fe5506589bae85e3babba1aaab3b737cd12543b
2016-01-19 19:39:01 +00:00
Jeff Sharkey
2f3e35376a More work towards triaging missing app behavior.
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
2016-01-04 13:19:02 -07:00
Jeff Sharkey
2a9e3f8e68 Better named encryption flags, start triaging.
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
2015-12-19 15:00:09 -07:00
Svet Ganov
52153f4c05 Add GTS test to ensure valid default permission grants - framework
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
2015-08-12 21:57:59 -07:00
Yorke Lee
db6da48621 Allow default dialer changes and phone account enable/disable via ADB
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
2015-06-02 14:23:21 -07:00
Yorke Lee
e0895660da Merge "Filter list of possible default dialers" into mnc-dev 2015-05-07 17:34:54 +00:00
Yorke Lee
6526f67e45 Add hidden methods to set/get default dialer across users
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
2015-05-04 17:11:46 -07:00
Yorke Lee
856a5ac704 Filter list of possible default dialers
Make sure they handle the ACTION_DIAL intent with the tel scheme

Bug: 20304411
Change-Id: I1822eff8bc014d4679352165ebe2bc819b82f75b
2015-04-28 17:05:00 -07:00
Yorke Lee
b7018ba660 Merge "Simplify DefaultDialerManager" into mnc-dev 2015-04-28 18:57:46 +00:00
Yorke Lee
8e0207ba5b Simplify DefaultDialerManager
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
2015-04-28 11:30:47 -07:00
Yorke Lee
d0922ed723 Merge "Rename setDefaultDialerApplication for consistency" into mnc-dev 2015-04-27 22:49:34 +00:00
Yorke Lee
a162f02f76 Rename setDefaultDialerApplication for consistency
Change-Id: I8227df913bdb0ed5e1b3472f9d4ebea1158b366b
2015-04-27 15:17:50 -07:00
Yorke Lee
610438230b Add utility method isDefaultOrSystemDialer
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
2015-04-27 12:55:23 -07:00
Yorke Lee
1011f4870c Add APIs to getDefaultDialerPackage and getSystemDialerPackage
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
2015-04-24 11:12:34 -07:00
Yorke Lee
014de02dd2 Add hidden class in framework for managing the default dialer settings
Bug: 20303635
Change-Id: I7e7318086ade9531fb85f08b8e3f1f001ee0a8d9
2015-04-23 10:19:52 -07:00