Resolve LocationManager + ActivityManager conflict

LocationManagerService was serially stuffing the same Location into
multiple Intents, which it would immediately hand off to
ActivityManagerService, running as a different thread in the same
process. LocationManager would continue to work with that Location
while ActivityManagerService worked with a Parceled version of it.

However, Location.mExtras is also a Bundle, and both
ActivityManagerService and LocationManagerService ended up working
with references to the same Bundle. ActivityManagerService needs
it in Parceled form (ie mParceledData != null), but
LocationManagerService was triggering Bundle.unparcel() when
referencing the data contained within.

As a result, LocationManagerService was able to trigger NPE (or
worse) in ActivityManagerService by manipulating the mExtras
member of a Location that was in the process of being reported to
listeners.

To resolve this issue, I copy-construct a new Location to report to
each listener. This should prevent ActivityManagerService and
LocationManagerService from referencing the same Bundle data, as
Location's copy constructor also copyconstructs the mExtras member,
rather than simply share references.

Bug: 7518371
Change-Id: Ib2334e0375612441ba6bbee0bde6c1f18b01f6d2
Profiles: Add a profile picker activity

Patchset 2: Add CM Copyright
Patchset 3+4: Rebase
Patchset 5: Some optimizations

Change-Id: Ic8281e4c6fef6d2f4c56fc01acfe6e54b4c8f51c
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Use sticky broadcast to convey torch state (1/2).

It doesn't really make sense to store the (non-persistent) state of the
torch in a (persistent) setting. As the torch is sending a broadcast
anyway, make that broadcast sticky and use it to convey the state.

Also unify the torch constants (actions, extras, activity names) at a
common place.

Change-Id: If845bef27cc79990794aa748dce18cfea3bac1f5
AssetRedirectionManager: Accept redirections only for whitelisted resource types

Change-Id: Idf1ea739a81719b6a196f0114c9fc3b7c7ff428c
Commit Ic8281e4c6fef6d2f4c56fc01acfe6e54b4c8f51c translated to Russian

Change-Id: I27b33419f9cdb9dadf20dd4d5e4c88fb72e8eaa1
Frameworks: fix quick peek

only react on a real swipe to avoid accidental show up
on pressing an action on eg ActionBar

as well the pass trough of mPieTop never worked. Not the
problem due that pie is overlaying this part

reduce the settings value write a bit....we need to
be as fast as possible here due that this method is
called on every touch event

PatchSet: minor code correction

Change-Id: Iced268ad043b753d93375439d7835d8570b7649c
Merge "Frameworks: fix quick peek" into jb4.2
Add 2G/3G option to profile connections (1/2)

Change-Id: I55d0768c9eeecb7dcce97c6d6390e339d678d0c4
Go back to AOSP normal mouse pointer

due our default dpi the circle is hard to see

This reverts commit 94fb81670217a7fd713490e035faece7317502ab.
Keep on notification LED while dreaming.

Change-Id: I407e34f9c60d3140f78abca133b4fda5dd45f311
JIRA:CYAN-689
Frameworks: a bit taste of android 4.3

most changes are under seems to be under the hood and are
not mergeable due that we have no code...... UI changes
are minor....but our lovely Roboto font is pimped up on the
new android version. So here we go

cheers

Change-Id: I139bcdeaefe5125ba8974fc88423c62d62b1b429
Frameworks: add reset option to clock color and cleanup (2/2)

to be consistent. So we have now on all places with colorpicker
same logic + option per menu to reset color to default.

as well some cleanup and codestyle corrections

cheers

Change-Id: Ife006425ee769feb438497d6483f520c7b1f236e
framework: Privacy Guard

 * Introduce a new privacy feature which allows the user to run an
   application with reduced visibility into his or her personal data.
 * Adds a per-application flag and simple API to determine if this flag
   is enabled for the current or calling process.
 * This flag can be used by content providers to decide if they should
   return a limited/empty dataset.

Patchset: fix notification behaviour
PatchSet: fix possible NPE on clean install if data apps are pushed
	  from gapps eg.
PatchSet: add back deleted 5 lines...thanks jeff
PatchSet: fix call for not allowed userState -1
PatchSet: check against userId and not identifier
PatchSet: fix for real now lol

Change-Id: Id7c54d728e63acb2b02a2a9322930b54949f6c5d
Add SMS Middleware layer.

Add fix so ordered broadcasts are delivered to system
apps first in the event of a tie. This works around
the issue where terrible apps steal SMS notifications
from the broadcast queue to simply prevent notifications
that could otherwise be removed by a toggle.

PatchSet: rebase + string correction

Change-Id: I4fff0c584f8fce9c5f2f4fe86a82fe6480c307c7
Frameworks: activate qs and notifications toggle for navring (1/2)

Change-Id: I514d59790e952ee12ae979f5b5fa9872f6b834c9
Merge "framework: Privacy Guard" into jb4.2
Merge "Add SMS Middleware layer." into jb4.2
Commit I514d59790e952ee12ae979f5b5fa9872f6b834c9 translated to Russian

Change-Id: Ie2d0b126d86a9d10dbede2d400308ce5cd815abc
Commits Id7c54d728e63acb2b02a2a9322930b54949f6c5d and I4fff0c584f8fce9c5f2f4fe86a82fe6480c307c7 translated to Russian

Change-Id: Iee60b6ec5a473407f5b354c55e3bfdf9e1428159
Send out USER_PRESENT broadcast on screen on if lockscreen is disabled.

This makes sure to turn off the notification LED on screen on when the
lockscreen is disabled by profile or e.g. by lockscreen toggle tile.

Change-Id: I0f6a5f9a021abd2799c22c744ab1180cee027409