OSDN Git Service

android-x86/frameworks-base.git
7 years agoDetect HDMI audio by switch events android-x86-6.0-r1
Chih-Wei Huang [Tue, 13 Sep 2016 09:43:11 +0000 (17:43 +0800)]
Detect HDMI audio by switch events

If detect SW_VIDEOOUT_INSERT, assume HDMI is plugged.

7 years agoMerge tag 'android-6.0.1_r66' into marshmallow-x86
Chih-Wei Huang [Wed, 7 Sep 2016 05:48:36 +0000 (13:48 +0800)]
Merge tag 'android-6.0.1_r66' into marshmallow-x86

Android 6.0.1 release 66

7 years agoanalytics: send anonymous usage information
Hugo [Wed, 6 Jul 2016 03:28:38 +0000 (11:28 +0800)]
analytics: send anonymous usage information

Send usage information to google analytics when applications are started
or throws exceptions.

7 years agoMerge tag 'android-6.0.1_r61' into marshmallow-x86
Chih-Wei Huang [Wed, 3 Aug 2016 07:40:30 +0000 (15:40 +0800)]
Merge tag 'android-6.0.1_r61' into marshmallow-x86

Android 6.0.1 Release 61 (MOB30Z)

Conflicts:
services/backup/java/com/android/server/backup/BackupManagerService.java

7 years agoDO NOT MERGE: Allow apps with CREATE_USERS permission to call UM.getProfiles.
Sudheer Shanka [Fri, 29 Jul 2016 17:50:10 +0000 (10:50 -0700)]
DO NOT MERGE: Allow apps with CREATE_USERS permission to call UM.getProfiles.

Bug: 29189712
Bug: 30317026
Bug: 30235113
Change-Id: Icced9805a56675e86f894c458c4a5a0048fd54c0

7 years agoDO NOT MERGE: Fix CTS regression
Sungsoo Lim [Mon, 25 Jul 2016 02:53:13 +0000 (11:53 +0900)]
DO NOT MERGE: Fix CTS regression

Bug: 30297223, Bug: 30437363
Change-Id: I7b18af40e4eac2713577204428fbfb96cc346582

7 years agoDO NOT MERGE: Remove the use of JHEAD in ExifInterface
Sungsoo Lim [Wed, 13 Jul 2016 00:31:16 +0000 (09:31 +0900)]
DO NOT MERGE: Remove the use of JHEAD in ExifInterface

Bug: 29270469
Change-Id: I6a6c8aeab2a842ff1646316363d614851625e78f

7 years agoDO NOT MERGE Block the user from entering safe boot mode
Benjamin Franz [Tue, 12 Jul 2016 14:20:47 +0000 (15:20 +0100)]
DO NOT MERGE Block the user from entering safe boot mode

Block the user from entering safe boot mode if the DISALLOW_SAFE_BOOT
policy is set.

Bug: 26251884
Change-Id: I4945d5d676928346c11ea305a5b6a2e1a42e94e6

7 years agoAdd bound checks to utf16_to_utf8
Sergio Giro [Tue, 28 Jun 2016 17:26:10 +0000 (18:26 +0100)]
Add bound checks to utf16_to_utf8

Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
(cherry picked from commit 4781057e78f63e0e99af109cebf3b6a78f4bfbb6)

7 years agoCheck caller's uid before allowing notification policy access.
Julia Reynolds [Tue, 28 Jun 2016 19:16:21 +0000 (15:16 -0400)]
Check caller's uid before allowing notification policy access.

Bug: 29421441
Change-Id: I7460268595e932d54660b02007bcd68b95fe8aec

7 years agoFix string equality comparison
Paul Stewart [Mon, 21 Mar 2016 16:51:27 +0000 (09:51 -0700)]
Fix string equality comparison

Don't use "==" to compare strings.

Bug: 25624963
Change-Id: Id25696e4fdcbcf4d48ec74e8ed65c1a33716b30c

7 years agoWifiEnterpriseConfiguration: Do not print credentials in toString
Paul Stewart [Wed, 11 Nov 2015 18:23:43 +0000 (10:23 -0800)]
WifiEnterpriseConfiguration: Do not print credentials in toString

BUG:25624963
Change-Id: I939a12a27d6b915d8a9cc8b142f645fba0ee42ec

7 years agohoudini: match package name by patterns
Chih-Wei Huang [Mon, 18 Jul 2016 14:32:13 +0000 (22:32 +0800)]
houdini: match package name by patterns

PRC apps from different markets usually have different package names.
This change tries to match them by patterns.

To test it, install the Implosion apps from Wandoujia and CoolMarket
and run them OK.

7 years agoMerge branch 'android-ia' into marshmallow-x86
Chih-Wei Huang [Wed, 20 Jul 2016 09:54:14 +0000 (17:54 +0800)]
Merge branch 'android-ia' into marshmallow-x86

7 years agoUpdate window surface while live wallpaper is changed.
suncx [Wed, 20 Apr 2016 08:24:42 +0000 (16:24 +0800)]
Update window surface while live wallpaper is changed.

Other than surface resized or surface moved, setSurfaceBoundariesLocked in
WindowStateAnimator.java may encounter another scenario that the live wallpaper
is changed. In all of scenarios, updateSurfaceWindowCrop(...) should be called
separately to avoid float window flickering when it's dragged off screen.

This patch is meant to refine the previous patch:
https://android.intel.com/#/c/468817/

Change-Id: I2b5f5f55dd221f794aafee1358d9cf5e91ce3666
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-30604
Reviewed-on: https://android.intel.com:443/496968

7 years agoFix memory leak in HWUI
Sangkyu Lee [Fri, 11 Dec 2015 07:05:10 +0000 (16:05 +0900)]
Fix memory leak in HWUI

std::unique_ptr::release just releases the ownership of the
managed object. To delete the object, std::unique_ptr::reset
function should be called.

Change-Id: If65f74085b1fc2be3a9fffc433326e0bcdb40ff3
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-19750
Reviewed-on: https://android.intel.com:443/509013

7 years agoFix issue #25727069: Top sleeping activity overrides foreground service
Dianne Hackborn [Tue, 17 Nov 2015 19:14:43 +0000 (11:14 -0800)]
Fix issue #25727069: Top sleeping activity overrides foreground service

port from google https://android-review.googlesource.com/#/c/221708/

Change-Id: I9a085cd650604f9d6277ad343bf3c3852324cafc
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-31379
Signed-off-by: huaqianx <huaqiangx.chen@intel.com>
Reviewed-on: https://android.intel.com:443/503938

7 years agoAdd fclose to avoid leak on native heaps
Sebastien MICHEL [Fri, 1 Apr 2016 13:25:39 +0000 (15:25 +0200)]
Add fclose to avoid leak on native heaps

This leak involves the "dumpsys gfxinfo" command and can be observed on
following processes:
* systemui
* system_server
* googlequicksearchbox

Change-Id: I5d0048a8a0c487ef5f88896fe294efebc9381e2a
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-17934
Signed-off-by: Sebastien MICHEL <sebastien.michel@intel.com>
Reviewed-on: https://android.intel.com:443/489997

7 years agoUpdate window surface while activity is set to full screen.
suncx [Wed, 23 Mar 2016 07:40:00 +0000 (15:40 +0800)]
Update window surface while activity is set to full screen.

Other than surface resized or surface moved, setSurfaceBoundariesLocked
in WindowStateAnimator.java may encounter another scenario that the
flag of window is set to LayoutParams.FLAG_FULLSCREEN. In all of
scenarios, updateSurfaceWindowCrop(...) should be called separately
to avoid float window flickering when it's dragged off screen.

This patch is meant to refine the previous patch:
https://android.intel.com/#/c/468817/

Change-Id: I4ca86588650a58661a13a925b7cb73ac9b0637c0
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-24062
Signed-off-by: suncx <changyingx.sun@intel.com>
Reviewed-on: https://android.intel.com:443/485284

7 years agoFix the memory leak bug introduced by PRC
jgu21 [Fri, 1 Apr 2016 04:40:31 +0000 (00:40 -0400)]
Fix the memory leak bug introduced by PRC
compatibility feature

Fix the memory leak bug introduced by PRC
compatibility featurei, introduced by
https://android.intel.com/#/c/471490/

