Fix NPE in NavigationBarView during bugreport

Commit "Merge Navigation Bar and Pie Controls button config (1/2)"
changed the tag field on the navigation bar buttons. This was not
reflected in NavigationBarView#dump() method, which lead to a NPE.

Also take into account that back and recents buttons may not be
present in the navigation bar.

Change-Id: Ie590608a4ad27753b673320132af7ec42d7a2ade
Merge "core: EL translations" into cm-10.1
SystemUI: Add missing Af Translations

Change-Id: I504dec8e14f9be07a227dd1629040402ed44cebc
[1/2] Add triggers to change profile based on AP

Add data structure mWifiTriggers to store triggers per profile.
Add network change listener to switch to profile

Change-Id: I97e360d7783d3b0e2bbd70fe7a9a866d8c0fa7cd
Fix ringer mode being unneededly changed by setting ringer mode volume
to 0.

When having set the ringer mode to silent on a device with vibrator and
calling setStreamVolume() for the ringer stream again (e.g. in one of
the volume control dialogs in the settings app), the ringer mode is set
to vibrate, although there's no reason to do so.

Fix that by remembering the last non-normal (that is, either silent or
vibrate) ringer mode and using that when setting the stream volume to 0.

Change-Id: I27f1c75a0fef52bd63ac20f4101042808ce2c458
JIRA: CYAN-1403
QuickSettings : Battery initial status

Battery tile upon being added relies on a battery level changed call
to update its status. Thus if upon adding, the battery level is not changing
or till the period when it updates, the tile shows an unknown state.

This patchset resolves this issue by making the controller store its last received value
and distributing it to the tiles when they register for changes.

https://jira.cyanogenmod.org/browse/CYAN-1374

Change-Id: Ia2e887e545430ed02c179a3c8f4b7e269a4817c8
Check and fail early if requested wallpaper size exceeds maximum texture size.

This fixes an issue where OpenGL initialization succeeds but buffer allocation fails because the requested wallpaper size
is too large (or otherwise unsupported) by the graphics hardware. This fixes an issue where SystemUI crashes constantly
on the PandaBoard when connected to a full HD display. Tested only on PandaBoard, no access to alternative hardware.
Signed-off-by: Wim Vander Schelden <wim.vander.schelden@philips.com>

Change-Id: I8d2e1ae9fd9772977c4e365f23f2f58bbca3787c
Don't assume any ringtone is present on external storage.

If that assumption doesn't hold true, the user will lose his ringtone
and won't know why.

Change-Id: I89409e1351792d020c5458f5104f4bb9f2a040f2
core: zh-rTW translations

Change-Id: I8301d7b0a07954cd52eec54739d2aa366c539992
Lockscreen : Fix widgets disabled

Currently, when keyguard widgets are disabled via the DevicePolicyManager,
a default widget if specified via widget_default_package_name/widget_default_class_name
is added on the main screen, and if not successful the default status widget is added.

However in its current state, each cycle of the lockscreen alternates between the two widgets.
Reason is, the default app widget is constantly recycled on screen power cycles, and in such events,
when checkAppWidgetConsistency() fails to add the widget (since the id is no longer valid), it toggles
back to the default status widget, and resets the stored id. Next cycle a new id is allocated and it works
and so on ...

This patchset addresses this issue by not removing the default status widget if not necessary, hence
preserving its id and fixing the toggling issue.

Change-Id: I6b21d18346fed5accc72141097939c92ee9aaa3c
SystemUI: zh-rTW translations

Change-Id: I69ae49bb775aa0cbc8ae1b66fd022a88cd73dcac
Fix mobile data button in power widget.

Change-Id: Ide0417768350081250af24518b6831d70196ba73
JIRA:CYAN-1189
Fix dock battery tile display.

Change-Id: I624663149da1161c2cd4f4b20b388bd711d9883c
AssetRedirectionService: Check for permissions before running dump()

Fix android.security.cts.ServicePermissionsTest failure

Change-Id: I9d629d19f3ff231db477d156c8bf557d4b8ee861
Cleanup.

Change-Id: I4ee830f146529269be98d4b899a97e8e867fdb01
Close notification panel when swiping away the last clearable
notification.

Change-Id: I4e5114f66e799a7c80e18b38abce5678da460846
Hide navigation ring if no targets are configured.

Change-Id: Ieca5c700f628e9c990483999367aa48d153fd6a5
Derp fix.

Change-Id: I124eb9e6b74556c6ff4ddb1e5335a758dc9250bf
ThemeUtils: Retain the original package name in themed UI context

In order for themes to reflect on system elements, we're changing
their context, including the package name.

This breaks anything that tries to identify system elements,
most notably any users of the uiautomator. Trying to do
'UiSelector().packageName("android")' to find, for example,
a force-close dialog will fail.

Fixes com.android.cts.uiautomatortest.CtsUiAutomatorTest#testUiWatcher

Change-Id: Ic05c3024b20ac3772ed5597846fbfa4a184ebb0d
Revert behavior of DateUtils.formatElapsedTime

Change Ib3c1e1aad05827df646aa18645cce19dffb7551f fixes the inability
to display more that 2-digit hour values, but also changes the behavior
of <10 minutes display by zero-padding the minutes. This makes
the Chronometer widget look different, and breaks Holo CTS.

Fix it so that for values under 600 seconds, the minutes don't
get padded

Change-Id: I34eb7f22e728c55bf3313ed1987ac32969cd5ed0