OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Update JavaDoc for DragEvent.getLocalState" into nyc-dev
TreeHugger Robot [Fri, 9 Sep 2016 18:34:55 +0000 (18:34 +0000)]
Merge "Update JavaDoc for DragEvent.getLocalState" into nyc-dev

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:44:54 +0000 (10:44 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev am: 00e808b06b am: e59073096e am: 24ffc9ab47 am: bd6a29cddc
am: e9295560cf

Change-Id: Ib64b8f7e777a5779ef7b057cb55bf1b8148e2fa5

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 82c6e6267e -s ours...
Narayan Kamath [Fri, 9 Sep 2016 10:39:40 +0000 (10:39 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 82c6e6267e  -s ours am: 646ee94421 am: 8f0cc3dd13 am: 8cb6b9335c
am: eb972e5d9d

Change-Id: I8030e2b745fe08b238fd9da5b518729fda05174e

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:39:29 +0000 (10:39 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev am: 00e808b06b am: e59073096e am: 24ffc9ab47
am: bd6a29cddc

Change-Id: I78f74e5d3f0e0b82afe4d5f48f2541a881189aa1

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 82c6e6267e -s ours...
Narayan Kamath [Fri, 9 Sep 2016 10:33:43 +0000 (10:33 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 82c6e6267e  -s ours am: 646ee94421 am: 8f0cc3dd13
am: 8cb6b9335c

Change-Id: If2f8fbef801cd61834ac50a7e1a254ed21b95cc2

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:33:40 +0000 (10:33 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev am: 00e808b06b am: e59073096e
am: 24ffc9ab47

Change-Id: I78adbdbbf8ffddfee3cd8b1407415cdf3a4d1b1f

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:28:52 +0000 (10:28 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev am: 00e808b06b
am: e59073096e

Change-Id: Ifb7972c30d70a0fbc4ffdae100aac2d77ca445ca

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 82c6e6267e -s ours...
Narayan Kamath [Fri, 9 Sep 2016 10:28:46 +0000 (10:28 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 82c6e6267e  -s ours am: 646ee94421
am: 8f0cc3dd13

Change-Id: Ida08d48da51f9f49dc70a916fa379cf89a4d33c0

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 82c6e6267e -s ours
Narayan Kamath [Fri, 9 Sep 2016 10:21:48 +0000 (10:21 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 82c6e6267e  -s ours
am: 646ee94421

Change-Id: I62f6556e630707274daa4ee0a4a57c77f5329bbc

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:18:19 +0000 (10:18 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev
am: 00e808b06b

Change-Id: I14939b5bf04ba47229e663b2ffc50543c5c6bc9a

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 9 Sep 2016 10:15:11 +0000 (10:15 +0000)]
Backport changes to whitelist sockets opened by the zygote.
am: 82c6e6267e  -s ours

Change-Id: Ib35b2567f19aff39d285794951cf9b8cb8d74ef1

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1...
Narayan Kamath [Fri, 9 Sep 2016 10:05:44 +0000 (10:05 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into lmp-mr1-ub-dev

7 years agoMerge "docs: Define card data for GPU Debugger b/31318053" into nyc-dev
Cheryl Potter [Fri, 9 Sep 2016 01:15:52 +0000 (01:15 +0000)]
Merge "docs: Define card data for GPU Debugger b/31318053" into nyc-dev

7 years agoUpdate JavaDoc for DragEvent.getLocalState
Vladislav Kaznacheev [Thu, 8 Sep 2016 23:37:23 +0000 (16:37 -0700)]
Update JavaDoc for DragEvent.getLocalState

Explicitly state that "local state" is local to the window
which has started the drag operation.

Bug: 31372686
Change-Id: Idbea7586c4e74097362067fa90390b97744181bb

7 years agoMerge "docs: Fixing links to moved Fragments guide, + redirect" into nyc-dev
Andrew Solovay [Thu, 8 Sep 2016 17:36:46 +0000 (17:36 +0000)]
Merge "docs: Fixing links to moved Fragments guide, + redirect" into nyc-dev

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev...
Narayan Kamath [Thu, 8 Sep 2016 09:05:08 +0000 (09:05 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev am: 014016cf32 am: 447d3798f1 am: 71e6a6f12a
am: 177ee386b9

Change-Id: Ic7a1d8c1ba996024b02915e431f2b7aacc306225

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560 -s ours...
Narayan Kamath [Thu, 8 Sep 2016 08:48:39 +0000 (08:48 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560  -s ours am: 6fa8339792 am: c6ced086d1
am: 4474da7b7c

Change-Id: Ie14b0e7887bd2da5c986b077f4563bbc306c88be

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev...
Narayan Kamath [Thu, 8 Sep 2016 08:48:31 +0000 (08:48 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev am: 459810b9b7 am: 47b88a15f6
am: 7a0c7ab520

Change-Id: I0ed385ab13ca461c1b77226d3be3cf788a09d3d6

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev...
Narayan Kamath [Thu, 8 Sep 2016 08:45:47 +0000 (08:45 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev am: 014016cf32 am: 447d3798f1
am: 71e6a6f12a

Change-Id: Ib162897a1428ab8c025a414eb0a3872327274f7a

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 41ca1bce01 am: 49d992fdb0
Narayan Kamath [Thu, 8 Sep 2016 08:44:31 +0000 (08:44 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 41ca1bce01 am: 49d992fdb0
am: 67c4adb5c1  -s ours

Change-Id: I2af50f6d32be035f491df4a0b83489ba7da186e7

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev...
Narayan Kamath [Thu, 8 Sep 2016 08:40:03 +0000 (08:40 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev am: 014016cf32
am: 447d3798f1

Change-Id: I323c669ed44e10f9e3a91271f47800754da5d389

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560 -s ours...
Narayan Kamath [Thu, 8 Sep 2016 08:39:07 +0000 (08:39 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560  -s ours am: 6fa8339792
am: c6ced086d1

Change-Id: Ie3699efd33fe53acfd0dff64cbb18e4792a65bf3

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev...
Narayan Kamath [Thu, 8 Sep 2016 08:35:04 +0000 (08:35 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev am: 459810b9b7
am: 47b88a15f6

Change-Id: Id267e22508824d569f54068291304584b3343b9a

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 41ca1bce01
Narayan Kamath [Thu, 8 Sep 2016 08:34:58 +0000 (08:34 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 41ca1bce01
am: 49d992fdb0

Change-Id: I0560d831235bd7ba3ea764b23e64b4e08110d7e5

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560 -s ours
Narayan Kamath [Thu, 8 Sep 2016 08:33:40 +0000 (08:33 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 0f6a0e1560  -s ours
am: 6fa8339792

Change-Id: Id7ad55a251a26782815005218dc186b53e74cfca

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev
Narayan Kamath [Thu, 8 Sep 2016 08:30:41 +0000 (08:30 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev
am: 014016cf32

Change-Id: Ic0cf8b5cc2accaad552b82eaadce359e21e5e624

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev
Narayan Kamath [Thu, 8 Sep 2016 08:24:54 +0000 (08:24 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev
am: 459810b9b7

Change-Id: I867a7c97c8363ede1b04e4ea8a75045d36d9d58d

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Thu, 8 Sep 2016 08:24:47 +0000 (08:24 +0000)]
Backport changes to whitelist sockets opened by the zygote.
am: 41ca1bce01

Change-Id: Id08676457fa3fa022d607e5de754f49b9c396261

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Thu, 8 Sep 2016 08:23:49 +0000 (08:23 +0000)]
Backport changes to whitelist sockets opened by the zygote.
am: 0f6a0e1560  -s ours

Change-Id: I2cdd131b750b4d04672149dcf7a90d2d566dd621

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev
Narayan Kamath [Thu, 8 Sep 2016 08:20:55 +0000 (08:20 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dr-dev

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev
Narayan Kamath [Thu, 8 Sep 2016 08:12:17 +0000 (08:12 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into mnc-dev

7 years agoMerge "Backport changes to whitelist sockets opened by the zygote." into nyc-dev
Narayan Kamath [Thu, 8 Sep 2016 07:30:43 +0000 (07:30 +0000)]
Merge "Backport changes to whitelist sockets opened by the zygote." into nyc-dev

7 years agoMerge "docs: Added item to Support Library revision history" into nyc-dev
TreeHugger Robot [Wed, 7 Sep 2016 23:45:37 +0000 (23:45 +0000)]
Merge "docs: Added item to Support Library revision history" into nyc-dev

7 years agoMerge "revisions to the Building Your First app class with feedback from mpawlan...
Scott Main [Wed, 7 Sep 2016 23:39:50 +0000 (23:39 +0000)]
Merge "revisions to the Building Your First app class with feedback from mpawlan (thank you!)" into nyc-dev

7 years agoMerge "docs: fix grammar mistake in TextureView" into nyc-dev
Mark Lu [Wed, 7 Sep 2016 23:24:09 +0000 (23:24 +0000)]
Merge "docs: fix grammar mistake in TextureView" into nyc-dev

7 years agodocs: Fixing links to moved Fragments guide, + redirect
Andrew Solovay [Fri, 26 Aug 2016 22:46:38 +0000 (15:46 -0700)]
docs: Fixing links to moved Fragments guide, + redirect

The Fragments API guide was moved, but apparently a redirect was
never set up. Also, there are a few links to the old location in
the Javadocs.

Staged the revised Javadocs (see first comment for stage location).
Not going to stage the redirects file since it would trash another,
bigger CL that deals with the redirects file, but it's pretty
straightforward.

bug: 30559011
Change-Id: Ibd65f85c1ebb9789c1d40614fe11fe4ffda97e58

7 years agoMerge "DO NOT MERGE Stop work challenge freeform bypass" into nyc-dev
TreeHugger Robot [Wed, 7 Sep 2016 22:07:19 +0000 (22:07 +0000)]
Merge "DO NOT MERGE Stop work challenge freeform bypass" into nyc-dev

7 years agodocs: Added item to Support Library revision history
Andrew Solovay [Mon, 29 Aug 2016 19:05:17 +0000 (12:05 -0700)]
docs: Added item to Support Library revision history

See first comment for doc stage location.

bug: 30622244
Change-Id: I7cfdf2107d57d72565bcc4cc503242741f2452ff

7 years agorevisions to the Building Your First app class with feedback from mpawlan (thank...
smain@google.com [Tue, 6 Sep 2016 19:32:18 +0000 (12:32 -0700)]
revisions to the Building Your First app class with feedback from mpawlan (thank you!)

stage: https://android-dot-devsite.googleplex.com/training/basics/firstapp/creating-project.html

Change-Id: I40ce201553226fa36477e54b82721bc6cc85b88b

7 years agoMerge "Support library 24.2.0 API diff" into nyc-dev
Alan Viverette [Wed, 7 Sep 2016 20:54:04 +0000 (20:54 +0000)]
Merge "Support library 24.2.0 API diff" into nyc-dev

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f8...
Narayan Kamath [Wed, 7 Sep 2016 20:32:17 +0000 (20:32 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc  -s ours am: 9802fcfa2b am: 2acf9f7e3c am: 36b90a1934 am: 5febcdd210
am: ebcc7aeda9

Change-Id: Ie2e2292bbb8c6d274109d64f7dd3ed00fca0ba0f

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f8...
Narayan Kamath [Wed, 7 Sep 2016 20:23:28 +0000 (20:23 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc  -s ours am: 9802fcfa2b am: 2acf9f7e3c am: 36b90a1934
am: 5febcdd210

Change-Id: Ib7e40acc4682e4198dcaab78c57de02acfe89c94

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0c90dcb323caeda14baf903cc108759:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e6978151bf245a775329cdae5e574d5:
-----------------------------------------------
fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- change std::unordered_map to std::tr1::unordered_map.
- add /dev/alarm and /dev/__properties__ to the whitelist.
- map.erase(iterator) returns void prior to C++11, so need the kludge
  of calling erase(it++).

(cherry picked from commit 7ec85f9d549971af59f047d5eafd7a829e1541c7)

Change-Id: If44dc64275d753553233b78a05d41df9d5bfdc36

7 years agoMerge "docs: Fixing redirect file" into nyc-dev
TreeHugger Robot [Wed, 7 Sep 2016 20:19:07 +0000 (20:19 +0000)]
Merge "docs: Fixing redirect file" into nyc-dev

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f8...
Narayan Kamath [Wed, 7 Sep 2016 20:17:02 +0000 (20:17 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc  -s ours am: 9802fcfa2b am: 2acf9f7e3c
am: 36b90a1934

Change-Id: Iec55904ecb004d3bf89bf3a065e5811afae798d6

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f8...
Narayan Kamath [Wed, 7 Sep 2016 20:12:43 +0000 (20:12 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc  -s ours am: 9802fcfa2b
am: 2acf9f7e3c

Change-Id: Ideae7875e299ec0292054aad85fe8aa92b6aba9b

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f8...
Narayan Kamath [Wed, 7 Sep 2016 20:07:58 +0000 (20:07 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87 am: 9a409265fc  -s ours
am: 9802fcfa2b

Change-Id: Iabeefa7d07d78002c124ce62dc210111b83a99b7

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87
Narayan Kamath [Wed, 7 Sep 2016 20:01:56 +0000 (20:01 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54 am: f7b9f84f87
am: 9a409265fc  -s ours

Change-Id: Idf4dcc5ab7e8b0510848cbd2f220fe7a8e4b3e04

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

(cherry picked from commit c5f27a7cb2ec816f483a65255034a1b57a8aa221)

Fix clang build breakage (-Werror -Wformat).

Use %zd for size_t. Note that this will break only on (-plus-)aosp because
clang is disabled on the N development branches.

bug: 30963384

(cherry picked from commit b334c33d65894f5ca9833fa55c3a1cf75e01c497)

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

(cherry picked from commit 3764a260f0c90dcb323caeda14baf903cc108759)

fd_utils: Remove whitelist for "/dev/pmsg0".

We're now calling __android_log_close prior to a fork, so this file
shouldn't need to be open.

bug: 31243313
bug: 30963384

(cherry picked from commit 8dee0541904e4f792cdebdee4f23f768561cb276)

fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

(cherry picked from commit 0b76d6a28e6978151bf245a775329cdae5e574d5)

add dri device to zygote whitelisted FDs

The driver can be used just like /dev/ion for graphic buffers.

(cherry picked from commit 8977e424ee2d6d85fec419532ae510131aa88c45)

7 years agoMerge "docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI" into nyc-dev
TreeHugger Robot [Wed, 7 Sep 2016 19:02:35 +0000 (19:02 +0000)]
Merge "docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI" into nyc-dev

7 years agoBackport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54
Narayan Kamath [Wed, 7 Sep 2016 18:58:41 +0000 (18:58 +0000)]
Backport changes to whitelist sockets opened by the zygote. am: 7ec85f9d54
am: f7b9f84f87

Change-Id: I317cecff389f30c5d47e4adee1afafbde8d9d23d

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Wed, 7 Sep 2016 18:53:40 +0000 (18:53 +0000)]
Backport changes to whitelist sockets opened by the zygote.
am: 7ec85f9d54

Change-Id: I6db56b5b06636201382f6d908297644183253c0b

7 years agodocs: Fixing redirect file
Andrew Solovay [Fri, 26 Aug 2016 21:31:25 +0000 (14:31 -0700)]
docs: Fixing redirect file

Devsite handles "redirect this directory tree" differently than DAC
did; as a result, a bunch of redirects were broken. (On Devsite, a
redirect ending in a slash redirects *only* paths that match it;
to redirect that directory and all its contents, end with /...)

Also deleted one redirect that wouldn't work (trying to redirect
foo.html#bar , which wouldn't work--the anchors are ignored on
devsite and there was a separate redirect for just foo.html).

When a redirect pointed *to* a path ending in slash -- but was clearly
meant to point to the directory itself (i.e. the /index.html file) --
I removed the trailing slash.

Redirects staged to https://android-dot-devsite.googleplex.com , so
they should all work there.

bug: 30748799
Change-Id: I6d090de5e6efa6ddb2bbe3e99fdbfb0ae02b88d5

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0c90dcb323caeda14baf903cc108759:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e6978151bf245a775329cdae5e574d5:
-----------------------------------------------

fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- add /dev/__properties__ to the whitelist.

Change-Id: I709a7f4913e807a8fec8a58c81e98fe5b5222820

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0c90dcb323caeda14baf903cc108759:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e6978151bf245a775329cdae5e574d5:
-----------------------------------------------

fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- add /dev/__properties__ to the whitelist.

Change-Id: Ic512be6362c3c5d84767e933884872b7e995dfea

7 years agoBackport changes to whitelist sockets opened by the zygote.
Narayan Kamath [Fri, 19 Aug 2016 12:45:24 +0000 (13:45 +0100)]
Backport changes to whitelist sockets opened by the zygote.

This is the backport of the following commits :

Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22:
-----------------------------------------------

Reopen whitelisted zygote file descriptors after a fork.

We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384

Commit 3764a260f0c90dcb323caeda14baf903cc108759:
-----------------------------------------------

Add a whitelist of sockets on fork.

Maintain a whitelist of AF_UNIX sockets that are permitted
to exist at the time of forking. If an open socket does not belong
to the whitelist (or is not AF_UNIX), the process will abort. If an
open socket is whitelisted, it will be redirected to /dev/null after
a sucessful fork. This allows us to unify our handling of the special
zygote sockets (/dev/socket/zygote[_secondary]) with the existing
whitelist of non socket file descriptors.

This change also removes non-fatal ALOGW messages since they have the
side effect of reopening the logging socket.

bug: 30963384

Commit 0b76d6a28e6978151bf245a775329cdae5e574d5:
-----------------------------------------------
fd_utils: Fix broken usage of iterators.

There were two separate issues here :
- RestatInternal was using an iterator after a call to erase(). This
  will not work because it will be invalidated.
- The "standard" for loop idiom for iterating over a map while making
  structural changes to it is broken. Switch to a while loop and treat
  cases where elements are erased differently from cases where they
  aren't.

bug: 31092930
bug: 30963384

Plus additional changes:
-----------------------------------------------
- change std::unordered_map to std::tr1::unordered_map.
- add /dev/alarm and /dev/__properties__ to the whitelist.
- map.erase(iterator) returns void prior to C++11, so need the kludge
  of calling erase(it++).

Change-Id: I694ff66d5f227239b0190ffc2287882b16e336fa

7 years agoMerge "docs: Added functional and UI quality criteria for Wear 2.0 apps. Bug:30951238...
Sreevani Sreejith [Tue, 6 Sep 2016 21:24:31 +0000 (21:24 +0000)]
Merge "docs: Added functional and UI quality criteria for Wear 2.0 apps. Bug:30951238" into nyc-dev

7 years agodocs: Define card data for GPU Debugger
Cheryl Potter [Tue, 6 Sep 2016 21:13:52 +0000 (14:13 -0700)]
docs: Define card data for GPU Debugger
b/31318053

Change-Id: Iaedeaa8f39d1adb7dd556d26f6cf176a0a6b4003

7 years agodocs: Added functional and UI quality criteria for Wear 2.0 apps.
sreevanis [Tue, 30 Aug 2016 17:02:43 +0000 (10:02 -0700)]
docs: Added functional and UI quality criteria for Wear 2.0 apps.
Bug:30951238

Change-Id: I5cbfac60716415d87f049ae2313fed7bfa214e28

7 years agoUpdate #jd-content to #body-content for DevSite layout changes.
Amanda Kassay [Tue, 6 Sep 2016 16:57:36 +0000 (12:57 -0400)]
Update #jd-content to #body-content for DevSite layout changes.

Change-Id: I57c43a9b05a2bd072c54bf53e8428015edf0a90e

7 years agoDoc change: remove useUpdatedTemplates script and sections using old templates.
Dirk Dougherty [Fri, 2 Sep 2016 22:24:11 +0000 (15:24 -0700)]
Doc change: remove useUpdatedTemplates script and sections using old templates.

Change-Id: I7c4e8f36125ad120699d5b2c66bea29433fecf59

7 years agoremove 'useUpdatedTemplates' flag that's no longer supported. Fix build.
smain@google.com [Sat, 3 Sep 2016 01:10:29 +0000 (18:10 -0700)]
remove 'useUpdatedTemplates' flag that's no longer supported. Fix build.

Change-Id: Ic1778b6e3044c80e602f5ce9d4f825c8578c1a0a

7 years agoMerge "Remove obsolete collections and extras metadata files. Authors should use...
Dirk Dougherty [Fri, 2 Sep 2016 22:26:59 +0000 (22:26 +0000)]
Merge "Remove obsolete collections and extras metadata files. Authors should use jd_extras_<lang> instead..." into nyc-dev

7 years agoMerge "switch all API builds to use template-sdk instead of (soon to be deleted)...
Scott Main [Fri, 2 Sep 2016 21:27:19 +0000 (21:27 +0000)]
Merge "switch all API builds to use template-sdk instead of (soon to be deleted) templates-sdk-dev. also update all non-DAC builds to use the "referenceonly" flag for a cleaner output and faster build." into nyc-dev

7 years agoswitch all API builds to use template-sdk instead of (soon to be deleted) templates...
smain@google.com [Fri, 2 Sep 2016 02:52:17 +0000 (19:52 -0700)]
switch all API builds to use template-sdk instead of (soon to be deleted) templates-sdk-dev.
also update all non-DAC builds to use the "referenceonly" flag for a cleaner output and faster build.

Change-Id: Iebd9791305479c5dc406ba3b81eaf076855bc632

7 years agoExclude sdk files from metadata.
Dirk Dougherty [Thu, 1 Sep 2016 21:07:47 +0000 (14:07 -0700)]
Exclude sdk files from metadata.

Change-Id: I16f89a3bfae32a0fa54037e328fc784133e5d9b0
Bug-Id: 31244539

7 years agodocs: Typo fix in multi-window docs
Andrew Solovay [Mon, 29 Aug 2016 18:48:50 +0000 (11:48 -0700)]
docs: Typo fix in multi-window docs

Referred to the "android:resizableActivity" property; should
have been "android:resizeableactivity". English prose, however,
consistently uses the (preferred) spelling "resizable".

See first comment for stage location.

bug: 30566808
Change-Id: I2570ff9269b4d2dc8b11f1c98817e50726be78fc

7 years agoMerge "docs: Fixing formatting problem" into nyc-dev
Andrew Solovay [Thu, 1 Sep 2016 02:21:46 +0000 (02:21 +0000)]
Merge "docs: Fixing formatting problem" into nyc-dev

7 years agodocs: fixing gpu debugger redirect
Cheryl Potter [Thu, 1 Sep 2016 00:43:37 +0000 (17:43 -0700)]
docs: fixing gpu debugger redirect
b/31227713

Change-Id: Ia0e7e4d26940dc98ab735df3068dc2dda22b1f58

7 years agodocs: Add redirects for new help buttons (Create Java Class, GPU Debugger, more)
Cheryl Potter [Wed, 31 Aug 2016 21:31:50 +0000 (14:31 -0700)]
docs: Add redirects for new help buttons (Create Java Class, GPU Debugger, more)
b/31158856
b/31157097
b/31158502

Change-Id: Id3178127e0267936c58f47cd7da7348202051fa3

7 years agoMerge "Properly close fd backing a MemoryIntArray" into nyc-dev
Svetoslav Ganov [Wed, 31 Aug 2016 17:25:28 +0000 (17:25 +0000)]
Merge "Properly close fd backing a MemoryIntArray" into nyc-dev

7 years agoProperly close fd backing a MemoryIntArray
Svetoslav Ganov [Mon, 29 Aug 2016 18:14:05 +0000 (11:14 -0700)]
Properly close fd backing a MemoryIntArray

Use ParcelFileDescriptor only as an IPC transport
to make sure MemoryIntArray manges its backing fd.

Bug:30310689

Change-Id: Ib3cc13ef4ae2a744e5f7a96099570e0431847bce
(cherry picked from commit fe2462f3a60b34ee6b7d8764d92ae58fc0cd7dfd)

7 years agoMerge "replace the N Preview landing page with the redirect to the package index...
Scott Main [Wed, 31 Aug 2016 03:06:08 +0000 (03:06 +0000)]
Merge "replace the N Preview landing page with the redirect to the package index also update version metadata (no longer preview, now 7.0)" into nyc-dev

7 years agodocs: fix grammar mistake in TextureView
Mark Lu [Wed, 31 Aug 2016 00:38:42 +0000 (17:38 -0700)]
docs: fix grammar mistake in TextureView

Bug: 6441115

7 years agoRevert "Bump up the uncrypt timeout to 30 min." Creates Null Build to test OTA failur...
Adam Seaton [Tue, 30 Aug 2016 23:15:49 +0000 (23:15 +0000)]
Revert "Bump up the uncrypt timeout to 30 min." Creates Null Build to test OTA failure fix. This reverts commit 8abcfed8a42a1ca517ee3c8d0448fda669ff9ded.
am: b57e6560d0

Change-Id: Idaafcb7c835aa7b7b83bb7382900ef3d18fa551f

7 years agoMerge "Backup system QS tiles DO NOT MERGE" into nyc-dev
TreeHugger Robot [Tue, 30 Aug 2016 22:30:15 +0000 (22:30 +0000)]
Merge "Backup system QS tiles DO NOT MERGE" into nyc-dev

7 years agoRevert "Bump up the uncrypt timeout to 30 min."
Adam Seaton [Tue, 30 Aug 2016 22:14:47 +0000 (22:14 +0000)]
Revert "Bump up the uncrypt timeout to 30 min."
Creates Null Build to test OTA failure fix.
This reverts commit 8abcfed8a42a1ca517ee3c8d0448fda669ff9ded.

Change-Id: I64474dad467ce8d8e379e0e2c47814d76ac0ee0d

7 years agoreplace the N Preview landing page with the redirect to the package index
smain@google.com [Tue, 30 Aug 2016 01:36:50 +0000 (18:36 -0700)]
replace the N Preview landing page with the redirect to the package index
also update version metadata (no longer preview, now 7.0)

Change-Id: I84af003daa9bae3bc932c8b87921ed82f813e1cf

7 years agoBackup system QS tiles DO NOT MERGE
Jason Monk [Thu, 25 Aug 2016 19:57:14 +0000 (15:57 -0400)]
Backup system QS tiles DO NOT MERGE

Add QS tiles to the backup list.  Non-system tiles will get removed
since they won't be installed when restore happens.

Change-Id: Iccf6e773384c45bd4d1f10c21aa8af356b3920d2
Bug: 28782938

7 years agodocs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI
Andrew Solovay [Tue, 30 Aug 2016 18:34:05 +0000 (11:34 -0700)]
docs: Added note about CustomTabsIntent.setAlwaysUseBrowserUI

See first comment for doc stage location.

bug: 31181353
Change-Id: Ibdd8c32be4b182241a4b2d3b4f430dbca18c53fb

7 years agoMerge "docs: Fix broken camera example" into nyc-dev
Mark Goldstein [Tue, 30 Aug 2016 18:34:21 +0000 (18:34 +0000)]
Merge "docs: Fix broken camera example" into nyc-dev

7 years agoMerge "add a notice that Work profiles are not compatible with Instant Run Also inclu...
Scott Main [Tue, 30 Aug 2016 18:09:03 +0000 (18:09 +0000)]
Merge "add a notice that Work profiles are not compatible with Instant Run Also includes the redirect for links from the Studio UI bug: 31098748" into nyc-dev

7 years agoMerge "Enforce consistent sizes for arrays in SpannableStringInternal" into nyc-dev
Raph Levien [Tue, 30 Aug 2016 17:25:55 +0000 (17:25 +0000)]
Merge "Enforce consistent sizes for arrays in SpannableStringInternal" into nyc-dev

7 years agoMerge "Sanity check ICMP6 router advertisement packets" into nyc-dev
TreeHugger Robot [Tue, 30 Aug 2016 05:20:10 +0000 (05:20 +0000)]
Merge "Sanity check ICMP6 router advertisement packets" into nyc-dev

7 years agoSanity check ICMP6 router advertisement packets
Paul Jensen [Wed, 20 Jul 2016 19:01:17 +0000 (15:01 -0400)]
Sanity check ICMP6 router advertisement packets

There is a chance a packet can slip by before we install the filter
on our socket listening for RAs, so add some basic sanity checking
to make sure we've recieved an RA.

Change-Id: I14cf84a0814896a41e00f50af376dfc4988d36cb
Fixes: 29586253

7 years agoMerge "update shared libraries for system apps" into nyc-dev
TreeHugger Robot [Tue, 30 Aug 2016 01:44:29 +0000 (01:44 +0000)]
Merge "update shared libraries for system apps" into nyc-dev

7 years agoMerge "Cherry pick TextureView fixes" into nyc-dev
John Reck [Mon, 29 Aug 2016 23:33:55 +0000 (23:33 +0000)]
Merge "Cherry pick TextureView fixes" into nyc-dev

7 years agodocs: Fix broken camera example
Mark Goldstein [Fri, 26 Aug 2016 18:29:25 +0000 (11:29 -0700)]
docs: Fix broken camera example

Removed bad out of date instructions and link to better
training pages instead.

Bug: 15562334
Change-Id: I77fe558e665de509eb11a2c668ba7bdcdbab3c6f

7 years agoupdate shared libraries for system apps
Todd Kennedy [Thu, 28 Jul 2016 20:28:16 +0000 (13:28 -0700)]
update shared libraries for system apps

After removing updates for a system package, we weren't updating its
shared libraries when we should have. Make it so.

NOTE: This didn't affect device boot because we update all of the
shared libraries for all system applications after scanning packages.

Bug: 30266503
Change-Id: I8edf4344228fb3e793e7648ea70a041cb5db6af6
(cherry picked from commit 6058df65e645a81bdc7285dcd9f8b12b9f5b534f)

7 years agoMerge "Make sure IME focus is synced to View focus" into nyc-dev
TreeHugger Robot [Mon, 29 Aug 2016 22:35:21 +0000 (22:35 +0000)]
Merge "Make sure IME focus is synced to View focus" into nyc-dev

7 years agoMerge "ChooserActivity: Cannot start app that the icon overflows the layout" into...
Chet Haase [Mon, 29 Aug 2016 22:13:09 +0000 (22:13 +0000)]
Merge "ChooserActivity: Cannot start app that the icon overflows the layout" into nyc-dev

7 years agoMerge "Set up view state before attaching, jump drawables if needed" into nyc-dev
Chet Haase [Mon, 29 Aug 2016 22:12:07 +0000 (22:12 +0000)]
Merge "Set up view state before attaching, jump drawables if needed" into nyc-dev

7 years agoMerge "Force AlertDialogLayout to have gravity start|top" into nyc-dev
Chet Haase [Mon, 29 Aug 2016 22:11:25 +0000 (22:11 +0000)]
Merge "Force AlertDialogLayout to have gravity start|top" into nyc-dev

7 years agoMerge "FloatingActionMode: Fix screen coordinates." into nyc-dev
Chet Haase [Mon, 29 Aug 2016 22:11:07 +0000 (22:11 +0000)]
Merge "FloatingActionMode: Fix screen coordinates." into nyc-dev

7 years agoMerge "Eliminate next-alarm-clock broadcast flapping" into nyc-dev
TreeHugger Robot [Mon, 29 Aug 2016 21:47:02 +0000 (21:47 +0000)]
Merge "Eliminate next-alarm-clock broadcast flapping" into nyc-dev

7 years agoCherry pick TextureView fixes
Chris Craik [Mon, 25 Jul 2016 22:29:59 +0000 (15:29 -0700)]
Cherry pick TextureView fixes

The following changes are in this commit:

Avoid destroying TextureView surfaces for onStop

bug:30238922

TextureViews will hold onto their backing surfaces, which will allow
them to resume gracefully when the app's surfaces are saved.

Now only resources that are destroyed for onStop are DisplayLists.

(cherry picked from commit 391d560402c2902e0fd701f99eabd91025154201)

TextureView: destroy layer on destroyHardwareResources event

bug:30468770

(cherry picked from commit 1c16c37d8646ed25e844af8472eede988ad0c2f0)

Fix NPE in TextureView

Bug: 30651595

(cherry picked from commit 3c2587f26eed32a8723488131d1d8940dc147ee1)

Fix NPE in TextureView

Bug: 30779663

(cherry picked from commit 7e237189c292cdb886733eb95c6069b7ac002527)

Fix maps resume being blank

Bug: 30889568

Fixes an issue where mLayer didn't have
the mSurface set on it in certain resume
scenarios.

(cherry picked from commit 03df0834e63b587dbfb8fdcd0086e3e1e72b9f9d)

7 years agoMerge "DO NOT MERGE -- Fix finishing activity in non-focused stack" into nyc-dev
TreeHugger Robot [Mon, 29 Aug 2016 21:10:31 +0000 (21:10 +0000)]
Merge "DO NOT MERGE -- Fix finishing activity in non-focused stack" into nyc-dev

7 years agoEliminate next-alarm-clock broadcast flapping
Christopher Tate [Wed, 3 Aug 2016 21:57:47 +0000 (14:57 -0700)]
Eliminate next-alarm-clock broadcast flapping

When multiple alarm clocks are scheduled at the same time, we would
flap among the alternatives for considering them the 'next upcoming
alarm clock', which in turn would generate [many] spurious broadcasts
about changes to the upcoming alarm situation.  This is now fixed;
once we have found the soonest upcoming alarm clock, we stick with
that one until it becomes unavailable, eliminating the spurious
broadcast traffic.

Bug 29501073

Change-Id: Ice1892490bb339e05fa8bd9d324fa1c6718b4942
(cherry picked from commit 76389c00d3d3ce79e48d9e87b597707ed3e8970c)

7 years agoBump up the uncrypt timeout to 30 min.
Tao Bao [Mon, 29 Aug 2016 19:26:43 +0000 (19:26 +0000)]
Bump up the uncrypt timeout to 30 min.
am: 8abcfed8a4

Change-Id: I35340614fe09f96f8c31cc53a99e366580294490

7 years agoDO NOT MERGE -- Fix finishing activity in non-focused stack
Andrii Kulian [Fri, 29 Jul 2016 19:55:41 +0000 (12:55 -0700)]
DO NOT MERGE -- Fix finishing activity in non-focused stack

This CL explicitly checks if we're finishing activity in non-focused
stack as there are other cases except this one when we finish paused
activities in FINISH_AFTER_VISIBLE mode.

Bug: 29007436
Bug: 29458854
Change-Id: I67744d23cd72f2fe8861180008bfdd284a7b5e26
(cherry picked from commit 995fa2bd2d334a37e10760c21ac108f4a3595713)