Commit Graph

71772 Commits

Author SHA1 Message Date
TreeHugger Robot
ac30b3bb5f Merge "Replace Toast-based cheat sheets with tooltips" 2016-12-08 19:25:53 +00:00
TreeHugger Robot
e3a3524dac Merge changes I6477b6d1,Ieb11345f
* changes:
  Adding ability for an app to request auto-enter picture-in-picture.
  Only allowed visible, non-stopped activities to enter PIP.
2016-12-08 18:37:45 +00:00
TreeHugger Robot
41a0bc55f9 Merge "Show popup transitions when there is no anchor set" 2016-12-08 18:25:05 +00:00
Amin Shaikh
38724a234d Merge "Support multiple caches in NetworkScoreService." am: 78f3f0049e am: a7c0b73971 am: b45a4a5d1b
am: 5456cdbc27

Change-Id: I421cff1c47959c40088a31f72556630a8acd007e
2016-12-08 17:24:32 +00:00
TreeHugger Robot
6cd5d2f838 Merge "Adding orientation preserving resizing" 2016-12-08 06:05:28 +00:00
skuhne@google.com
322347ba58 Adding orientation preserving resizing
Adding freeform resizing to activities which require
a certain orientation. This is needed for e.g. ARC++.

Bug: 33267688
Test: runtest frameworks-services -c com.android.server.wm.TaskPositionerTests
Test: Visually on ARC++
Change-Id: If708c1602cb2ff464174389af4648ad767b0b079
2016-12-07 20:01:19 -08:00
Joe Onorato
be5378574b Merge changes from topic 'proto convenience methods'
* changes:
  ProtoOutputStream convenience methods.
  Give protoc-gen-javastream the ability to output multiple java files.
2016-12-08 02:39:50 +00:00
TreeHugger Robot
5683204632 Merge "Camera2: Consolidate the overriding of PRIVATE format" 2016-12-08 02:34:08 +00:00
Amin Shaikh
5456cdbc27 Merge "Support multiple caches in NetworkScoreService." am: 78f3f0049e am: a7c0b73971
am: b45a4a5d1b

Change-Id: If0080f344e53c4cddf4605879614a664c80b62ee
2016-12-08 02:28:57 +00:00
Amin Shaikh
b45a4a5d1b Merge "Support multiple caches in NetworkScoreService." am: 78f3f0049e
am: a7c0b73971

Change-Id: Idf846f55436c44930f5db2a07b7362412274f46e
2016-12-08 02:24:59 +00:00
TreeHugger Robot
a62415dd1e Merge "Only persist last Shared Preferences state" 2016-12-08 02:23:37 +00:00
Svetoslav Ganov
61705a3e64 Fix vulnerability in MemoryIntArray am: 4694cad511 am: ec40a70ffb am: 138a541eaa am: 557858b9c0
am: 6023fd1800

Change-Id: I313c59c10f2d18673c5f9e7fbdfc2141d6c91e77
2016-12-08 02:11:39 +00:00
Svetoslav Ganov
638134c1d8 Fix vulnerability in MemoryIntArray am: 4694cad511 am: ec40a70ffb am: 138a541eaa
am: 557858b9c0

Change-Id: I872df5965848ccd935c43473168e1e5aea40aad1
2016-12-08 02:08:26 +00:00
Svetoslav Ganov
6023fd1800 Fix vulnerability in MemoryIntArray am: 4694cad511 am: ec40a70ffb am: 138a541eaa
am: 557858b9c0

Change-Id: Ia6b6b59be28f938f4c3a7c4aecb035fd4c6607f6
2016-12-08 02:08:23 +00:00
Aart Bik
a0c8b340be Revert "Fix vulnerability in MemoryIntArray" am: 29139a8ae5 am: 86699f980f am: 65cf055ad9 am: 278cad4793
am: 7eb917d5eb

Change-Id: I7ea739ac873ce3e5a2252666394db2b3199ec42a
2016-12-08 02:08:23 +00:00
Aart Bik
7eb917d5eb Revert "Fix vulnerability in MemoryIntArray" am: 29139a8ae5 am: 86699f980f am: 65cf055ad9
am: 278cad4793

