Commit Graph

301953 Commits

Author SHA1 Message Date
Lorenzo Colitti
f32347ef25 DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility. am: b55bf38351 -s ours
am: d1c92f25b3  -s ours

Change-Id: I441369366958f6bc55776a4f449715103ed61cc0
2016-12-09 03:43:42 +00:00
Hugo Benichi
af7c2d6c96 DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports am: 5635c270a1 -s ours
am: a67ede1e15  -s ours

Change-Id: I5b363f1f5a3b4dae5de156ea9014d9d259219bcd
2016-12-09 03:42:53 +00:00
Hugo Benichi
f567aa22ff DO NOT MERGE: IpConnectivity metrics: add version number am: 9df2ae138b -s ours
am: 0e67ef7d3f  -s ours

Change-Id: I05ffe76ca4f266bd341fc298cbc03da62991e4bb
2016-12-09 03:41:57 +00:00
Hugo Benichi
5910f412bd Merge changes from topic 'framework-net-aosp'
am: 25afce88a6

Change-Id: I04262e6b654c8ce0fd44139d5568783d75ccbe7b
2016-12-09 03:31:44 +00:00
Hugo Benichi
6765bc08d0 DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
am: f99a33a1b4  -s ours

Change-Id: Iedfe60899226b6007963b0852f87ecebb5bc987e
2016-12-09 03:31:37 +00:00
Hugo Benichi
c50e9972dd DO NOT MERGE: TokenBucket for rate-limiting and throttling
am: 05ad47add8  -s ours

Change-Id: I7f5a7a47d7e430fc503612bfd0a844b5ffe1bde9
2016-12-09 03:30:56 +00:00
Hugo Benichi
f3b4c26453 DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
am: 8c9e4b68f0  -s ours

Change-Id: Ie3265557cacf2014ace63fcd73f1334330558631
2016-12-09 03:29:58 +00:00
Lorenzo Colitti
d1c92f25b3 DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
am: b55bf38351  -s ours

Change-Id: Ia5ca5f84367fd92848aa03446617bb296d4c93b3
2016-12-09 03:28:51 +00:00
Hugo Benichi
a67ede1e15 DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
am: 5635c270a1  -s ours

Change-Id: Ia9b6e6887fd80211ff054584127ec9141a22fd57
2016-12-09 03:28:06 +00:00
Hugo Benichi
0e67ef7d3f DO NOT MERGE: IpConnectivity metrics: add version number
am: 9df2ae138b  -s ours

Change-Id: If27714f6dc3475030da891cd25a0f8e174ea83e3
2016-12-09 03:27:23 +00:00
Treehugger Robot
25afce88a6 Merge changes from topic 'framework-net-aosp'
* changes:
  DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
  DO NOT MERGE: TokenBucket for rate-limiting and throttling
  DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
  DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
  DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
  DO NOT MERGE: IpConnectivity metrics: add version number
2016-12-09 03:19:13 +00:00
Hugo Benichi
f99a33a1b4 DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
This patch uses the previously introduced TokenBucket to rate limit
ApfProgramEvents, still allowing for burst of ApfProgramEvents when a
new interface is set up (due to ipv4 provisioning, multicast lock, ipv6 RAs
triggering new APF program events in short amounts of time).

Test: new test in IpConnectivityMetricsTest
Bug: 1550402

(cherry picked from commit e1c173d224)

Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e
2016-12-09 11:21:31 +09:00
Hugo Benichi
05ad47add8 DO NOT MERGE: TokenBucket for rate-limiting and throttling
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.

Test: comes with unit tests.
Bug: 32198637

(cherry picked from commit 998493f0ee)

Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031
2016-12-09 11:21:29 +09:00
Hugo Benichi
8c9e4b68f0 DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
Test: IpConnectivityMetricsTest passes. Also manually changed the new
setting and verified the buffer size is as expected after flushing the
buffer.
Bug: 32198637

(cherry picked from commit 05686dbb6b)

Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d
2016-12-09 11:21:26 +09:00
Lorenzo Colitti
b55bf38351 DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
This makes the policy for mixed HTTP/HTTPS content match Chrome.
This allows us to display login pages where unimportant
subresources are HTTP.

Bug: 32171569

(cherry picked from commit 625166377b)

Change-Id: Ia82958192d978280715442e182c34f9da5c88c66
2016-12-09 11:21:24 +09:00
Hugo Benichi
5635c270a1 DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Test: manually created a bug report and inspected content.

(cherry picked from commit 51d14cb607)

Change-Id: I9649cc2f9bb7a1975e60baaae55fcdb2a48c3b93
2016-12-09 11:21:20 +09:00
Hugo Benichi
9df2ae138b DO NOT MERGE: IpConnectivity metrics: add version number
This patch adds a version field to ipconnectivity.proto and populates it
to 2, which is the logical version number for NYC-MR2.

Test: IpConnectivity{EventBuilder,Metrics}Test pass
Bug: 32127906

