Commit Graph

5772 Commits

Author SHA1 Message Date
Jeff Sharkey
a915a88cfb Merge "Merge "Improve developer docs for storage APIs." into oc-dev am: 05b52d8ba5 am: f96c9a0fa2" into oc-dr1-dev-plus-aosp
am: 08b598fcfe

Change-Id: I6dd330a240f1725b59e79111fd3bfc124a3fb897
2017-06-13 00:57:38 +00:00
Jeff Sharkey
10e0b425bc Merge "Improve developer docs for storage APIs." into oc-dev am: 05b52d8ba5
am: f96c9a0fa2

Change-Id: Ifef4156412f88e1d7bc3d8bbccaca6d0177c7245
2017-06-13 00:35:13 +00:00
Jeff Sharkey
f96c9a0fa2 Merge "Improve developer docs for storage APIs." into oc-dev
am: 05b52d8ba5

Change-Id: I36dbac981e7a11819bd120c604f491eca11018a4
2017-06-12 22:45:22 +00:00
Jeff Sharkey
83559ba8d5 Merge "Hide APIs not intended to ship in DR." into oc-dr1-dev am: 3d4c62de10
am: dd96cfc4ef

Change-Id: I02eab4f04913de48c182176da6559fb14559f459
2017-06-12 22:09:16 +00:00
Jeff Sharkey
b31afd2273 Improve developer docs for storage APIs.
No code changes; only docs.

Test: builds
Bug: 38508833, 37987197, 37978296
Change-Id: Idfeb680480b2f818d18f787cbf20ceab896763a2
2017-06-12 20:19:53 +00:00
Jeff Sharkey
0c28d43fe1 Hide APIs not intended to ship in DR.
This CL will be reverted once it merges into the next release branch
to re-introduce the proposed APIs.

This CL also makes the following code changes to preserve API
compatibility:

-- It keeps the recently added RemoteViews.clone() synchronized logic
intact, but moves it inside the method to avoid changing the API
signature.

-- It reverts the RttCall.read() behavior to the oc-dev logic, since
we can't throw IOException until we get an API level bump.  (The
original logic returned null instead of throwing.)

Test: builds, boots
Bug: 62427252, 62431886, 62427329
Bug: 62468911, 62431162, 62428935, 62429096
Bug: 37290820, 37359238, 36886243
Bug: 30143923, 35761231, 62192626, 29829689
Change-Id: I83d723f598cb0ee1fe198e65debd86ef7fd0420c
2017-06-12 10:26:01 -06:00
Makoto Onuki
2d0785b97d Merge "Whitelist ACTION_QUICK_CONTACT from StrictMode.onFileUriExposed" 2017-06-09 23:10:34 +00:00
Makoto Onuki
7d1911f264 Whitelist ACTION_QUICK_CONTACT from StrictMode.onFileUriExposed
Bug 38428650
Test: Manual test on an eng build + logcat + contacts app

Change-Id: I1b6c99b8f42443511baddd8574955a17342b2ac9
2017-06-09 14:22:06 -07:00
Jeff Sharkey
42e26f0c2d Merge "Omit icons from bulk SessionInfo calls." into oc-dr1-dev am: c017d299ce
am: 00c66f676f

Change-Id: I200f39ef3dd3c336abd48e53a9b93e21f48a7dc0
2017-06-09 20:37:38 +00:00
Garry Boyer
ee3cced4e0 Merge "Enables child APKs, fixes a package parsing bug, and adds tests." 2017-06-09 20:25:49 +00:00
Jeff Sharkey
c017d299ce Merge "Omit icons from bulk SessionInfo calls." into oc-dr1-dev 2017-06-09 20:23:23 +00:00
Adam Lesinski
8573162324 Merge "Revert "always adjust per-user application info"" into oc-dev
am: 887544e100

Change-Id: I944c449954876353c7e597fca19ac5fe00e62906
2017-06-08 21:22:21 +00:00
Adam Lesinski
adca091fcd Merge "Revert "always adjust per-user application info"" into oc-dev
am: 887544e100