Change-Id: Iaf9bd21afa17f3a81ab700c63ae7c0bb0851a594
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-27449
Signed-off-by: jgu21 <jinghui.gu@intel.com>
Reviewed-on: https://android.intel.com:443/489353

7 years agoFix KW issues on PRC compatibility
jgu21 [Wed, 30 Mar 2016 06:57:38 +0000 (02:57 -0400)]
Fix KW issues on PRC compatibility

Fix KW issues on PRC compatibility,introduced by below commit.
https://android.intel.com/#/c/484542/

Change-Id: Ib10899655dd2a18569387dbafbe33856acf5df59
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-26904
Signed-off-by: jgu21 <jinghui.gu@intel.com>
Reviewed-on: https://android.intel.com:443/487804

7 years agoDon't back up / restore EAP network definitions
Christopher Tate [Wed, 18 Nov 2015 02:01:52 +0000 (18:01 -0800)]
Don't back up / restore EAP network definitions

Bug 25725016

Change-Id: Idfef9dd53f2403bbe4c950493a0ab8fa66a3b7d4
(cherry picked from commit 9bc2f472e9cf204c737025b5d7101ba16c43b356)
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-26648
Reviewed-on: https://android.intel.com:443/486879

7 years agoHandle renamed packages during default grants
Svet Ganov [Tue, 17 Nov 2015 19:53:18 +0000 (11:53 -0800)]
Handle renamed packages during default grants

If an L device has a privileged app on the system image which was
updated and an M OTA renames the app package (supported only for
privileged apps) we end up with a disabled system package setting
with no package information. Since we are not doing a null check
of the package we get from the disabled package settings during
default grants we crash leaving the system in a bad state.

bug:25687380
Change-Id: I4f2ebcaf471e4bd1696298eab4716b50c52ca5c4
(cherry picked from commit f443384d9e30111aaa61dac75af1f40d19465e96)
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-26630
Reviewed-on: https://android.intel.com:443/486841

7 years agoReduce the overhead of the PRC compatibility package
xiajiang [Mon, 21 Mar 2016 16:26:06 +0000 (12:26 -0400)]
Reduce the overhead of the PRC compatibility package
feature during system bootup

The PRC compatibility package introduced too heavy overhead
in system bootup. This commit aims to reduce the overhead
in system bootup and improve the performance of PRC
compatibility package.

NOTE: The format of ThirdPartySO has been changed to improve
the performance. From now on, the lib name should be trimmed
as below if want to add into the list. For "libabc_v1_2_3.so",
add "abc_v" into the list, that is, the version information
at the tail of lib name should be removed.

Change-Id: Ic374e363d3d31f9bd69be839b33b1bd65950ef61
Tracked-On:https://jira01.devtools.intel.com/browse/OAM-25819
Signed-off-by: xiajiang <xia1.jiang@intel.com>
Reviewed-on: https://android.intel.com:443/484542

7 years agoChanges of root storage space unmounting time on Zygote Process
doheon1.lee [Wed, 20 Jan 2016 04:07:27 +0000 (13:07 +0900)]
Changes of root storage space unmounting time on Zygote Process

Cherr Pick from https://android-review.googlesource.com/#/c/204250/

Zygote process forks every child process for launch the SystemServer and other
applications. When child process is forked, unmount storage inherited
from Zygote process is executed before it gains its own root storage
space.
If Zygote have no storage spaces, unmount operations not needed to
get relevant permission storage space.
Thus unmount is executed only once shortly before the SystemServer is forked.
And the child processes do not unmount its inherited root storage space.

Change-Id: Ib71b065f86d9c4eb100e79f2a74a0cd5ae761b08
Tracked-On:https://jira01.devtools.intel.com/browse/OAM-26190
Reviewed-on: https://android.intel.com:443/485736

7 years agoEnable shader cache for applications that shared UID with multiple packages too
Shuo Gao [Tue, 1 Mar 2016 05:32:03 +0000 (13:32 +0800)]
Enable shader cache for applications that shared UID with multiple packages too

Frameworks supported a mature mechanism for shader cache per each package already,
but as a special case such as Settings APP, if there are several packages in this
application which means that multiple packages shared the same SharedUserID with it,
it won't initialize the graphics disk caches, thereby APP like Settings have to
rebuild and relink shader every time during launch, which cause a bad launching
performance, so here to enable the GFX and RS cache initialization for multiple
shared packages case too.

As measured on Sofia LTE this saves 100 ms during
the 'flush drawing commands' on a cold launch of the Settings
application and so improve the launch time by the same.

Next:
    Run below test on multiple platforms with different GFX:
        1. CTS
        2. MTBF
        3. full Perf Regregssion test suites

Category: aosp improvement
Domain: AOSP-Framework-GUI
Origin: internal
Upstream-Candidate: yes

Change-Id: If0f927e3399b775804abf1d9a868887951f471c5
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-19982
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Reviewed-on: https://android.intel.com:443/476092

7 years agoCreate mixins configuration for app compatibility
jgu21 [Mon, 14 Mar 2016 06:56:10 +0000 (02:56 -0400)]
Create mixins configuration for app compatibility
enhancement feature

This feature is created for some corner cases of
app compatibility issue. It's disabled by default.
To enable it, please add below lines to mixins.spec.
Currently, it aims to handle below issues:

1. All native libraries are put under assets directory.
Some apps put their libraries under the assets directory
in their APKs, instead of lib directory. It's not a
problem if the ABI of app libs is matched with platform
default ABI. But for apps with other ABIs, this feature
must be enabled to call native bridge for help.

Change-Id: I56cd60ade4778094e2b14fc38aa51d0eb0f0d40f
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-24196
Signed-off-by: jgu21 <jinghui.gu@intel.com>
Reviewed-on: https://android.intel.com:443/481102

7 years agoWait for handler thread to exit
jiangmin [Fri, 4 Mar 2016 02:27:31 +0000 (10:27 +0800)]
Wait for handler thread to exit

Wait for handler thread to exit.
If main thread exits too early, vm and binder
will be closed and handler thread will lose
binder fd.

Change-Id: I078f2eb5efcbacca1fe8a41a385c1a2e0b744cd9
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-22153
Signed-off-by: jiangmin <jiangming.wu@intel.com>
Reviewed-on: https://android.intel.com:443/477481

7 years agofix No UL&DL in BT headset during Skype call
Yingkai Cheng [Thu, 4 Feb 2016 09:06:20 +0000 (17:06 +0800)]
fix No UL&DL in BT headset during Skype call

when turn on BT headset during the call, the HSP is firstly connected.
Then A2DP is connected. In this situation A2DPsuspend should not be
set to false. Add condition to judge A2dpsuspend should be true or
false.

Change-Id: Ia7f9b26eafe4869987a42255ef8dc122109bc3ae
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-17033
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-19773
FeatureID: https://jira01.devtools.intel.com/browse/PREQ-18838
Signed-off-by: Yingkai Cheng <yingkaix.cheng@intel.com>
Reviewed-on: https://android.intel.com:443/469114

7 years ago[EAP-TTLS] Specify EAP-GTC phase 2 authentication method in autheap= param
Riadh Khaldi [Mon, 29 Feb 2016 16:37:30 +0000 (17:37 +0100)]
[EAP-TTLS] Specify EAP-GTC phase 2 authentication method in autheap= param

EAP-GTC phase 2 authentication method is specified in auth= param and can't be
correctly parsed by the supplicant.

This patch specifies the EAP-GTC phase 2 authentication method in autheap= param
so it can be correctly parsed by the supplicant.

Change-Id: I37ef692245963262b8b88df16ee413624c5931b9
Category: aosp improvement
Domain: CWS.WIFI-Common
Origin: internal
Upstream-Candidate: yes
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-21727
Signed-off-by: Riadh Khaldi <riadhx.khaldi@intel.com>
Reviewed-on: https://android.intel.com:443/476297

7 years agoEnable the PRC compatibility package feature for PRC market
xiajiang [Wed, 17 Feb 2016 18:59:14 +0000 (13:59 -0500)]
Enable the PRC compatibility package feature for PRC market

