254332 Commits

Author SHA1 Message Date
Mark Lu
5f05256106 docs: update Paint.setTextSize() to indicate pixel units
bug: 2321154
Change-Id: Ic71404677a8079c744b99d4848d69c6ff52089ab
2016-12-17 07:23:29 +00:00
Joe Fernandez
e161f75d38 docs: Add deprecation message for the developer.android.com docs am: b9bd6cca9e
am: 045ae0458a

Change-Id: I2257467a9b263897d2af594720de61d29a982709
2016-12-17 04:37:05 +00:00
Joe Fernandez
045ae0458a docs: Add deprecation message for the developer.android.com docs
am: b9bd6cca9e

Change-Id: I3ba7d4519c491bdf09836f096106b4a6bc52e116
2016-12-17 04:26:02 +00:00
Svet Ganov
5034efbaf3 [DO NOT MERGE] Fix vulnerability in MemoryIntArray - fix build file am: c3db570a00 -s ours
am: c91845f753

Change-Id: Ia85d2855dd8360b94fecb4bf6cd280ea4518d0e1
2016-12-17 03:32:01 +00:00
Svet Ganov
c91845f753 [DO NOT MERGE] Fix vulnerability in MemoryIntArray - fix build file
am: c3db570a00  -s ours

Change-Id: I63b03cd2b057f95aefab23cdb4a29766ec304544
2016-12-17 03:21:28 +00:00
Joe Fernandez
b9bd6cca9e docs: Add deprecation message for the developer.android.com docs
Change-Id: Ia091df49099482696abbc3a596cf1787ca904d67
2016-12-16 18:20:56 -08:00
Mark Lu
88e64bb739 Merge "docs: update description for BitmapFactory.Options#inBitmap" into nyc-mr1-dev 2016-12-17 02:04:28 +00:00
Mark Lu
a8f4286272 docs: update description for BitmapFactory.Options#inBitmap
bug: 18730109
Change-Id: Iab062d41af3a32208d3500179d3737278a035188
2016-12-16 15:43:27 -08:00
Mark Lu
7b22d549d4 Merge "docs: changes to broadcast documentation" into nyc-mr1-dev 2016-12-16 04:48:39 +00:00
Svet Ganov
c3db570a00 [DO NOT MERGE] Fix vulnerability in MemoryIntArray - fix build file
bug:33039926
bug:33042690

Change-Id: If0431b77ec546c72f8cc25bb605a851572bb22a6
2016-12-15 22:58:05 +00:00
Julius D'souza
8cc9f081aa fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8 am: af0b547fc7
am: 20081c4e71

Change-Id: I5e461a835cf64ba69894da2c5493a9d8a1ebcbcf
2016-12-14 19:11:59 +00:00
Julius D'souza
20081c4e71 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8
am: af0b547fc7

Change-Id: I23ef765ebbd2dde2110946fcc46c6b61e11733f2
2016-12-14 19:06:29 +00:00
Julius D'souza
af0b547fc7 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours
am: 7a69e8f3d8

Change-Id: I581e1cd6ef0dec7042802b29dd76db8ffc02cec3
2016-12-14 19:00:38 +00:00
Julius D'souza
7a69e8f3d8 fix case issues with mGoingIdleWakeLock in DeviceIdleController
am: e6f8cb29ec  -s ours

Change-Id: Ia7bdba0fd3d52bb2d7c33f81d376336563f3a5cb
2016-12-14 18:54:02 +00:00
Julius D'souza
e6f8cb29ec fix case issues with mGoingIdleWakeLock in DeviceIdleController
Bug: 31900521

Change-Id: I9484b10f0e6b99dfaf11266bb275a31d7ff3868c
2016-12-14 10:31:12 -08:00
Julius D'souza
03c946e06b DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours am: 495aa09cc6 -s ours
am: 10a9005003  -s ours

Change-Id: I7a1d2d5b60b27765b2381e6d85fd3f8e967a40e1
2016-12-14 18:03:26 +00:00
Julius D'souza
10a9005003 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours
am: 495aa09cc6  -s ours

Change-Id: I0f1a50fac9a6fc8a5c21b890aaa3aea5ea2aca74
2016-12-14 17:56:53 +00:00
Julius D'souza
495aa09cc6 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours
am: 589f83e686  -s ours

Change-Id: I76a619ed9824174735d0a86c55fe13a3d6e90ec5
2016-12-14 17:51:28 +00:00
Julius D'souza
589f83e686 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle.
am: f9f39cc4a8  -s ours

Change-Id: Ibd0b18a9e833afcc85845f4db57a927e80739cc2
2016-12-14 17:44:27 +00:00
Mark Lu
33ec106d22 docs: changes to broadcast documentation
- move BroadcastReceiver info to developer guide. see cl/140402421
- add usage note to CONNECTIVITY_ACTION broadcast

bug:32533262
bug:33106411