Change-Id: I440be882264d8687d7b5e3de036e54bf91386d6d
2017-06-08 21:20:03 +00:00
Adam Lesinski
887544e100 Merge "Revert "always adjust per-user application info"" into oc-dev 2017-06-08 21:14:09 +00:00
Adam Lesinski
157be6ead8 Revert "always adjust per-user application info"
This reverts commit e0046cecb0.

Reason for revert: Regresses UI theme

Bug: 62445682
Bug: 36561125
Change-Id: I9b60bd8e4eb89129368d38e83c0036ab459a524e
2017-06-08 21:10:52 +00:00
Jeff Sharkey
da1247a076 Omit icons from bulk SessionInfo calls.
Calls that return List<SessionInfo> can end up returning hundreds of
sessions, each of which include a "Bitmap appIcon" object.  Since we
quickly smash the entire list through a ParceledListSlice, we risk
exhausting FDs for all the ashmem regions.

To mitigate this, we omit these icons from the bulk calls, and then
fetch individual icons on-demand when explicitly requested.

Test: create 2k sessions and verify system doesn't croak
Bug: 38021844
Change-Id: I932073defe5b9b34a636818a69009d49060215fb
2017-06-08 14:13:31 -06:00
Todd Kennedy
de066fd249 Merge "Passing callingUid to internal methods" into oc-dev
am: dacdf2e978

Change-Id: Ie6e85346f63f4b06e693e6a6ac0c73b2ec3b9639
2017-06-08 05:50:03 +00:00
Todd Kennedy
ddb322a000 Merge "Passing callingUid to internal methods" into oc-dev
am: dacdf2e978

Change-Id: I11bcd48eb91c1f877a27f1cb06d6269aef76d3d2
2017-06-08 01:05:25 +00:00
TreeHugger Robot
dacdf2e978 Merge "Passing callingUid to internal methods" into oc-dev 2017-06-08 01:00:52 +00:00
Bryce Lee
cf8cfc4412 Merge "Revert "Coordinate configuration changes and window frame size."" into oc-dev
am: f867733d4f

Change-Id: I7436b4e82365c2d83c1f38a856324e8e309920aa
2017-06-07 23:33:43 +00:00
Bryce Lee
50caf4af60 Merge "Revert "Coordinate configuration changes and window frame size."" into oc-dev
am: f867733d4f

Change-Id: Icaff526ff266e449eefdc6f471c37d94290662b6
2017-06-07 23:31:48 +00:00
Bryce Lee
f867733d4f Merge "Revert "Coordinate configuration changes and window frame size."" into oc-dev 2017-06-07 23:23:30 +00:00
Bryce Lee
46b01655b3 Revert "Coordinate configuration changes and window frame size."
This reverts commit afb45bba83.

Bug: 32839232
Fixes: 62424393
Change-Id: Ifaa0176e18100ec85b8c81268a26fb16ffe9b5f3
2017-06-07 23:03:09 +00:00
Todd Kennedy
18211fd8f6 Passing callingUid to internal methods
Sometimes callers want to clear the calling identity [to avoid permission
calls]. In this case, allow passing the original calling identity to
internal methods.

Test: Manual; create profile account and observe launcher still works cross profile
Test: bit FrameworksServicesTests:com.android.server.pm.ShortcutManagerTest{1..10}
Change-Id: I73f8ad4b2dc1895227c3fcb14f3f1f18f600562f
Fixes: 38349978
2017-06-07 15:53:21 -07:00
Todd Kennedy
dcbfba2a45 Merge "always adjust per-user application info" into oc-dev
am: 91a9d65e42

Change-Id: I1c7af6ce2ef12fd445389325e98b84b552efae88
2017-06-07 18:52:27 +00:00
Todd Kennedy
1581bb0b75 Merge "always adjust per-user application info" into oc-dev
am: 91a9d65e42