In PRC market, some APKs are packed in non-standard way, that is,
the x86(_64) libraries aren't workable although they're found in the APK.
This patch intends to relieve the impact from below 2 defects,
which is based-on the heuristic algorithm.

NOTE: To enable this feature, set "PRC_COMPATIBILITY_PACKAGE := true"
in device BoardConfig.mk before enabling houdini.

1. Missing x86(_64) libraries: The x86(_64) libraries are ported and
   existing in the APK. But it's incomplete, and not workable.
2. Mixed arm(64) libraries: Several libraries are existing in lib/x86(_64)/
   directory in the APK. But some of them are arm(64) libraries,
   instead of x86(_64) ones.

All of above always cause APP crash if installed x86(_64) libraries
by PackageManager.

This patch aims to improve PackageManager to figure out these defects
and install arm(64) libraries to run the APP with houdini support.
The basic idea is to compare x86(_64) libraries with arm(64) alternatives
to determine which one should be workable.

To customize it for specific APPs, 3 lists are provided under
/system/vendor/etc/misc/ on the device.

1. /system/vendor/etc/misc/.OEMWhiteList:
   This patch will be disabled for the APPs containing in the OEMWhiteList
2. /system/vendor/etc/misc/.OEMBlackList:
   The APP is enforced to install the arm(64) libraries if existed.
3. /system/vendor/etc/misc/.ThirdPartySO:
   This is another list which contains the names of all 3rd-party libraries,
   which will impact on the final decision of APP installation.

Change-Id: I2613d9ebc8fe012c801f4a38fc5dede413f15a91
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-20470
Signed-off-by: xiajiang <xia1.jiang@intel.com>
Reviewed-on: https://android.intel.com:443/471490

7 years agoOnly window position changed, update window crop.
Wei, ChangzhiX [Tue, 12 Jan 2016 07:37:55 +0000 (15:37 +0800)]
Only window position changed, update window crop.

When the window move to the edge of screen, first call setWindowCrop,
if the position of window is changed, second call setPosition.
setWindowCrop will let surfaceflinger dispaly the window, but the
lefttop position is the last postion, this will lead the rightbottom
position reduced, and the reduced rect is display the second layer's
window, so the window flicking.
setPosition let surfaceflinger display the window second, and this
time is right rect.

Solution:  When the window move to the edge of screen, only the
position of window is changed, call setPosition and setWindowCrop.

Cherry-picked from https://android.intel.com/#/c/458039

Conflicts:
services/core/java/com/android/server/wm/WindowStateAnimator.java

Change-Id: I12f2b380823f869dea8aa1f42b3b8c548d016b95
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-18559
Signed-off-by: Wei, ChangzhiX <changzhix.wei@intel.com>
Reviewed-on: https://android.intel.com:443/458039
Reviewed-on: https://android.intel.com:443/468817

7 years agolibhwui: handle eglSwapBuffers with EGL_BAD_NATIVE_WINDOW error case
Zhang Dongsheng [Thu, 21 Jan 2016 07:12:18 +0000 (15:12 +0800)]
libhwui: handle eglSwapBuffers with EGL_BAD_NATIVE_WINDOW error case

If eglSwapBuffers is called but the under surface was destroyed,
the EGL_BAD_NATIVE_WINDOW error may also be generated according
to the EGL spec 1.4.

This really shouldn't happen from the upper, but add the graceful
handling of this case also.

Change-Id: Ic0a599808b72f401d2a01c3dc40f9e6ea0e0a564
Signed-off-by: Zhang Dongsheng <dongsheng.zhang@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-12666
Reviewed-on: https://android.intel.com:443/460679

7 years agoFix java crash under DhcpClient.java
Damien Vagner [Tue, 19 Jan 2016 12:09:54 +0000 (13:09 +0100)]
Fix java crash under DhcpClient.java

Avoid calling method getTransactionId() on a null pointer.

Change-Id: I330982293ba005679c2ad338e779153b790ee983
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-16403
Signed-off-by: Damien Vagner <damienx.vagner@intel.com>
Reviewed-on: https://android.intel.com:443/459740

7 years agoGive up “startAssist()”if the object “mView” of class “AssistOrbContainer” is null.
xiaowa1x [Thu, 7 Jan 2016 02:00:51 +0000 (10:00 +0800)]
Give up “startAssist()”if the object “mView” of class “AssistOrbContainer” is null.

If device has physical NavigationBar,will not call method
"com.android.systemui.assist.AssistManager.onConfigurationChanged()",
cause the object "mView" is null. When input command "input keyevent 219",
will call methed "com.android.systemui.assist.AssistManager.startAssist()",
but object "mView" is null , result in JAVACHRASH.
So we need give up "com.android.systemui.assist.AssistManager.startAssist()" for physical NavigationBar.

Change-Id: I5c74643c9d99dc56d80a54eea6e798365b044c42
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-13670
Signed-off-by: xiaowa1x <xiaox.wang@intel.com>
Reviewed-on: https://android.intel.com:443/454888

7 years agoNat464Xlat: fix null pointer exception
Honore Tricot [Thu, 14 Jan 2016 13:32:12 +0000 (14:32 +0100)]
Nat464Xlat: fix null pointer exception

Under specific conditions, the interface could become null
while Nat464xlat is handling link properties. This could
leads to a null pointer exception => add robustness to avoid
such exception.

Change-Id: I3eae521c4d38d4111d37e8a988be4ed7fbb89db7
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-15066
Signed-off-by: Honore Tricot <honore.tricot@intel.com>
Reviewed-on: https://android.intel.com:443/458312

7 years agofix race condition between HWUI cache and renderThread
Thomas Buhot [Mon, 18 Jan 2016 09:31:58 +0000 (10:31 +0100)]
fix race condition between HWUI cache and renderThread

This is based on the commit c0a0e1a66da20a18045d59451b59ec32685bcf18
that has been merged in Google's master branch.
See: https://android-review.googlesource.com/#/c/195743/

getMaximumBitmapWidth() and getMaximumBitmapHeight() of DisplayListCanvas
need HWUI cache instance. Since the initialization of the cache is
asynchronous it may crash if not yet ready. Add a staticFence() call
to guarantee the cache has been created prior issuing the call.

Change-Id: I5ed9e5cc084444c8d1872a77fef50e294ae14e93
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-15447
Reviewed-on: https://android.intel.com:443/456036

7 years agolibhwui: make setSurface asynchronous
Thomas Buhot [Mon, 11 Jan 2016 09:50:08 +0000 (10:50 +0100)]
libhwui: make setSurface asynchronous

This is based on the commit 738a5d4f18e69c03700b77af0ea7e2a101da2c34
that has been merged in Google's master branch.
See: https://android-review.googlesource.com/#/c/183305/

On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.

With this optimization the launch time of any application
is improved (for example settings by 20 to 40 ms).

Change-Id: I2fea7991abf290d35747b14dc5f9710d293de40a
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-15447
Reviewed-on: https://android.intel.com:443/456345

7 years agoRevert "libhwui: make setSurface asynchronous"
Thomas Buhot [Wed, 6 Jan 2016 14:18:43 +0000 (15:18 +0100)]
Revert "libhwui: make setSurface asynchronous"

This reverts commit 1b801ad2e073c5eaa62f388a6b92d4ced9370c94.

Change-Id: I3c4f7518d9ee02593f063d8536d9234e0c1af3cd
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-15447
Reviewed-on: https://android.intel.com:443/456344

7 years agoFix deadlog of command "sm forget all"
Yu Chen [Fri, 15 Jan 2016 05:37:25 +0000 (13:37 +0800)]
Fix deadlog of command "sm forget all"
Deadlock orrcurs between pms and MountService.

Change-Id: I1ca34a8a431a743f613cf6cdb4cc20cd7731e4b3
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-14219
Reviewed-on: https://android.intel.com:443/458563

7 years agoAvoid deadlock issue when dump in pms
Hongcheng Xie [Tue, 12 Jan 2016 08:33:16 +0000 (16:33 +0800)]
Avoid deadlock issue when dump in pms

Move package installer service dump action out of
mPackages lock to avoid deadlock.

Change-Id: I255659defe801109707000cb7a8db67b1cf56363
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-8973
Signed-off-by: Hongcheng Xie <hongcheng.xie@intel.com>
Reviewed-on: https://android.intel.com:443/458057

