fix build

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
SysUI: Don't recreate controllers.

The various controllers, such as mLocationController, get recreated
every time the status bar is recreated due to a theme change.  We
should only need to create these if they are null, otherwise use
the controller as is.  Also, each of these controlers registers
themselves as a broadcast receiver and are never unregistered before
recreating them.

Change-Id: I6215aae5a82b7ced8f0f25cf592a804d38825260
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Take into account ALL res/xml dirs

Only res/xml was being searched for redirection XML files, which
causes themes that use xml-v14, xml-v19, etc to be overlooked and
resources not being mapped.

Change-Id: I8ccad5770250150a95ec3b89be56f8d01025b126
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Use 32bit hash to decide if idmap should be created

Using the last modified time of the package to determine if an idmap
should be created is not always valid for system packages.  We have
observed some packages having a time stamp of 08/01/2008 even if the
package has changed.  This causes system packages, such as
frameworks-res.apk to not be properly mapped if IDs changed in this
package.

This patch will generate a 32 bit hash code based on the file's
MD5 sum.  This hash code is then provided to idmap for writing these
values into the idmap header for future comparison.

This patch requires the following change found in frameworks/native
http://review.cyanogenmod.org/62566

Change-Id: Ie9e0273aef96217f06b08774623dd5f1b290a3da
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Cleanup theme assets when done with them

Before this patch if phone was left on long enough it would reboot
when a theme was applied due to files being left open.

Change-Id: I4c242249fcf6e8097789c3dd6690104296485784
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Wallpaper Overscroll and Transparent NavBar

Now possible to offset wallpaper windows by more than the size of the wallpaper
and add added a transparent mode to the NavigationBar

Change-Id: I2b0f1129a4cf73b8def35abb7072d0472a9cc972
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
wallpaper: add missing @hides

Add missing @hides to setWallpaperOverscroll and setWallpaperOverscrollOffsets

Change-Id: I1cfe876272d7c0a94bef122567da30318eac9400
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Lockscreen wallpaper for themes

Change-Id: If77b97301c5bfebd94b193fe9a54e676e678d3ed
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Fix segfault removing theme assets

Change-Id: I4827eb6e2b186547f1df6f9bbd048fb1e3a29890
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Put overlays in their own group.

Overlays will now be added to their own group and the
target group will contain a pointer to the overlay
package to be used in getResource and getBagLocked.

Change-Id: Icc6c6eb791f04966e68dbc099eae8e7129546414
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Remove type matching restriction

Change-Id: I5a8ac8ff1794350ff9dc03b378c704bfb97d0a9e
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Allow forcing idmap (re)creation.

Change-Id: I9f5938e9b1052da83b7f2cd7b1ff6f1ed270db6b
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
CM11 Themes: Use theme name for audible name.

Change-Id: Ib841cb80925b0f3f5ac770e00df04515849e9360
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Allow icons in shared restables to be themed

Example
Google Drive's package  name: com.google.android.apps.docs
Google Drive's restable name: com.google.android.apps.docs.common

Before this patch we used resource table name to get the package info. For
app's like google drive this return a null package info and the icon would not be themed.

So instead of usnig the restable name, this patch creates a package name
in AssetManager that is set by getTopLevelResources.

Change-Id: Ic51b93f6c7ea0a32197682998c6d0aa36d774845
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
hide new AssetManager methods for themes

Change-Id: I9f5c6a432f9c2f3c1dd5bd9927c5e3fe3ddd1f93
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
WallpaperCropper: Fix crash when set .gif as wallpaper

It returns an equivalent scaled cropBounds as true
crop bounds, then it set the rounded rect by rounding
"out" the true crop rect, this make the rounded crop
rect may out range of the original bitmap, then an error
will happen.

We change to check the rounded crop rect, if it is out
the range of original bitmap, we set the original bitmap
bounds as rounded crop bounds.

CRs-Fixed: 622582

Change-Id: I215ef2a0165adaaadb05c62dee741a8ea6926144
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
idmap: Don't log spam "CREATING STRING CACHE"

Change-Id: Idce5aa5881c8e860eca9749cc85f748303c913c0
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
frameworks: move keyguard wallpaper to system  (1/2)

Change-Id: I0eb1b5578b705c2ade4c0772fa86e09478b9f73e
Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

Conflicts:
	core/java/android/app/WallpaperManager.java
	core/java/android/provider/Settings.java
	core/res/res/values/mahdi_strings.xml
	packages/Keyguard/src/com/android/keyguard/KeyguardViewManager.java

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>

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