Commit Graph

4651 Commits

Author SHA1 Message Date
Jeff Sharkey
49ca529a85 Avoid caching services with missing binders.
When fetching system services early during boot, if the underlying
binder interface hasn't been published yet, we end up caching a
manager class that is broken for the remainder of the process
lifetime, and innocent downstream callers end up using the broken
cached manager.

Fix this by using an explicit exception to quickly abort manager
creation when the underlying binder is missing.  The exception is
only used to skip the remainder of the manager creation, and it
doesn't actually crash the process.

Bug: 28634953
Change-Id: I0cb62261e6d6833660704b93a11185aa11a2ac97
2016-08-11 09:44:30 -06:00
Mark Lu
7c5a32526f docs: add info to SharedPreferences.Editor.putString am: fb48521f41 am: f434456ba5
am: 82a7343653

Change-Id: I112c1d2944cf6f1feeb2abd93514c59ee143f08c
2016-08-08 22:56:15 +00:00
Mark Lu
82a7343653 docs: add info to SharedPreferences.Editor.putString am: fb48521f41
am: f434456ba5

Change-Id: I5dec6b6fb20c741d92a840cf6291d0b33ac46d5a
2016-08-08 22:49:12 +00:00
Mark Lu
f434456ba5 docs: add info to SharedPreferences.Editor.putString
am: fb48521f41

Change-Id: Icf8a1a92e8f18bcc63b52842ea75b00610feac9d
2016-08-08 22:36:09 +00:00
TreeHugger Robot
3dc99ea200 Merge "Break out static update method" 2016-08-04 19:00:47 +00:00
Todd Kennedy
13715d521f Break out static update method
Simply getting package settings could changes stored state. Break out
the majority of the method to modify local variables and not change
any stored state. The top-level getPackageLPw() method will still
mutate stored state. This will be changed in a future CL.

Also add a set of tests to verify the behaviour of updatePackageSetting()

Bug: 30219944
Change-Id: I3360a36ce238e816246ee8ca7ecabfbbcdf0b89d
2016-08-04 10:38:39 -07:00
TreeHugger Robot
3242a9a7fd Merge "Remove another fw.show_hidden_users" 2016-08-04 16:20:35 +00:00
Robin Lee
434a74f558 Remove another fw.show_hidden_users
We've finished developing managed profiles now.

Change-Id: Ic587fce990e06c676d0819c63439a31b9ca07dcb
2016-08-04 15:58:08 +01:00
TreeHugger Robot
391dfcfa68 Merge "Revert "Add per-user versions of set{Component,Application}EnabledSetting."" 2016-08-02 23:56:55 +00:00
Sudheer Shanka
38c67d3c0f Revert "Add per-user versions of set{Component,Application}EnabledSetting."
This reverts commit 0e6bfff6c1.

Change-Id: I4eafa9fc052e9eba9e26fd32c09b5e759fe63b00
2016-08-02 22:13:17 +00:00
Mark Lu
fb48521f41 docs: add info to SharedPreferences.Editor.putString
The information explains what happens when null is passed
as value parameter

Bug: 24696308
Change-Id: I362c2b1885e882312d1b4b2ff829f8f9f3546301
2016-08-02 12:10:48 -07:00
Makoto Onuki
b3941d2aee LauncherApps should also throw when user is locked am: 02f338e23d am: 897a4f84d0
am: 88870a84ed

Change-Id: I5f098c71a128c9e51b957e5b391b2d57eca663f9
2016-08-02 18:24:34 +00:00
Makoto Onuki
88870a84ed LauncherApps should also throw when user is locked am: 02f338e23d
am: 897a4f84d0

Change-Id: I0e2112d5c638ddf11a51f004eec2b533acd2251b
2016-08-02 18:15:18 +00:00
Robin Lee
35579aa7b4 Merge "Pass userId through to singleton ContentProviders" 2016-08-02 07:55:21 +00:00
Makoto Onuki
02f338e23d LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: I953eb6ae58e029d254d9fdbd5d05a0090b8d2391
2016-08-01 18:15:47 -07:00
Robin Lee
2ab02e2cb2 Pass userId through to singleton ContentProviders
System content providers like SettingsProvider run as singleUser but
on receipt of a call make decisions based on the calling user ID.

This is right up until the caller is a system service or a cross-user-
-aware app like Settings, where putStringForUser etc. provide a
workaround for most settings but not for the few files SettingsProvider
exposes.

Change-Id: I90060c9c13e274edd71f8a16ab3a026a58b98e3e
2016-08-01 23:45:36 +01:00
Fyodor Kupolov
9e01f2ace5 Merge \\\"Fix the API compatibility of \\\"UriMatcher#addURI\\\"\\\" am: 3e151273a3 am: bc8d946e09 am: dbf07bb8ef
am: 0d287f1846