7 years agoWrap reference count to one module
jiangmin [Wed, 6 Jan 2016 02:40:12 +0000 (10:40 +0800)]
Wrap reference count to one module

The reference count should be not managed by two module
(PdfRenderer and PdfEditor) separately.
It will cause memory leak and crash.
FPDF_InitLibrary will be call twice and excute
"g_FPDFAPI_pDefaultMgr = new CPDF_ModuleMgr;" twice.
Memory leak will happen.
PdfEditor will call FPDF_DestroyLibrary just after
PdfRenderer calls FPDF_InitLibrary. PdfRenderer
will execute FPDF's API and crash for null point of
CPDF_ModuleMgr::Get() due to PdfEditor's calling for
FPDF_DestroyLibrary.
So we merge the reference count of FPDF library to
PdfLibrary.cpp from PdfEditor.cpp and PdfRenderer.cpp.

Change-Id: I984a268ddd2d6d97e086e51d6459751feeaf372a
Signed-off-by: Wu Jiangming <jiangmin.wu@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-15089
Reviewed-on: https://android.intel.com:443/455409

7 years agoCamera: include VideoStop.ogg into target file system
Hongfu Ruan [Wed, 16 Dec 2015 03:37:22 +0000 (11:37 +0800)]
Camera: include VideoStop.ogg into target file system

VideoStop.ogg was used as recording stop sound, but sound
file was not copied into file system, then cause souldpool
load file failed.

Change-Id: Ib6cf22334a61950f9d9592671f21afdeb7e5ec16
Category: AOSP improvement
Origin: Internal
Upstream-Candidate: yes
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-12378
Signed-off-by: Hongfu Ruan <hongfu.ruan@intel.com>
Reviewed-on: https://android.intel.com:443/451140

7 years agoframework: Enable houdini to Support the apps which put all libs under assets dir.
jgu21 [Thu, 2 Apr 2015 08:22:46 +0000 (04:22 -0400)]
framework: Enable houdini to Support the apps which put all libs under assets dir.

1. Many apps in PRC market put all arm native libs under assets/ dir in
   their APK, instead of lib/ dir.
   Since Lollipop, PakcageManager needs clear ABI info during app
   installation.
   If the ABI is not supported, houdini has not chance to involve in.
   For above kind of apps, houdini will not be loaded to help arm libs.
   To support such kind of apps, we have to enable houdini even without
   clear ABI info only for PRC market

2. Fix GTS case failure caused by above modification,
   which enforce to set arm ABI for all pure java

NOTE: Must merge together with https://android.intel.com/449223

Change-Id: I020812790707fb6ec53fb70900ad75971d907bbb
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-12442
Signed-off-by: jgu21 <jinghui.gu@intel.com>
Signed-off-by: Zhou,KaiX K <kaix.k.zhou@intel.com>
Reviewed-on: https://android.intel.com:443/449222

7 years ago[SYSTEM-SERVER] Avoid a dead lock between ActivityManager and PowerManager services
Emmanuel Berthier [Thu, 15 Oct 2015 13:39:35 +0000 (15:39 +0200)]
[SYSTEM-SERVER] Avoid a dead lock between ActivityManager and PowerManager services

