core/jni/android/graphics: Cache copy of pre-scaled Bitmaps

Caching some pre-scaled Bitmap objects allows for optimizing later
scaling operations to reduce memory pressure.

CRs-fixed: 451681

Change-Id: Id4341e75911074ff9f565b2d386ccad8f3a223e8
Vectorize bitmap operations on A15 too

 * Commit a2e20761b5ad646ce3f08ed24995799dd81acee0 enables GCC
   vectorization for bitmap operations on Krait. Enable it on A15 also.

Change-Id: I1f733f5311376deb78782931ea2b83a8d12c2171
Toggle rewrite (1/2)

Change-Id: I80ef0c3f1cbe8e0d35c7a4e4111ad22b96196963

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/drawable/stat_power_background.xml
	packages/SystemUI/res/layout/quick_settings_tile_generic.xml
	packages/SystemUI/res/layout/status_bar_expanded.xml
	packages/SystemUI/res/layout/toggle_tile_user.xml
	packages/SystemUI/res/values/colors.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
Toggles: cleanup class and quiet down logging

Change-Id: I39f1382ee2d340a2d2676aa85e6fbc6641bb3c61
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Toggles: fix initial bluetooth icon

Change-Id: I7ceb1e382dce07bd4ccca0777535e49015a16070
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Keyguard: fix nasty file handle leak

Change-Id: I47d58392d9d00a2cb843cf8bd51d6390ad1334a7
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
SystemUI: transparency mgr bug fixes

- Avoid potential NPE which crashes SysUI
- Sometimes while in the home screen pulling down a phablet panel would have delayed
    reaction and statusbar would be transparent while the panel is below it, it looks
	ugly and avoid it.

Change-Id: I5e405e34e8dec42ea0fb3dbf00910219b411f202
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
Toggle bug fixes

This patch fixes:
* bluetooth not showing correct state
* battery information should retain after rearranging toggles
* tile text being cut off
* network toggle should stay updated after rearranging
* ime toggle will collapse statusbar
* wifi ap toggle states should update
* user/favorite user layout fix
* use consistent color for toggle texts

Change-Id: I7646292b88f34cd3b1e23ba615d2c571ca22cb89
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Final BT toggle fix!

Change-Id: I0c8f85ef87d1f359c18cab8c4d07f681fe2b5649
Signed-off-by: Gergely Szell (sethyx) <szell@hu.ibm.com>
SystemUI: cleaner recents key implementation

Also, I noticed that the RecentsTaskLoader implemented
View.OnTouchListener, so just use that implementation for the button.
Also camelCased some variables.

I can't stand the way AokpTarget looks... so I renamed it to
AwesomeAction :/

Change-Id: If51c592bebcfbe98d49bb362f845a1b1d86cfb1e
Signed-off-by: Roman Birg <romanbirg@gmail.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
	packages/SystemUI/src/com/android/systemui/aokp/AwesomeAction.java
	packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/ExtensibleKeyButtonView.java
SystemUI: unlock keyguard to open nav ring apps

Should not launch apps if it's secured with a pin/password/pattern.

Change-Id: I52fd604a15982e9eed465e005425b93ffb2a6e82
Signed-off-by: Roman Birg <romanbirg@gmail.com>
AwesomeAction: Make more awesomeer

Patchset 1:
- Switched to static methods and enums
- Moved Navbar helpers to its own class to
  be moved to FW for RC navbar recode.
- Created broadcast reicever
  use it like this...

     Intent i = new Intent();
     i.setAction("com.android.systemui.aokp.LAUNCH_ACTION");
     i.putExtra("action", "**string you want AwesomeAction to launch**");
     mContext.sendBroadcast(i);

Removed screenshot option for 2 reasons
1) Security
2) Can't be made static.

Patchset 2/3 : white space / string derp

Patchset 4: mini optimization in fromString function

Patchset 5/6 : clean up. Should be good to go now.

Change-Id: I9159a70082058f4dd1afc47c9d57a6f4b4a6bfb1

Conflicts:
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
	packages/SystemUI/src/com/android/systemui/carbon/AwesomeAction.java
	packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/key/ExtensibleKeyButtonView.java
	packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
derp can't have webaddress here

Change-Id: I6a158757f08445f51a893c513724e1332dc3434d
Toggles: fix silent off label

Change-Id: Id811af6599ca8466ba3af0dd555a4856863ef7fb
Signed-off-by: Dirk Rettschlag <dirk.rettschlag@gmail.com>
FW: Navring Rework.

PS2: Moves drawables and static strings to Frameworks, Removes
     some redundant code from RC.

PS3: Needs awesome action update for now if we dont add it ill
     rebase.

PS4: Rebase and clean up, plus I added the option to turn "off" the
      navring by setting all targets to null or none.

PS5: added logic for custom icons

PS6: forgot to add Icons to the settings observer
     adjust some long press logic

PS7: Comment message clean up

PS8: Rebase of the new awesome action

PS9: cleanup

PS10: Rebase

Change-Id: Iff157e4e49407f46284f52697befe6cc3d5a42d7

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/src/com/android/systemui/SearchPanelView.java
SystemUI: set correct initial NFC toggle state

Change-Id: I451f53bb2ae533823c214a66d83ce6a92ceb5025
Signed-off-by: Roman Birg <romanbirg@gmail.com>
SystemUI: avoid NPE when no toggles are set

Change-Id: Idc3fe5b43f545fed51f33b06fb5888fb5e226b7a
Signed-off-by: Roman Birg <romanbirg@gmail.com>
Remove BigMenu Logic

When BigMenu exists, NavBar assumes you want 'DONT_SHOW' for
left/right little menus.  This had spacing implications for users
that used BigMenu, but few buttons :
http://rootzwiki.com/topic/38274-menu-button-in-navbar/

removing this had little implication on the NavBar itself, but
did force some re-working of the MenuArrowKeys.

Change-Id: I6946d85d2e0a6db26b937a9ced9643c6a2a1ae83
Signed-off-by: Zaphod <mwilson@acesappraisal.com>

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/NavigationBarView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/key/ExtensibleKeyButtonView.java

Add missing stuff.

Fix up. (AOKP)
Remove cm power widget.
Clean up.