Commit Graph

73910 Commits

Author SHA1 Message Date
Neil Fuller
70ddf0932b Merge "Add a new constant to TimeZoneRulesDataContract" into oc-mr1-dev 2017-08-01 10:06:16 +00:00
TreeHugger Robot
4f48862d0f Merge "NsdManager: remove duplicated argument validation" into oc-mr1-dev 2017-08-01 05:17:52 +00:00
Hugo Benichi
4aa743c343 NsdManager: remove duplicated argument validation
This patch simplifies argument validation in NsdManager public api and
regroup duplicated validation into common methods.

This makes stack traces more actionable as now specific errors will
cause the api to throw exception from specific methods, whereas before
IllegalArgumentException would be thrown from inside the same api method
for different reasons.

This patch also includes a couple of other small cleanups.

Test: $ runtest -x frameworks/base/tests/net/../NsdManagerTest.java
Bug: 35362108
Bug: 37013369
Bug: 62044295
Bug: 63826516
Merged-In: Iaad13e13976e9bf8f508d7188f823f8184ac414b

(cherry pick from commit ff3e6ccca1)

Change-Id: I5e6a1ecc6b98069ef0089bbceecf73f7692df227
2017-08-01 02:45:23 +00:00
TreeHugger Robot
0b8f281637 Merge "Add documentation on oneway transaction ordering." into oc-mr1-dev 2017-08-01 02:21:21 +00:00
TreeHugger Robot
d04d64c133 Merge "Persisted jobs versus incorrect boot-time RTC" into oc-mr1-dev 2017-08-01 01:50:06 +00:00
TreeHugger Robot
2729912a35 Merge "List column names in the error message" into oc-mr1-dev 2017-08-01 00:36:49 +00:00
Dianne Hackborn
6f12f2233e Add documentation on oneway transaction ordering.
Test: built
Change-Id: I4d2e336327a4ce9c8f76d49037c894e981bdf571
2017-07-31 17:02:51 -07:00
Fyodor Kupolov
82f289a4b4 Merge "Added setIdleConnectionTimeout method" into oc-mr1-dev 2017-07-31 23:56:02 +00:00
Christopher Tate
616541d701 Persisted jobs versus incorrect boot-time RTC
Devices routinely boot in a state where the RTC is wildly incorrect
in the past (2009, 1999, or even at Unix epoch zero).  When we have
persistent jobs to be scheduled at boot, this presents a problem: when
should those jobs run, given that our idea of "now" is incorrect?

The previous implementation fell back to rescheduling these jobs
"from scratch" in this situation, as though they were newly-introduced,
but this turns out to have some emergent pathologies when the jobs
were intended to become runnable after long initial delays: the
rescheduling behavior could wind up starving jobs out entirely,
never running them regardless of how much real uptime the device
had, given the "wrong" pattern of reboots.

We now preserve the original nominal schedule, but recognize when we
have booted in a pathological situation, and correct the schedule for
these jobs when the system clock becomes sensible.

Bug 63817592
Test: JobScheduler test suite plus manual bogus-boot-time repro

Change-Id: Ia36fc5298b68db74e4e07e973b68e68e66206b43
2017-07-31 16:26:01 -07:00
Eino-Ville Talvala
102e9a7e3b Merge "Camera2: Release input surface on capture session close" into oc-dr1-dev
am: 06802167e5

Change-Id: Iedafc28d1a63b708b1992e4ef3570069c59d087a
2017-07-31 22:30:01 +00:00
Eino-Ville Talvala
06802167e5 Merge "Camera2: Release input surface on capture session close" into oc-dr1-dev 2017-07-31 22:21:40 +00:00
Adam Lesinski
80454c2c88 Merge "Remove extraneous invalidate call that unregisters AssetManagers" into oc-dr1-dev
am: defdb1fd70

Change-Id: I6878ca92b2bd8b2e9569147dde007ae657adc87c
2017-07-31 22:17:27 +00:00
Adam Lesinski
defdb1fd70 Merge "Remove extraneous invalidate call that unregisters AssetManagers" into oc-dr1-dev 2017-07-31 22:08:30 +00:00
Bryce Lee
69aac0a7b6 Merge "Do not call onConfigurationChanged for appBound position changes." into oc-dr1-dev
am: 33d4702a12