"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x73fbbfa8 self=0x7ff7b3024000
  | sysTid=3219 nice=-2 cgrp=default sched=0/0 handle=0x7ff7b6f853e0
  | state=S schedstat=( 2270057780 115981310 8889 ) utm=149 stm=77 core=0 HZ=100
  | stack=0x7fff62c6e000-0x7fff62c70000 stackSize=8MB
  | held mutexes=
  at com.android.server.am.ActivityManagerService.registerReceiver(ActivityManagerService.java:15583)
  - waiting to lock <0x016a0e36> (a com.android.server.am.ActivityManagerService) --> synchronized(this): lock held by thread 29
  at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1655)
  at android.app.ContextImpl.registerReceiver(ContextImpl.java:1623)
  at com.android.server.power.PowerManagerService.systemReady(PowerManagerService.java:522)
  - locked <0x1e40b137> (a java.lang.Object)                                --> synchronized(mLock)
  at com.android.server.SystemServer.startOtherServices(SystemServer.java:1054)
  at com.android.server.SystemServer.run(SystemServer.java:263)
  at com.android.server.SystemServer.main(SystemServer.java:177)
  at java.lang.reflect.Method.invoke!(Native method)
  at java.lang.reflect.Method.invoke(Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

"InputDispatcher" prio=10 tid=29 Blocked
  | group="main" sCount=1 dsCount=0 obj=0x12fb50a0 self=0x7ff7a9656200
  | sysTid=3418 nice=-8 cgrp=default sched=0/0 handle=0x7ff7a9511400
  | state=S schedstat=( 3081453 618956 33 ) utm=0 stm=0 core=0 HZ=100
  | stack=0x7ff79f104000-0x7ff79f106000 stackSize=1012KB
  | held mutexes=
  at com.android.server.power.PowerManagerService.setUserActivityTimeoutOverrideFromWindowManagerInternal(PowerManagerService.java:2317)
  - waiting to lock <0x1e40b137> (a java.lang.Object  --> synchronized(mLock): lock held by thread 1
  at com.android.server.power.PowerManagerService.access$5600(PowerManagerService.java:84)
  at com.android.server.power.PowerManagerService$LocalService.setUserActivityTimeoutOverrideFromWindowManager(PowerManagerService.java:3277)
  at com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner(WindowManagerService.java:10110)
  at com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedLoop(WindowManagerService.java:8789)
  at com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLocked(WindowManagerService.java:8731)
  at com.android.server.wm.WindowManagerService.setNewConfiguration(WindowManagerService.java:3934)
  - locked <0x0b892c09> (a java.util.HashMap)
  at com.android.server.am.ActivityManagerService.updateConfigurationLocked(ActivityManagerService.java:16785)
  at com.android.server.am.ActivityManagerService.updateConfiguration(ActivityManagerService.java:16668)
  - locked <0x016a0e36> (a com.android.server.am.ActivityManagerService)  --> synchronized(this)
  at com.android.server.wm.WindowManagerService.sendNewConfiguration(WindowManagerService.java:7053)
  at com.android.server.wm.InputMonitor.notifyConfigurationChanged(InputMonitor.java:331)
  at com.android.server.input.InputManagerService.notifyConfigurationChanged(InputManagerService.java:1385)

Change-Id: Icf8b722b7739084a2eabd115001c923ec930130a
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-10610
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
Reviewed-on: https://android.intel.com:443/424475
Reviewed-on: https://android.intel.com:443/442803

7 years agoCamera2: create new streams if surface size has changed
Mikael Persson [Thu, 26 Nov 2015 11:34:29 +0000 (12:34 +0100)]
Camera2: create new streams if surface size has changed

When a new capture session is created, the old streams
are re-used if same surface and rotation. However, if the
surface has changed size, we must re-create the stream
to ensure HAL is configured properly, which includes
setting up proper sensor resolution.

This is an issue in e.g. CTS testNoiseReductionModes
and testEdgeModeControl, where a new preview with different
size can be setup without first stopping the previous one.
The same preview surface is used here, but with changed size.

Change-Id: I3b88a95209e83cf1cef0f4d1f791c87b0feb093f
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-10333
Signed-off-by: Mikael Persson <mikael.persson@intel.com>
Reviewed-on: https://android.intel.com:443/441205

7 years agoparallel preload class
Zhang Gary [Sun, 22 Nov 2015 08:18:31 +0000 (16:18 +0800)]
parallel preload class

To parallel class preload with resource preload

Change-Id: I35498f6401f41413974fa2608ac00170a0585034
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-10387
Depends-Change-Id: Ia82cc53534d4140599530e6a58a8f7a5cd09d645
Reviewed-on: https://android.intel.com:443/439031

7 years ago[BT] Handle the update of MAC address in Framework
Franck Lenormand [Mon, 23 Nov 2015 17:23:37 +0000 (18:23 +0100)]
[BT] Handle the update of MAC address in Framework

In case that the OTP address from the BT chip is used,
The callback from the stack update the mac address in
the AdapterProperties but not in
BluetoothManagerService

This patch:
- add the new intent and variable to the API
- handle the reception of the intent
- update the local value

Change-Id: I56eb2299d7b634aa2a229e3e74329f30d0a84d22
Category: aosp improvement
Domain: CWS.BT-Common
Origin: internal
Upstream-Candidate: yes
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-8856
Signed-off-by: Franck Lenormand <franckx.lenormand@intel.com>
Reviewed-on: https://android.intel.com:443/439917

7 years ago[Record] Add voice call recording sources.
Wajdi Zairi [Tue, 24 Feb 2015 08:19:37 +0000 (09:19 +0100)]
[Record] Add voice call recording sources.

Voice call, Voice Uplink and Voice Downlink recording audio
sources are not supported when set through AudioAttributes.
So some market applications can not record from these sources.

This patch adds these sources in AudioAttributes to enable
recording for Applications that use setCapturePreset() interface
when selecting audio record source (exp: Automatic Call Recorder).

Change-Id: Ia1465c4ce03e6b1d303f22967ee096118fd3de82
Depends-Change-Id: I543caf39121e867a9ce4198d9a72560cdf6cce79
Depends-Change-Id: Ie693516564b98096b1db5bd7ad2eba9b619037ba
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-4669
FeatureID: https://jira01.devtools.intel.com/browse/AREQ-11542
Category: aosp improvement
Domain: AOSP-Framework-Media
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Wajdi Zairi <wajdix.zairi@intel.com>
Reviewed-on: https://android.intel.com:443/346382
Reviewed-on: https://android.intel.com:443/374320
Reviewed-on: https://android.intel.com:443/394816
Reviewed-on: https://android.intel.com:443/422615

7 years agofix an ArrayIndexOutOfBoundsException while file path increase to more than maximum...
Du, Changbin [Tue, 11 Sep 2012 23:50:56 +0000 (07:50 +0800)]
fix an ArrayIndexOutOfBoundsException while file path increase to more than maximum amount of chararcters

The object's file path may include more than 255 characters that is
out of MTP string limitation and this will casue a exception
"ArrayIndexOutOfBoundsException". This patch add checking for the
string length of path.

Change-Id: Ie8c9c266d74950211f7e360020d594c882a70088
Orig-Change-Id: Ied02ee401a22771df12cf97b7612660a3c74c3fc
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-4917
Category: aosp improvement
Domain: USB-Mtp-ptp
Origin: internal
Upstream-Candidate: yes
Signed-off-by: Du, Changbin <changbinx.du@intel.com>
Signed-off-by: Bo Huang <bo.b.huang@intel.com>
Reviewed-on: https://android.intel.com:443/311630
Reviewed-on: https://android.intel.com:443/426960

7 years agoPackage Manager :optimization forZipFileRO->NextEntry
Shuo Gao [Sat, 10 Oct 2015 07:59:07 +0000 (15:59 +0800)]
Package Manager :optimization forZipFileRO->NextEntry

In functions like findSurpportedAbi and CopyNativeLibraries, it using
ZipFileRO->NextEntry to get FileName of each file in package, and then find a
best ABI or do CRC checking for native libraries.

But in current implementation, NextEntry will read info from both CentralDirectoryRecord
and LocalFileHeader, to compare the filename, signature and so on to check the integrity.

But on platform that has bad "read" performance like Sofia 3GR, it cost too much
time reading infor from LocalFileHeader in each NextEntry, lead to so much time
scanning one package that contains dozens of binaries.

So add the NextEntryNoIntegrity API for such processing that just need a filename, like
use case mentioned above. But it might not trustable if package damaged or changed
unpredictable.

Change-Id: I1647b94f75edf2476f13c1b91edc3a398521928d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-5845
Depends-Change-Id:Ib06f9486fc2c0f26694018acdb5640d5e650b4e0
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Johnson Z Wu <johnson.z.wu@intel.com>
Signed-off-by: taozha2x <taox.z.zhang@intel.com>
Reviewed-on: https://android.intel.com:443/426686

7 years agoWORKAROUND: Adding two new HDMI switch names
Srikanth Koyili [Fri, 4 Sep 2015 11:05:59 +0000 (16:35 +0530)]
WORKAROUND: Adding two new HDMI switch names

Graphics created switch with "hdmi_b" & "hdmi_c",
but the AOSP code expects "hdmi_audio" or "hdmi".

This patch adds two more switch names "NAME_HDMI_B" and
"NAME_HDMI_C" to support the kernel changes and to make
it backward compatible for other platforms.

Change-Id: I768a6cf7ba063f4ed074f3c1ed29b2d102d00387
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3683
Signed-off-by: Srikanth Koyili <srikanthx.koyili@intel.com>
Reviewed-on: https://android.intel.com:443/415621

7 years agoBuilt-in mic is not used when USB mic is disconnected
Alejandro Ochoa [Sat, 31 Oct 2015 02:05:00 +0000 (20:05 -0600)]
Built-in mic is not used when USB mic is disconnected

In some cases when the USB microphone is disconnected,
audio stack does not switch to the built-in microphone.
It gets stuck in a state where it still recognizes the
USB mic is still connected. Current device removal
implementation only considers USB output devices such
as headset. The same process should be used for input
USB devices (microphone).

Bug: 24932354
Change-Id: Ic2089ef5a9a318cb47336ade405f79eccd7129f8
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-6651
Signed-off-by: Alejandro Ochoa <alejandro.ochoa@intel.com>
Reviewed-on: https://android.intel.com:443/432909

7 years agolibhwui: make surface buffer allocation asynchronous
Thomas Buhot [Fri, 2 Oct 2015 12:12:12 +0000 (14:12 +0200)]
libhwui: make surface buffer allocation asynchronous

On the critical path of the cold launch of applications
the main thread of the started application allocates
the surface buffer. The allocation is synchronous and blocks
the main thread of the application.
As a consequence the launch time of the application is delayed
by the time spent doing the allocation.

With this optimization the allocation is performed
asynchronously in the RenderThread. This optimization
will benefit to the launch of all applications.

Change-Id: I4bc145cfc3ba6fe1efbca519bcee2e4ea6617ae7
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3601
FeatureID: https://jira01.devtools.intel.com/browse/AREQ-13987
Reviewed-on: https://android.intel.com:443/420527

7 years agolibhwui: make setSurface asynchronous
Thomas Buhot [Thu, 24 Sep 2015 08:38:07 +0000 (10:38 +0200)]
libhwui: make setSurface asynchronous

On the critical path of the cold launch of applications
the main thread of the started application tells the RenderThread
to create a surface. This process is synchronous and blocks
the main thread of the application until the creation
of the EGLContext is complete.
As a consequence the launch time of the application is delayed
by time spent allocating the EGL Context in the RenderThread.

With this optimization the launch time of the settings
application is reduced by 20 ms to 40 ms.

This optimization applies to the launch of all
applications.

Change-Id: Ibf47aaa0abb8dedf7aa00693073db3785d9d6b08
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3601
FeatureID: https://jira01.devtools.intel.com/browse/AREQ-13987
Reviewed-on: https://android.intel.com:443/420515

7 years ago[DEBUG] Dump full stacks during ANR & UIWDT
Liu Changcheng [Tue, 25 Aug 2015 03:22:00 +0000 (11:22 +0800)]
[DEBUG] Dump full stacks during ANR & UIWDT

And netd daemon stacks.

Change-Id: I38f8f4d5f30313a70bb65d55aa9861bb59642db5
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-6307
Signed-off-by: Changcheng Liu <changcheng.liu@intel.com>
Reviewed-on: https://android.intel.com:443/429457

7 years agoFrequently used OpenGL ES methods whitelisted for fast JNI
Daniil Sokolov [Wed, 26 Aug 2015 19:39:36 +0000 (12:39 -0700)]
Frequently used OpenGL ES methods whitelisted for fast JNI
 path

The patch lists ~70 methods of OpenGL ES 2.0 wrapper as fast JNI.
This significantly reduces JNI overhead for OpenGL Java applications.
Which results in faster rendering and reduced JANK (e. g. 10 % Jank
reduction  on Google Maps).

None of the whitelisted methods can block forever according to OpenGL
spec. So, this change is safe from fastJNI point of view (can not
introduce any deadlocks). As measured is a separate experiemnt
the whitelisted methods take less than 1 ms in vast majority (99.9+) of the
cases, and always complete within 100 ms.  As shown in this thread
https://soco.intel.com/thread/766188 such level of delays should not
have any practical impact on GC pauses, but reduces the JNI overhead
significantly.

Category:aosp improvement
Domain:AOSP.ART-Other
Origin: internal
Upstream-Candidate: yes
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3965
Signed-off-by: DaniilSokolov <daniil.y.sokolov@intel.com>
Change-Id: I04ed94aef64686d6ee6a1b6a0ef62570687c5f5b
Reviewed-on: https://android.intel.com:443/405100

7 years agoFix deadlock between ActivityManager and BackupManager under some race conditions.
lwan89x [Wed, 24 Sep 2014 10:27:49 +0000 (18:27 +0800)]
Fix deadlock between ActivityManager and BackupManager under some race conditions.

Deadlock may happen when bind backup agent under some race condition.
If waiting for backup agent timeout, BackupManager will call to
ActivityManager's clearPendingBackup with mAgentConnectLock held.
During clearPendingBackup process, it will try to lock ActivityManager's
main lock. If app started up timeout at the same time, ActivityManager
will call to BackupManager's agentDisconnected with main lock held.
During agentDisconnected process, it will try to lock mAgentConnectLock.
Deadlock happened then.

In bindToAgentSynchronous process, move clearPendingBackup out of lock
area to fix this issue.

Change-Id: Ic1acfe1df8fd83d4acff5ce518d86cea4b2fe18b
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3350
Orig-Tracked-On: https://jira01.devtools.intel.com/browse/IMINAN-43094
Signed-off-by: lwan89 <liang.wang@intel.com>
Reviewed-on: https://android.intel.com:443/400206
Reviewed-on: https://android.intel.com:443/412995

7 years agoThe process PrintSpooler:renderer crashes in libpdfium.so.
suncx [Tue, 15 Sep 2015 07:57:09 +0000 (15:57 +0800)]
The process PrintSpooler:renderer crashes in libpdfium.so.

In PdfManipulationService.java, PdfEditorImpl shouldn't open the same
ParcelFileDescriptor before PdfRendererImpl close it. In this case, add
a lock to synchronize the two threads.

Category: aosp improvement
Domain: AOSP-Framework-CoreService
Origin: internal
Upstream-Candidate: yes

Change-Id: Ia405b3d4fbccf56982212a21e4a586f69da0ddb5
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-3778
Reviewed-on: https://android.intel.com:443/411261
Reviewed-on: https://android.intel.com:443/412833

7 years agoAdd Process IOWAIT info to ANR dump
Alexandru Timohi [Tue, 1 Sep 2015 08:39:15 +0000 (11:39 +0300)]
Add Process IOWAIT info to ANR dump

Some ANR are due to system slow down related to high IO usage.
We need more info regarding IO consumption per process to
conclude.
This patch will display process blockIO wait time as IOWAIT.
https://jira01.devtools.intel.com/browse/GMINL-14913

Category: aosp improvement
Domain: AOSP-Others
Origin: internal
Upstream-Candidate: yes
Orig-Change-Id: I2ffabff4d4c560a0d60ea552e70a1d878ade596c
Reviewed-on: https://android.intel.com:443/233114
Reviewed-on: https://android-review.googlesource.com/#/c/114481
Reviewed-on: https://android.intel.com:443/350035
(cherry picked from commit 519a029c560a88a2c95a3d05a3f0b2da9e257c58)
Reviewed-on: https://android.intel.com:443/394370

Change-Id: I5afed372d8060b5efcda68b09bb14f896bcf3406
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-2004
Signed-off-by: Alexandru Timohi <alexandru.timohi@intel.com>
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
Signed-off-by: Nicolae Natea <nicolaex.natea@intel.com>
Reviewed-on: https://android.intel.com:443/406682

7 years agoDump full stacks during ANR & UIWDT
Emmanuel Berthier [Tue, 7 Apr 2015 16:38:02 +0000 (18:38 +0200)]
Dump full stacks during ANR & UIWDT

And add some useful daemons stacks.

Change-Id: Ifd1fb6b57dea78997f93c6a3a7ecee0766ee85c4
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
Tracked-On: https://jira01.devtools.intel.com/browse/GMINL-10293
Reviewed-on: https://android.intel.com:443/383101
Reviewed-on: https://android.intel.com/385134
Reviewed-by: Sjolander, Simon <simon.sjolander@intel.com>
Tested-by: Sjolander, Simon <simon.sjolander@intel.com>
Reviewed-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
Tested-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
7 years agoAdd observer for extcon events
Faouaz TENOUTIT [Wed, 28 Jan 2015 09:57:01 +0000 (10:57 +0100)]
Add observer for extcon events

Recent kernel drivers are using EXTCON instead of SWITCH class.

This patch will extend the current WiredAccessoryManager to monitor
and notify about both events (switch & extcon), depending on the current
running kernel configuration.

Issue: IRDA-3090

Change-Id: Ica61534236ed96eda3afdc44934741945b243952
Signed-off-by: Faouaz TENOUTIT <faouaz.tenoutit@intel.com>
Signed-off-by: Guillaume Zajac <guillaume.zajac@intel.com>
Reviewed-on: https://android.intel.com/327024
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Bhat, Sudheendra S <sudheendra.s.bhat@intel.com>
Tested-by: Bhat, Sudheendra S <sudheendra.s.bhat@intel.com>
Reviewed-on: https://android.intel.com/335886
Reviewed-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
Reviewed-on: https://android.intel.com/385132
Reviewed-by: Sjolander, Simon <simon.sjolander@intel.com>
Tested-by: Sjolander, Simon <simon.sjolander@intel.com>
Tested-by: Fagerstedt, Axel <axel.fagerstedt@intel.com>
7 years agoMerge tag 'android-6.0.1_r52' into marshmallow-x86
Chih-Wei Huang [Fri, 8 Jul 2016 11:03:19 +0000 (19:03 +0800)]
Merge tag 'android-6.0.1_r52' into marshmallow-x86

Android 6.0.1 Release 52 (MOB30R)

7 years agoSupport save local time to RTC
Ma Jian [Sun, 12 Jun 2016 07:13:55 +0000 (15:13 +0800)]
Support save local time to RTC

Make it work for dual boot with Windows, we could set property
persist.rtc_local_time to 1, so that RemixOS and Windows both
use local time in rtc.

NO_REF_TASK
Tested:
1) set time in android, reboot to bios, make sure the time in bois is
   local time
2) reboot back to android, the current time should be correct local time
   (this need another change)

