OSDN Git Service

android-x86/frameworks-base.git
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 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

8 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

8 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

8 years agoDO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time...
Adam Lesinski [Tue, 12 Jan 2016 18:36:09 +0000 (10:36 -0800)]
DO NOT MERGE ANYWHERE: UsageStats: Fix issue where initializing data for first time would cause crash

With the updated rolling window of stats for app idleness, we need to make sure
it is populated before we initialize some defaults.

Now that we look at older entries to figure out idleness, if those
entries are in the future (due to time change), set them to the current
screen on time.
Bug:26504153

Change-Id: Ia22add0e8eaf0f137002bbe3e91d747fef5b7d69

8 years agoDO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time
Adam Lesinski [Fri, 8 Jan 2016 02:24:53 +0000 (18:24 -0800)]
DO NOT MERGE ANYWHERE: UsageStatsService: Fix app idle issue at rollover time

App Idle queries are very frequent and so they only check in memory stats.
However, in memory stats can be missing some entries, especially after a rollover, but also
due to a larger bug fixed in master (too risky to take now).

The fix is to do a deep query (reading older files from disk) and maintain a parallel cache
of stats for app idle. That way the rolling window of data required to serve app idle queries
stays in memory.

Bug:26355386
Change-Id: I6a29bbc25214f6a3c2f24c8c079936e66f99e42e

8 years agoFix missing observer reply callbacks
Amith Yamasani [Fri, 20 Nov 2015 17:44:08 +0000 (09:44 -0800)]
Fix missing observer reply callbacks

This was causing upto 2 seconds in user switching delay.

Bug: 25813588
Change-Id: Icf23b021f134a8ccfa2dae470af02b2da7454acc

8 years agoExit getAllValidScorers early if not the primary.
Jeremy Joslin [Fri, 18 Dec 2015 01:38:04 +0000 (17:38 -0800)]
Exit getAllValidScorers early if not the primary.

This fixes the crash that occurs when getAllValidScorers() is invoked by
a non-primary user when a scorer is active.

BUG: 23040221
Change-Id: I42c9e18d74389be3191258ca5626f2c433ca7cc7
(cherry picked from commit 5b294b45d0d7afbed71fd2e59342c5ad7b8b7d76)

8 years agoDO NOT MERGE: Use GregorianCalendar.add() when searching for next alarm.
Dan Sandler [Tue, 29 Dec 2015 20:45:39 +0000 (15:45 -0500)]
DO NOT MERGE: Use GregorianCalendar.add() when searching for next alarm.

Never attribute to malice that which is adequately explained
by a bug, particularly one involving date math.

Bug: 26326394
Change-Id: I3483ac102c678a8852565c8ea94c06e19b3f26d8
(cherry picked from commit 8d9aea8a1870ad83d9eccba1068a1685da5e96d0)

8 years agoCheck permissions on getDeviceId.
Robert Greenwalt [Fri, 4 Dec 2015 19:51:49 +0000 (11:51 -0800)]
Check permissions on getDeviceId.

This needs the package name passed in, so the aidl changes.

bug:25778215
Change-Id: I72f3456a2774a7ad5104424daea9e046ee9c6360

8 years agomerge in mnc-mr1-release history after reset to mnc-dr-dev
The Android Automerger [Thu, 17 Dec 2015 21:08:37 +0000 (13:08 -0800)]
merge in mnc-mr1-release history after reset to mnc-dr-dev

8 years agomerge in mnc-mr1-release history after reset to mnc-dr-dev
The Android Automerger [Tue, 15 Dec 2015 20:54:59 +0000 (12:54 -0800)]
merge in mnc-mr1-release history after reset to mnc-dr-dev

8 years agoDO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
Andy Hung [Tue, 1 Dec 2015 00:09:55 +0000 (16:09 -0800)]
DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread

Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8
(cherry picked from commit 0275a982abecee683f16c827d405eafe51fb67ae)

8 years agoDO NOT MERGE Ensure that the device is provisioned before showing Recents.
Winson [Wed, 4 Nov 2015 22:24:43 +0000 (14:24 -0800)]
DO NOT MERGE Ensure that the device is provisioned before showing Recents.

