Revert "AssetAtlas: Fix NPE when there are no preloaded resources"

This reverts commit 6d44258046916fca490049c81681277d12824c78.
Revert "Framework: fix theme engine merge"

This reverts commit 6c47382198ab7ac2cd7d48237014feed3121a797.
Revert "PackageManager: Prevent themes from going into ASEC containers"

This reverts commit 5d03f3d509c7082ee770e50eb49f787f054fd047.
Revert "platform: Fix the gid for the theme manager service"

This reverts commit 5ce4b78eba67206cd60beaeba7767f68e661a8a5.
Revert "ResourcesManager: Fix theme insertion at boot"

This reverts commit 193de9149df892098efed2d48ce692ea35240825.
Revert "PackageManager: Let com.tmobile.thememanager access privileged permissions"

This reverts commit d6f135e645d6f6dd3d8f5189d876c45900322a4f.
Revert "ThemeUtils: Retain the original package name in themed UI context"

This reverts commit eb84db31fa46a27c4d575c2ee9ce46e2b3526ae3.
Revert "Fix theme provider crashing for non-primary user."

This reverts commit ed60fce627a769db5c43a23ecb046893a9e62118.
Revert "SystemUI: Reinflate on theme change"

This reverts commit 38997df22740f5efb341cad1b34475c5491ea6d5.
Revert "Framework: Remove orphaned Theme related code"

This reverts commit ea50a5f4ca851a13f473def4cbcb4131edebf559.
Revert "@hide API change from themes"

This reverts commit 6eec84efe4c142fb92fce824d347a1354a70cd86.
Revert "Squashed commit of the theme engine support."

This reverts commit e1d8374d93ea30b1f677ce55cd15c8e00805fba5.
Squashed commit of the theme engine support.

Updated 4.2 support for the old T-Mobile theme engine, as usual
needs the provider and switcher apps installed as well.

I'm finally dropping the 400+ commit history on this, since everybody
else keeps picking it up from CM as a single patch anyway... But
for the record, nothing of this would be possible without Josh, Ed,
and the rest of the TMo guys who wrote and maintained it until 2.2:

amit chabra <amit.chabra@t-mobile.com>
Amit Kohli <amit.kohli@t-mobile.com>
Chris Cogar <chriscogar@t-mobile.com>
Dirk Sigurdson <dirk.sigurdson@t-mobile.com>
Ed Carrigan <edward.carrigan@t-mobile.com>
Gaurav Sharma <gaurav.sharma3@t-mobile.com>
Hui Feng <hui.feng@t-mobile.com>
John Ritz <john.ritz1@t-mobile.com>
Josh Guilfoyle <josh.guilfoyle@t-mobile.com>
Mark Roberts <mark.roberts48@t-mobile.com>
Pankaj Kumar <Pankaj.kumar6@t-mobile.com>
Samuel Cheung <samuel.cheung@t-mobile.com>
Sergey Ten <sergey.ten6@t-mobile.com>

Change-Id: I7148d51be48f28a2dc4bdf9ec9018f04b268ffc4

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	policy/src/com/android/internal/policy/impl/GlobalActions.java
	services/java/com/android/server/NotificationManagerService.java
	services/java/com/android/server/SystemServer.java
	services/java/com/android/server/am/ActivityManagerService.java
	services/java/com/android/server/connectivity/Tethering.java
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/java/com/android/server/connectivity/Tethering.java
	services/java/com/android/server/wm/WindowManagerService.java

Conflicts:
	services/java/com/android/server/wm/WindowManagerService.java
Fix the resource IDs used by CTS tests

* Google didn't make networkAttributes a public resource, so everyone
  is failing CTS after adding new resources to the framework. This
  fixes it.
* Same thing with config_useFixedVolume

Change-Id: I720b36d0922b636fe30f691f016add6b8cc7ade3
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
Check themes of current user, not user 0.

Change-Id: I5d685a04289b434a12e460b4fdacc43a41ff2be1
JIRA:CYAN-1303
ResourcesManager: Fix theme insertion at boot

This was lost during the 4.4 ActivityThread reshuffle, put it back

Change-Id: I96eadf691973e9a2daa099b55816fc103d129be7
PackageManager: Prevent themes from going into ASEC containers

Themes on ASEC cause all kinds of random timing/racey issues at boot
time, and more kinds of racey concurrency issues at uninstall/upgrade
time. Stop them from getting into containers at all.

Change-Id: If08e90c51137b22239831a4eca17ea00d5d87d93
ThemeUtils: Retain the original package name in themed UI context

In order for themes to reflect on system elements, we're changing
their context, including the package name.

This breaks anything that tries to identify system elements,
most notably any users of the uiautomator. Trying to do
'UiSelector().packageName("android")' to find, for example,
a force-close dialog will fail.

Fixes com.android.cts.uiautomatortest.CtsUiAutomatorTest#testUiWatcher

Change-Id: Ic05c3024b20ac3772ed5597846fbfa4a184ebb0d
platform: Fix the gid for the theme manager service

It was mismatched with fs_config, resulting in attribution of the
"-1" gid

Change-Id: Ia6d55af0b39f659da2965f9bc0bda0df5c775ba4