Change-Id: Ic2aa517831d29418e0c42aa6fc1e7f9aeb50f802
2016-12-13 18:28:32 -08:00
Julius D'souza
f9f39cc4a8 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController
is going idle.

The inputs to DeviceIdleController (alarm manager, sensors)
hold wake locks while they call it.  But then the real work
happens in a handler which is outside of the wakelock, so
listeners don't get a chance to run right away, which in
the case of NetworkPolicyManager means the device is in a
higher power state than it should be.

It's not clear that this will 100% fix the bug, because
NetworkPolicyManagerService also has its own internal
Handler, and isn't holding its own wakelock for this,
but this change allows NPMS to be fixed if it really
needed to be.

Bug: 31900521
Change-Id: I706045aa189147824c9214c57abc13993aee9a5b
2016-12-13 18:28:31 -08:00
Svetoslav Ganov
d08cf2b071 Fix vulnerability in MemoryIntArray
am: 1181f448c1

Change-Id: I4217066be49bb9525e945f110c22eb864ec6c212
2016-12-09 01:43:52 +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
Bill Napier
498547ec6c Revert "Fix vulnerability in MemoryIntArray am: a97171ec49"
am: 43966dafb3

Change-Id: I01bc83edd411dc39cb696e64ea35b5d4a8497fbf
2016-12-08 22:30:02 +00:00
Bill Napier
43966dafb3 Revert "Fix vulnerability in MemoryIntArray am: a97171ec49"
This reverts commit fb12dd509f8e106d034f67c2e404845128128994.

Change-Id: I9e1b22b8df0e754095541a758096cba279a81ab1
2016-12-08 22:22:38 +00:00
Svetoslav Ganov
a5ee109029 Fix vulnerability in MemoryIntArray am: a97171ec49
am: fb12dd509f

Change-Id: I269ec7d61ebdc9f485d759d1398d5fa4eacf868f
2016-12-08 21:42:05 +00:00
Svetoslav Ganov
fb12dd509f Fix vulnerability in MemoryIntArray
am: a97171ec49

Change-Id: Ifa2221a9b8ca705ef0239d61772938ac11761ce2
2016-12-08 21:37:33 +00:00
Svetoslav Ganov
a97171ec49 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
2016-12-08 11:51:26 -08:00
Svetoslav Ganov
60357eb6bd Revert "Fix vulnerability in MemoryIntArray" am: 1f06508bc6
am: 64b5725900

Change-Id: Id7021fb02059cfb3bb9184ef24f417c0be7f55b9
2016-12-08 02:33:00 +00:00
Svetoslav Ganov
64b5725900 Revert "Fix vulnerability in MemoryIntArray"
am: 1f06508bc6

Change-Id: Id387817495b1857f304203c8487da3db49bdd0e4
2016-12-08 02:29:00 +00:00
Svetoslav Ganov
1f06508bc6 Revert "Fix vulnerability in MemoryIntArray"
This reverts commit 4694cad51122c20880d00389ef95833d7a14b358.

Change-Id: I235ea3c4bd86d90bf97bc1a2d023f4780251e570
2016-12-08 02:17:40 +00:00
Svetoslav Ganov
138a541eaa Fix vulnerability in MemoryIntArray am: 4694cad511
am: ec40a70ffb

Change-Id: I5d03aaa04fe13b3af20bcc61e9bb925b471ab825
2016-12-08 01:56:24 +00:00
Svetoslav Ganov
ec40a70ffb Fix vulnerability in MemoryIntArray
am: 4694cad511

Change-Id: I64257a851c06e4a333056ee132ff8a2ea29aef5c
2016-12-08 01:49:21 +00:00
Aart Bik
65cf055ad9 Revert "Fix vulnerability in MemoryIntArray" am: 29139a8ae5
am: 86699f980f

Change-Id: I7876874ba0d6815920f21021a47e3fe1b3e1c42f
2016-12-08 01:44:54 +00:00
Aart Bik
86699f980f Revert "Fix vulnerability in MemoryIntArray"
am: 29139a8ae5

Change-Id: I3975cfc51bd03a65855c113dfdb827d24471e0ba
2016-12-08 01:36:50 +00:00
Svetoslav Ganov
4694cad511 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: Id7f0e8a4c861b0b9fa796767e0c22d96633b14d1
2016-12-08 01:35:08 +00:00
Aart Bik
29139a8ae5 Revert "Fix vulnerability in MemoryIntArray"
This reverts commit 86dfa094de773670743d41c3e3156eace8e403a3.


BROKE BUILD (as shown in some treehugger builds)

frameworks/base/core/java/android/util/MemoryIntArray.java:84: error: cannot find symbol
        mCloseGuard.open("close");
        ^
        
       
bug:33039926
bug:33042690

Change-Id: Ief875e543ec849fe55c747fb1ed5253f0cd9a122
2016-12-08 01:12:48 +00:00
Svetoslav Ganov
e123f41553 Fix vulnerability in MemoryIntArray am: 86dfa094de
am: 367023218e

