Commit Graph

5588 Commits

Author SHA1 Message Date
Seigo Nonaka
ba12631bba Merge "Stop loading other package's font by default." into oc-dev
am: 824d75e0e1

Change-Id: I5518dbd8b5d8a4548ea00bbfca0e3aee87880ee7
2017-06-23 04:23:44 +00:00
Seigo Nonaka
80f6a985c3 Stop loading other package's font by default.
Since CONTEXT_RESTRICTED is not a default flag of createPackageContext,
we can't rely on it for preventing unexpected font injections.
To protect developers and existing apps from a risk of font injection,
stop loading font from other package's resouce unless the developer
explicitly set CONTEXT_IGNORE_SECURITY.

This CL contains Iac2a6fb3d82ef23d5ca6ee33f4aaa9ed28455271 by manual
merging to handle repository split.

Bug: 62813533
Bug: 62879353
Test: Manually done
Merged-In: I4442ddc48dadb5c968b444be86038b602074d301
Change-Id: I4442ddc48dadb5c968b444be86038b602074d301
2017-06-22 19:07:17 -07:00
Svetoslav Ganov
d46d0386e2 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev
am: 324c41ba89

Change-Id: Ia774a4f3bd1af7c334b2844f87fa8850de48f2f7
2017-06-21 01:19:42 +00:00
Svetoslav Ganov
324c41ba89 Merge "[DO NOT MERGE] Support native shared libs" into oc-dev 2017-06-21 01:06:22 +00:00
Svet Ganov
f8579581c1 [DO NOT MERGE] Support native shared libs
Add the shared libs that are APKs to the native library
path when creating application class loaders. Also don't
allow shared libraries hosting native libs to request
extraction of the native libs out of the APK. Lastly,
shared libraries hosting native libs must be declared
as multi-architecture.

Test: CTS tests in this topic

bug:62720360

Change-Id: I0a398593ebe41b2976cb706ca8a388005f5aec83
2017-06-20 12:12:34 -07:00
Phil Weaver
8b2816faa3 Merge "Separate a11y and autofill view ids" into oc-dev
am: c91290a6e9

Change-Id: Ib4566c2f0e32477d5f9eb6510edc140c2b66e0a4
2017-06-17 00:56:19 +00:00
Phil Weaver
846cda9397 Separate a11y and autofill view ids
Autofill seems to need IDs to be preserved across things
like configuration changes, while accessibility will not
function without views with unique ids. Separating out the
two types of IDs. We can re-combine them once it's clear
that both demands can be satisfied.

Bug: 62301218
Test: Run a11y and autofill CTS, and verify that the play
store app functions with TalkBack after a screen rotation.

Change-Id: I17a99de2874768fc0ade3aa354130dd1f6b4cd7e
2017-06-16 14:36:36 -07:00
Todd Kennedy
80b761b6db Merge "Save overlay paths as user state" into oc-dev
am: 508a5bade6

Change-Id: Icba76fbeef9f4cd2a067fafd65c750f1f95a4ed0
2017-06-13 22:39:56 +00:00
Todd Kennedy
b274947dfb Save overlay paths as user state
Instead of maintaining a separate structure just for overlay
paths, store them as user state in the package setting. Also
centralize updating the overlay paths to avoid issues with
inconsistent updates.

Fixes: 36561125
Test: Manual
Change-Id: Iac1c987e8650074dbc564e332d5da1950fad6ac5
2017-06-13 12:05:44 -07: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
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
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
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
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
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
91a9d65e42 Merge "always adjust per-user application info" into oc-dev 2017-06-07 18:42:13 +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
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
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
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
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
7e1a273708 resolve merge conflicts of 255b69aca0 to oc-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I9caf7542f11b0b322da063a5a08140384eba0ce0
2017-05-26 11:03:19 +01:00
Nicolas Geoffray
3b4359a06c Pass bootComplete to dexopt.
bug: 37165062
Test: After OTA, check bootComplete=false on package updates
Change-Id: I6fc00216020bb16d8ed4f6e839b5e1df0e942700
2017-05-25 13:56:00 +01:00
Adam Lesinski
9553fb3240 Add ResourceId validation helper method
An invalid, 'null' resource ID is defined as 0. Apps often use -1.

Add a helper method that makes checking valid IDs easy and more
centralized.

Eventually make it public API.

Bug: 38393777
Test: manual
Change-Id: I969ec4a45e86bdab3d7f57d357d475b77c7f8a78
2017-05-24 15:39:23 -07:00
Todd Kennedy
4cdc26746e Merge "System installed launcher can see instant apps" into oc-dev
am: 1de10d6602

Change-Id: I70d707c25ed793bd2ad8e58f3558d2a4d0b6e980
2017-05-24 20:49:59 +00:00
TreeHugger Robot
1de10d6602 Merge "System installed launcher can see instant apps" into oc-dev 2017-05-24 20:38:56 +00:00
Todd Kennedy
3051caac52 System installed launcher can see instant apps
Change-Id: I97f791b61f9b4f7ed33305345bf3d92394b40ae4
Fixes: 38202759
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Test: Manual. Create sample app that replaces the launcher to test ability to see ephemeral apps.
2017-05-24 07:34:55 -07:00
Adam Lesinski
006a6fa850 Merge "Resources: fix race with creating theme" into oc-dev
am: 5f70bc89be

Change-Id: I73bb76a7ff3fe6d3e0a974b5cbaed34c632ee8ae
2017-05-23 23:19:26 +00:00
Adam Lesinski
4fed971437 Resources: fix race with creating theme
Bug: 38353957
Test: none
Change-Id: Id78770b475b979635da6a4067db6269e3a1b04d6
2017-05-23 13:14:54 -07:00
Dianne Hackborn
7fdeb9ff3f Merge "Fix issue #38393543: Not allowed to start service Intent" into oc-dev
am: ad6dde65ff

Change-Id: Ife26f513fa6d04771148a3965171822874854828
2017-05-22 20:09:29 +00:00
Dianne Hackborn
ad6dde65ff Merge "Fix issue #38393543: Not allowed to start service Intent" into oc-dev 2017-05-22 20:03:33 +00:00
Dianne Hackborn
3e6e3855ea Fix issue #38393543: Not allowed to start service Intent
Turns out there was another path in to the activity manager
to trigger a PendingIntent, which needs to be modified to
now also pass in the whitelist token of that pending intent.

Test: manual
Change-Id: I755ff87db1b782fa6974d404dcb490786053c5e0
2017-05-19 16:12:08 -07:00
ztenghui
ee7e8f13ea Create a new drawable after caching the DrawableContainer
fix:37135264

Test: Add new CTS test
bit
CtsGraphicsTestCases:android.graphics.drawable.cts.DrawableContainerStateTest,
CtsGraphicsTestCases:android.graphics.drawable.cts.DrawableContainerTest,
CtsGraphicsTestCases:android.graphics.drawable.cts.Drawable_ConstantStateTest

Change-Id: I8bb868d16a944f746ec41d3e37ae4215b964d949
2017-05-19 12:29:14 -07:00
Seigo Nonaka
99c587a9b1 Merge "Introduce early exit path for non resource path." into oc-dev
am: 01d5b3d2af

Change-Id: I07120a86307dd397862e0d341763d0048b066845
2017-05-18 23:39:41 +00:00
TreeHugger Robot
01d5b3d2af Merge "Introduce early exit path for non resource path." into oc-dev 2017-05-18 23:30:24 +00:00