Don't register methods when there's nothing to register.

Change-Id: I6d0233f79bb90089426d702b4076ec5750e82475
RecentsPanelView: remove internal getter for isHighEndGfx()

if we're going to store this as a global we might as well set it in the construct
instead of looking for it every time the recents are inflated

Change-Id: Ic38e98e5cf2ae399d51b63089d7cb2ab3ac97f51
Release SQLite page cache as much as it can

Call sqlite3_release_memory() until it returns 0

Change-Id: Id7a0942805c2c3ad5a7efe8bc3ecd8b7fffbf75b
Improve notification shade auto-collapse code.

- When the user dismisses a notification by swiping, also collapse
  notification shade if there are persistent notifications remaining.
  Only skip collapsing if there are still non-persistent notifications
  pending
- When the notification is removed by the app, wait a bit until
  collapsing the shade so the removal doesn't come as a surprise to the
  user
- Centralize the collapse trigger at one place

Change-Id: I4e5114f66e799a7c80e18b38abce5678da460846

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
Update Roboto fonts to Android L versions

Change-Id: I541694b159e32bb90c1889e894c4352e43f3ce40
Use Android L navbar icons by default

Change-Id: I80425aec8db26e56954c0c081ee811eeff86e4fd

Conflicts:
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_back.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_ime.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_back_land.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_home.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_home_land.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_menu.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_menu_big.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_recent_land.png
	packages/SystemUI/res/drawable-hdpi/ic_sysbar_search.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_back.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_ime.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_back_land.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_home.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_home_land.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_menu_big.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_recent.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_recent_land.png
	packages/SystemUI/res/drawable-mdpi/ic_sysbar_search.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_ime.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_back_land.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_home.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_home_land.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_menu.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_menu_big.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_recent.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_recent_land.png
	packages/SystemUI/res/drawable-xhdpi/ic_sysbar_search.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_ime.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_back_land.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_home_land.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_menu.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_menu_big.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_recent.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_recent_land.png
	packages/SystemUI/res/drawable-xxhdpi/ic_sysbar_search.png
frameworks: Make Spinner widget request the itemtype of the adapter

Prior to that change the itemtype is ignored, this prevent Spinner to
work with adapter containing multiple itemtype.

Change-Id: I1554f5bfd04c972f4eddb6da9d611b7f7ef4e0e7
IndexOutOfBoundsException observed rarely in ProcessStats

Sometime IndexOutOfBoundsException is observed in ProcessStats
while allocating longs array. This could be due to synchronization.
This fix will return if array index is >= size.

Change-Id: I1df34152c95f2ff61829da07f750e79a6f1efab3
CRs-fixed: 626638
base: App crash when select suggestion's length more than specified.

App crashed by catch IndexOutOfBoundsException which raised
by check span range when select suggested string.The root
cause is that the editor will truncate the suggested string
which length is more than it specified, but it also set span
use the suggestion's original length.

Update the suggestion's real length after editor replace the
original string to suggested.

Change-Id: I2d765701934a9e68be172cb87a104590f3cdeceb
CRs-Fixed: 532211
Applications crash observed while selecting words from suggestion list

While selecting words from suggestion list, applications are crashing as
textview span are going out of index. For textinput where spaces are not
allowed length difference shall be calculated properly to avoid Index
out of bound situations.

Change-Id: I360318cf9241abbb7f58ad1ddf3f3c8d364f17d1
CRs-Fixed: 642057
Fixing IndexOutOfBounds Exception in ActivityManager

Bypass the iteration to avoid the exception during
the execution of ensureActivityVisibleLocked() because
startSpecificActivityLocked() within the loop may delete
the elements from History stack.

Change-Id: I195da10a8e9161572bdb653ad3021998d4f2a939
CRs-Fixed: 651963
Added validity check for Pointer Index

Checking if the pointer index is valid before querying for X & Y
coordinates. This is done to avoid IllegalArgumentException.

Change-Id: Ic7f3022d33c313a0bfe8b55c9bc89019b33d23b7
Frameworks: Fix to avoid crash when the tab is not set.

Tab is not highlighted in Videoapp unlike Music app.
Instead the list is highlighted with mSelectedTab a negative value
when onFocusChange is called.
Add a check for mSelectedTab.

Change-Id: I930657b8a9be4be4d973f876242a15a667ec6f94
CRs-Fixed: 657606
audio: Inform audio HAL if it is a voice call initiated by Telephony

setMode() API with IN_CALL mode can be called by any of the Apps.
In HAL, it is required to distinguish if it is a real voice call
or not. Inform to audio HAL if it is a voice call by checking
getPhonestate() updated by telephony.

CRs-Fixed: 662804
Change-Id: I20a661f49f6566bdd1e23d6de18b509e2728ef19
Fix the texture ID reuse issue in HWUI.

Issue: When the layer of previous frame is destroyed, it doesn't clear the
texture id in mBoundTextures[mTextureUnit], so in the next frame, if
glGenTexture returns same texture ID of the previous frame,
the new texture is not bound.

CRs-fixed: 671736

Change-Id: Ifc5fd2115fb1863b3c006ab14b0faabeaeb4eab4
update parameters in uploadToTexture() for GLES20

Google optimized the uploadToTexture with GLES3.0+,
This allows us to upload a sub-rectangle of texture,
but this has compliance issue with GLES 2.0.

With OpenGL ES 2.0 we need to copy the bitmap in a
temporary buffer if the stride doesn't match the width,
and then upload entire temporary stripes.

Change-Id: I8987cd8347913c61b7fa45bd47be1189aa6bdb05
Signed-off-by: Shenghua Lu <shenghua.lu@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Guobin Zhang<guobin.zhang@intel.com>
Remove getBoundTexture().

GetBoundTexture checks the bound and active texture,
and we should clear the id from all bound textures
(regardless of whether they're active or not).
Remove the check and getBoundTexture() method,
and just always call caches.unbindTexture(texture.id).

CRs-fixed: 681102

Change-Id: I481386394f382519bb7ea2700c4e808e00474c70
Fixing parcel leaks to avoid virtual memory leak

Client has to call recycle() on parcel object after its usage
otherwise native layer of binder won't clear the resources of
parcel which were allocated for IPC

Change-Id: Ib31ddcc92aa4ebd80bb66729922b9133692e9c9e
Make sure we clean up

pruneDeadThumbnailFile need to close its cursor
in a finally block to avoid leak resouces.

Change-Id: I2646b91970e47ee80a721a2452215b7cae149d10