Change-Id: I38d3f7089b9678210772f79215b44198b262e922
2016-12-08 00:49:48 +00:00
Svetoslav Ganov
367023218e Fix vulnerability in MemoryIntArray
am: 86dfa094de

Change-Id: I664782bea6e2b941ba94e51c65afd7e9b0f95f8d
2016-12-08 00:42:18 +00:00
Svetoslav Ganov
86dfa094de 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: Ie267646eb88014034fbd048d7a9bc273420c7eff
2016-12-07 15:19:13 -08:00
Elliot Waite
050cf854c7 Merge "Change insecure HTTP resource link to scheme-relative link." into nyc-mr1-dev 2016-12-06 01:52:12 +00:00
Jeff Sharkey
4aacfce724 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-dev am: ae7d4b1339 -s ours am: ce477912a2 am: 920b02a94f -s ours am: aff9286bd6 am: 37ff2d56bf am: 56247334f8 am: 923aef8e02 -s ours am: f199d511c3
am: 1d752340a7

Change-Id: Ie7b1d07a622a9b5be4e0d5d9b08b33b821b8e43a
2016-12-02 20:11:33 +00:00
Jeff Sharkey
6786309c03 DO NOT MERGE. Check provider access for content changes. am: 9b85862620 -s ours am: 9277cce7fa am: a1d1ecbe05 -s ours am: 928c09cd8e am: 5267b63325 am: a51ebb828a am: acfda3d71a -s ours am: 0eaa192436
am: 43b3a13803

Change-Id: I5f4f250100c3b9f63149add16f0086c77ccdf7ca
2016-12-02 20:10:37 +00:00
Jeff Sharkey
d12e48494d Merge "DO NOT MERGE. Check provider access for content changes." into lmp-mr1-dev am: 6b89229d14 am: a7efe16fe1 -s ours am: f1085f2dc8 am: c130d7fd5e am: 948841362a am: 7e54dc58d4 -s ours am: 3fa188bd8f
am: 09960bdfcc

Change-Id: Ib66ff9a9e82f9ed3e7e291c0bcca1be9d4f38805
2016-12-02 20:09:34 +00:00
Jeff Sharkey
a55258bd17 DO NOT MERGE. Check provider access for content changes. am: 91add43ae7 am: 792d49dfb5 -s ours am: 32af84320b am: 8b5fa0c0c0 am: d081cb0ab7 am: cd35e746dc -s ours am: 836b54e6bb
am: 383e0cfa06

Change-Id: I231c3a499177db213b0406ea84e7ea3c224f132d
2016-12-02 20:08:37 +00:00
Jeff Sharkey
1d752340a7 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-dev am: ae7d4b1339 -s ours am: ce477912a2 am: 920b02a94f -s ours am: aff9286bd6 am: 37ff2d56bf am: 56247334f8 am: 923aef8e02 -s ours
am: f199d511c3

Change-Id: I990a5459cd64bbc0e2ede2d3b5899163d12818f4
2016-12-02 19:55:09 +00:00
Jeff Sharkey
43b3a13803 DO NOT MERGE. Check provider access for content changes. am: 9b85862620 -s ours am: 9277cce7fa am: a1d1ecbe05 -s ours am: 928c09cd8e am: 5267b63325 am: a51ebb828a am: acfda3d71a -s ours
am: 0eaa192436

Change-Id: Ie0fe9fd6770c94d56b3af10902c44c52d9a2f2a3
2016-12-02 19:54:12 +00:00
Jeff Sharkey
09960bdfcc Merge "DO NOT MERGE. Check provider access for content changes." into lmp-mr1-dev am: 6b89229d14 am: a7efe16fe1 -s ours am: f1085f2dc8 am: c130d7fd5e am: 948841362a am: 7e54dc58d4 -s ours
am: 3fa188bd8f

Change-Id: Ibae31cd6439c2fdfcc9d333ca23bd466a7730218
2016-12-02 19:53:09 +00:00
Jeff Sharkey
383e0cfa06 DO NOT MERGE. Check provider access for content changes. am: 91add43ae7 am: 792d49dfb5 -s ours am: 32af84320b am: 8b5fa0c0c0 am: d081cb0ab7 am: cd35e746dc -s ours
am: 836b54e6bb

Change-Id: Ib546b18b5373aaf8e429a3e8668a23a9d3b5c411
2016-12-02 19:52:04 +00:00
Jeff Sharkey
f199d511c3 Merge "DO NOT MERGE. Check provider access for content changes." into lmp-dev am: ae7d4b1339 -s ours am: ce477912a2 am: 920b02a94f -s ours am: aff9286bd6 am: 37ff2d56bf am: 56247334f8
am: 923aef8e02  -s ours

Change-Id: Ia0d0ac5ed1f8a84bd9158530fde499f91ac7f411
2016-12-02 19:46:36 +00:00