OSDN Git Service

android-x86/frameworks-base.git
7 years agoDO NOT MERGE: VPN network stat accounting changes. am: ffe5a46b3e -s ours
Jeremy Joslin [Fri, 9 Dec 2016 09:54:07 +0000 (09:54 +0000)]
DO NOT MERGE: VPN network stat accounting changes. am: ffe5a46b3e  -s ours
am: 12bb3f057b  -s ours

Change-Id: Id9d26bf1b9512a85cd9b6a3253b86b77a6f62e77

7 years agoDO NOT MERGE: ConnectivityThread: use lazy holder idiom am: ce765b7a51 -s ours
Hugo Benichi [Fri, 9 Dec 2016 09:53:16 +0000 (09:53 +0000)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom am: ce765b7a51  -s ours
am: f6cb43ae32  -s ours

Change-Id: I08a03dd249d30bc474a5d16472883737d12fec37

7 years agoDO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 1853f78d76 ...
Hugo Benichi [Fri, 9 Dec 2016 09:52:26 +0000 (09:52 +0000)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper am: 1853f78d76  -s ours
am: 7337239702  -s ours

Change-Id: Ida0d76b540e800db215569717a1c5d26e0f583b0

7 years agoDO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 4983e55853 -s ours
Hugo Benichi [Fri, 9 Dec 2016 09:50:57 +0000 (09:50 +0000)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler am: 4983e55853  -s ours
am: ef148edaa2  -s ours

Change-Id: Ie8ebf41835e62b64ceb22e552208c77482d96c73

7 years agoDO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolve...
Philip P. Moltmann [Fri, 9 Dec 2016 09:50:04 +0000 (09:50 +0000)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service. am: 29154b000f  -s ours
am: 6e8a33a583  -s ours

Change-Id: I95d1b3e8b676572dd3fb78aa750731e4c4c6a31f

7 years agoDO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: c8e4cc8e99 ...
Jeremy Klein [Fri, 9 Dec 2016 09:48:50 +0000 (09:48 +0000)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback. am: c8e4cc8e99  -s ours
am: 3cd1ae2261  -s ours

Change-Id: I3c471a8971c21cdbf1ebf7e1302524b038b20375

7 years agoDO NOT MERGE: VPN network stat accounting changes.
Jeremy Joslin [Fri, 9 Dec 2016 09:23:37 +0000 (09:23 +0000)]
DO NOT MERGE: VPN network stat accounting changes.
am: ffe5a46b3e  -s ours

Change-Id: Ic42723be04158feafd268b3859f0e938d3e36d01

7 years agoDO NOT MERGE: ConnectivityThread: use lazy holder idiom
Hugo Benichi [Fri, 9 Dec 2016 09:22:57 +0000 (09:22 +0000)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
am: ce765b7a51  -s ours

Change-Id: I0625013f14e4a2c24a238677a3de50961d114619

7 years agoDO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
Hugo Benichi [Fri, 9 Dec 2016 09:22:16 +0000 (09:22 +0000)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
am: 1853f78d76  -s ours

Change-Id: Ia41bae1435c94e042358e8b88b42f83cd5359a6e

7 years agoDO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
Hugo Benichi [Fri, 9 Dec 2016 09:21:22 +0000 (09:21 +0000)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
am: 4983e55853  -s ours

Change-Id: I806d5d79994785357390707d77760af3af725477

7 years agoDO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolve...
Philip P. Moltmann [Fri, 9 Dec 2016 09:20:02 +0000 (09:20 +0000)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
am: 29154b000f  -s ours

Change-Id: I5c7c11dc4f8112f0ca89b482c2ba10a6a94abfba

7 years agoDO NOT MERGE: Add a null check for the OnStartTetheringCallback.
Jeremy Klein [Fri, 9 Dec 2016 09:19:21 +0000 (09:19 +0000)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
am: c8e4cc8e99  -s ours

Change-Id: I3290e0f17c8d29f7e7216687f85b7487a3b85ac5

7 years agoDO NOT MERGE: VPN network stat accounting changes.
Jeremy Joslin [Mon, 8 Aug 2016 23:07:37 +0000 (16:07 -0700)]
DO NOT MERGE: VPN network stat accounting changes.

Properly account for VPN apps that make heavy use of the tun
interface. Prior to this change a VPN app could be incorrectly charged
for more data than it actually used if it sent more traffic through
the tun interface than the underlying interface.

This change excludes VPN app traffic on the tun interface from the
adjustment pool and doesn't redistribute traffic to the VPN app.
Instead all of the redistributed traffic is deducted from the VPN app
which effectively represents any overhead incurred by the VPN app.

BUG: 30557871

(cherry picked from commit 8b436d865c9f287e9ae491e5278cd8874f4a865b)

Change-Id: I06f01aa8fe5fdc06b2d36cfb9c68feb244c2e5de

7 years agoDO NOT MERGE: ConnectivityThread: use lazy holder idiom
Hugo Benichi [Thu, 13 Oct 2016 07:48:42 +0000 (16:48 +0900)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom

This patch changes the way that the ConnectivityThread is lazily
instantiated by using the "lazy initialization holder class idiom".

The first code point that tries to obtain a reference to the unique
ConnectivityThread instance will trigger the creation of the Singleton
class, which will guarantee a thread-safe initialization of the static
INSTANCE field inside Singleton according to the language specs.

This is the Item #71 of Effective Java.

The unique static instance of ConnectivityThread is not stored directly
inside ConnectivityThread class but is stored in a static nested class.
This is to avoid triggering the creation of that unique instance when
Zygote does class preloading at phone startup. Otherwise this would lead
to Zygote creating a new OS thread during preloading, which is a fatal
error.

Test: frameworks-wifi tests pass
Bug: 26749700
Bug: 28537383
Bug: 32130437

(cherry picked from commit c4fe5d373caa9f53686e4d58e61394dd40558957)

Change-Id: If13b363889a8e9396273a90c3d9f9421a48aecbc

7 years agoDO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
Hugo Benichi [Thu, 7 Jul 2016 01:15:56 +0000 (10:15 +0900)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper

This patch removes the static singleton looper used by
ConnectivityManager and instead uses the common ConnectivityThread.

This allows to removes the static atomic counter used to track
the number of registered NetworkCallback in ConnectivityManager, because
the looper is not turned off anymore when no callbacks are registered.

Also an overloaded version of sendRequestForNetwork is added taking as a
new parameter a Handler. This will allow to overload various callback
and request related API calls with user provided Handlers.

Test: ConnectivityServiceTest passes
Bug: 26749700
Bug: 28537383
Bug: 32130437

(cherry picked from commit 7724cdd8b90006c852644d06cf6c8a28450c71c6)

Change-Id: If956addbf8e7b11b36a4b966de7fca00e8f362c1

7 years agoDO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
Hugo Benichi [Wed, 6 Jul 2016 13:53:17 +0000 (22:53 +0900)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler

This patch simplifies CallbackHandler in the following way:
  - CallbackHandler directly uses the static references to
    sNetworkCallback and sCallbackRefCount. This allows to remove
    instance fields in CallbackHandler.
  - CallbackHandler does not have a reference to ConnectivityManager
    anymore
  - CallbackHandler.getObject() is now generic in a type-safe way.

Test: ConnectivityServiceTest passes
Bug: 28537383
Bug: 32130437

(cherry picked from commit d42650faaa33ec6274278c65a6042228555ddd4f)

Change-Id: I1b5fe2a361b5f623a8310ae698497c83d72f3034

7 years agoDO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolve...
Philip P. Moltmann [Mon, 18 Apr 2016 23:23:06 +0000 (16:23 -0700)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.

Fixes: 28530428

(cherry picked from commit 7d5da4b044183826ac8388c8bdb94ac979a81797)

Change-Id: If2bfc06589adb361f11b89cd5923cb5c255cb680

7 years agoDO NOT MERGE: Add a null check for the OnStartTetheringCallback.
Jeremy Klein [Sun, 13 Mar 2016 00:29:54 +0000 (16:29 -0800)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.

This avoids a NullPointerException when trying to call the callback
and gives a more readable error message.

(cherry picked from commit 5f277e1667b49976a77c9fa79b9a04d775f3b49e)

Change-Id: Ia419ff68ef10f308f9e44be47420e27099ee6070

7 years agoMerge changes from topic 'framework-net-aosp' am: 25afce88a6
Hugo Benichi [Fri, 9 Dec 2016 03:47:48 +0000 (03:47 +0000)]
Merge changes from topic 'framework-net-aosp' am: 25afce88a6
am: 5910f412bd

Change-Id: I919fd8d8075c89aa9eb42b505017c075f61824ff

7 years agoDO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents am: f99a33a1b4 ...
Hugo Benichi [Fri, 9 Dec 2016 03:46:50 +0000 (03:46 +0000)]
DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents am: f99a33a1b4  -s ours
am: 6765bc08d0  -s ours

Change-Id: I9e3ca112a654018d9d0b72ba1b0963e7fb678cf0

7 years agoDO NOT MERGE: TokenBucket for rate-limiting and throttling am: 05ad47add8 -s ours
Hugo Benichi [Fri, 9 Dec 2016 03:45:57 +0000 (03:45 +0000)]
DO NOT MERGE: TokenBucket for rate-limiting and throttling am: 05ad47add8  -s ours
am: c50e9972dd  -s ours

Change-Id: Iaaf4c3b0b335bf741452eb5bcd05c03f45d419fc

7 years agoDO NOT MERGE: IpConnectivityMetrics reads buffer size in settings am: 8c9e4b68f0...
Hugo Benichi [Fri, 9 Dec 2016 03:45:08 +0000 (03:45 +0000)]
DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings am: 8c9e4b68f0  -s ours
am: f3b4c26453  -s ours

Change-Id: I7f2eee043702be1a8878851793b9b17bdb89766b

7 years agoDO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility. am:...
Lorenzo Colitti [Fri, 9 Dec 2016 03:43:42 +0000 (03:43 +0000)]
DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility. am: b55bf38351  -s ours
am: d1c92f25b3  -s ours

Change-Id: I441369366958f6bc55776a4f449715103ed61cc0

7 years agoDO NOT MERGE: Add IP conn metrics to dumpsys and bug reports am: 5635c270a1 -s ours
Hugo Benichi [Fri, 9 Dec 2016 03:42:53 +0000 (03:42 +0000)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports am: 5635c270a1  -s ours
am: a67ede1e15  -s ours

Change-Id: I5b363f1f5a3b4dae5de156ea9014d9d259219bcd

7 years agoDO NOT MERGE: IpConnectivity metrics: add version number am: 9df2ae138b -s ours
Hugo Benichi [Fri, 9 Dec 2016 03:41:57 +0000 (03:41 +0000)]
DO NOT MERGE: IpConnectivity metrics: add version number am: 9df2ae138b  -s ours
am: 0e67ef7d3f  -s ours

Change-Id: I05ffe76ca4f266bd341fc298cbc03da62991e4bb

7 years agoMerge changes from topic 'framework-net-aosp'
Hugo Benichi [Fri, 9 Dec 2016 03:31:44 +0000 (03:31 +0000)]
Merge changes from topic 'framework-net-aosp'
am: 25afce88a6

Change-Id: I04262e6b654c8ce0fd44139d5568783d75ccbe7b

7 years agoDO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
Hugo Benichi [Fri, 9 Dec 2016 03:31:37 +0000 (03:31 +0000)]
DO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
am: f99a33a1b4  -s ours

Change-Id: Iedfe60899226b6007963b0852f87ecebb5bc987e

7 years agoDO NOT MERGE: TokenBucket for rate-limiting and throttling
Hugo Benichi [Fri, 9 Dec 2016 03:30:56 +0000 (03:30 +0000)]
DO NOT MERGE: TokenBucket for rate-limiting and throttling
am: 05ad47add8  -s ours

Change-Id: I7f5a7a47d7e430fc503612bfd0a844b5ffe1bde9

7 years agoDO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
Hugo Benichi [Fri, 9 Dec 2016 03:29:58 +0000 (03:29 +0000)]
DO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
am: 8c9e4b68f0  -s ours

Change-Id: Ie3265557cacf2014ace63fcd73f1334330558631

7 years agoDO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
Lorenzo Colitti [Fri, 9 Dec 2016 03:28:51 +0000 (03:28 +0000)]
DO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
am: b55bf38351  -s ours

Change-Id: Ia5ca5f84367fd92848aa03446617bb296d4c93b3

7 years agoDO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Hugo Benichi [Fri, 9 Dec 2016 03:28:06 +0000 (03:28 +0000)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
am: 5635c270a1  -s ours

Change-Id: Ia9b6e6887fd80211ff054584127ec9141a22fd57

7 years agoDO NOT MERGE: IpConnectivity metrics: add version number
Hugo Benichi [Fri, 9 Dec 2016 03:27:23 +0000 (03:27 +0000)]
DO NOT MERGE: IpConnectivity metrics: add version number
am: 9df2ae138b  -s ours

Change-Id: If27714f6dc3475030da891cd25a0f8e174ea83e3

7 years agoMerge changes from topic 'framework-net-aosp'
Treehugger Robot [Fri, 9 Dec 2016 03:19:13 +0000 (03:19 +0000)]
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

7 years agoDO NOT MERGE: IpConnectivityMetrics: rate limit ApfProgramEvents
Hugo Benichi [Tue, 18 Oct 2016 01:36:33 +0000 (10:36 +0900)]
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 e1c173d2240a8eedf7685c9371087dc047a6931f)

Change-Id: Idb640dec13ba64180985544b9709a586af66eb6e

7 years agoDO NOT MERGE: TokenBucket for rate-limiting and throttling
Hugo Benichi [Mon, 17 Oct 2016 23:43:30 +0000 (08:43 +0900)]
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 998493f0ee39ae0e9ffdea27f48f1b11b0807fcb)

Change-Id: I4012ae6d02f7004bceee9a2ba03914f2a2506031

7 years agoDO NOT MERGE: IpConnectivityMetrics reads buffer size in settings
Hugo Benichi [Wed, 19 Oct 2016 02:17:28 +0000 (11:17 +0900)]
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 05686dbb6b965eb1a54591d2ed2334337886c6ee)

Change-Id: Iefbeac3a688b260fb3f92dfe0bfd9db28e26749d

7 years agoDO NOT MERGE: CaptivePortalLogin: set mixed content policy to compatibility.
Lorenzo Colitti [Fri, 21 Oct 2016 09:41:25 +0000 (18:41 +0900)]
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 625166377b2d7c5f09d1e7617b3eac3a464fba53)

Change-Id: Ia82958192d978280715442e182c34f9da5c88c66

7 years agoDO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Hugo Benichi [Wed, 19 Oct 2016 04:48:40 +0000 (13:48 +0900)]
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 51d14cb60793a9a073b8a29ff7875bb518cd7d54)

Change-Id: I9649cc2f9bb7a1975e60baaae55fcdb2a48c3b93

7 years agoDO NOT MERGE: IpConnectivity metrics: add version number
Hugo Benichi [Thu, 13 Oct 2016 04:16:16 +0000 (13:16 +0900)]
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 d680d4c856f54bea0c60dea74ba4204822391e49)

Change-Id: If8f167c0dc4c1abe0e235e2adfd131168a4ddc52

7 years agoFix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071
Svetoslav Ganov [Fri, 9 Dec 2016 01:52:56 +0000 (01:52 +0000)]
Fix vulnerability in MemoryIntArray am: 1181f448c1 am: d08cf2b071
am: 385277305e

Change-Id: I3d7222359d095d5e53f3e6fbfeda10352fa43f76

7 years agoFix vulnerability in MemoryIntArray am: 1181f448c1
Svetoslav Ganov [Fri, 9 Dec 2016 01:48:16 +0000 (01:48 +0000)]
Fix vulnerability in MemoryIntArray am: 1181f448c1
am: d08cf2b071

Change-Id: I436a09f1e49626fa45a7f6cc6bff92b2e5486a97

7 years agoFix vulnerability in MemoryIntArray
Svetoslav Ganov [Fri, 9 Dec 2016 01:43:52 +0000 (01:43 +0000)]
Fix vulnerability in MemoryIntArray
am: 1181f448c1

Change-Id: I4217066be49bb9525e945f110c22eb864ec6c212

7 years agoFix vulnerability in MemoryIntArray
Svetoslav Ganov [Thu, 8 Dec 2016 23:58:02 +0000 (23:58 +0000)]
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

7 years agoRevert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c
Bill Napier [Thu, 8 Dec 2016 22:40:09 +0000 (22:40 +0000)]
Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3 am: 498547ec6c
am: ef435f6780

Change-Id: I6b879ca7e2c7c48885dcdbf791afcd914869df24

7 years agoRevert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3
Bill Napier [Thu, 8 Dec 2016 22:34:34 +0000 (22:34 +0000)]
Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3
am: 498547ec6c

Change-Id: I8874250d553a7271305efc3f027c933e4aad3b1d

7 years agoRevert "Fix vulnerability in MemoryIntArray am: a97171ec49"
Bill Napier [Thu, 8 Dec 2016 22:30:02 +0000 (22:30 +0000)]
Revert "Fix vulnerability in MemoryIntArray am: a97171ec49"
am: 43966dafb3

Change-Id: I01bc83edd411dc39cb696e64ea35b5d4a8497fbf

7 years agoRevert "Fix vulnerability in MemoryIntArray am: a97171ec49"
Bill Napier [Thu, 8 Dec 2016 22:22:38 +0000 (22:22 +0000)]
Revert "Fix vulnerability in MemoryIntArray am: a97171ec49"

This reverts commit fb12dd509f8e106d034f67c2e404845128128994.

Change-Id: I9e1b22b8df0e754095541a758096cba279a81ab1

7 years agoFix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f am: a5ee109029
Svetoslav Ganov [Thu, 8 Dec 2016 21:51:05 +0000 (21:51 +0000)]
Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f am: a5ee109029
am: 5250d90637

Change-Id: I20c20bee05321d722e83ee47ad6d13e308178e02

7 years agoFix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f
Svetoslav Ganov [Thu, 8 Dec 2016 21:46:34 +0000 (21:46 +0000)]
Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f
am: a5ee109029

Change-Id: If1b852faa812b0bcb7419ae0f75a3e2349926de0

7 years agoFix vulnerability in MemoryIntArray am: a97171ec49
Svetoslav Ganov [Thu, 8 Dec 2016 21:42:05 +0000 (21:42 +0000)]
Fix vulnerability in MemoryIntArray am: a97171ec49
am: fb12dd509f

Change-Id: I269ec7d61ebdc9f485d759d1398d5fa4eacf868f

7 years agoFix vulnerability in MemoryIntArray
Svetoslav Ganov [Thu, 8 Dec 2016 21:37:33 +0000 (21:37 +0000)]
Fix vulnerability in MemoryIntArray
am: a97171ec49

Change-Id: Ifa2221a9b8ca705ef0239d61772938ac11761ce2

7 years agoMerge "Don't include front most excluded task in Multi-Window mode" am: a8c2c229d7
Yoshinori Hirano [Thu, 8 Dec 2016 21:13:10 +0000 (21:13 +0000)]
Merge "Don't include front most excluded task in Multi-Window mode" am: a8c2c229d7
am: 435db7e690

Change-Id: Iedb0b93fd599170132ddd545490a3564e575cdc0

7 years agoMerge "Don't include front most excluded task in Multi-Window mode"
Yoshinori Hirano [Thu, 8 Dec 2016 21:05:16 +0000 (21:05 +0000)]
Merge "Don't include front most excluded task in Multi-Window mode"
am: a8c2c229d7

Change-Id: If5c1a8de2cc951d8ec97b40c57cbbc8313137a37

7 years agoMerge "Don't include front most excluded task in Multi-Window mode"
Treehugger Robot [Thu, 8 Dec 2016 20:52:14 +0000 (20:52 +0000)]
Merge "Don't include front most excluded task in Multi-Window mode"

7 years agoFix vulnerability in MemoryIntArray
Svetoslav Ganov [Thu, 8 Dec 2016 19:48:19 +0000 (11:48 -0800)]
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: I1004579181ff7a223ef659e85c46100c47ab2409

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
Bill Yi [Thu, 8 Dec 2016 17:16:41 +0000 (17:16 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev
am: c0b7e766b0  -s ours

Change-Id: Ida46c6f5dceaf39a6d6490b2beae373b0b1e3e0f

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 8 Dec 2016 17:16:37 +0000 (17:16 +0000)]
Import translations. DO NOT MERGE
am: b004945727  -s ours

Change-Id: Iec1db28d743317ae912d92dab3fb42baee34bc11

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
Bill Yi [Thu, 8 Dec 2016 17:15:00 +0000 (17:15 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev
am: e1add91fa1  -s ours

Change-Id: I2d00cfe8ab1f7d3aca0108531e2de070b73ce660

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 8 Dec 2016 17:14:54 +0000 (17:14 +0000)]
Import translations. DO NOT MERGE
am: c30efc0214  -s ours

Change-Id: Iedcde15869e0c41d67c5549caefcf97cba7f4e73

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
Bill Yi [Thu, 8 Dec 2016 17:13:22 +0000 (17:13 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev
am: 7e212ae873  -s ours

Change-Id: I74f96038ba9a074e9359ae90a14eb6d756f91724

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 8 Dec 2016 17:13:17 +0000 (17:13 +0000)]
Import translations. DO NOT MERGE
am: c300be1cf4  -s ours

Change-Id: Id10d974799e3958fe899750bf07c229b96601868

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
Bill Yi [Thu, 8 Dec 2016 17:11:44 +0000 (17:11 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev
am: df9a47a79f  -s ours

Change-Id: I5f81a5beacd58d17fff694bc76987f7bf580a55c

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 8 Dec 2016 17:11:41 +0000 (17:11 +0000)]
Import translations. DO NOT MERGE
am: ef89f62670  -s ours

Change-Id: I7e16f16bf5fbec60c9f1258cf1cd139c3e04377b

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
Bill Yi [Thu, 8 Dec 2016 17:10:13 +0000 (17:10 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev
am: 3c54cdf15e  -s ours

Change-Id: Ia2d5e05d5c889b2559fb047f71fcb26732e2810e

7 years agoImport translations. DO NOT MERGE
Bill Yi [Thu, 8 Dec 2016 17:10:06 +0000 (17:10 +0000)]
Import translations. DO NOT MERGE
am: d4bdbc314b  -s ours

Change-Id: I865d999e568c8194dfdb8b54d4e84a38ee2b8b7f

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
TreeHugger Robot [Thu, 8 Dec 2016 17:00:37 +0000 (17:00 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
TreeHugger Robot [Thu, 8 Dec 2016 17:00:10 +0000 (17:00 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
TreeHugger Robot [Thu, 8 Dec 2016 16:59:44 +0000 (16:59 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
TreeHugger Robot [Thu, 8 Dec 2016 16:59:16 +0000 (16:59 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev

7 years agoMerge "Import translations. DO NOT MERGE" into cw-f-dev
TreeHugger Robot [Thu, 8 Dec 2016 16:58:48 +0000 (16:58 +0000)]
Merge "Import translations. DO NOT MERGE" into cw-f-dev

7 years agoMerge changes from topic 'framework-net-aosp' am: b92aa5bdfd
Lorenzo Colitti [Thu, 8 Dec 2016 11:08:42 +0000 (11:08 +0000)]
Merge changes from topic 'framework-net-aosp' am: b92aa5bdfd
am: 0a7f2d076d

Change-Id: I9f8ef7f4fad821a02f3455e710d16d121b9213a2

7 years agoDO NOT MERGE: [CS] Remove timeout event after first available am: bf3b1bad15 -s...
Etan Cohen [Thu, 8 Dec 2016 11:07:46 +0000 (11:07 +0000)]
DO NOT MERGE: [CS] Remove timeout event after first available am: bf3b1bad15  -s ours
am: a8b73b23d6  -s ours

Change-Id: I61fbbf03bc011ae0b6b0e011bfb69dea33195c79

7 years agoDO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest am: 5d2654124e ...
Hugo Benichi [Thu, 8 Dec 2016 11:06:58 +0000 (11:06 +0000)]
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest am: 5d2654124e  -s ours
am: 2a2e22ab23  -s ours

Change-Id: I8b47225c8a6b3b7214b9b0a89971984d2f9fc9e3

7 years agoDO NOT MERGE: Unbreak TetherInterfaceStateMachineTest. am: 5bce5a16b1 -s ours
Lorenzo Colitti [Thu, 8 Dec 2016 11:05:48 +0000 (11:05 +0000)]
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest. am: 5bce5a16b1  -s ours
am: efd928fe56  -s ours

Change-Id: I08660dacb99bb50654157ce5d507247339cd2348

7 years agoDO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. am: 7ceef950a...
Lorenzo Colitti [Thu, 8 Dec 2016 11:04:38 +0000 (11:04 +0000)]
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net. am: 7ceef950a0  -s ours
am: d1e22a3f07  -s ours

Change-Id: I92f0f18ed7ee196f1cdb1369393ff7c4e2c800fc

7 years agoDO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. am...
Lorenzo Colitti [Thu, 8 Dec 2016 11:03:45 +0000 (11:03 +0000)]
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils. am: 3c295b59f5  -s ours
am: bcb7e32954  -s ours

Change-Id: I377b66283b29bb97e02ec796352bc3a5dbea1454

7 years agoDO NOT MERGE: Move FakeSettingsProvider to a common location. am: b8df76e413 -s...
Lorenzo Colitti [Thu, 8 Dec 2016 11:02:57 +0000 (11:02 +0000)]
DO NOT MERGE: Move FakeSettingsProvider to a common location. am: b8df76e413  -s ours
am: a84ede299c  -s ours

Change-Id: Ia6f433944c63245436199b8b9b1a022794ab939e

7 years agoDO NOT MERGE: ConnectivityServiceTest: mark flaky test as such am: 5d540d1410 -s...
Hugo Benichi [Thu, 8 Dec 2016 11:02:09 +0000 (11:02 +0000)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such am: 5d540d1410  -s ours
am: e47b0886ad  -s ours

Change-Id: I803b51cae7b20502d11701cb99ab3816d6995555

7 years agoDO NOT MERGE: Add option to skip and avoid captive portals. am: 1f64f3fd14 -s ours
Calvin On [Thu, 8 Dec 2016 11:00:46 +0000 (11:00 +0000)]
DO NOT MERGE: Add option to skip and avoid captive portals. am: 1f64f3fd14  -s ours
am: 8006bd5c66  -s ours

Change-Id: I9984984de7f72e23fbc11e972ff851a1d2adc6c1

7 years agoDO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime am: dafc44ea11 -s ours
Hugo Benichi [Thu, 8 Dec 2016 11:00:00 +0000 (11:00 +0000)]
DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime am: dafc44ea11  -s ours
am: d063978acf  -s ours

Change-Id: Iae654ce24cba1e968f14b8b6cd74446c99135b0c

7 years agoDO NOT MERGE: Do not synchronize boolean reads/writes am: 94dcb3c3fd -s ours
Hugo Benichi [Thu, 8 Dec 2016 10:59:14 +0000 (10:59 +0000)]
DO NOT MERGE: Do not synchronize boolean reads/writes am: 94dcb3c3fd  -s ours
am: eb98bc95d2  -s ours

Change-Id: I897ff8b2072a4fcbf42e88d4ad61ffcec2d85331

7 years agoDO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters am: 4104ff9220 ...
Hugo Benichi [Thu, 8 Dec 2016 10:58:28 +0000 (10:58 +0000)]
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters am: 4104ff9220  -s ours
am: 2889968553  -s ours

Change-Id: I935fd216a905688a51d928dada3485a0117dbbf1

7 years agoDO NOT MERGE: Add fuzzing tests to ApfFilter RA processing am: 0668a61d82 -s ours
Hugo Benichi [Thu, 8 Dec 2016 10:57:26 +0000 (10:57 +0000)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing am: 0668a61d82  -s ours
am: 976ef7538a  -s ours

Change-Id: I10b1ea356622de68d75ee65f8ab4ae937c11171a

7 years agoDO NOT MERGE: Support timeouts for requestNetwork() invocations. am: 3841a48d0a ...
Erik Kline [Thu, 8 Dec 2016 10:56:13 +0000 (10:56 +0000)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations. am: 3841a48d0a  -s ours
am: eb6be2c826  -s ours

Change-Id: Id91b2267ffcd7c66a1be8e01761ffb1d943082d3

7 years agoDO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is...
Pierre Imai [Thu, 8 Dec 2016 10:54:56 +0000 (10:54 +0000)]
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network. am: accd5fcb79  -s ours
am: 8a73b2896d  -s ours

Change-Id: Ic529525e6671da1b6a85890c8eb40238b07da2b3

7 years agoMerge changes from topic 'framework-net-aosp'
Lorenzo Colitti [Thu, 8 Dec 2016 10:15:03 +0000 (10:15 +0000)]
Merge changes from topic 'framework-net-aosp'
am: b92aa5bdfd

Change-Id: I9f4cb99312b61e47bfb80f35a5c2478bc1be2473

7 years agoDO NOT MERGE: [CS] Remove timeout event after first available
Etan Cohen [Thu, 8 Dec 2016 10:14:55 +0000 (10:14 +0000)]
DO NOT MERGE: [CS] Remove timeout event after first available
am: bf3b1bad15  -s ours

Change-Id: I24ccd42ff2078ffac5560a132dcd2432118f6788

7 years agoDO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
Hugo Benichi [Thu, 8 Dec 2016 10:14:16 +0000 (10:14 +0000)]
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
am: 5d2654124e  -s ours

Change-Id: I8cfbe35c719dc2f135ec695f346c555fb45dfa58

7 years agoDO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
Lorenzo Colitti [Thu, 8 Dec 2016 10:13:37 +0000 (10:13 +0000)]
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
am: 5bce5a16b1  -s ours

Change-Id: I820b911f737e8b00ff3069505a2412ba9fdf3e1c

7 years agoDO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
Lorenzo Colitti [Thu, 8 Dec 2016 10:12:57 +0000 (10:12 +0000)]
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
am: 7ceef950a0  -s ours

Change-Id: I866c317dbec720a5ec6c64b1e7e14437d132ce7e

7 years agoDO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
Lorenzo Colitti [Thu, 8 Dec 2016 10:11:44 +0000 (10:11 +0000)]
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
am: 3c295b59f5  -s ours

Change-Id: I72123940742a0ca1418f8c892da82b6bb984f4ae

7 years agoDO NOT MERGE: Move FakeSettingsProvider to a common location.
Lorenzo Colitti [Thu, 8 Dec 2016 10:11:01 +0000 (10:11 +0000)]
DO NOT MERGE: Move FakeSettingsProvider to a common location.
am: b8df76e413  -s ours

Change-Id: I017a302961d252a3fe4e062a0642b79d64230f54

7 years agoDO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
Hugo Benichi [Thu, 8 Dec 2016 10:10:22 +0000 (10:10 +0000)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
am: 5d540d1410  -s ours

Change-Id: I2bd4e64b397fe2bd6ec8a11b02753c26df1a2000

7 years agoDO NOT MERGE: Add option to skip and avoid captive portals.
Calvin On [Thu, 8 Dec 2016 10:09:43 +0000 (10:09 +0000)]
DO NOT MERGE: Add option to skip and avoid captive portals.
am: 1f64f3fd14  -s ours

Change-Id: I549bc49715a6476069f30aa206d8b4d1310fe6c5

7 years agoDO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
Hugo Benichi [Thu, 8 Dec 2016 10:09:05 +0000 (10:09 +0000)]
DO NOT MERGE: ApfFilter: use elapsedRealTime for RA lifetime
am: dafc44ea11  -s ours

Change-Id: Ic80e642dffa4f1246e91aeaa5bdedf450f703ccd

7 years agoDO NOT MERGE: Do not synchronize boolean reads/writes
Hugo Benichi [Thu, 8 Dec 2016 10:08:15 +0000 (10:08 +0000)]
DO NOT MERGE: Do not synchronize boolean reads/writes
am: 94dcb3c3fd  -s ours

Change-Id: If30f221e24c897be9e2fddf66a9d6c9db2b5a431

7 years agoDO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
Hugo Benichi [Thu, 8 Dec 2016 10:07:12 +0000 (10:07 +0000)]
DO NOT MERGE: ApfFilter: systematically use u8, u16, u32 getters
am: 4104ff9220  -s ours

Change-Id: I699a4d4403e21c3ebb59e29c7732dba78eb006d7

7 years agoDO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
Hugo Benichi [Thu, 8 Dec 2016 10:06:34 +0000 (10:06 +0000)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
am: 0668a61d82  -s ours

Change-Id: I961d0fd200c1317e1e81657071acf1fe7ae43f6f

7 years agoDO NOT MERGE: Support timeouts for requestNetwork() invocations.
Erik Kline [Thu, 8 Dec 2016 10:05:58 +0000 (10:05 +0000)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
am: 3841a48d0a  -s ours

Change-Id: Ia0431810a2a2081116bc5c31b4c6a37ab09a69ad

7 years agoDO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is...
Pierre Imai [Thu, 8 Dec 2016 10:05:18 +0000 (10:05 +0000)]
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
am: accd5fcb79  -s ours

Change-Id: Ib54fcd8b268872bc599e2b4dedaa7bbb4d7f8956