Bug: 25476219

Change-Id: Ibbe621748f7275f8c1ccded84612ca16292559eb

8 years agoDon't allow contact sharing by default for device not recognized as carkit.
Sanket Padawe [Wed, 11 Nov 2015 23:01:35 +0000 (15:01 -0800)]
Don't allow contact sharing by default for device not recognized as carkit.

+ Don't allow contact sharing by default for devices not recognized
as carkit at pair time.

Bug: 23607427
Change-Id: If6babb10117ba7ee5008a4a29450a7cb981bea4a

8 years agoRevert "Fix race condition when setting default ringtones"
Ian Pedowitz [Wed, 11 Nov 2015 21:38:04 +0000 (21:38 +0000)]
Revert "Fix race condition when setting default ringtones"

This reverts commit f2cb9341ff864e6d9cc6797857665b2281643a74.

Change-Id: I151972052aea47bf8c6823eb8bbf8161c5a7a4f0

8 years agoFix race condition when setting default ringtones
Marco Nelissen [Fri, 6 Nov 2015 00:44:52 +0000 (16:44 -0800)]
Fix race condition when setting default ringtones

If the device was powered off during first boot, after media scanner
inserted some entries but before the default ringtone settings were
set (or committed to disk), the default settings would not be set
on subsequent boots.

Bug: 18625739
Bug: 22349910
Change-Id: Iff07da59a9c6d53bf2950bd107ee74d02b7f48d6

8 years agoBlock directory selection in openable modes.
Jeff Sharkey [Fri, 6 Nov 2015 17:16:22 +0000 (09:16 -0800)]
Block directory selection in openable modes.

When picking documents to return to apps requesting CATEGORY_OPENABLE
we can't let the user select directories.

Bug: 25455200
Change-Id: I8076883ee5b019eab4d2adb841952865f21e413e

8 years agoKick movement preconditions onto handler thread.
Jeff Sharkey [Thu, 5 Nov 2015 18:00:05 +0000 (10:00 -0800)]
Kick movement preconditions onto handler thread.

The bulk of package moving already occurs on the handler thread,
but one of the precondition steps requires that we make an installd
call to calculate disk space of the app.  If there was already
another long-running installd call going on, we could end up ANR'ing
the caller.

Since movePackage() is already designed to return a moveId and go
async, we can push all the precondition steps onto the handler thread
to prevent the ANR.

Bug: 25490003
Change-Id: I62d555c23bbf81b791f6f4cabc40c3d64c580cf8

8 years agoRevert "Remove -ffast-math from libhwui makefile"
Chris Craik [Thu, 5 Nov 2015 17:58:28 +0000 (17:58 +0000)]
Revert "Remove -ffast-math from libhwui makefile"

This reverts commit e02ec7c37a92fd63748a610bac6a23d0409788cf.

Change-Id: Iea7fadf04c4ffa62be28f783342ae749f89bf931

8 years agoWhen the incoming light source is invalid, don't generate any shadow
Teng-Hui Zhu [Thu, 5 Nov 2015 00:57:53 +0000 (16:57 -0800)]
When the incoming light source is invalid, don't generate any shadow

b/25417885

Change-Id: I4b87e35ca68091fd0409cb9fe9b9400af860a507

8 years agoEarly return when the scale is 0.
Teng-Hui Zhu [Thu, 1 Oct 2015 23:49:16 +0000 (16:49 -0700)]
Early return when the scale is 0.

b/24534579

Change-Id: Ib3581ec99387ca70ca036026f64857a49657d94b
(cherry picked from commit 8d0ec389531d071529fb0a800f10733b057205d9)

8 years agoRemove -ffast-math from libhwui makefile
Chris Craik [Wed, 4 Nov 2015 18:12:28 +0000 (10:12 -0800)]
Remove -ffast-math from libhwui makefile

bug:25417885

Change-Id: I8244bd28c2d46fc449398b9bf5104bf7cbaded8a

