237287 Commits

Author SHA1 Message Date
Sudheer Shanka
ad143c09df Revert "Temporary changes to fix crashes during tests."
This reverts commit 1c15e01f6dc57cbd8dbfb45f60c625703309c4a5.

Change-Id: I9ea2f26c9d95b5429c98a0785b1797bea2e3f945
2016-03-31 00:24:05 +00:00
Jeff Sharkey
f584f12b6b Fix DownloadManager tests.
ERROR_CANNOT_RESUME is the correct code for one, and relative paths
are supported by the RFC, so change the test to check for success.

Bug: 27580939
Change-Id: Ife99c22a44dd71232466e35d38a2441c16a558f7
2016-03-30 18:22:22 -06:00
Philip P. Moltmann
9dcb86a48d Add the print service recommendation service
This service connects through the print manager to the print spooler:

PrintSpooler.AddPrintersActivity <-> PrintManager <-> PrintManagerService <-> UserState <-> RemotePrintServiceRecommendationService <-> PrintRecommendationService <-> PrintRecommendationServiceImpl

Hence there is a lot of mindless plumming.

The actual changes are only in the AddPrintersActivity which is extended
to show another list of services: The recommended services.

The PrintServiceRecommendationService is based on the experimenal print
service stubs provider. This provider was contributed the Android by
Mopria. As this services uses Android own network discovery service most
code from the experimental provider goes away. In fact the only logic
left over is the selections of mdns-txt fields to look at and the
printer vendor configuration.

This relies on the Android MDNS to get fixed (Bug: 27696905). This also
does not deal with how to update the recommendation service.

Bug: 24533249
Change-Id: I6edc6e25fc08a50d478b61c71bb8ea158b08624c
2016-03-30 17:21:07 -07:00
Siyamed Sinir
70f660f2d6 Reset FontMetrics at each new measurement in BoringLayout
Reset FontMetrics object used in BoringLayout.isBoring to get updated
and correct FontMetrics as a result of measurement.

Bug: 26704088
Change-Id: If77b0edba8dc4b5b1738a802c5f49e112e47b4f2
2016-03-30 17:17:05 -07:00
Sudheer Shanka
549b969280 Return null value if getActiveAdminUncheckedLocked returns null.
- Split per user version of getUserRestrictions into a separate method
  in DPMS and make the per-user version return null if the admin
  parameter is not a valid one.
- Update isAccessibilityServicePermittedByAdmin and
  isInputMethodPermittedByAdmin to return false if the admin parameter
  is not a valid one.

Bug: 27909087
Change-Id: I6f4cae6552cbfe02dc4a92b04eeeddf0314e0974
2016-03-30 17:12:07 -07:00
Jean-Michel Trivi
4e9b8d4fe4 Merge "Fix audio focus logging" into nyc-dev 2016-03-31 00:10:26 +00:00
Siyamed Sinir
545c3cf95f Benchmarks for Linkify
Add benchmarks for Linkify and URL regular expressions.

Bug: 27921706
Change-Id: I61dcd090bdf877f2df77e898c8a0f441de1dc45a
2016-03-30 17:02:02 -07:00
Joe Onorato
05c9ecc08a Include process state in association tracking
Bug: 26165863
Change-Id: Ic1f3237d85dd9f9b55a412bc8609e60e6c2f3fd2
2016-03-30 16:55:25 -07:00
Adrian Roos
c0a579e575 Add option to force remote input history
Bug: 27851227
Change-Id: Iced5d24d6cc0894ce7c7e9565722d0ef016a50a5
2016-03-30 16:46:34 -07:00
Sergei Vasilinetc
394d3dfb2d Merge "Hide children in ViewGroup.createSnaphost via internal flag and add test for it." into nyc-dev 2016-03-30 23:42:34 +00:00
Felipe Leme
2ac876945b Minor tweaks on Scoped Directory Access:
- Only allow entire directory access on non-primary volumes.
- Do not display primary storage label on scoped access.

BUG: 27743842
BUG: 27676858
Change-Id: I9884fb1e2df3534fceebc5d5bef44adfb758724c
2016-03-30 16:42:10 -07:00
Adam Lesinski
30cadc2529 Merge "AAPT2: Suppress warnings from libandroidfw when built for host" into nyc-dev 2016-03-30 23:29:57 +00:00
Adam Lesinski
1d7172e598 AAPT2: Suppress warnings from libandroidfw when built for host
Certain error cases are expected (like not finding a package) when
using libandroidfw on the host side for AAPT2. Suppress those warnings
and let AAPT2 handle error cases.

Change-Id: I3de97128686c03c89c5b99559bf46d4f2f1dfe4d
2016-03-30 16:22:33 -07:00
Jeff Sharkey
7732e1e544 Fix RootsCache invalidation bugs.
When RootsCache is still running and it detects a provider/package
change, it needs to force reload roots.  Also fix cache invalidation
bug in ContentService to allow for Uri prefix matches.

Mark internal storage broadcasts with flag to bypass new background
checks.

