257123 Commits

Author SHA1 Message Date
Mark Lu
9c834b1241 docs: update Paint.setTextSize() to indicate pixel units
am: 5f05256106

Change-Id: I9709ea36fe7657c8a06abe1c58760b30112e0e63
2016-12-19 20:16:15 +00:00
Charles Mendis
a586b546c3 Merge "Fix OnCancelListener for Dialogs on swipe to dismiss." into cw-f-dev 2016-12-19 19:05:53 +00:00
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
536dc4ecc4 docs: Add deprecation message for the developer.android.com docs am: b9bd6cca9e am: 045ae0458a
am: e161f75d38

Change-Id: I622c23e61f4e8db5a51a9d2425cc1fe379ec9505
2016-12-17 04:48:04 +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
0dca3a2fba [DO NOT MERGE] Fix vulnerability in MemoryIntArray - fix build file am: c3db570a00 -s ours am: c91845f753
am: 5034efbaf3

Change-Id: I22c38f921047ba7ecea5826701e3024de9a3d110
2016-12-17 03:42:58 +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
1474527789 Merge "docs: update description for BitmapFactory.Options#inBitmap" into nyc-mr1-dev
am: 88e64bb739

Change-Id: Idcaf2dabd54d5fc07cce825e44237ddb3fc0e51f
2016-12-17 02:19:55 +00:00
Mark Lu
58d24b22ed docs: update description for BitmapFactory.Options#inBitmap
am: a8f4286272

Change-Id: I163f1f5f8a9d688407aa7c0d76895bf18efa3430
2016-12-17 02:19:51 +00: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
Michael Kwan
67639a5f67 Fix OnCancelListener for Dialogs on swipe to dismiss.
Swipe to dismiss on dialogs did not dispatch onCancel events
to OnCancelListeners. Resolve by adding listener to monitor
swipe to dismiss events and dispatch onCancel events when
that occurs.

Bug: 33663411
Change-Id: I64ff29e008d485a4559eb3d1ff7f0e74dccff404
2016-12-16 13:43:16 -08:00
Mark Lu
b825c71446 Merge "docs: changes to broadcast documentation" into nyc-mr1-dev
am: 7b22d549d4

Change-Id: I41ac74d65f48258c21afcbd39bf1eb518976a5f2
2016-12-16 04:59:10 +00:00
Mark Lu
377dab8ab3 docs: changes to broadcast documentation
am: 33ec106d22

Change-Id: I673efc100756ee6d6ef0d2afa99d48d471ce0987
2016-12-16 04:59:08 +00: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
Michael Kwan
738fb65657 Merge "Fix swipe-to-dismiss to properly react to swipe gestures." into cw-f-dev 2016-12-15 21:09:57 +00:00
Phil Weaver
74f9e1b867 Add null check to a11y interrupt.
Also adding same robustness to interrupt that we have for
sending a11y events.

Bug: 32507871

Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
(cherry picked from commit 867ad35d9c676b5ba2047b0fc9a4006737e5c4aa)
2016-12-15 08:06:15 +00:00
Julius D'souza
1838237435 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8 am: af0b547fc7 am: 20081c4e71
am: 8cc9f081aa

Change-Id: I39ecaf420d8bc4390c737fd378fd0e32202e2d8c
2016-12-14 19:18:04 +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
c2aed112a7 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
am: 03c946e06b  -s ours

Change-Id: I75323469d9e15ea3b8652bb5f972d0e14a06cc7a
2016-12-14 18:09:25 +00: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
Michael Kwan
8a9b27773b Fix swipe-to-dismiss to properly react to swipe gestures.
Test: manual test
Bug: 33588580
Change-Id: If8d03f90a25e989e254e3a21bafef4e76bab5d7b
2016-12-13 17:10:12 -08:00
Ivan Podogov
e5592abb83 Merge changes from topic 'f-radio-toggle' into cw-f-dev
* changes:
  Add WiFi toggle prompts - framework
  Add Bluetooth toggle prompts - framework
2016-12-13 15:55:30 +00:00
TreeHugger Robot
3350ae9c82 Merge "Fix race condition bug related to freezing apps." into cw-f-dev 2016-12-09 17:22:22 +00:00
Jeff Sharkey
41d2be0f0f Fix race condition bug related to freezing apps.
Consider the following situation:

1. Package is frozen.
2. We try forking the app while frozen, causing a ProcessRecord with
PID 0 to be recorded in mProcessNames. As a result of the failed
fork, removeProcessLocked() tears down that ProcessRecord, but a
special case records it into mRemovedProcesses.
3. Package is unfrozen.
4. We try forking the app, and this time it proceeds normally now
that we're unfrozen.  The new valid ProcessRecord is recorded in
mProcessNames.
5. activityIdleInternalLocked() triggers a clean-up pass of
mRemovedProcesses.  trimApplications() ends up cleaning up the
stale reference from (2) above *by hash key* and not *by reference*,
which causes us to remove the new valid ProcessRecord.  This results
in the valid ProcessRecord in (4) becoming an orphaned PID, which
starts a chain reaction of havoc that ensues.

This issue is fixed by checking the expected ProcessRecord by value
before actually removing it, thus preventing orphaned PIDs.

Test: builds, boots, over 600 installs without orphaned PIDs
Bug: 28395549
Change-Id: I5ea1b31c3fd374ea7f5cc40ff35bb9195d9f3e2b
2016-12-09 09:07:16 -07: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
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
ef435f6780 Revert "Fix vulnerability in MemoryIntArray am: a97171ec49" am: 43966dafb3
am: 498547ec6c

Change-Id: I8874250d553a7271305efc3f027c933e4aad3b1d
2016-12-08 22:34:34 +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
5250d90637 Fix vulnerability in MemoryIntArray am: a97171ec49 am: fb12dd509f
am: a5ee109029

Change-Id: If1b852faa812b0bcb7419ae0f75a3e2349926de0
2016-12-08 21:46:34 +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
TreeHugger Robot
c0b7e766b0 Merge "Import translations. DO NOT MERGE" into cw-f-dev 2016-12-08 17:00:40 +00:00
TreeHugger Robot
e1add91fa1 Merge "Import translations. DO NOT MERGE" into cw-f-dev 2016-12-08 17:00:14 +00:00