Change-Id: Id6748aab9ee83844303324ea397d4ac699fb5839
2017-07-31 18:45:19 +00:00
TreeHugger Robot
06ba486a74 Merge "Stop font loading with restricted context." into oc-mr1-dev 2017-07-31 18:23:04 +00:00
Fyodor Kupolov
cf97b6b7f7 Added setIdleConnectionTimeout method
It allows apps to set time SQLite connection is allowed to be idle
before it is closed and removed from the pool.

Test: manual + DatabaseGeneralTest
Bug: 63398887
Change-Id: Ie09eeb4dc2b9e52ba67d9355b1f9bd869b148613
2017-07-31 11:05:57 -07:00
TreeHugger Robot
bb77e6c689 Merge "Reduce duplicate strings due to the package cache." into oc-mr1-dev 2017-07-31 17:52:41 +00:00
Neil Fuller
af4cfc5c81 Add a new constant to TimeZoneRulesDataContract
This enables time zone data app code (provided by Google)
to check the manifest (provided by the OEM) uses the right permission
without referencing internal manifest permission Strings directly.

Bug: 64139059
Test: Ran internal xTS tests
Change-Id: I4b1a8608beff3b5218ecf5162cfe8e31027e2007
(cherry picked from commit 8e2a85752b)
2017-07-31 18:20:05 +01:00
Eino-Ville Talvala
3b594bfe33 Camera2: Release input surface on capture session close
Per the documentation, the input surface of a reprocessable capture
session should be abandoned on the close of a session.

Actually implement this, to avoid unintentional leaks of buffers.

Test: Camera CTS passes
Bug: 38313948
Change-Id: Ia45c39ea925288a5082d6e722ff4b40c55971a37
2017-07-31 10:09:59 -07:00
Bryce Lee
658d984f04 Do not call onConfigurationChanged for appBound position changes.
Since appBounds encodes both dimensions and positions, movement will
cause a diff change. This happens in situations where the dimensions
stay constant, such as dragging a PiP window around.

To avoid flooding the client side with configuration changes, this CL
checks whether the new configuration is equivalent to the existing
configuration with the exception of the position of the appBounds
before sending to the registered callbacks.

Change-Id: I8fbc94458fd9ed3b39494c3587f25e704ec02a7d
Fixes: 63927944
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke
2017-07-31 08:46:00 -07:00
Selim Gurun
a30ec5ff4c Merge "Update documentation for Whitelist API" into oc-mr1-dev 2017-07-31 14:27:52 +00:00
Yohei Yukawa
7a1ad6d97c Remove a compat hack SurfaceView#setWindowType()
This CL logically reverts a compatibility hack I introduced [1] for
apps that had relied on @hide method SurfaceView#setWindowType(int).

 [1]: I5217f6417a73690ae8a978754218b7b089070fdd
      3b5011afc9

Fixes: 62054282
Test: Manually verified that Bug 36345857 is still not reproducible
Change-Id: Icee198c554de558cfa4ffe0b264064969839654e
2017-07-30 20:54:08 -07:00
TreeHugger Robot
2c131cafae Merge "Migrate plans to @SystemApi, evolve permissions." into oc-mr1-dev 2017-07-30 00:09:04 +00:00
Vinay Kalia
7d06d7bd79 Merge "Fix BLE scan leaks" into oc-dr1-dev
am: 604a4b7171

Change-Id: I9e3f7a0d3b871e5c5e2a740ec69eacaa2cbc41e2
2017-07-29 22:17:03 +00:00
TreeHugger Robot
604a4b7171 Merge "Fix BLE scan leaks" into oc-dr1-dev 2017-07-29 22:08:36 +00:00
Hugo Benichi
6992f4edb3 Merge "Logging improvements when NetworkCapabilities change" into oc-dr1-dev
am: 6e269ec6fe

Change-Id: I4f6cbc0adb461cef6610460daeba72ca38b8f10c
2017-07-28 23:54:03 +00:00
Hugo Benichi
6e269ec6fe Merge "Logging improvements when NetworkCapabilities change" into oc-dr1-dev 2017-07-28 23:42:59 +00:00
Vinay Kalia
9722971cb4 Fix BLE scan leaks
If an app starts multiple scans with same callback then
there is a collision in mLeScanClients hash map which
results in leaking first scan. This change fixes it by
not allowing the second scan with same callback.

