Revert "hardware keys: use proper key layout when adding a navbar with the keyboard up"

This reverts commit 74a36d37296560f3fd7f9983611636d9b52a600b.
Redo keylayout when hardware toggling

1. WindowManagerService has getters for navbar/hardware-nav information. PhoneStatusBar has an reference to a WindowManagerService instance. Use it.
2. If you're not moving forwards, you're moving backwards. This commit isn't a blind revert of related changes from previous  commits.

Change-Id: Ia8b66425006bd808948f06b3d8fa69d96596030f
This has been fixed for months, and does not affect IME being under the navbar when it's toggled w/ the keyboard up

Revert "fix the race condition in PSB for adding the navbar to hardware devices"

This reverts commit 5c5d470b2108e0d37310eddc58a4acb7e44e3184.

Change-Id: Ia145a22d61415fa743ed7f966b7fb5a661330ec8
advanced reboot: add soft reboot option

Adds a "Soft reboot" option which restarts zygote, as requested in JIRA
CYAN-3998

Change-Id: Ia6e5ed9b053e1c5ebd1fc55e5692858b97f7e0fc
Signed-off-by: Roman Birg <roman@cyngn.com>
Themes: Fix icon filters clamping to wrong values

Change-Id: Iab3cce465f8bdfd7c30a020fda254728349c5ebe
Themes: Make sure composed icon info is meaningful

We don't want to try and create a composed icon if the parts that
make up a composed icon are not valid or set.

Change-Id: I3d9e7432e4b351de9c0a4e662e028932ee7f08e2
fix necessity for try/catch on reorient() during adding NBV

Change-Id: I0d0fa7129156750d47b406919200c075d19cc54a
Optimize drawBitmapMesh using TRIANGLE_STRIP

Draw BitmapMesh using STRIP instead of TRIANGLES.
Depending on where the bottleneck is located in the pipeline,
there is a potential for saving two-thirds of the time spent rendering.
The speedup is due to avoiding redundant operations,
i.e., mapping each vertex four times to texture and color attribute,
sending each vertex twice to the GPU, vertex processing of GPU ...

In this patch:
1. Refactoring mesh using Strip.
2. Batch triangles by adding extra vertexs at the start and end of rows.
3. Optimize computing positions of texture and color attribute.

Benchmark: Drawing Bitmap(1152x768 px) with 200x200 meshes
Performance: ~46% improvements (from 26.4 fps to 38.7 fps)
Memory: Reduce 80800 vertices with xy, uv, rgba data.

Change-Id: I08c5c20d981d88528ce7b02012feefae468d6ec4
Signed-off-by: kui.zheng <kui.zheng@arm.com>
[ActivityManager] Prevent provider creating twice.

Root Cause:
If a process which contains provider is starting by not
from accessing provider, e.g. service/activity/receiver,
its providers' will be created during handleBindApplication.
And before the process complete publish provider to
ActivityManagerService, if there is an access to its provider,
these providers will be created again (there will have 2nd onCreate).

Solution:
Check if provider record is existed, do not schedule install provider,
becuase it is already creating and will be published later.

Change-Id: Ic200ceae042c014c86e7edee0acd013b513af334
ActivityManagerService: Penalise large apps going to background

Large applications (PSS more than a given threshold) when closed are
penalised with higher ADJ. Now, they will be more prone to be killed by
lowmemorykiller during memory pressure levels. This ensures better app
concurrency and improved subsequent latencies as it leaves some more room
for other smaller bg apps to be alive

Change-Id: I448fa12f55370949b22075595cd75b9c29e5d4b5
Fix occasional failure to disable navbar

If the observer in PSB fires before that in WM, then WM.hasNavigationBar() would still be true. When ored with the System.Setting, which should be false at that time, would not remove the navbarview.

TODO: handle navbar state outside of WM with a broadcast from WM, rather than letting other things use the system setting directly

Change-Id: Ie65f81bc6db4a1cac831755b0b8c39db386d95dd
ShutdownThread: set soft reboot trigger accordingly

Change-Id: I72bd52aa1492d356e368e8c60897002c1f110172
fix default recents clear all button

Change-Id: If874b9319649be81955eef31230320d4a22c0494
frameworks:base: SystemUI: cleanup a duplicate permission

these permissions are duplicated which i found using a script to check for
duplicate permissions.

submitted to AOSP here: https://android-review.googlesource.com/#/c/104810/

Change-Id: I598ed68836303e3ebc5313342f3ddaee6ccea9b2

Conflicts:

	packages/SystemUI/AndroidManifest.xml
Fix theme FC

Change-Id: If896661b736568220e8e791c05bd1dc251b3976a
Merge branch 'kk44' of https://github.com/VanirAOSP/frameworks_base into kk44