AssetRedirectionService: Check for permissions before running dump()

Fix android.security.cts.ServicePermissionsTest failure

Change-Id: I9d629d19f3ff231db477d156c8bf557d4b8ee861
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
Lockscreen : Fix widgets disabled - Danesh M

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

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java
Merge branch 'jb-mr1' of https://github.com/maxwen/frameworks_base into jb-mr1
recents: rework kill all button layout

Change-Id: Ibcb6fed7c04188f15ea07c986e5bdf2229d99b88
am: Fix the privacy guard notification

 * The privacy guard notification was not showing everytime. Fix the
   logic and handle it in the right place so it hits both the create and
   resume startup path.

Change-Id: I80c88ffb0fcb4ed3ea64ceb228bb436975278ecc
Frameworks: privacy guard fix possible NPE

If the user flash a data app over recovery on clean flash
(like a lot themed apps or gapps packages are doing)
the user will get into a bootloop because of an NPE
due an unknown state of the user due that
installedUser == null

To fix it
Check if installUser exists if yes then
call the provider settings value for the current
user

PatchSet 2+3: message update
	      fix for real now

Change-Id: Ie5f94a0d0a11ae24fdfdc8372c0433b26793b66e
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
Fix DateUtils.formatElapsedTime, again

Remove extraneous "hours" argument in the <10 minutes case

Change-Id: I5a5913d2e0744f5783f8422cddc30603c7bd703f
QS: Capitalize more consistently

Change-Id: Idfe152a97e639c97ac68f98d516f7646f458c31e
Signed-off-by: Rohan Mathur <rohanmathur34@gmail.com>
 Framework: Update Swedish translation, typo

Change-Id: I001f66800080c4791468aafe87fde2bd8b3223e5
LTE toggle: fix supported modes

Change-Id: Iba828b00072dadb4ec0058b7158f2187e1ac1f2d
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
LTE Toggle: add missing network mode NT_MODE_LTE_WCDMA

Change-Id: I93db32d4700568d79230350ff67e5dc0227a0c30
Signed-off-by: Jonathan Steadman <xxwhitehawk@gmail.com>
 SystemUI: Update Swedish translation

Change-Id: I3062079d6d5f6ea0a6f633253f89bfe798d44952