Change-Id: Ib58a5a1e7506327b690df9c1a98c2fa8b895d216
2016-12-08 02:01:06 +00:00
Aart Bik
116a4e883d Revert "Fix vulnerability in MemoryIntArray" am: 29139a8ae5 am: 86699f980f am: 65cf055ad9
am: 278cad4793

Change-Id: I545ba917e74f34716fe773250468e06b1dfd8312
2016-12-08 02:00:56 +00:00
Svetoslav Ganov
557858b9c0 Fix vulnerability in MemoryIntArray am: 4694cad511 am: ec40a70ffb
am: 138a541eaa

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

Change-Id: I5d03aaa04fe13b3af20bcc61e9bb925b471ab825
2016-12-08 01:56:24 +00:00
Aart Bik
278cad4793 Revert "Fix vulnerability in MemoryIntArray" am: 29139a8ae5 am: 86699f980f
am: 65cf055ad9

Change-Id: Iae6e4fe6eada607d71a20b8ea588ee8efd56a8e0
2016-12-08 01:52:51 +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
TreeHugger Robot
66ebaf7ff5 Merge "Fix vulnerability in MemoryIntArray" 2016-12-08 01:39:52 +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 86dfa094de.


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
cd92cc49d2 Fix vulnerability in MemoryIntArray am: 86dfa094de am: 367023218e am: e123f41553 am: b317e60014
am: 63499946b0

Change-Id: Ib9f5aabdf4e96b250a66f4dab7f3a90bd27a773f
2016-12-08 01:11:51 +00:00
Svetoslav Ganov
63499946b0 Fix vulnerability in MemoryIntArray am: 86dfa094de am: 367023218e am: e123f41553
am: b317e60014

Change-Id: Ieb3bf25ec225a0d3c5e568ff9c9e753a95be297c
2016-12-08 01:04:53 +00:00
Svetoslav Ganov
9aed2f6f53 Fix vulnerability in MemoryIntArray am: 86dfa094de am: 367023218e am: e123f41553
am: b317e60014

Change-Id: I550293e05ce1d1039e3f22f72002e69df919f735
2016-12-08 01:04:48 +00:00
TreeHugger Robot
55abee314c Merge "MessagingStyle: Fix buggy measure in MessagingLinearLayout" 2016-12-08 01:00:10 +00:00
Svetoslav Ganov
b317e60014 Fix vulnerability in MemoryIntArray am: 86dfa094de am: 367023218e
am: e123f41553

Change-Id: Id5cd6072d972b5d03512e83dc342a7c78341ffeb
2016-12-08 00:57:21 +00:00
Svetoslav Ganov
e123f41553 Fix vulnerability in MemoryIntArray am: 86dfa094de
am: 367023218e

Change-Id: I38d3f7089b9678210772f79215b44198b262e922
2016-12-08 00:49:48 +00:00
Adrian Roos
c6a43b1e0b Notifications: Fix bad layout for long texts am: 62be439d26
am: 52e364e4ba

Change-Id: I299401ef2627cbf55332cc0648398e19f25b594f
2016-12-08 00:44:27 +00:00
Svetoslav Ganov
367023218e Fix vulnerability in MemoryIntArray
am: 86dfa094de

Change-Id: I664782bea6e2b941ba94e51c65afd7e9b0f95f8d
2016-12-08 00:42:18 +00:00
Adrian Roos
52e364e4ba Notifications: Fix bad layout for long texts
am: 62be439d26

Change-Id: Ia0f6fe64cc853dcdaf84910055cf5a8b1e163ddd
2016-12-08 00:35:59 +00:00
Adrian Roos
8f250c13d7 Merge "Notifications: Fix bad layout for long texts" into nyc-mr2-dev 2016-12-08 00:30:08 +00:00
Shuzhen Wang
71e6d62d23 Camera2: Consolidate the overriding of PRIVATE format
We had overriding of PRIVATE format scattered at multiple places.
Consolidate them into one place.

Test: Camera preview/capture, and camcorder recording
Change-Id: I098ce93bba2000760a20c0297fcf0cb9d8c6caab
2016-12-07 16:22:37 -08:00
Amin Shaikh
972e236e84 Support multiple caches in NetworkScoreService.
- Use RemoteCallbackList for managing multiple callbacks
- Add unregisterNetworkScoreCache to the service interface
- Added NetworkScoreServiceTest

