Revert "Bypass the lockscreen when the hardware keyboard is slid out and security mode is 'none'"

This causes issues, documented in CYAN-5567.

This reverts commit c12204450f41eb3a6175b5fae7f1a853c059c6eb.

Change-Id: Ic9478eadbfa830e869007dad17983bd33c0ac6d6
radio: Treat REGULAR_DEACTIVATION events as transient errors on AT&T

Change-Id: I6872be05de01dbe41d923f4274b70414f65d5f7e
MultiSim: move getFormattedSimName() to frameworks (2/2)

Move this into one location any app can call.

Change-Id: I02a96f72be1e41783faeb5862cb26b96ca776672
Signed-off-by: Roman Birg <roman@cyngn.com>
Add system|signature permission for intercepting package launch.

The preLaunchCheck (add, remove) functions which allows an application to
perform any checks before the framework launches the app
needs to be a protected with a system|signature permission.
This change defines the permission and protects the functions with it.

Change-Id: Ib62e25b780df39c4a7d9d1e4eaf3fc98ffa4089c

Conflicts:

	core/res/AndroidManifest.xml
PackageManager: Add configuration APIs for pre-launch checks

This change replaces overlays with an audited set() API, allowing
application with INTERCEPT_PACKAGE_LAUNCH permission to bootstrap
themselves.

Additionally, checks have been added to ensure that the custom prelaunch
check activity always resolves to a valid target.

Change-Id: I7f6be647fde3ce4ed699e6abfbe0392176ec96d3
Automatic translation import

Change-Id: Idfc4f2ffb3420870742c010835aaf0a057585296

Conflicts:

	core/res/res/values-ca/cm_strings.xml
	core/res/res/values-cs/cm_strings.xml
	core/res/res/values-da/cm_strings.xml
	core/res/res/values-de/cm_strings.xml
	core/res/res/values-el/cm_strings.xml
	core/res/res/values-es-rXA/cm_strings.xml
	core/res/res/values-es/cm_strings.xml
	core/res/res/values-fi/cm_strings.xml
	core/res/res/values-hr/cm_strings.xml
	core/res/res/values-in/cm_strings.xml
	core/res/res/values-it/cm_strings.xml
	core/res/res/values-ja/cm_strings.xml
	core/res/res/values-ko/cm_strings.xml
	core/res/res/values-lt/cm_strings.xml
	core/res/res/values-nb/cm_strings.xml
	core/res/res/values-nl/cm_strings.xml
	core/res/res/values-pt-rBR/cm_strings.xml
	core/res/res/values-pt-rPT/cm_strings.xml
	core/res/res/values-ru/cm_strings.xml
	core/res/res/values-si/cm_strings.xml
	core/res/res/values-sv/cm_strings.xml
	core/res/res/values-th/cm_strings.xml
	core/res/res/values-uk/cm_strings.xml
	core/res/res/values-zh-rCN/cm_strings.xml
	packages/Keyguard/res/values-zh-rHK/cm_strings.xml
Keyguard: Allow applications to customize left-corner widget

Adds ability for trusted applications to set the application widget and
action in the lower left corner of the Keyguard.  Its behavior is
modeled against the on-screen camera widget most commonly found on the
lower right corner of the Keyguard.

Three intents are defined: one to set the widget, one to clear the
widget, and one to notify when the widget is activated.

Applications calling this intent must have this permission:
android.permission.SET_KEYGUARD_APPLICATION_WIDGET.

Change-Id: I8c5b11fd1cc1888c710bf3736e3c28d77fc57e37

Conflicts:

	core/java/com/android/internal/policy/IKeyguardService.aidl
	core/res/AndroidManifest.xml
	core/res/res/values/cm_strings.xml
	packages/Keyguard/res/values-sw600dp/bools.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardViewMediator.java
	packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
	packages/SystemUI/res/layout/navigation_bar.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardTouchDelegate.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java
Expand android.permission.WRITE_THEMES to system|signature

Change-Id: I5dd3dc7ea09276227a47f72f8a1c1f312354ddb8
Add API for protected SMS receive broadcasts.

  - Allows an application to receive an sms (usually for auth
  or registration) from whitelisted addresses, without broadcasting
  to any other listeners.

  - Allows an application to modify the whitelisted addresses within
  System.Secure settings.

Change-Id: I5dfeb94832eefac9607070e9fb29db589bac7a57

Conflicts:

	core/res/AndroidManifest.xml
SystemUI: Utilize TextureView for CameraTile.

  SurfaceView causes unecessary and confusing view bleeding
  when the camera preview is about to begin. Utilize TextureView
  to display the content stream which behaves better within the
  QuickSettingsTile's container.

Change-Id: I408545ea92e29ab2cf4760b097ecf0cea4d813c9

Conflicts:

	packages/SystemUI/src/com/android/systemui/quicksettings/CameraTile.java
Start autofocus only when we have a previewframe.

  - No quicksettings tile should be allowed to take down
  SystemUi. Thus, we need to handle a sporadic RuntimeException
  being thrown because the underlying camera ABI may be a bit dated.

Change-Id: I4d87bee0827a1133a6fb59c893d1fca124546471
reconcile cameratile: use existing tile lifecycle interface rather than polling shade position

Change-Id: Ic33d4d48ce803c305f2160650e3ecdc91ecd8c76
SettingsProvider: fix load protected sms setting logic

The method assumed a string resource, but we are working with
string-arrays.

Change-Id: I7d03821c5f5ac5d24445e5c03f7911c3a81c16dd
Signed-off-by: Roman Birg <roman@cyngn.com>
Fix crash while installing themes rapidly

A theme can be installed on a PM or theme service thread.
If multiple themes are being installed at once and one of
those themes happens to be part of the boot config, then
two themes will try to be installed at the same time. This
causes problems with files like the temp AndroidManfiest.xml
which are not designed to be multi-thread safe.

This patch fixes the issue by making sure a theme is
never installed in a PM thread except during boot.

Change-Id: Ic9a0ffe43d0199a2a893579f3d2dbb6d9340e7b4
Sanity-check paths of files to be restored

(cherry picked from commit 7d51cc701a6735cf455af8479f56c9c0b2109e02)
Bug: 16298491
Change-Id: I0c2d6523c9d152dad4d27d06d3853afd432e5af7
Tether : Update settings app reference

Change-Id: I1726be0de702e688326b74ee262d9f674ff8e014
ThemeManager: Synchronize access to listeners

If the Set of listeners is modified while iterating we will get
a ConcurentModificationException so we need to synchronize access
to avoid this.

Change-Id: Ib521ad86a665316d707463200c16c1bcdcfac362
Revert 'base: Add P2P interface "p2p0" to tethering support list'

* fixes p2p issues

Change-Id: I12249f4f633c5b317d04da9f433ee58bb21f4681
Ignore certain overlaid sms-sending packages.

Change-Id: I294a7e350d6193fc257f884def779994b7da5f57
Protected Apps: Allow all system apps to see Protected Components

Change-Id: I5e12dd7cd05117a4e44a4bf3ee9f56ea6122ce15