8 years agoRevert "Use clang for libhwui"
John Reck [Wed, 4 Nov 2015 15:21:35 +0000 (15:21 +0000)]
Revert "Use clang for libhwui"

Bug 25462107

This reverts commit d354fd2c66855d116440eb4c936317f124241225.

Change-Id: Ib7c50b5becf247f837f3cc20f9128d9411d22563

8 years agoConvert ashmem bitmap thresholds to constants.
Riley Andrews [Wed, 4 Nov 2015 07:36:52 +0000 (23:36 -0800)]
Convert ashmem bitmap thresholds to constants.

Bug 25256717

Change-Id: I23e2795ef8798d83bf60dcbd6ff2e7093fcaa9b0
Signed-off-by: Riley Andrews <riandrews@google.com>
8 years agoUse clang for libhwui
Chris Craik [Tue, 3 Nov 2015 18:33:34 +0000 (10:33 -0800)]
Use clang for libhwui

bug:25417885

Change-Id: I0ef8034d79ba3682925e3c2a4b7ccd833fd4f156

8 years agoLimit persistent ashmem backed fds to a minimum of 128kB.
Riley Andrews [Mon, 2 Nov 2015 07:36:04 +0000 (23:36 -0800)]
Limit persistent ashmem backed fds to a minimum of 128kB.

Bug 25256717

Change-Id: Ieb356006df0a6545b89de44d3d8fd4b46312b3b8
Signed-off-by: Riley Andrews <riandrews@google.com>
8 years agoFix issue #25357209: Could not send SMS or MMS messages, had to reboot
Dianne Hackborn [Mon, 2 Nov 2015 21:43:29 +0000 (13:43 -0800)]
Fix issue #25357209: Could not send SMS or MMS messages, had to reboot

I think what probably happened is that since we only report an app
going in to the "interaction" state as an interaction event to usage
stats, apps that sit around in that state forever will only see one
interaction at the start and never again.  So usage stats could start
thinking they are idle.

Fix this by having the activity manager report an interaction event
for such long running applications at least once a day.

Also, because it is correct and for paranoia by protected us another
way, system uids should never go in to standby.

Change-Id: I8a3805bfca86cbe78560488a649ecd07427da99a

8 years agoFix a crash while printing ICCID because of alphabets in UICC.
Sanket Padawe [Mon, 2 Nov 2015 23:45:18 +0000 (15:45 -0800)]
Fix a crash while printing ICCID because of alphabets in UICC.

Bug: 25401769
Change-Id: Ieda058817b8d3cb4b1696fd9932bd0f10da55573

8 years agoFixed a bug where the panel could get stuck closing
Selim Cinek [Mon, 2 Nov 2015 21:42:58 +0000 (13:42 -0800)]
Fixed a bug where the panel could get stuck closing

When mClosing was set even though the panel was not
expanding, the variable was never reset leading to
bad states like the notification shade not updating,
people missing calls and similar bad bugs.

Bug: 25338991
Change-Id: I4362fda257770c98c5f9ba75a5622b14f74dc5ae

8 years agoImprove comment on EXTRA_CALL_RAT_TYPE.
Tyler Gunn [Mon, 2 Nov 2015 19:24:57 +0000 (11:24 -0800)]
Improve comment on EXTRA_CALL_RAT_TYPE.

Adding comments to EXTRA_CALL_RAT_TYPE to make it clear what it is used
for, and what values are expected.

Bug: 20144385
Change-Id: I248aca61abc8a57d7aeef650e48cc498e41c859b

8 years agoNetworkTimeUpdateService: Grab a wakelock when manipulating system time
Thierry Strudel [Thu, 29 Oct 2015 21:40:29 +0000 (14:40 -0700)]
NetworkTimeUpdateService: Grab a wakelock when manipulating system time

Bug: 24986869
Change-Id: Iab4e5ce6be0b5279ce85f868037ba256ee62c0ac
Signed-off-by: Thierry Strudel <tstrudel@google.com>
8 years agoDon't try overriding system fixed permissions on install
Svet Ganov [Mon, 2 Nov 2015 17:32:01 +0000 (09:32 -0800)]
Don't try overriding system fixed permissions on install