Change-Id: Ief1ab206a0eb71c9225c000148d0f0b3264a526b
2017-06-07 18:50:33 +00:00
Todd Kennedy
91a9d65e42 Merge "always adjust per-user application info" into oc-dev 2017-06-07 18:42:13 +00:00
Garrett Boyer
5213666521 Enables child APKs, fixes a package parsing bug, and adds tests.
1. Enables child APKs by default. (This is primarily so the tests work, but I'm
open to other options.)

2. Fixes bug where child packages would steal their parent's components of the
same type of the parent.

(e.g. if the child has a service, it would steal all of the parent's services,
but only reproduced for more complicated manifests)

This changes the way component parse args are cached and reused. Previously
they were cached in a field and reset each time a new package was scanned.  But
with child APKs, a single manifest can have multiple packages.  Now, the
lifetime of the cache is limited to a single <application> element, and rather
than being a member field, it's passed explicitly as a parameter so its
lifetime can be explicitly controlled without the need to remember to null it.

3. Adds tests for the bug PackageParser

These tests just test the parsing component without doing full installation.
And once b/62385737 (failing tests) are fixed, we can add new
PackageManagerTests.

Change-Id: Iccd148b571af86daab48d7a9e28ab6d636b1ad00
Fixes: 62032885
Test: Tested a large app with a child package and the previous issue did not reproduce after this change.
2017-06-07 09:58:47 -07:00
Makoto Onuki
a6e0addc26 Merge "Refer to ShortcutManagerCompat in the javadoc" into oc-dev am: a9c185f6e7
am: a178d194f9

Change-Id: Iec712211a2c83798ae160560d1cca9ce23b7e577
2017-06-06 17:00:17 +00:00
Makoto Onuki
a178d194f9 Merge "Refer to ShortcutManagerCompat in the javadoc" into oc-dev
am: a9c185f6e7

Change-Id: If571669aaa81d085774c1bb9a0daa308f237978a
2017-06-06 16:44:59 +00:00
Makoto Onuki
a9c185f6e7 Merge "Refer to ShortcutManagerCompat in the javadoc" into oc-dev 2017-06-06 16:26:10 +00:00
Bryce Lee
906fdb24e6 Merge "Coordinate configuration changes and window frame size." into oc-dev am: 749cbb1911
am: 42e95f8b54

Change-Id: I6ecf592612f5c9d54c37ae9df9525b2f9e14826d
2017-06-06 16:10:17 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Todd Kennedy
e0046cecb0 always adjust per-user application info
Test: manual; it runs
Change-Id: I98db17ebe9ebe34a5affad44300a55ed68adb565
Fixes: 36561125
2017-06-06 07:51:10 -07:00
Bryce Lee
42e95f8b54 Merge "Coordinate configuration changes and window frame size." into oc-dev
am: 749cbb1911

Change-Id: I2a27d8b34967603b0621332651a31be025542c09
2017-06-06 14:38:58 +00:00
Bryce Lee
afb45bba83 Coordinate configuration changes and window frame size.
Previously, it was possible for the view hierarchy to be measured,
laid out, and drawn around a window frame size that did not match
the current configuration. This stems from new configurations not
always propagating back from WindowSession#relayout, which is
called from ViewRootImpl.

This changelist makes WindowManagerService#relayoutWindow always
return the latest configuration. It also adds rotation to the
configuration.

Fixes: 32839232
Test: go/wm-smoke
Test: Open Camera while rotating phone to landscape. Added
      temporary logs to detect inconsistencies between measurements
      and reported rotation on draw.
Change-Id: I39daca338b4f87eff1a509eb99493f01e710ced1
2017-06-05 20:55:46 -07:00
Jeff Sharkey
7a2e4a8486 Merge "Annotate @SystemApi with required permissions." into oc-dev
am: c1406978a4

Change-Id: I305967cad945a807c3f8234efabaad0ef8b591d1
2017-06-05 22:28:21 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Makoto Onuki
9aeff8abcc Refer to ShortcutManagerCompat in the javadoc
Bug: 62193112
Test: m offline-sdk-docs and manually checking the result
Change-Id: I5f608f9b22dec595a0e14026a9f4aaf7898bfdba
2017-05-31 09:58:47 -07:00
Jeff Sharkey
b562e53950 Merge commit '06951ac74d9e74b29037b0a5d8e3b9ad85983b5b' into mergeit
am: 3c3d9d8158