Change-Id: Id2c0ce150fb9320b132ad8bdd83b38dcae1070db

7 years agoAdd pm operation to set user restrictions.
Sudheer Shanka [Thu, 16 Jun 2016 15:58:00 +0000 (08:58 -0700)]
Add pm operation to set user restrictions.

Bug: 29189712
Change-Id: I6fdb3b68dfe3f51119e5ce8008880fc7d9c793df

7 years agoReduce shell power over user management.
Sudheer Shanka [Thu, 9 Jun 2016 00:13:24 +0000 (17:13 -0700)]
Reduce shell power over user management.

Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.

Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3

7 years agoDO NOT MERGE Disable app pinning when emergency call button pressed
Hall Liu [Thu, 2 Jun 2016 17:32:08 +0000 (10:32 -0700)]
DO NOT MERGE Disable app pinning when emergency call button pressed

Also disables app pinning when the "return to call" button is pressed
and brings up the in-call screen when app pinning is stopped if there is
an existing call.

Combination of ag/1091397 and ag/1085584 adapted for MNC.

Bug: 28558307
Bug: 28761672
Change-Id: I82ec4042bff387c845ce571b197a4a86e1dd5ec8

7 years agoDO NOT MERGE Fix intent filter priorities
Todd Kennedy [Mon, 4 Apr 2016 19:29:59 +0000 (12:29 -0700)]
DO NOT MERGE Fix intent filter priorities

Since this is a backport, there is only one rule that guards intent
filter priorities:
1) Updates will NOT be granted a priority greater than the priority
   defined on the system image.