Test: runtest frameworks-services

Bug: 32913019
Change-Id: I16ca1682acca9cbe403812e520394688a026414b
2016-12-07 15:52:33 -08:00
Stephen Chen
4aef203cb8 Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED." am: faf3aa697f am: fe9a20c980 am: 609711bbd5
am: 357483f41e

Change-Id: I4cb930396651b86d9a786b9b0abe807c300cd526
2016-12-07 23:33:49 +00:00
Stephen Chen
357483f41e Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED." am: faf3aa697f am: fe9a20c980
am: 609711bbd5

Change-Id: I11634693f1088319c90e291d78edbc8e10cd147a
2016-12-07 23:25:46 +00:00
Winson Chung
b5c41b7868 Adding ability for an app to request auto-enter picture-in-picture.
- If an activity requests that it can auto-enter PIP, then we will trigger
  it to enter PIP when the task is effectively being occluded.  This does
  not affect the activity when the screen is locking, or if it starts new
  activities within its own task, or if it finishes itself, or if there is
  already a PIP activity.
- Changed setPictureInPictureAspectRatio to also specify the aspect ratio
  to use when auto-entering PIP.  If the activity is not PIP'ed and has
  not requested auto-enter, then the call continues to fail.

Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testAutoEnterPictureInPicture
Test: #testAutoEnterPictureInPictureLaunchActivity
Test: #testAutoEnterPictureInPictureFinish
Test: #testAutoEnterPictureInPictureAspectRatio
Test: #testAutoEnterPictureInPictureOverPip

Change-Id: I6477b6d1f160cf0219d935123bbb505f57ee7a56
2016-12-07 15:21:50 -08: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
Stephen Chen
609711bbd5 Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED." am: faf3aa697f
am: fe9a20c980

Change-Id: I7bba392e349525dd55bb8b251554e81967424136
2016-12-07 23:18:15 +00:00
Adrian Roos
4ac8f40d96 MessagingStyle: Fix buggy measure in MessagingLinearLayout
Fixes a bug in MessagingLinearLayout where we would not
recompute the height of it after applying the computed
insets to the text views, leading to incorrect padding
and in rare cases a cut off message at the bottom.

Change-Id: If87a527555158e94e501832e9f49e380cc7da2bb
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/MessagingLinearLayoutTest.java
Fixes: 31463075
2016-12-07 15:16:19 -08:00
Treehugger Robot
faf3aa697f Merge "Clarify doc on NETWORK_RECOMMENDATIONS_ENABLED and WIFI_WAKEUP_ENABLED." 2016-12-07 23:00:26 +00:00
Svetoslav Ganov
74c9983e80 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: Ib8e50afcdb5475123968572ac9696e8ed4031631
2016-12-07 22:43:56 +00:00
TreeHugger Robot
e5e0a85ef3 Merge "Fix slow exit transition left exited views INVISIBLE." 2016-12-07 22:22:48 +00:00
Joe Onorato
fb9f736a3c ProtoOutputStream convenience methods.
- Add a set of write methods to ProtoOutputStream that figure out the type.
  The other methods are doing all the type checking anyway, so this won't be
  much slower, and it's way easier to use.  The expected java type casts
  that people would do anyway happen inside.
- Add writeObject and writeRepeatedObject methods that write a pre-encoded
  object.
- Add a constructor that takes an OutputStream, and a flush() method.  Right
  now, all the data gets flushed at the end, but given this API it would be
  possible to write smaller chunks at the object boundaries and do more
  sophisticated buffering.

Test: CTS
Change-Id: Ieb852092d3d65812c81139558151de9e3f467dc8
2016-12-07 13:24:54 -08:00
Ned Burns
3dc8814e04 DO NOT MERGE Fix android:noHistory for Wear am: d7a313fb11
am: 5207e1cff1

Change-Id: Ie5ed01b9161da8ecf0e6b4ec92be71e941cc966c
2016-12-07 21:20:15 +00:00
Ned Burns
5207e1cff1 DO NOT MERGE Fix android:noHistory for Wear
am: d7a313fb11

Change-Id: I3715b2fb1045b7bfce7f52e9b4982fcc0218d28c
2016-12-07 21:14:51 +00:00