(cherry picked from commit d680d4c856)

Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52
2016-12-09 11:21:11 +09:00
Svetoslav Ganov
271700018a Merge "Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e am: ff112f6ad2" into nyc-mr2-dev-plus-aosp
am: 54aa4655a5

Change-Id: I0db640687a0ed18744ea3224fd8302aeaf94fa70
2016-12-09 02:14:57 +00:00
Svetoslav Ganov
eaf3e0e5b8 Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e am: ff112f6ad2
am: 15acb8786d

Change-Id: I87e0030ad2cc9d074257e06e8ea7ff04e83c927b
2016-12-09 02:14:46 +00:00
Svetoslav Ganov
dbeca91de0 Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e am: 69b9db8c5d
am: 4d97c73eda  -s ours

Change-Id: If8d25b2e04f69fb3784fc11c975e3e719fdd40b0
2016-12-09 02:13:27 +00:00
Erik Kline
0e6cbb02e4 Stop setting net.dns{1234} system properties.
Nothing in the system consumes these properties, they were never part
of an official public API, and they can leak information about the
current network to applications without networking prvileges.

Specifically, these properites allow applications to access network state
(and detect network changes, etc.) without having the ACCESS_NETWORK_STATE
permission.

Test: runtest ConnectivityServiceTest passes
Bug: 33308258
Change-Id: I85abc52bc11aee33940fd0af2397478a9a5c3b8f
2016-12-09 11:06:52 +09:00
Android Build Merger (Role)
54aa4655a5 Merge "Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e am: ff112f6ad2" into nyc-mr2-dev-plus-aosp 2016-12-09 01:58:04 +00:00
Svetoslav Ganov
15acb8786d Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e
am: ff112f6ad2

Change-Id: I5f7fbf29e884d2cf20929a326c2c76746bc6f2b2
2016-12-09 01:57:20 +00:00
Svetoslav Ganov
4d97c73eda Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071 am: 385277305e
am: 69b9db8c5d

Change-Id: I06ce1c69064ff8c2c346877b9f834d412eba7829
2016-12-09 01:57:20 +00:00
Svetoslav Ganov
69b9db8c5d Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071
am: 385277305e

Change-Id: I3d7222359d095d5e53f3e6fbfeda10352fa43f76
2016-12-09 01:52:56 +00:00
Svetoslav Ganov
ff112f6ad2 Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071
am: 385277305e

Change-Id: Ie90f6504f26526256671b057dfbb0c93e8c193c5
2016-12-09 01:52:48 +00:00
TreeHugger Robot
6175bf40b2 Merge "Do enforcement check before granted check" 2016-12-09 01:51:16 +00:00
Fyodor Kupolov
2fe1990ba7 [DO NOT MERGE] Increased user switch timeout to 3s
Also report the actual delay if sendResult is eventually called.

Test: Manual - device boots, no timeouts
Bug: 30813554
Change-Id: I1271181ab9d2653fad1167049c84a6780ad46ff0
2016-12-08 17:49:09 -08:00
Svetoslav Ganov
385277305e Fix vulnerability in MemoryIntArray am: 1181f448c1
am: d08cf2b071

Change-Id: I436a09f1e49626fa45a7f6cc6bff92b2e5486a97
2016-12-09 01:48:16 +00:00
Svetoslav Ganov
d08cf2b071 Fix vulnerability in MemoryIntArray
am: 1181f448c1

Change-Id: I4217066be49bb9525e945f110c22eb864ec6c212
2016-12-09 01:43:52 +00:00
Tomasz Mikolajewski
099f95181d Update API documentation about virtual files.
To say that virtual files must have at least one streamable type.

Test: None
Bug: 33463773
Change-Id: I9094686cb95ee0af1c01b2bf88550cd3bbfe572d
2016-12-09 10:19:46 +09:00
Bill Napier
655d3dcb49 Merge "Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780 am: 31f2e91892" into nyc-mr2-dev-plus-aosp
am: 6a9d6a1695

Change-Id: Ie07e7c0d5b0c6c8ddfe4f168b48a0162d2e3ce41
2016-12-09 00:53:40 +00:00
Bill Napier
5e418778c0 Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780 am: 31f2e91892
am: 2430c2c169

Change-Id: Ib9c963a72bc7a62a074e034ba6698374d27aab1e
2016-12-09 00:53:32 +00:00
Bill Napier
5363bf677a Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780 am: 1c47e9e8f0
am: cf8f7b3aed  -s ours

Change-Id: Ibdcd6cebfa5692b8bce03733d6a2841a2117d193
2016-12-09 00:52:25 +00:00
TreeHugger Robot
1ee9d38a6b Merge "Add system API to install ephemeral apps" 2016-12-09 00:37:40 +00:00
Jeremy Joslin
c5ac587bf3 Update registerNetworkScoreCache() to accept a filter type.
Defined a new IntDef in NetworkScoreManager named CacheUpdateFilter
with 3 values. Caches must be registered with a filter value and will
only receive updates based on their registered filter. Actual
filtering implementation will follow.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 32912120
Change-Id: I8940e0ed1a7bbcb5a81fb3b6a7fafe4fbbc33875
2016-12-08 16:36:00 -08:00
Svetoslav Ganov
e362784a6f Merge "Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f am: a5ee109029 am: 5250d90637 am: 49e3ce4800" into nyc-mr2-dev-plus-aosp
am: d2b34ce8cf