Bug: 27450489
Change-Id: Ifcec4d7a59e684331399abc41eea1bd6876155a4

7 years agoDon't trust callers to supply app info to bindBackupAgent()
Christopher Tate [Mon, 13 Jun 2016 22:17:54 +0000 (15:17 -0700)]
Don't trust callers to supply app info to bindBackupAgent()

Get the canonical identity and metadata about the package from the
Package Manager at time of usage rather than rely on the caller to
have gotten things right, even when the caller has the system uid.

Bug 28795098

Change-Id: I215786bc894dedf7ca28e9c80cefabd0e40ca877

Merge conflict resolution for ag/1133474 (referencing ag/1148862)
- directly to mnc-mr2-release

7 years agoMerge tag 'android-6.0.1_r46' into marshmallow-x86
Chih-Wei Huang [Tue, 7 Jun 2016 00:24:42 +0000 (08:24 +0800)]
Merge tag 'android-6.0.1_r46' into marshmallow-x86

Android 6.0.1 release 46

7 years agoBackport of backup transport whitelist
Christopher Tate [Fri, 20 May 2016 22:29:31 +0000 (15:29 -0700)]
Backport of backup transport whitelist

Sysconfig define a whitelist of permitted backup transports

Previously any apk bundled in priv-app could insert a backup transport.
Reduce risk surface by giving the OEM explicit control over who is
allowed to handle backup data.

Bug 28406080

Backport of 494df791728f4d42d67e935c327910975993ad29 from N

Change-Id: I9f90e324169a68720d608f74754d284a7e59cf87

7 years agoBackport ChooserTarget package source check from N
Adam Powell [Thu, 28 Apr 2016 23:32:18 +0000 (16:32 -0700)]
Backport ChooserTarget package source check from N

Fix a bug where a ChooserTargetService could supply a ChooserTarget
pointing at a non-exported activity outside of its own package and
have it launch.

Bug 28384423

Change-Id: I3f5854f91c5695ad9253d71055ef58224df47008

7 years agoDon't pass URL path and username/password to PAC scripts
Paul Jensen [Fri, 15 Apr 2016 14:41:13 +0000 (10:41 -0400)]
Don't pass URL path and username/password to PAC scripts

The URL path could contain credentials that apps don't want exposed
to a potentially malicious PAC script.

Bug: 27593919
Change-Id: I4bb0362fc91f70ad47c4c7453d77d6f9a1e8eeed

7 years agoFix missing permission check when saving pattern/password
Jim Miller [Wed, 13 Apr 2016 23:35:36 +0000 (16:35 -0700)]
Fix missing permission check when saving pattern/password

Fixes bug 28163930

Change-Id: Ic98ef20933b352159b88fdef331e83e9ef6e1f20

7 years agoKill the real/isolated uid group, not the ApplicationInfo uid
Christopher Tate [Mon, 18 Apr 2016 22:16:31 +0000 (15:16 -0700)]
Kill the real/isolated uid group, not the ApplicationInfo uid

This is a direct reimplementation in L of fixes applied to N in
these two commits:

8dc8d37c1d7d694016f1ec2b3cea5fb723567be8
e8741d23d2dd05c4cb3fed5ee6a4040ee96a60e3

Bug 19285814

Change-Id: I59bcc8f1d41c426e9da635bea9ad1d7c6756d5aa

Resolve merge conflict when cp'ing ag/941553 to mnc-mr1-release branch

7 years agoSolve black background for android-x86
qinshaohui [Thu, 10 Mar 2016 06:13:09 +0000 (14:13 +0800)]
Solve black background for android-x86

7 years agoAdd support for setting passkey as pairing variant
Grzegorz Kolodziejczyk [Tue, 20 Oct 2015 13:07:51 +0000 (15:07 +0200)]
Add support for setting passkey as pairing variant

This is needed if pairing variant is passkey entry.

Change-Id: I8f3efbc90757ac77414a9e86d7c29326c25c12ad

7 years agoAvoid crashes with Suspendon Lollipop (ColorFade)
Paulo Sergio Travaglia [Sun, 21 Jun 2015 08:11:13 +0000 (05:11 -0300)]
Avoid crashes with Suspendon Lollipop (ColorFade)

ColorFade (which is called on Suspend during STATE_OFF)
uses some GLSL commands to make some effects ( fade current screen
to black and white before blacking it out completelly)

However, it produces a crash on mesa. To avoid this crash,
Fragment Shader code was commented out, keeping just
gl_FragColor to set a single black color

7 years agoFix Bluetooth tethering
Grzegorz Kolodziejczyk [Thu, 5 Feb 2015 12:56:03 +0000 (13:56 +0100)]
Fix Bluetooth tethering

Ignore linkstate down events for bt-pan interface which cause its
remove. Interface should only be removed when we receive the interface
remove event.

At connect init to bluetooth PAN service, bridge pan device adds
tetherable bt-pan interface as set in bluetooth regexs. Before bt-pan
interface gets tethered, multiple linkstate events are received by
linkstate change notifier.
Receiving multiple time of linkstate down may cause remove of tetherable
interface (bt-pan), before we call tether method. Finally when tethering
method is called and bt-pan tether interface is removed, error is
returned because of not available tetherable interfaces.

Bug found during bluetooth PTS PAN testing. It affects multiple test
cases.

Change-Id: Ifb0d16657ca238aa62064fee0fc4ee974a2518ad

7 years agoMap keycode 120 to APP_SWITCH
Chih-Wei Huang [Mon, 22 Dec 2014 04:08:17 +0000 (12:08 +0800)]
Map keycode 120 to APP_SWITCH

Define the unused keycode 120 to be APP_SWITCH.

7 years agoInputReader: read the pointercal from TSCalibration2
Chih-Wei Huang [Sat, 17 May 2014 18:20:32 +0000 (02:20 +0800)]
InputReader: read the pointercal from TSCalibration2

Watch the pointercal and reload it on changed.

7 years agoSystemUI: Recycle the old wallpaper background bitmap after we choose a new wallpaper.
jshe32X [Thu, 24 Oct 2013 04:57:09 +0000 (12:57 +0800)]
SystemUI: Recycle the old wallpaper background bitmap after we choose a new wallpaper.

BZ: 101064

RootCause: ImageWallpaper didn't call old background bitmap's recycle before
           set it to null.

Category: aosp improvement
Domain: AOSP-Framework-Media
Origin: internal
Upstream-Candidate: yes

Orig-Change-Id: I27f6971a3edd26472b69e59b542b27fd7c8e7b90
Change-Id: Ice59aea79f8137d5995d7a5ce9a6ed7903750d30
Signed-off-by: jshe32X<jianchunx.shen@intel.com>
7 years agoMediaFile: support more media types
Chih-Wei Huang [Fri, 13 Sep 2013 08:15:12 +0000 (16:15 +0800)]
MediaFile: support more media types

7 years agoMake "windows" key to act as "home" key
juntingwang [Wed, 24 Apr 2013 06:06:08 +0000 (14:06 +0800)]
Make "windows" key to act as "home" key

Issue: AXIA-1893
Change-Id: I7b2b19f7e34ec8a1867e8e6ce522e65133e5267f
Signed-off-by: juntingwang <Junting.Wang@windriver.com>
7 years agocamera: fix NullPointerException
Chih-Wei Huang [Wed, 20 Feb 2013 17:46:17 +0000 (01:46 +0800)]
camera: fix NullPointerException

7 years agoGLSurfaceView: Be less picky about EGLConfig alpha sizes
Andy Ross [Tue, 15 Jan 2013 23:05:38 +0000 (15:05 -0800)]
GLSurfaceView: Be less picky about EGLConfig alpha sizes

EGLChooseConfig returns a "best match" set of visuals meeting or
exceeding the required r/g/b/a component depths.  But GLSurfaceView
oddly requires that the returned visual be an exact match.  Add to
that that the (rarely used outside of CTS) default request specifies
zero alpha bits and that not all drivers expose a zero-alpha
EGLConfig, and the default configuration will fail needlessly.