BUG: 62389939
BUG: 38198694

Test: Tested applications which started multiple scans with
       same callback.

Change-Id: I569069a40b6f8b4b8bb070731225e732c6b23ec8
2017-07-28 23:39:15 +00:00
Adam Lesinski
662153740d Remove extraneous invalidate call that unregisters AssetManagers
We are already taking care of updating AssetManagers affected by
path changes to a running app's ApplicationInfo. There is no need
to invalidate ALL AssetManagers, thereby unregistering them
from ResourcesManager and preventing configuration changes from
reaching them.

Bug: 64004601
Test: manual
Change-Id: I39311ec9b1dfd34eb7025836f75c92e0516bc36b
2017-07-28 16:33:11 -07:00
Jeff Sharkey
b7479988d2 Migrate plans to @SystemApi, evolve permissions.
We're not yet ready to commit to SubscriptionPlan as public API, so
relax to be @SystemApi instead.  Add a new MANAGE_SUBSCRIPTION_PLANS
permission that we require apps to hold, unless they've been
delegated access via a trusted CarrierService.

Since several apps have the ability to provide plans for a single
subId, we now remember the "owner" who set the current plan
information, and we refuse to leak plan information beyond the app
that originally set it.

Relax permissions check to not require READ_PHONE_STATE, since we're
only returning data that an app provided to us earlier.  Also fix
NPE when SubscriptionInfo is missing.

Test: bit FrameworksServicesTests:com.android.server.NetworkPolicyManagerServiceTest
Bug: 63997177, 63928277, 64156138, 63903381
Change-Id: If503378ef406dcaec438c9b41e837e0a821a3ef4
2017-07-28 16:59:14 -06:00
Fyodor Kupolov
848485bb1c List column names in the error message
Otherwise it's not clear what is causing the issue (e.g. no columns,
case sensitivity issue or a table prefix etc.)

Bug: 62431773
Test: manual
Change-Id: I81d1f420b70a2248a9b132147cda72c2417dc46b
2017-07-28 15:46:17 -07:00
Makoto Onuki
e86a29c6e6 Reduce duplicate strings due to the package cache.
The following charts are the actual measurement with and without the fix,
using "dumpsys system".
- The red bar is "total private dirty".
- The X axsis is time since boot.

Without fix:
- First boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=0
Private dirty stabilizes at ~16.8M.

- Second boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=1918404197
Private dirty stabilizes at ~17.8M.

With fix:
- First boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=791764875
Private dirty stabilizes at ~17.0M.

- Second boot:
https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=1820894299
Private dirty stabilizes at ~17.0M.

Test: build, boot, reboot, adb-install, reboot
bit FrameworksCoreTests:android.content.pm.PackageParserTest

Bug: 64112468
Change-Id: I5ae9c1b2d021fe62526d4e0dd1a52a962b48206e
2017-07-28 15:09:13 -07:00
Sergey Vasilinets
3c9c422d33 Merge "Revert "Revert "Update overscroll and toast UI""" into oc-dr1-dev
am: 2cf8f91637

Change-Id: Ia0f4dc6193776e0b37eb7e2d2048918510cae535
2017-07-28 22:02:14 +00:00
Sergey Vasilinets
2cf8f91637 Merge "Revert "Revert "Update overscroll and toast UI""" into oc-dr1-dev 2017-07-28 21:46:43 +00:00
Bryce Lee
84fa183e7d Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev
am: 5b76ce1b2b

Change-Id: Ibf899e9a08cdab31ae38897add813fc4c8089474
2017-07-28 21:28:05 +00:00
Benjamin Miller
ae4b64ab41 Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev am: 91f16ace4f
am: 5934ae605a

Change-Id: Ia4c07afe64fd3a0a743790f1e1284bdc1db0f4c5
2017-07-28 21:15:41 +00:00
Selim Gurun
89e935904a Update documentation for Whitelist API
Bug: 64144913
Test: compile documentation and visually confirm

