base: Check for homeAsUp status when collapse actionbar widget

mHomeLayout should be visible if one of DISPLAY_SHOW_HOME or DISPLAY_HOME_AS_UP are set.
collapseItemActionView only checks for DISPLAY_SHOW_HOME, so applications that only uses
DISPLAY_HOME_AS_UP and uses an expandable/collapsible widget (like SearchView) doesn't
properly restore the home layout.
One sample of this behaviour is the DeskClock app. The CitiesActivity doesn't show the homeasup
indicator after collapse the searchview.

aosp change-id: https://android-review.googlesource.com/#/c/71093/

Change-Id: I2f225138771da6bd6b2a468ad616b90c2c0a9d35
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Frameworks: PT-BR Translations

Change-Id: I56687fb4aa28385eb57908a21c6ac29a48caee33
SystemUI: PT-BR Translations

Change-Id: I401fc15e68ec393be917183dbbb301e179a6daf6
p2p: Display P2P peer MAC address if device name is empty.

Display MAC address of a P2P peer in an invitation prompt
message on receiving invitation request from the P2P peer
with empty device name.

Change-Id: Icabeb91d666437746eb5a733ec582849eb7295a5
CRs-Fixed: 506109
Make the lock screen camera widget configurable (1/2)

Change-Id: Ia349c39937a56ee53c2c8ec2441d71ad081572e3
LockScreen: allow long-press actions from hardware keys (1/2)

Allow following actions with button long-presses on lockscreen:
- toggle flashlight (if available)
- play/pause/next/previous track selection
- toggle silent mode

Allow customizing of back, menu, and home buttons. Search
button events are completely ignored on the lockscreen.

Auto-detect hardware keys, only show appropriate menu
options based on the actual hardware keys available on the
device (or completely hide if there are no hardware keys).

Based largely on Danny Baumann's work from gingerbread.

Ported from CM10
Change-Id: Iff32736d00ca5d4122f64a6a861bbb0a1de9cca9

Fix home/menu unlock with long press hardware key
- Forward port of commit 2a572ee
Change-Id: Ic2eb85542f8052fe1662244fe5e72ba12a98608b

Keyguard: Fix for home wake/unlock
sometimes device is waking and unlocking during the same keypress.
Change-Id: I72ea7611d39aac0cd03dfd5aa7036aeef7600140

Use sticky broadcast to convey torch state (1/2).
It doesn't really make sense to store the (non-persistent) state of the
torch in a (persistent) setting. As the torch is sending a broadcast
anyway, make that broadcast sticky and use it to convey the state.

Also unify the torch constants (actions, extras, activity names) at a
common place.
Change-Id: If845bef27cc79990794aa748dce18cfea3bac1f5

Fix Home/Menu/Back keys' unlock
Change-Id: Ibd3842b6ad8e037a2a9f8eb581e7c55900017b0f

LockScreen: allow hardware key longpress to put device to sleep
Change-Id: I54260e21c462bcabd9b6383e22f44d644630b4d3
Camera button support (1/2)

Add new bitmask for Camera button and "hasCamera" boolean.
For those devices that have dedicated Camera key
(like Sony ZL/ZR/Z1/...)
Change-Id: I1a6681664f9f3fd3f30221ba10b082cb5f8cafca

Camera button support: make it actually work
Previous commits were merged so fast that I didn't even
added the code that actually DOES launch the camera.
Let me fix that.
Change-Id: I4fcb3c46e5fd50e273dcf19fd3eb35a3f9d979e0

Camera button support: useful features & bugfixes (1/2)
Screw the remapping, let's make something more useful!
Replaced the code to actually launch Camera app, not just fire the shutter.
I won't remove it: it's cool to have an option to double-click Home for Camera.
Added:
  * Camera wake (with button half-press) and unlock options
  * "Peek": releasing the half-pressed Camera button will
    turn the screen back off
  * Camera playback control

Change-Id: Id49e09e20d81cd80d9800ab8ab0f200d44485a09
Remove 'Allow custom buttons' checkbox (1/2)

Let hardware buttons be rebound by default.

Change-Id: Ib4fcae7d93dc63d53490442d7ff44678583b0d9c
Framework: Add option to always show battery status on lockscreen (1/2)

Based on the feature by burnsra in CM7
Authored by Blunden
Tweaked by DvTonder
Change-Id: I642da4dcd82a776a74d77031d37acc76f97b25af

lockscreen battery status: add off option (2/2)
Change-Id: Ie10015865f161e783dc394d467e456d51dc9fbbc
Show confirmation for deleted screenshot.

Change-Id: I4a36cf06bf252e5e15fe08fbd054dc64a0a507ae
SystemUI: NL translations

Change-Id: I04681c3b81fcd866e9ddeade4ef0be0d12c90495
framework/base: IT translations

Change-Id: I912695bf6b92cd226cbbc75772b934295e55aaab
base: LT translations

Change-Id: I9598f89973a01444f787b62c644f35e6da56ed1b
SystemUI: ES translations

- Screenshot delete action

Change-Id: I8e3b31e967f95be1c2cf829904f514e7b8464b7b
privacyguard: Share privacy package name between activity stacks

AOSP 4.4 now has a stack supervisor with differents activity stacks for home and focus activities.
Every ActivityStack instance has a ref to this supervisor. Just share the privacy guard package name
throught the supervisor.

Patchset 2: Fix formatting

Change-Id: I5dd75cfa7f5e8b568a4302fce98809ae307c6d52
JIRA: CYAN-2874
Issue: https://jira.cyanogenmod.org/browse/CYAN-2874
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Merge "framework/base: IT translations" into cm-11.0
Merge "base: LT translations" into cm-11.0
Merge "SystemUI: ES translations" into cm-11.0
Revert "Fix for Concurrency issue reported in  525529"

This reverts commit 7eb1fcb76989f11aaa9ca0a78e0361239ff5317d.

Change-Id: I37815b93bf2b25caff171888dc13788479a9c8c4
CRs-Fixed: 585504
Use highp precision for scaled coordination

If scaled coordination is closer to zero than what
the medium precision can store, distance becomes
zero and it causes divided by zero.

Change-Id: I8ee921dd1f57564a442e685266b12d95fc08e165