Fix theme provider crashing for non-primary user.

PackageManagerService's context is for user 0, so if the theme provider
for other users was invoking the getInstalledThemePackages() method, the
themes provider crashed as it doesn't have the INTERACT_ACROSS_USERS
permission.
Fix that (and simplify code) by making getInstalledThemePackages()
return the installed themes for the current user, which was probably the
intent anyway.

Change-Id: I02002cee005b74128f3b2f7cc7a93b9b8514f1f3
Fix a number of multi-user bugs.

In particular, expanded desktop mode couldn't be enabled for non-primary
users as GlobalActions wrote the setting to the primary user's settings
DB.
Also fix some other cases where we didn't track the settings for
multi-user correctly.

Change-Id: I3bec45cb84903120639c2e85c1d71ec9a491933c
Merge "Fix a number of multi-user bugs." into cm-10.1
Revert "Frameworks: Add Permissions Management to AOKP [3/4]"

This reverts commit a49dd26d8acf3fb40122e2d17d3e60944c82e275.
Halo: Bugfix for Layout < 0 crash

Change-Id: I870a8b195995500fa631a8b08da413039769ff37
[1/2] Add triggers to change profile based on AP

Add data structure mWifiTriggers to store triggers per profile.
Add network change listener to switch to profile

Change-Id: I97e360d7783d3b0e2bbd70fe7a9a866d8c0fa7cd
merge changes from remotes/github/cm-10.1 into master

Conflicts:
	policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Change-Id: Icb59b95cfbab1e99546099eed66e66c7d78684e7
Floating window (1/2)
This is the popup code from Paranoid Android's HALO, which has already been commited. This commit just allows it to be on or off as some users may not want to use this function. We have a better idea on how to use this functionaility which will be seen later.

For now though, this is the messy way of turning it on and off.

Conflicts:
	core/java/android/app/Activity.java
	core/java/android/provider/Settings.java

Change-Id: Ica702fbe9348ea3055e8c15da97574d2da783479
lift clear recents button

Change-Id: Ic5ffc65076bab0653d489e35ed9d69f008520a88
Fix Floating Window

Change-Id: Icf48df5d6ffbfb8e6b16a632f5135a0fa02dd946