Change-Id: Ic9ec776900cbb10470f731409de71ecbf55e700f
2016-08-01 22:06:15 +00:00
Makoto Onuki
a31a6f9f27 Revert \\"LauncherApps should also throw when user is locked\\" am: 2ec16b08ac am: e330d59c2e
am: 685091f203

Change-Id: Iacfdd622ce04a86f0f5f573a9e11dc7d1cccc932
2016-08-01 22:06:08 +00:00
Hidehiko Tsuchiya
0d287f1846 Merge \\\"Fix the API compatibility of \\\"UriMatcher#addURI\\\"\\\" am: 3e151273a3 am: bc8d946e09
am: dbf07bb8ef

Change-Id: I105800630bb0b5b2ed610c27741eb027d60b61a2
2016-08-01 17:56:38 +00:00
Fyodor Kupolov
dbf07bb8ef Merge \\"Fix the API compatibility of \\"UriMatcher#addURI\\"\\" am: 3e151273a3
am: bc8d946e09

Change-Id: I6ab069a0e02e6b1053dafe98671ab68ef99ff527
2016-08-01 17:50:09 +00:00
Makoto Onuki
685091f203 Revert \\"LauncherApps should also throw when user is locked\\" am: 2ec16b08ac
am: e330d59c2e

Change-Id: I18070a0a1a69ab8ba366cef5295f09ac598c5e9f
2016-08-01 17:47:10 +00:00
Hidehiko Tsuchiya
bc8d946e09 Merge \"Fix the API compatibility of \"UriMatcher#addURI\"\"
am: 3e151273a3

Change-Id: Ic06ade3ce6dd795e7d12cfba150286933512433d
2016-08-01 17:43:30 +00:00
Makoto Onuki
2ec16b08ac Revert "LauncherApps should also throw when user is locked"
This reverts commit bc4ad85d29.

Will retry when the updated launcher is in.

Change-Id: I428dc93132615480df70aeca7977089af008c041
2016-08-01 17:20:59 +00:00
Makoto Onuki
07996bce98 LauncherApps should also throw when user is locked am: bc4ad85d29 am: 5ec63fc3c7
am: 3b5920b2a1

Change-Id: I60beb409a55297a9a2adaaf52f1ea1e185668c88
2016-07-31 02:25:45 +00:00
Hidehiko Tsuchiya
5acd41d155 Fix the API compatibility of "UriMatcher#addURI"
The previous patch (ef23bf19 Allow leading slash in path...) made
a single slash path unmatchable.
To solve it, this patch stops removing a slash character if the path
only has a slash character.
Now, a single slash is a matchable path for a URI without path string.

Bug: 29524484
Change-Id: I90b357aa48be1a3e0cf36e75ed2a9d6532908972
2016-07-30 01:47:50 +00:00
Makoto Onuki
3b5920b2a1 LauncherApps should also throw when user is locked am: bc4ad85d29
am: 5ec63fc3c7

Change-Id: Iacb1a0725553ff8e2c205eba8e74d26b19a9a5dd
2016-07-29 18:38:12 +00:00
Makoto Onuki
bc4ad85d29 LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: Id6b0295933c5639fa23c56d737a7f0199cbd7497
2016-07-29 09:40:40 -07:00
TreeHugger Robot
347117f556 Merge "fix javadoc for grantRuntimePermission" 2016-07-29 13:35:19 +00:00
Todd Kennedy
a8eb6a89d6 fix javadoc for grantRuntimePermission
javadoc and implementation were out of sync.

Change-Id: I53b50ac999134d3f10557cc3b2c3e2586aaa48de
fixes: 30119755
2016-07-28 16:35:42 -07:00
Makoto Onuki
4830a0c5ca Prevent shortcut access when user is locked am: 9c850012ca am: cab2462e38
am: 890f85d70f

Change-Id: Ie6653dcc55b37598a45987d938f07ba31e173ef5
2016-07-28 23:15:16 +00:00
Makoto Onuki
890f85d70f Prevent shortcut access when user is locked am: 9c850012ca
am: cab2462e38

Change-Id: I66faccf78500d057957fb4a7bc361ff8907811b5
2016-07-27 22:28:30 +00:00
Makoto Onuki
9c850012ca Prevent shortcut access when user is locked
Also add some test utility methods that'll be used by CTS.

Bug 30406401

Change-Id: I9396acebbdb3cbe64f6e85877ee62a2131cd6e61
2016-07-27 12:01:46 -07:00
Makoto Onuki
21e778192d Update ShortcutManager javadoc am: fe9c9669a4
am: d09c33f32c