Bug: 27759529
Change-Id: I9d9c6fe15d8640ff56ae7214afb3bac673682c28
2016-03-30 17:14:25 -06:00
Dianne Hackborn
e015cd4de7 Merge "Fix issue #27920133: Need to ensure activity starts in idle maintenance" into nyc-dev 2016-03-30 23:13:12 +00:00
Evan Rosky
0418ea7a73 Merge "Make part of KeyguardSecurityContainer protected" into nyc-dev 2016-03-30 23:13:05 +00:00
Dongwon Kang
5557bef5e4 TIF: Add more class documentation on TvInputManager
Bug: 25726241
Change-Id: Ib3ff49f2d9f7a3bdcee4b97f89da193fe05d663c
2016-03-30 16:10:11 -07:00
Lorenzo Colitti
7d4ed2f5ab Merge "Avoid null app context in StaticApplicationContextServiceFetcher." into nyc-dev 2016-03-30 23:03:18 +00:00
Julia Reynolds
69fccd629b Merge "Check permission of package, not caller." into nyc-dev 2016-03-30 22:58:51 +00:00
Mihai Nita
4de75e9fa2 Ignore stopwords in the Arabic locale sort
Bug: 26277596
Change-Id: I7cf36d67313de8ee89d12b0289a15bccb9dd9ecc
2016-03-30 15:57:43 -07:00
Sunny Goyal
bc48d8c6a8 Chaning LauncherActivityInfo to return a density specific non-badged icon
Bug: 27877821
Change-Id: I57c39c197b2480d9620a1719ace076cc6c936652
2016-03-30 15:56:34 -07:00
George Mount
6bb61e25a2 Merge "Revert "Run cleanup before end actions of ViewPropertyAnimator."" into nyc-dev 2016-03-30 22:55:29 +00:00
Philip P. Moltmann
02add6aa91 Merge "Rewrite workflow on how the destination printer is selected." into nyc-dev 2016-03-30 22:42:49 +00:00
Felipe Leme
ea113376cc Merge "Data Saver Mode should automatically allow foreground services." into nyc-dev 2016-03-30 22:39:54 +00:00
Fyodor Kupolov
da466f7272 Merge "Fixed arguments order for addSharedAccountsFromParentUser" into nyc-dev 2016-03-30 22:34:49 +00:00
Adam Lesinski
d17f96ae00 Merge "Allow multiple Resources associated with an Activity" into nyc-dev 2016-03-30 22:33:30 +00:00
Rob Carr
a004ed7789 Merge "Update surface size even when preserving geometry." into nyc-dev 2016-03-30 22:32:39 +00:00
Felipe Leme
ef89c90978 Data Saver Mode should automatically allow foreground services.
BUG: 27324964

Change-Id: I8f09b9c9673f3ed697daca14902123a81ce41085
2016-03-30 15:30:40 -07:00
Felipe Leme
a6f98afbde Merge "Uses bw_happy_box and bw_penalty_box for Data Saver." into nyc-dev 2016-03-30 22:28:06 +00:00
Aga Wronska
3d6dc3a60a Merge "Add metrics for create directory and rename file operations" into nyc-dev 2016-03-30 22:04:24 +00:00
Dianne Hackborn
945c9c9f8f Fix issue #27920133: Need to ensure activity starts in idle maintenance
We now hold a wake lock while going in to idle maintenance, since
we really want to make sure everyone has a chance to respond.  And
since we are doing that, we can move to just using a delayed message
to make sure we don't leave maintenance until the time expires, getting
rid of the separate timeout alarm.

Also improve the initial transition to light idle mode so that if
we currently have work going on, we will wait for up to 15 minutes
more before actually going idle and forcing it to stop.

Change-Id: I6045da57ab4165f80a651126e99371c029ced23d
2016-03-30 14:59:22 -07:00
Mitchell Wills
612b4c588b Merge "Send WorkSource for scan requests so the origin can be overridden" into nyc-dev 2016-03-30 21:58:44 +00:00
Yohei Yukawa
f6f0f5fbe9 Merge "Add IC#closeConnection()." into nyc-dev 2016-03-30 21:55:31 +00:00
Felipe Leme
70c57c2810 Uses bw_happy_box and bw_penalty_box for Data Saver.
bw_penalty_box is a blacklist-based firewall chain used to determine
which UIDs do not have access to metered interfaces. It can be used
alone or with bw_happy_box, which is a whitelist-based chain: when
bw_happy_box is enabled, it's included in the bw_penalty_box chain.

Currently, NMPS and NMS uses just bw_penalty_box for both blacklist and
whitelist, so when Data Saver is turned on, it has to build a extensive
list of UIDs to be blacklisted, which can take seconds (since it makes
dozens of iptables, and which forks an iptables process)

This CL changes this behavior so it uses both chain (plus a new
bw_data_saver chain, which is added to the end of bw_happy_box), in
which case the Data Saver switch is much faster (around 120-160ms),
since it requires just 1 or 2 iptables calls (one to switch the
bw_data_saver rule, and another to whitelist the foreground app if it's
not whitelisted yet).

BUG: 27127112
BUG: 26685616

