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
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
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
Make people lookup default overlay

Change-Id: I6dd7267bc82d33e04d99024e4dfb193f071d4f97
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
Update location tile(1/2)

Uncheking all sets to old(default) mode

Change-Id: I5a05d7ebd3f83043763c2d157b6d1ef1643ef1cf
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
UsbSettings: Add UMS mode support

Android only supports MTP and PTP mode in UsbSettings screen, this change
is to add USB mass storage mode.

Change-Id: If7e49ae022c187063d30316b6a017d6089d97713
SystemUI: fix msim signal cluster text label spacing

When WiFi is on and mobile data is active with msim device, the first
mobile text label (e.g. 1) was too close to the WiFi icon. Show the
spacer as necessary.

Change-Id: I2fc4c77f448647d79d81cfa02373da477556c6b0
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: hide msim no-sim icons

Simply hide the SIM mobile indicator group when a no SIM icon is
requested.

Change-Id: I074b8e486ab35f57daa1f1eaee7e5b696835b3b8
Signed-off-by: Roman Birg <roman@cyngn.com>
Revert "Themes: Build icon cache when applying icons"

This reverts commit 7bb802a478faaac295ccd8b98a3573701edd9b1e.

This is not thread safe.  It is possible for an icon to be in the
middle of being composed when another process requests it.  That
process would not be able to load the image.  In Trebuchet, the
icon would be displayed as the standard "android" icon since it
would not be able to load the icon.

Change-Id: Id9bc38296cc02c376f9ea66565babc00e8dbf634
Protect windowNoTitle and windowActionBar attributes

This patch creates a new method to define "protected" attributes. These
are attributes like windowActionBar which should not be modified by
a theme.

Some apps (eg gmail) use the appcompat library which
has its own Actionbar classes. When an app uses its own
Actionbar it must not include the default actionbar which is
achieved through the windowActionBar attribute.

Some themes may try to change these attributes, which can will cause
the app to crash.

Change-Id: Ie3bb7285eed09f3f13facf9d142ea9eb83796eec
SystemUI : Improve heads up display logic

- Add ticker as a condition for high priority (based on upstream L patch http://goo.gl/Kofy4V)
- Make sure non high priority don't get shown if screen is off or dreaming

Change-Id: I527ac55c641ac45848715a1baae5c44df1381644