Change-Id: Ia4c7f1792c9b6e8e72b4ffe742249b02b82d0817
2017-05-31 14:54:24 +00:00
Jeff Sharkey
3c3d9d8158 Merge commit '06951ac74d9e74b29037b0a5d8e3b9ad85983b5b' into mergeit
Change-Id: Ifa69c7bb53de94312e2b32607fa098c194a4c72c
2017-05-31 08:43:51 -06:00
Jeff Sharkey
ddff807b76 Consistent "low storage" behavior.
When answering the question "how much space is free", use the same
logic for Settings UI and StorageManager.getAllocatableBytes().  That
is, the reported free space is usable bytes plus any cached data the
system is willing to delete automatically.

This does *not* include any reserved cache space, since we don't want
abusive apps to penalize other well-behaved apps that are storing
their data in cache locations.  Callers freeing cached data need to
now explicitly request defiance of the reserved cache space.  (Most
callers are already doing this by using FLAG_ALLOCATE_AGGRESSIVE.)

Rewrite the core logic of DeviceStorageMonitorService to understand
this new "reserved" cache space, and to be easier to understand.  It
also now handles cached data on adopted storage volumes, which had
been ignored until now.  Also fix bug where we had skipped "low"
broadcasts when the device skipped directly from/to "full" state.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Icbdcf3b52775f7ada1ceaeff2f96094c8d8052f9
2017-05-30 22:17:23 -06:00
Christopher Tate
fe2368c38c Refresh in-memory SharedPreferences instances after restore
Existing instances don't know that the file has changed out from
under them, so they continue to return stale values from reads, and
risk overwriting restored data with stale content if writes are
performed.  We now tell the backing cache system to induce a
reload after restore (i.e. after we might have written a relevant
file out from under it).

Along the way we shook out an irregularity in the way we were
setting up the context topology of non-lifecycle instances of
the metadata-handling BackupAgent subclass, so that's fixed
now too.

Bug 12061817
Test: cts-tradefed run cts -m CtsBackupHostTestCases

Change-Id: I401fe9297235b55d8a8f041e430d122dc6e24129
2017-05-30 12:41:39 -07:00
Adam Lesinski
6ea208d059 Merge "Add ResourceId validation helper method" into oc-dev am: 24c18af14a
am: 01b95f9067

Change-Id: I7097af67601496f56741a5f5e43f953ba8134ce0
2017-05-26 19:01:00 +00:00
Adam Lesinski
01b95f9067 Merge "Add ResourceId validation helper method" into oc-dev
am: 24c18af14a

Change-Id: I18dc41c220d3cd91c8ce78d93de860064c5f2294
2017-05-26 18:55:15 +00:00
Adam Lesinski
24c18af14a Merge "Add ResourceId validation helper method" into oc-dev 2017-05-26 18:45:28 +00:00
Tenghui Zhu
912684514a Merge "Create a new drawable after caching the DrawableContainer" into oc-dev am: 36d6a985cd
am: 246bf5cb9b

Change-Id: I0ef7196cdb87d40be15adff868ca4fcc17addd60
2017-05-26 16:32:10 +00:00
Tenghui Zhu
246bf5cb9b Merge "Create a new drawable after caching the DrawableContainer" into oc-dev
am: 36d6a985cd

Change-Id: I53422934c6bf84033fdfff94c5eda79275e91b3a
2017-05-26 16:22:09 +00:00
Tenghui Zhu
36d6a985cd Merge "Create a new drawable after caching the DrawableContainer" into oc-dev 2017-05-26 16:10:25 +00:00
Nicolas Geoffray
4414db2da2 Merge "resolve merge conflicts of 255b69aca0 to oc-dev-plus-aosp" into oc-dev-plus-aosp
am: b118505ef0

Change-Id: I6e9963188b487de4e76dc0d17d56b53050fd3745
2017-05-26 10:20:39 +00:00