Correct stride for drawing to cached glyph bitmap

fixes the glyph cachebuffer index to account for pixelbuffer
format size.

issue: in launcher home screen create icon group and rename the
group to some text string with emo-icons (smilies). without this
change the drop shadows for emo-icons will look bad.

Change-Id: I525a9219d35f4541363fd64e7fc5fd1053269725
Signed-off-by: Digish Pandya <digishp@codeaurora.org>
Avoid SystemUI crash due to NPE

BaseStatusBar.createNotificationViews() returns null
when it reports handleNotificationError(), leading to
a forced crash of the misbehaving app. However, it
should not add a null object of Notification.Entry
since it will also crash SystemUI (crashing at compare).

Change-Id: I86678c8024e931420b0fbab1f36b330e7e75d581
MetadataRetriever: Check null pointer to avoid tombstone crash.

When the app's vm-heap is not enough, memory allocation for big
object like bitmap may failed.

This patch add protection for bitmap creating to avoid segment
fault error in the following GetIntField function.

Change-Id: I63977dc602f4ed395afd11004a0ed027173fb685
Signed-off-by: wang, biao <biao.wang@intel.com>
Signed-off-by: TingX Li <tingx.li@intel.com>
Signed-off-by: Wang LiangX <liangx.wang@intel.com>
NULL previous background bitmap upon changing wallpaper

Step to reproduce it on Nexus 10 with 4.4.2(KOT49H):
1. Long press on home screen.
2. Choose wallpaper from Wallpapers.
3. Select new wallpaper and set it.
4. Repeat step 1-3 several times.
See black background instead of the wallpaper.

There are two binder objects who hold reference to the
ImageWallpaper$DrawableEngine, which keeps the big chunk
bitmap from being recycled.
One is WallpaperService$IWallpaperEngineWrapper. The client
references went away slowly, maybe several minutes after
changing wallpaper. Then the finalizer has to been executed
to GC it.
The other one is WallpaperService$Engine$BaseIWindow. Don't
know who still held reference to it even after the window
was removed.
Anyway, let the bitmap be GCed first.

Change-Id: I27f6971a3edd26472b69e59b542b27fd7c8e7b90
Signed-off-by: jshe32X<jianchunx.shen@intel.com>
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
WallpaperManager: add NULL pointer check for getCropAndSetWallpaperIntent

Originally the api 'getCropAndSetWallpaperIntent' does not check
whether the parsed parameter is a NULL pointer, as leads to the
whole app crash if it call this api with a null parameter accidentally.
A null pointer check logic is added into its original parameter check
logic, so that this API will throw an IllegalArgumentException if it
is parsed with a null pointer

Change-Id: Ib7de40e571419d09e1a744edc969eb7162766b75
[1/3]frameworks/base: add "Accept all files" option for incoming files via Bluetooth

This patch defines a key to store the option value in Settings Provider db

Change-Id: I993d7ec77b49f608a5a17e5a8516e52fc5d82946
add a getter for the x and y offsets of the wallpaper window

Change-Id: I35294bcac664e85cc5d344b50b5c4335a60d3f37

Conflicts:
	services/java/com/android/server/wm/Session.java
Alarm: ignore less than 2 mins upcomming power off alarm

2 minutes is our define for enough boot up time for a power off alarm.
For current design, it can only afford upcoming power off alarm which
is later than 2 minutes. Kernel alarm driver only take care the power
off alarm which is 2 minutes later. And the framework only pass the
first power off alarm to kernel. So we need to find the first 2
minutes later upcomming power off alarm to kernel, otherwise it will
be no power off alarm from kernel's perspective. Fix the bug by
ignoring less than 2 mins upcomming alarm as power off alarm, and
only treat it as a normal alarm.

CRs-Fixed: 624561
Change-Id: I91379ecb2b378441ac2edb36212531ba6f203d8a
ExtMediaPlayer: Increase parcel pool size to 30

Increase MAX_NUM_PARCELS to 30. This is to handle
parcel override issue when textsamples are sent at
a fast pace from mediaplayer.
Usecase: With CEA CC streams, dashplayer sendTextPacket
embedded in each video sample as soon as decoded.
No realtime offset delay sync logic for text samples
as with A/V samples. When samples drained in batch,
can have more than 5 textsamples sent in flurry

Change-Id: I4c4c63b9c9c296dbb387c4da9e70c040b75f92b6
AlarmMangerService: Fix the delay of ACTION_TIME_CHANGED for time-services

After boot completed, if low memory condition happens or some ordered
broadcasts have time out, it will cause delay for some receivers to
receive ordered broadcasts. Adding FLAG_RECEIVER_FOREGROUND into
time changed action will make TimeServiceBroadcastReceiver receive
ACTION_TIME_CHANGED in time.

CRs-Fixed: 630982
Change-Id: Id789d0b3c969af6b92f62612602ba119613382ab
Tele2 considered non-roaming on T-Mo

Change-Id: Ibb05f277b701861b8716168b54e96f63127e686d
Revert "add a getter for the x and y offsets of the wallpaper window"

This reverts commit 86b9bfe8ae9ce60079a716829f231edb67edca05.
Bluetooth: use  virtual sco calls for VOIP

 - use virtualvoicesco connection set-up for VOIP calls
 - cannot simply revert c18c9138cee0f0859bcab636a004ce92ca4a9ab5
and 25fc29b3691a1d2a84164988dc74b2e7d301868e changes because
of aidl modifications involved.

Change-Id: Ib49cb01151a9cea2e94bc7a51ad1f58e877271aa
CRs-Fixed: 598072
Bluetooth: Unbind only in case of OFF state

In MESSAGE_SAVE_NAME_AND_ADDRESS,BT manager
calls unbindandfinish without checking BT
adapter state which if not OFF, will lead
to improper cleanup. Unbind will get called
but cleanup will not happen.

Change-Id: Ibfc70c51a95f8b80f331090e322ba3ebb88f6c03
CRs-Fixed: 652260
Bluetooth: Adds check to verify Bluetooth adapter state

This checks whether bluetooth is turned ON or not in BLE
start scan process.BLE scan apis are called from applications
so need to check if BT adapter state is ON to avoid Bluetooth
crash

CRs-fixed: 649274
Change-Id: Ic075e1560bba2cabbfac2e1477932f9ad3144067
BT: HF: Control verbose logging at runtime.

Verbose logging in BluetoothHeadset can be
controlled from adb shell.

Change-Id: If63974402a4fc91065c8007a224388af12f49cf7
CRs-Fixed: 601899
Merge remote-tracking branch 'upstream/kk-4.4' into kk-4.4
Merge branch 'kk-4.4' of git://github.com/beegee-tokyo/platform_frameworks_base into kk-4.4