Change-Id: If10222aef9f49a924b07b978d4bdccdd92f9acdb
2016-03-30 14:54:58 -07:00
Tyler Gunn
5bbeea0883 Add carrier config option to determine if "wifi-only" is supported.
By default we set this to "true", however it is anticipated in the future
that some carrier may desire to not allow the wifi-only option, hence
this carrier config option.

Bug: 27858149
Change-Id: I55b09655a590a661780cd9ed89c1e1b0d87d54dc
2016-03-30 14:50:30 -07:00
Philip P. Moltmann
456f1e33b8 Merge "Update print preview when option is changed and clear ranges when they layout changes" into nyc-dev 2016-03-30 21:44:19 +00:00
Julia Reynolds
0867b3af69 Check permission of package, not caller.
Bug: 27923662
Change-Id: I86fd9ed2e8971bde216f53b6d1a5933e8188a425
2016-03-30 17:34:42 -04:00
George Mount
879a626f18 Revert "Run cleanup before end actions of ViewPropertyAnimator."
This reverts commit e9a4f878528976efb4ec6f3d7797bef44732b00e.

This revert is to test to see if the gralloc lock problems are caused by this CL.

Change-Id: I395fd3675dd430c44a5d29b050ba248f3f2bf4cd
2016-03-30 21:33:18 +00:00
Christopher Tate
edf7d04003 API review: WallpaperManager
- Rename FLAG_SET_* to simply FLAG_*
- Improve documentation

Bug 27365822

Change-Id: I10e85aeaa462a8ae092938c0ccd55d171f02c20a
2016-03-30 14:32:00 -07:00
Amith Yamasani
9dd2ad6e94 Merge "Fix deadlock during user state transitions" into nyc-dev 2016-03-30 21:28:58 +00:00
Adam Lesinski
7f3f499887 Allow multiple Resources associated with an Activity
Previously it was assumed that one Resources object per Activity would be fine.
This proved to be incorrect, as methods like Context#createConfigurationContext()
expect to create a new Resources object that gets updated whenever the Activity Resources
get updated.

To fix this issue, there exists a master override configuration for each Activity. Subsequent
Resources created for an Activity will be based off that master override configuration, and
will be updated accordingly.

Bug:27644297
Bug:27604953
Change-Id: Idb3d851f55ee7981eec4e3fe28e2ea8d55f1192d
2016-03-30 14:27:11 -07:00
Ruchi Kandoi
7ef20dd340 Revert "PowerManager: Hide the SUSTAINED_PERFORMANCE API."
This reverts commit 302710deaa02ad5fba5e39d9f0f652d3587b8b91.

Change-Id: I3e7e071838bae9460e126aac099b31f5213e3c6c
2016-03-30 14:23:58 -07:00
sergeyv
b37d44e267 Hide children in ViewGroup.createSnaphost via internal flag and add test for
it.

bug:27747923
Change-Id: I079b52b176b920bfa4c6749be31fbcd96a4dc42c
2016-03-30 14:20:09 -07:00
Joseph Pirozzo
43b5d980d8 Merge "PBAP client Settings profile." into nyc-dev 2016-03-30 21:00:54 +00:00
Tenghui Zhu
0ade7ff3c0 Merge "Add radio button as a bundle XML file in the manual test" into nyc-dev 2016-03-30 20:38:15 +00:00
Robert Carr
603248d909 Update surface size even when preserving geometry.
A recent change is causing some apps to request their
SurfaceView size before requesting visibility. We won't
apply this because of the View.GONE check in WMS. Once the app
becomes visible, it thinks the surface size hasn't changed
locally, so it appends PRESERVE_GEOMETRY to let the render thread
and reposition child control the layout size. Now we will never
set a requested width/height though and end up with 0. The line
to not update requested size while preferring geometry was
required when we were using SCALING_MODE_NO_SCALE_CROP, as
making the size smaller would apply immediately (with
the surface size acting as a reduced crop until we got a new
buffer), but now that we are using SCALING_MODE_FREEZE there
are no problems.

Bug: 27914300
Change-Id: Ic0997ab3950f3eac360260e9939b6f2ee6667453
2016-03-30 13:32:46 -07:00
Jason Monk
be8612de2c Fix QS animation visibility issue on lockscreen
Change-Id: I4ed417051b1efe23952b20a993830ba06f8faee7
Fixes: 27616176
2016-03-30 16:31:32 -04:00
Tenghui Zhu
620a84c76a Merge "LUTInterpolator needs to have 2 frame at minimal" into nyc-dev 2016-03-30 20:30:06 +00:00
Dongwon Kang
0632d8ae71 TIF: Address comments on hardware manager related system APIs
Bug: 25726241
Change-Id: I0a3e7e8cf494d897fc04528ba719faa4150b9207
2016-03-30 13:25:45 -07:00
Amith Yamasani
98c0556f40 Fix deadlock during user state transitions
performReceive() is called with the activity manager lock held.
Don't call out to other system services (such as user state
callbacks) with the lock held. Post a runnable to the handler
instead.

Bug: 27589217
Change-Id: I5c2f8debe1ae365682b27af65e0bf02bcce50d4a
2016-03-30 13:15:26 -07:00