Audio: Fix abnormal keytone playback during silent mode changing

Change-Id: I603dbf70615b25dfad846235b97be5eb2731617e
Origin-Change-Id: I29e8673bb8305d96d5adc0a7e82b9bb9bcb3e7de
Orig-Change-Id: I5240aa118d3eeb7c630b2e03abe5536c26e6a405
Signed-off-by: ezhao3X <ertaox.zhao@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 19084
fix some CTS problems

Some CTS test cases which are to test a long-click availability on a
view fail if "long_press_timeout" would be changed. For instance, if
we would change "Touch & hold delay" setting to "medium" or "long",
the following test cases fail.
  - GestureDetectorTest#testOnTouchEvent
  - View_UsingViewsTest#testSetupListeners
  - AbsListViewTest#testGetContextMenuInfo
These test cases call TouchUtils.longClickView(). ThelongClickView()
uses ViewConfiguration.getLongPressTimeout() to get
"long_press_timeout". However the method will always return a
default value '500' if it would be called from non-main thread.
CTS test case runs on non-main thread. So longClickView() should
read the value from SettingProvider.

Change-Id: I19465678a1f6a10b93262263975d612b386856f9
Do not set the content description on the icon tab when not necessary

It is not necessary to set the content description of a tab's icon
when the icon is not actually visible. Based on the implementation,
the tab's icon is only visible when not null and its visibility is
set to true.

Change-Id: I4430dfc7d1faa0ae00fdc789745e7cae7b453a89
Video can not continue to play after wake up.

Save the time to make the player continue.
While playing, lock-screen will make the play paused, the time is not saved,
so it will play from beginning after unlock screen.

Change-Id: I54d2e40521c5351a563a269ade087bae203f8098
Author: Bin Xu <binx.xu@intel.com>
Signed-off-by: Bin Xu <binx.xu@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: 26444
Fix to NullPointerException when activity is relaunched

When ChooseTypeAndAccountActivity is relaunched and resumed
by ActivityManager a call is made to onActivityResult without
first triggering onResume. This leads to mAccounts object
still being null.

Fixed by properly setting mAccounts object if it is null prior
to use after function onCreate has been called.

Change-Id: Ife7e1e052c473970d923fa43ee6189eb62a1113b