bug:25397466

Change-Id: Ie92ec000a94b757178ddfdd9384407535f4af9db

8 years agoPackageSettingBase needs to copy volume UUID.
Jeff Sharkey [Sat, 31 Oct 2015 20:58:54 +0000 (13:58 -0700)]
PackageSettingBase needs to copy volume UUID.

When copying all fields from one PackageSettingBase to another, we
also need to copy volumeUuid, which had previously been missed.

Without this, packages using sharedUserId that are installed on
adopted storage devices will be destroyed, since after reboot we
think they actually belong on internal storage (where volumeUuid is
null).

Bug: 25334169
Change-Id: I223361bd1e19e7d5dd78626682ac7c5cbecb9fa1

8 years agoHandle "uninstalled" apps when pruning app-ops.
Jeff Sharkey [Fri, 30 Oct 2015 02:00:44 +0000 (19:00 -0700)]
Handle "uninstalled" apps when pruning app-ops.

During system boot, we prune app-ops belonging to apps that have
been uninstalled.  However, apps installed on adopted storage devices
haven't been scanned at this point, so they appear to be uninstalled.

To avoid pruning app-ops for these apps, we need a getPackageUid()
variant that also considers "uninstalled" apps for which we still
have PackageSetting values.

Bug: 25206071
Change-Id: I1820f674d45c5ddc1c5f10ed7d859e7025005e28

8 years agoIMS: Support For Per-Call RAT Info
Omkar Kolangade [Thu, 29 Oct 2015 22:06:27 +0000 (15:06 -0700)]
IMS: Support For Per-Call RAT Info

Adding the extra key that will be used to
propagate RAT information for each call via
call extras. The key is used in IMS Service.

Bug: 20144385
Change-Id: Ia7ca81d661afb579fd25315036c43489b1dca50d

8 years agoAllow verifier to grant permissions
Svetoslav [Fri, 30 Oct 2015 00:00:06 +0000 (17:00 -0700)]
Allow verifier to grant permissions

bug:25329324

Change-Id: I2ac01a983ad812df7725a0499a8d9b470a7ea481

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Thu, 29 Oct 2015 19:27:09 +0000 (12:27 -0700)]
Import translations. DO NOT MERGE

Auto-generated-cl: translation import

Bug: 25319151
Change-Id: I4170f31d992d23a365c98fe5e799a31ef48f17bd

8 years agoGet rid of getTypesVisibleToCaller log spam.
Carlos Valdivia [Thu, 29 Oct 2015 23:41:21 +0000 (16:41 -0700)]
Get rid of getTypesVisibleToCaller log spam.

Bug: 25062620
Change-Id: Ia3080c501a288522a5b1de88d50f365357418ba8

8 years agoUsbDeviceManager: set mUsbDataUnlocked=false on user switch
Nick Kralevich [Thu, 29 Oct 2015 19:45:23 +0000 (12:45 -0700)]
UsbDeviceManager: set mUsbDataUnlocked=false on user switch

Make sure access to MTP data is relocked when a user switch occurs.

Bug: 25288494
Change-Id: I69dafc7f51b847f4dba1993a85fb1a51df1a5e37

8 years agoDon't crash if a DHCP server doesn't send the server ID option.
Lorenzo Colitti [Thu, 29 Oct 2015 06:21:54 +0000 (15:21 +0900)]
Don't crash if a DHCP server doesn't send the server ID option.

This violates a MUST in RFC2131, but apparently some
implementations don't know or care.

Bug: 25343517
Change-Id: I80459b58ffe231e7ed64e77bafa157a96b745149

8 years agoMerge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev
Svetoslav Ganov [Thu, 29 Oct 2015 01:10:46 +0000 (01:10 +0000)]
Merge "Make SYSTEM_ALERT_WINDOW development permission" into mnc-dr-dev

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr-dev
Geoff Mendal [Wed, 28 Oct 2015 14:38:11 +0000 (14:38 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 28 Oct 2015 14:37:31 +0000 (07:37 -0700)]
Import translations. DO NOT MERGE

Change-Id: Id9e2298a05893e3769f0e62bcda5fe70c058d11a
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Wed, 28 Oct 2015 13:59:45 +0000 (06:59 -0700)]
Import translations. DO NOT MERGE