Change-Id: I630e9d4aece166075fdd55ed18466071b734ebf7
2016-12-09 00:17:53 +00:00
Svetoslav Ganov
d415d5e8e5 Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f am: a5ee109029 am: 5250d90637 am: 49e3ce4800
am: ca657b7e95

Change-Id: I960f369712984b460e06f219145816d3ba6d749d
2016-12-09 00:17:42 +00:00
Svetoslav Ganov
7f88e79dbd Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f am: a5ee109029 am: 5250d90637 am: e812cd0379
am: 9db8a68022  -s ours

Change-Id: Ie5eeda144c295e6f6366819f5cdf3a02a90b43aa
2016-12-09 00:16:32 +00:00
Svetoslav Ganov
1181f448c1 Fix vulnerability in MemoryIntArray
MemoryIntArray was using the size of the undelying
ashmem region to mmap the data but the ashmem size
can be changed until the former is memory mapped.
Since we use the ashmem region size for boundary
checking and memory unmapping if it does not match
the size used while mapping an attacker can force
the system to unmap memory or to access undefined
memory and crash.

Also we were passing the memory address where the
ashmem region is mapped in the owner process to
support cases where the client can pass back the
MemoryIntArray instance. This allows an attacker
to put invalid address and cause arbitrary memory
to be freed.

Now we no longer support passing back the instance
to the owner process (the passed back instance is
read only), so no need to pass the memory adress
of the owner's mapping, thus not allowing freeing
arbitrary memory.

Further, we now check the memory mapped size against
the size of the underlying ashmem region after we do
the memory mapping (to fix the ahsmem size) and if
an attacker changed the size under us we throw.

Tests: Updated the tests and they pass.

bug:33039926
bug:33042690

Change-Id: Ibf56827209a9b791aa83ae679219baf829ffc2ac
2016-12-09 00:08:33 +00:00
Jorim Jaggi
c7613cb184 Merge "Light navigation bar support (1/2)" 2016-12-09 00:07:51 +00:00
Matthew Ng
0d22b079c5 Cancels out long press on recents button when viewing home screen
Cancel the long press when viewing home (launcher) to disable the
double vibration that should occur when in multiwindow mode.

Fixes: 29927464
Test: manual - at home and multiwindow to long press recents button
Change-Id: Ic9c8a5096ce9f30fc1265774ebb82c1356b1221b
2016-12-08 15:59:30 -08:00
Fyodor Kupolov
7bfe074c78 Do enforcement check before granted check
The enforcement assertion provides better explanation of the problem and fix
instructions.

Test: Removed permission from a privapp xml and verified that test fails
Bug: 31008485
Change-Id: I58454d1b38722a232764dea14ebe2e4ada09e24f
2016-12-08 15:53:39 -08:00
TreeHugger Robot
f2079a293e Merge "Do not call buildInputMethodListLocked twice" 2016-12-08 23:22:37 +00:00
George Mount
d5f70891e1 Protect BackStackRecord from accessing null mHost.
Bug 33177567

The fragment manager is being accessed after it has been torn
down. This protects BackStackRecord from accessing the null
mHost in that case.

Test: cts-tradefed run singleCommand cts -d --skip-preconditions
--skip-connectivity-check -m CtsFragmentTestCases

Change-Id: Id927eb1bc78e3750b01f685523418bde5a9cf8a0
2016-12-08 15:04:58 -08:00
Todd Kennedy
b771768249 Add system API to install ephemeral apps
Test: manual; install using "adb install --ephemeral"
Change-Id: Idce214779fea5f3c4a0121542319044f9f0e0a42
2016-12-08 14:51:43 -08:00
Hall Liu
15dbf2b3f0 Make use of user id in getDefaultDialerApplication
In the version of getDefaultDialerApplication that has an argument for
user id, make use of it when querying the list of installed dialer
packages. Otherwise, a secondary user may find their default dialer
pointing to an app that they had disabled.

Test: manual
Change-Id: Id85ff730b820741cddb6afee8af095232d3dae0f
2016-12-08 14:51:38 -08:00
Android Build Merger (Role)
6a9d6a1695 Merge "Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780 am: 31f2e91892" into nyc-mr2-dev-plus-aosp 2016-12-08 22:50:00 +00:00
Bill Napier
2430c2c169 Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780
am: 31f2e91892

Change-Id: If2059cc1e45f5ec726c15284e2f5274572619ab4
2016-12-08 22:49:11 +00:00
Bill Napier
cf8f7b3aed Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c am: ef435f6780
am: 1c47e9e8f0

Change-Id: I7077f444b348e7ef31378c1a2ae6765dc6ad82ad
2016-12-08 22:49:06 +00:00