It's not incorrect to have alpha bits you didn't request: the only way
to produce divergent behavior is for a fragment shader to write out
explicit alpha values (into the channel it didn't want to begin with!)
with values other than 1.0 and then rely on them being ignored and
treated as 1.0.

For: AXIA-1448
Change-Id: I2f64995d7b9de1ae082aa47822af525390102083
Signed-off-by: Andy Ross <andy.ross@windriver.com>
7 years agoImageWallpaper: don't throw-up when EGL init fails
Matt Gumbel [Mon, 5 Nov 2012 19:21:19 +0000 (11:21 -0800)]
ImageWallpaper: don't throw-up when EGL init fails

Just fall back to non-GL path instead.

Change-Id: Icabee5b7cadd49942e9c920a7ff49a54fc8bea9f
For: AXIA-991
Signed-off-by: Matt Gumbel <matthew.k.gumbel@linux.intel.com>
7 years agoimport YuvToEncoder R3 patches, BZ 18528, 19092, 19696
Zhao Liang [Fri, 20 Jul 2012 03:56:51 +0000 (11:56 +0800)]
import YuvToEncoder R3 patches, BZ 18528, 19092, 19696

BZ: 47824

Please refer http://umgbugzilla.sh.intel.com:41006/show_bug.cgi?id=19092 and
external/jpeg/libjpeg.doc

The MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16
scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual
sample rows of Y and 8 each of Cb and Cr.

The original implement of Yuv420SpToJpegEncoder::compress didn't add padding to the frame buffer
when height and width aren't aligned with 16 pixel. It will cause illegal memory violation and core dump.

Category: aosp improvement
Domain: Video.Media-jpeg
Origin: Internal
Upstream: Yes

Change-Id: Ibcf14230d616e2d440ace244bb420723b5c01dc2
Orig-Change-Id: Ic1b7494b98ee9c1997b226d58abd034b1dcb18f6
Signed-off-by: Tong, Bo <box.tong@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
7 years agodisables hardware acceleration if debug.egl.hw=0
Chih-Wei Huang [Thu, 8 Dec 2011 12:16:29 +0000 (20:16 +0800)]
disables hardware acceleration if debug.egl.hw=0

7 years agoAdd new, hidden MotionEvent flag for partially obscured windows.
Michael Wright [Thu, 31 Mar 2016 00:31:48 +0000 (17:31 -0700)]
Add new, hidden MotionEvent flag for partially obscured windows.

Bug: 26677796
Change-Id: Ic4219b883bb760495e6172ef61e84e9725876ef6

8 years ago[DO NOT MERGE] Disallow guest user from changing Wifi settings
Samuel Tan [Mon, 14 Mar 2016 22:57:02 +0000 (15:57 -0700)]
[DO NOT MERGE] Disallow guest user from changing Wifi settings

Disallow existing and newly created guest users from
changing Wifi settings.

BUG: 27411179
TEST: Flashed device, switched to existing guest user, and verified
      that Wifi settings are disabled.
TEST: Flashed device, created new guest user, and verified that Wifi
      settings are disabled.

Change-Id: Ia1bf4cce0369017b62f69d317c7ab2e30e3949b3

8 years agoRedact Account info from getCurrentSyncs
Matthew Williams [Tue, 19 Jan 2016 23:04:04 +0000 (23:04 +0000)]
Redact Account info from getCurrentSyncs

BUG:26094635
If the caller to ContentResolver#getCurrentSyncs does not hold the
GET_ACCOUNTS permission, return a SyncInfo object that does not
contain any Account information.

Change-Id: I5628ebe1f56c8e3f784aaf1b3281e6b829d19314
(cherry picked from commit b63057e698a01dafcefc7ba09b397b0336bba43d)

8 years agoConflict resolution CL to ag/868720 when cp'ing to mnc-mr1-release
Zach Jang [Sat, 27 Feb 2016 00:06:28 +0000 (16:06 -0800)]
Conflict resolution CL to ag/868720 when cp'ing to mnc-mr1-release

Change-Id: I3efe5476ebd758fc567bfdb035583a01c45aea8b

8 years agoDO NOT MERGE Read Bluetooth interop database entries from settings (1/2)
Andre Eisenbach [Thu, 14 Jan 2016 22:20:34 +0000 (14:20 -0800)]
DO NOT MERGE Read Bluetooth interop database entries from settings (1/2)

Interop database entries are stored in the system settings entry
"BluetoothInteropDatabase". The format is a list of entries separated by
";". An entry consists of a BDA fragment, followed by a comma and an
integer representing a feature from interop.h.

Example:
To disable LE secure connections for devices starting with BDA 11:22:33,
use "11:22:33,0".

Bug: 26548845
Change-Id: I6a9fd34f6af4d3bdfcaa0e051eafebdfbf2a4949
(cherry picked from commit 3bc623be8dd8b83d0a22c5cc5b5a8955001f6fc7)

8 years agoDO NOT MERGE Bluetooth: Restrict gain for Absolute volume case
Liejun Tao [Wed, 20 Jan 2016 23:52:20 +0000 (17:52 -0600)]
DO NOT MERGE Bluetooth: Restrict gain for Absolute volume case

For the lowest music volume steps 1 and 2, restrict the gain to 50% and
75%. This will avoid the lowest volume steps being too loud for some
accessories. For music volume 0, set phone gain to 0 as some
accessories won't mute on their end.

Change-Id: I24e0fa7be8c8635b428a11c91ea153aad7cec55f
Signed-off-by: Liejun Tao <baibai@motorola.com>
8 years agoDO NOT MERGE ANYWHERE: Hack to get devices booting again.
Jeff Sharkey [Fri, 29 Jan 2016 17:45:45 +0000 (10:45 -0700)]
DO NOT MERGE ANYWHERE: Hack to get devices booting again.

If we try scheduling a pass before the system is ready, record a
pending event and dispatch once we're actually ready.

Bug: 26863668
Change-Id: I028285383c8bbe8b653aeaa7544eefe3d41277bc
(cherry picked from commit 538c11cf2175d4e30337e8776401bfede85866be)

8 years agoDO NOT MERGE ANYWHERE: Don't change screen on time on time changes
Adam Lesinski [Wed, 27 Jan 2016 02:18:19 +0000 (18:18 -0800)]
DO NOT MERGE ANYWHERE: Don't change screen on time on time changes

Screen on time should be measured in elapsed realtime, not wallclock.

Cause a checkIdleStates to occur when reloading stats
(on rollover and on time change).

When time changes occur in the negative direction, the new stats file
we create can overlap the previous one with regards to its end timestamp.
Use the begin timestamp to determine which of the latest stats to merge.
(b/22716352)

Bug: 26488100
Change-Id: If31b29bbbee9e98401205b5e26bce86e181286e7

8 years agoDO NOT MERGE Fix for syncs being dropped when appIdle is on
Shreyas Basarge [Mon, 11 Jan 2016 15:43:54 +0000 (15:43 +0000)]
DO NOT MERGE Fix for syncs being dropped when appIdle is on

Syncs were being dropped when appIdleMode was on for
an app. This CL backs off the sync instead of dropping
it. When the app becomes non-idle, backoff is cleared
and the sync is performed.

Bug: 26355386
Change-Id: I2040dfd847011d3ca902e66a8cd52b2a429177c1
(cherry picked from commit 2c051498b2b0e2608740d906e70867b74083107d)

8 years agoDO NOT MERGE Check apps idle states on time changes
Amith Yamasani [Fri, 22 Jan 2016 19:27:16 +0000 (11:27 -0800)]
DO NOT MERGE Check apps idle states on time changes

And ensure that the listeners are informed of app standby transitions
that might occur during time changes.

Fix for apps that sometimes don't have network access until reboot.

Bug: 26488100
Change-Id: Ic342c188a6cd19faee88f50b2c6a342a6968cb23
(cherry picked from commit c465e71cdc401e1565c29a895a5c6d366ba5344c)

8 years agoDO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle
Adam Lesinski [Wed, 13 Jan 2016 20:26:07 +0000 (12:26 -0800)]
DO NOT MERGE ANYWHERE: UsageStats: Use new settings key idle_duration2 for app idle

Ignores the old, re-appropriated key "idle_duration" which is now
set to a high value in order to force disable app idle on devices
with bug b/26355386

Bug:26355386
Change-Id: Iff9de843ad6e547d29c1583687fc7f7ce7e15090