Fix PreferenceActivity's isMultiPane on single-pane screens

isMultiPane returns true incorrectly on single-pane screens when under a
preference header.

Change-Id: Ic17e939c257ea4c8db02e69bb961432e9deb0d39
fix surfaceview bug when surface format changed should not call surfaceDestroyed

formatchange should not destroy surface

Change-Id: I20fa219a4a8ecb7b504518f5eba7e342dd55c569
Author: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: b529 <b529@borqs.com>
Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Bing Deng <bingx.deng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 37272
fix the mess thumbnail when export 1080p/720p video to 848x480 resolution

Root cause: After export the video, the output frame size will be rewrote by the export
resolution, when rotate the phone, the frame will use the export resolution to display
which causes the mess thumbnail.
Fix: store the old output frame size and reset the size after export.

Change-Id: I05b6b6a87187969213fb9e44d95e7e0df2f06afa
Author: Wangyi Gu <wangyi.gu@intel.com>
Signed-off-by: Wangyi Gu <wangyi.gu@intel.com>
Signed-off-by: Tong, Bo <box.tong@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 32193
fb: TRDS 3.0 and new theme engine preparation sdk support (1/4)

First commit for public api sdk support, to give app developer a way
to add TRDS/TRLS and coming theme engine support. As well would be later
used for themer to build theming.

Of course apps will be still compatible to firmwares without that feature
as well backwardscompatible

This just adds the support

TODO:
- Proper API documentation
- Adding sample cases

Change-Id: Ic88838247c47d2a92b55d1cb1b00330f2d62fb88

Conflicts:
	core/java/android/content/res/Configuration.java
	core/java/android/provider/Settings.java
fix bug about view cache in RemoteViews

clear the data in cache before reloading new items,
& the method 'getCount()' returns tmpMetaData.count.

Change-Id: I0d37d7a99408f60b1d63fa5ca0c0a0f265dd0a8a
Telephony: The settings values aren't taken in account correctly.

Just after a phone flash, the phone receives and
displays the Ambert Alert SMS CB, even if the
"Show Amber Alert" is disabled in the setting
of the CellBroadcastReceiver application by
default. This default value is to false in the
preference.xml file of the CellBroadcastReceiver
application in the vendor/intel/common/overlays
folder.

This patch updates the preference
TwoStatePreference.java file of the telephony
framework, with which after a phone flash the
Amber Alert for SMS CB is not received and
displayed, when the "Show Amber Alert" setting
disabled. Also With this patch the xml files are
correctly initialized after a phone flash.

Change-Id: I5c428c2b283ff6cc715a5eb22376f74ea98f9cb5
Author: Delaude Emmanuel <emmanuelx.delaude@intel.com>
Signed-off-by: Delaude Emmanuel <emmanuelx.delaude@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 66630
Fix layout of MultiWaveView and GlowPadView.

If the calculated size of the rings is much smaller than the measured
size (which is happening e.g. on mdpi 600x1024 tablets), the glow pad
appeared shifted to the right.
This happened due to the insets being calculated as difference of
available and needed size, and later on being added to the available
size. Example numbers (Nexus 4 with density forced to 160):
- computed size in onMeasure: 768x505
- scaled size in onMeasure: 505x505
- thus, insets are calculated as 131/0
- in onLayout, placementWidth (364) and max target width (108) are much
  smaller than width (768)
- thus, center is calculated as 131 + (768 / 2) = 515, thus shifted to
  the right

Fix that by not using width in the calculation, as the inset size
already takes it into consideration.

JIRA:CYAN-829
Change-Id: Ifc2a93214f812f554a8fed3243eed66aec9f00c9
Media: Check null pointer before call native function to avoid tombstone

When the vm in low memory enviorment, it may can't new the needed big
object like bitmap, and the object is null, and then it call the native
function to get offset of this object, this cause a segment fault
because the 0+offset is an invalid address.