Change-Id: If7c4ccf382e85f88a4fac586ca870068d8219974
Auto-generated-cl: translation import

8 years agoMake SYSTEM_ALERT_WINDOW development permission
Svetoslav [Tue, 27 Oct 2015 22:22:39 +0000 (15:22 -0700)]
Make SYSTEM_ALERT_WINDOW development permission

bug:25329324

Change-Id: I0086464846bab9424764dd0d726692d96a0f1207

8 years agoMerge "Petites fautes." into mnc-dr-dev
Daniel Sandler [Tue, 27 Oct 2015 19:51:31 +0000 (19:51 +0000)]
Merge "Petites fautes." into mnc-dr-dev

8 years agoPetites fautes.
Dan Sandler [Tue, 27 Oct 2015 17:42:55 +0000 (13:42 -0400)]
Petites fautes.

Bug: 25308153
Change-Id: I62ffe080e3f36eb685cdc06d8c106d32e18092ed

8 years agoFix issue #25289999: Lower device idle alarm limit to 10 mins.
Dianne Hackborn [Tue, 27 Oct 2015 00:51:57 +0000 (17:51 -0700)]
Fix issue #25289999: Lower device idle alarm limit to 10 mins.

This helps with some cases where perisistent network connections
need a more frequent keep alive signal.  Actually make it 9
minutes to ensure that things needing a 10 minute cycle will
execute within that time.

Change-Id: Ife8c7b7f7f82b108d5a6c1624bd6115e6087c3be

8 years agoMerge "Import translations. DO NOT MERGE" into mnc-dr-dev
Geoff Mendal [Mon, 26 Oct 2015 16:28:12 +0000 (16:28 +0000)]
Merge "Import translations. DO NOT MERGE" into mnc-dr-dev

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 26 Oct 2015 16:27:14 +0000 (11:27 -0500)]
Import translations. DO NOT MERGE

Change-Id: I0383c1869f289a39ca3db684712dbd812e626e9a
Auto-generated-cl: translation import

8 years agoImport translations. DO NOT MERGE
Geoff Mendal [Mon, 26 Oct 2015 14:17:06 +0000 (07:17 -0700)]
Import translations. DO NOT MERGE

Change-Id: I9bf90d06113d8333bed3eec1c65ed799a785fb63
Auto-generated-cl: translation import

8 years agoMerge "Prevent recents from coming up when in SUW" into mnc-dr-dev
Puneet Kumar [Sat, 24 Oct 2015 15:20:28 +0000 (15:20 +0000)]
Merge "Prevent recents from coming up when in SUW" into mnc-dr-dev

8 years agoPrevent recents from coming up when in SUW
Michael Wright [Sat, 24 Oct 2015 12:24:15 +0000 (13:24 +0100)]
Prevent recents from coming up when in SUW

Bug: 25229538
Change-Id: I141c4eb928a5ce7f9858922862fe3dc1d3a33a90

8 years agoDelay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a...
Dan Sandler [Sat, 24 Oct 2015 00:45:01 +0000 (00:45 +0000)]
Delay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a  -s ours am: 410bea181b am: 511357c39b am: 7e16b2e8f5  -s ours
am: e68e70d509

* commit 'e68e70d509e2a0ba1c8bd56c231bf1c6cc3da967':
  Delay hiding the cast icon for 3 seconds. DO NOT MERGE

8 years agoDelay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a...
Dan Sandler [Sat, 24 Oct 2015 00:33:48 +0000 (00:33 +0000)]
Delay hiding the cast icon for 3 seconds. DO NOT MERGE am: 1044e162c3 am: b1de85487a  -s ours am: 410bea181b am: 511357c39b
am: 7e16b2e8f5  -s ours

* commit '7e16b2e8f5b74d29711d330f6982d8ed12c3f4db':
  Delay hiding the cast icon for 3 seconds. DO NOT MERGE