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
ProximitySensor: check for correct MaxRange value

Use TYPICAL_PROXIMITY_THRESHOLD for devices that returns incorrect mProximitySensor.getMaximumRange() value;

Presto's proximity sensor returns values: 0.0f(near) or 5.0f(far).
mProximitySensor.getMaximumRange() must return proximity sensor's availible range, but it always return 0, so mProximityThreshold is also 0.

So boolean positive = distance >= 0.0f && distance < mProximityThreshold;  positive will never be
true.
The cause of this problem is proprietary sensor.msm8660.so, it must set proper Range and Resolution for proximity sensor.

Change-Id: I0cf81fd20f210115cbd6db10c0070b12f1c57336