Change-Id: Ic72bbcded49d1b74165539fb54bbc5188db5e19c
Author: Biao Wang <biao.wang@intel.com>
Signed-off-by: Biao Wang <biao.wang@intel.com>
Signed-off-by: Bing Deng <bingx.deng@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 64923
Make VideoView and MediaController listen to more key events

Make VideoView and MediaController listen to more key
events, i.e: "FastForward", "Rewind", "Next" and "Previous".

Change-Id: I522061a3fae2ab349d0ca8dbb82f9ba22e490cf7
Mtp: MtpDatabase TOMBSTONE continue happen when do usb otg plug/unplug test.

Add one JNI interface in MtpDatabase to delete global reference
in order to avoid GREF issue.

Change-Id: Id980f669c56461f1e4b48f52d416f3651f15589a
Author: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 60891
Fix verifyPreloadConfig to use correct density constant

Configuration bits in ActivityInfo are different from what is
used in native code (and passed to this method) and must
be converted before compared.
Without this fix resources that exists in multiple densities
will not be preloaded.

Change-Id: Ic92c590720d3c8af691b9f5ad119fa87d2cac654
Frameworks: long SMS converted to MMS

MobC00386620
b/12682831

Using the supplied configuration in mms_config.xml
(packages/Apps/MMS/res/xml) to enable/disable this feature,
when setting the configuration to 7, an IndexOutOfBoundsException
will be thrown.

We re-correct the valid start of span range in the SpellChecker
to avoid triggering the exception.

Change-Id: I693fcb6ab82e6813ff6d8c5532b92a81b6a570fe
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Port SmoothProgressBar: User Custom ProgressBar Setting[2/2] [DO not merge]

Sample : https://github.com/castorflex/SmoothProgressBar
http://antoine-merle.com/images/smoothprogressbar_all.gif

thanks Dokdo Project

Change-Id: If476fb2a4fa9a988c73364107555b5e7624dea53
Signed-off-by: hany <hany.alsamman@gmail.com>

Conflicts:
	core/java/android/provider/Settings.java
	core/java/android/widget/ProgressBar.java
Show live wallpapers in the recents view on high-end devices

Change-Id: Iefbf4f292b6a9bfdb516f154cc2976db2ba86cde

Conflicts:
	packages/SystemUI/src/com/android/systemui/recent/RecentsActivity.java
Signal strength: add more checks to signal strength,

so it doesn't fall under the range of poor signal and automatically
assumes a gsm signal, actually checks if all values are true and not
valid then pass it on to lte or gsm. This fixes cases when gsm signal
is not valid and lte is active. When lte is active and shows a really
weak and gsm signal is not avalible due some broken vendor ril or
just running cdma lte and a few others senario creates this issue.

Change-Id: If9c5dc1a969605cd1eeb9218de02a9f8dbbd3ae1

Conflicts:
	telephony/java/android/telephony/SignalStrength.java
SmoothProgressBar: Initial Commit [DO not merge]

Change-Id: Ic48f7ff57f76c933808f2ea4a6be49e949ce2c00

Conflicts:
	core/java/android/widget/ProgressBar.java
	core/res/res/values/attrs.xml
	core/res/res/values/symbols.xml
SmoothProgressBar: Turn off mirror and reversed by default

Change-Id: If8dd267b1b47b55723f184e822beb2fad5c2be94
Support for setting the outline color

Change-Id: I177407bb25647d0aab3df7b4eead6fffef8fdc5d
Support for outlineColor, outlineWidth, originAngle parameters.

Added XML attributes to support those parameters and code changed to support them.

Change-Id: I7c764cb90f1d0ffd9c8f9b2949ce6d7cca5fcc8b

Conflicts:
	core/res/res/values/attrs.xml
Fix active display notification service call

Active display was broken due to Halo(1/2) commit

Change-Id: I680b601bd3a35d2d39e1fa5cabd51d81dfd9321b
Signed-off-by: iceandfire <arhamjamal@gmail.com>