Merge "Magnifier not respecting RTL/LTR direction and keyguard dialogs not properly centered." into jb-mr1-dev
am 80ce3d87: Merge "Magnifier not respecting RTL/LTR direction and keyguard dialogs not properly centered." into jb-mr1-dev

* commit '80ce3d8746e9bb727ebf37a8963b96be84d82413':
  Magnifier not respecting RTL/LTR direction and keyguard dialogs not properly centered.
Defer layer rendering to avoid stalls
Bug #7326824

When a layer is taken out of the cache and initialized it gets cleared
to prepare it for future rendering. This triggers the following sequence
of operations:

glBindFramebuffer(layer.fbo)
attach texture storage to FBO
glClear()
glBindFramebuffer(defaultFbo)

The clear forces a resolve on tilers which stalls the CPU for a little
while, thus producing jank during animations. This change moves the
clear to the next frame when we know we will have to execute a resolve
anyway.

Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
Robustly add symlink and add for non-primary users

Amazingly, some apps still don't use the nativeLibraryPath. So add a lib
symlink for non-primary users to fix that.

Also, there was an error when the symlink existed that it would give up.
This shouldn't really happen, but in that case, just remove it and
create a new one to be safe.

Also, move the downgrade code to the appropriate place. This downgrade
case triggered the above symlink existing bug.

Bug: 7318366
Bug: 7371571
Change-Id: Ia175b36d98f00bdc2f2433b909aafd524eb34d15
Merge "Fix bug #7374285  GridLayout layout param margins are broken in RTL mode" into jb-mr1-dev
am 07f85fec: Merge "Fix bug #7374285  GridLayout layout param margins are broken in RTL mode" into jb-mr1-dev

* commit '07f85fecdd9f13a617953c7377ff62b4133b4e30':
  Fix bug #7374285  GridLayout layout param margins are broken in RTL mode
Merge "Layoutlib: Read and close XML files as soon as possible." into jb-mr1-dev
am d8149b03: Merge "Layoutlib: Read and close XML files as soon as possible." into jb-mr1-dev

* commit 'd8149b03a8676a49f6ca500eecafe79fadf046a7':
  Layoutlib: Read and close XML files as soon as possible.
Fix the build

- was missing a "make update-api" pass

Change-Id: I004a1650cf7946e0e8bd36d75dab81bbca80443c
Merge "Fix the build" into jb-mr1-dev
More migration to Global settings.

Bug: 7375796
Change-Id: I3954ce141ad30073896090a28eee743ba15fd736
am 0437302f: Merge "Fix the build" into jb-mr1-dev

* commit '0437302f164f3eb1ba6a359ef5b3cd857facbbe4':
  Fix the build
Layoutlib: Read and close XML files as soon as possible. do not merge.

Because passing an InputStream to KXML does not close the
stream after the file has been parsed, the files are staying
locked on windows until the gc and finalizers are run.

This change preload the XML files and close their stream,
and then pass the content in a stream to the parser.

(cherry picked from commit c48b0b940d632b9862ff6aa32665e37fe9e50845)

Change-Id: I1b225454c166026c1aab6290c55ac8279e8862d5
Fix missing @hide on ViewGroup.resolveLayoutParams()

- as we dont need this to be public

Change-Id: Ib8de262eec26d4785b13875d59599369b06a067d
Merge "Fix missing @hide on ViewGroup.resolveLayoutParams()" into jb-mr1-dev
am 45c77ca0: Merge "Fix missing @hide on ViewGroup.resolveLayoutParams()" into jb-mr1-dev

* commit '45c77ca0f6afd568ff6d149e17fb43c684e51722':
  Fix missing @hide on ViewGroup.resolveLayoutParams()
Try to free cache before giving up on install

Try to get installd to free up cache before giving up when there is too
little space free.

Bug: 7232123
Change-Id: Ie3c8ca8dfc190abbb9a29a7baee31f32e9de7d69
Fix deadlock.

The display manager must never call into the activity manager with
its lock held.  Make it clear that the adapters are constructed
while holding the syncroot lock.

Bug: 7377631
Change-Id: I1557313cbb31dcad9b5a46919a88a5a1c1af3e9b
am 135b5ba5: Layoutlib: Read and close XML files as soon as possible. do not merge.

* commit '135b5ba52431b147d51a81b807784009cd0510dd':
  Layoutlib: Read and close XML files as soon as possible. do not merge.
am fcc93e73: (-s ours) am 135b5ba5: Layoutlib: Read and close XML files as soon as possible. do not merge.

* commit 'fcc93e734be9fe4608fb5a6818163104cdec3fb5':
  Layoutlib: Read and close XML files as soon as possible. do not merge.