Change-Id: I14fdc704a54e4b8e148b9bcd4127cadf7e89eec1
2016-07-26 20:55:02 +00:00
Makoto Onuki
d09c33f32c Update ShortcutManager javadoc
am: fe9c9669a4

Change-Id: I4bfaca9ce475e91ec0dae45739b1623ceac8a43c
2016-07-26 20:50:00 +00:00
Chad Brubaker
90f331adad Merge "Add asUser version of sendBroadcast(Intent, String, Bundle)" 2016-07-26 20:25:43 +00:00
Makoto Onuki
fe9c9669a4 Update ShortcutManager javadoc
Bug 30359231

Change-Id: I01f1987416fa1ac3f0669afa1f15f88ff2dd1631
2016-07-25 17:56:09 -07:00
Chad Brubaker
52c8edc2d8 Add asUser version of sendBroadcast(Intent, String, Bundle)
Change-Id: Id87aa1123d6c0a8a036ed9430eee10357040321f
2016-07-25 14:30:26 -07:00
Todd Kennedy
7a39181c6c Merge "Implement new ephemeral resolver design" 2016-07-22 22:29:17 +00:00
Todd Kennedy
8653659cbe Merge "Add more tracing" 2016-07-22 14:37:27 +00:00
Makoto Onuki
df4e733bf7 Follow-up to multiple intents support am: 0eed441c0c
am: b6ed7b7552

Change-Id: I1034eaa7670c7fa983ddffcce295979ec86bde89
2016-07-22 07:13:17 +00:00
TreeHugger Robot
ddde470652 Merge "Fix undefined fontScale issue in Configuration" 2016-07-22 02:44:35 +00:00
Makoto Onuki
b6ed7b7552 Follow-up to multiple intents support
am: 0eed441c0c

Change-Id: I3007735db610ddd8c608290ffac8edcdcf390758
2016-07-22 02:24:00 +00:00
Todd Kennedy
8e2d9d1d90 Implement new ephemeral resolver design
In the new design, the ephemeral installer can be returned from
queryIntentActivities which means any intent resolution could potentially
return the installer. Additionally, the new design calls for a platform
defined broadcast receiver that receives the status from the ephemeral
installer. This receiver then starts the final intent -- either to launch
the ephemeral application or to launch the fallback.

For more detail, see go/ephemeral-design

Change-Id: I6644bbb4f180d2d22c63af04b9857577516344a9
2016-07-21 14:55:23 -07:00
Todd Kennedy
cd029da321 Add more tracing
Allows us to track PackageManagerService startup

Bug: 30272038
Change-Id: I56fa7480fe640f4444d09a657889ec83685a7570
2016-07-21 13:35:12 -07:00
Makoto Onuki
0eed441c0c Follow-up to multiple intents support
- More unit tests
 - LauncherApps.startShortcut() now supports sourceBounds
 (again)
- Updated the javadoc.

Bug 30218829

Change-Id: Iae208ffd4911d149246ccfd0c4380544c2aafffc
2016-07-21 11:33:37 -07:00
Makoto Onuki
de1e6e4d2d Merge \\"Support multiple intents in ShortcutInfo\\" into nyc-mr1-dev am: b84ce2e034
am: 9a6109f284

Change-Id: I0f1caf54cc544db0b73f8e3275005923904f57a8
2016-07-20 23:15:32 +00:00
Makoto Onuki
9a6109f284 Merge \"Support multiple intents in ShortcutInfo\" into nyc-mr1-dev
am: b84ce2e034

Change-Id: I53daa680bdf18505896a372e59c7b4bd73d4edca
2016-07-20 23:09:55 +00:00
Makoto Onuki
440a1ea8e2 Support multiple intents in ShortcutInfo
Also fix b/30230996.

TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().

Bug 30218829
Bug 30230996

Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
2016-07-20 14:46:48 -07:00
Adam Lesinski
bad43fcae4 Fix undefined fontScale issue in Configuration
When using a Configuration object as a delta for use
as an update to an existing Configuration object,
the fontScale property is always defaulted to 1.0, which
is not considered "undefined". That means that fontScale will
always get overridden to 1.0.

This changes the undefined value of fontScale to 0.0, which is
set when the Configuration object is constructed. Thankfully,
the documentation for Configuration states that until
Configuration#setToDefaults() is called, the Configuration is in
an invalid state. That means that apps can not rely on fontScale == 1.0
without calling setToDefaults().

Bug:29924927
Change-Id: I19342c55f7057423f1ca8c5d8dce1dff07617d90
2016-07-20 20:15:26 +00:00
TreeHugger Robot
c5837520ba Merge "Add per-user versions of set{Component,Application}EnabledSetting." 2016-07-20 18:58:56 +00:00