Change-Id: Ia19ca9b6cf4f8a0802835d597a30e10c498dbd81
2017-07-28 12:06:42 -07:00
Bryce Lee
5b76ce1b2b Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev 2017-07-28 17:57:09 +00:00
Benjamin Miller
5934ae605a Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev
am: 91f16ace4f

Change-Id: Id7d2c62577e0b534a7dd6605f722e7c5639e46b7
2017-07-28 17:30:18 +00:00
TreeHugger Robot
91f16ace4f Merge "Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting" into oc-dev 2017-07-28 17:11:28 +00:00
Svetoslav Ganov
899f54da72 Report permission flags for all protections based on SDK am: adb8c522a8
am: 436b901dbb

Change-Id: Ibe7cecd60242f1895434d586af30c2081d451f0b
2017-07-28 16:59:55 +00:00
Svetoslav Ganov
436b901dbb Report permission flags for all protections based on SDK
am: adb8c522a8

Change-Id: Ia30269ec2097d5978ae3e0b3930a38b3f4441ea4
2017-07-28 16:42:59 +00:00
TreeHugger Robot
a6b8e4503e Merge "Revert "Merge "Remove ability to downgrade importance of existing channel." into oc-dr1-dev"" into oc-mr1-dev 2017-07-28 15:26:54 +00:00
Bryce Lee
0e4a6dfb3f Remove rotation and app bounds from Configuration diff.
The presence of these new flags leads to issues with application that
do not expect their presence. Since these flags can appear at
critical times, such as on orientation change, these issues are
brought to the surface often.

This CL remedies this problem by first removing the rotation
property. It is not used and the original issue of orientation and
Configuration alignment has been addressed. For app bounds, the CL
reverts the behavior back to identifying diffs as a screen size
change.

Fixes: 64004417
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke

Change-Id: I1fabb564dfb5c13d897336708523cf7cd5099fa0
2017-07-28 07:49:01 -07:00
Benjamin Miller
05fef7ed69 Docs: Note that DISALLOW_CONFIG_VPN stops VPNs from starting
VPNs don't start except a DPC's configured always-on VPN. Clarified version behaviors.
Staged at: go/dac-stage/reference/android/os/UserManager.html#DISALLOW_CONFIG_VPN

Test: make ds-docs and output staged UserManager page
Bug: 63582789
Change-Id: I83c0c6cc580b9d1d224a94e073f559f23cf4d672
(cherry picked from commit 1f83e4d498)
2017-07-28 09:56:24 +00:00
Hugo Benichi
683ea489d3 Logging improvements when NetworkCapabilities change
This patch improves the wtf() logging in updateCapabilities to
better distinguish between the cases of a changed specifiers, changed
transports, or changed capabilities. The case of NOT_METERED being added
or removed is ignored.

Bug: 63326103
Test: runtest frameworks-net, runtest frameworks-wifi
Change-Id: I05c6e78891e1eac658f1cf883223af520a9a4f8f
2017-07-28 15:25:54 +09:00
Svetoslav Ganov
adb8c522a8 Report permission flags for all protections based on SDK
We added a couple of protection flags that also apply to
normal and dangerous permissions. These flags are folded
in the protection level breaking apps that directly and
compare against the protection constants. Apps that target
older than O SDK don't get protection flags folded into
the protection level.

Test: All permission tests pass
      Added a new test to ensure no protection flags reported
      for normal and dangerous permissions

Change-Id: I87b10a7695d8ecfa7156525d6f3d101fc0639513
bug:62755026
2017-07-28 05:46:53 +00:00
Bart Sears
7a8044dc67 Revert "Report permission flags for all protections based on SDK" am: 784b56e1e6
am: 076d6f7669

Change-Id: I6034405a465919b5e4fc75b4eb109b6ae5259fe0
2017-07-28 05:29:23 +00:00
Bart Sears
076d6f7669 Revert "Report permission flags for all protections based on SDK"
am: 784b56e1e6

Change-Id: Ice7dde53c5613f48d013424a7e99203fd854e532
2017-07-28 05:17:52 +00:00
Bart Sears
784b56e1e6 Revert "Report permission flags for all protections based on SDK"
This reverts commit 852cf98cb8.

Change-Id: I62763bf85ec95a02a245c6b503aa34bb0e9d997a
2017-07-28 05:05:38 +00:00