Commit Graph

252159 Commits

Author SHA1 Message Date
Mark Lu
41d65f28c2 [AM] Skip unnessary ANR when process already died.
When app process been killed by AMS or lowmemkiller just before ANR report,
because process record info has been cleared after received death recipient,
it also cannot dump trace log because process already dead,
so report ANR & show ANR UI to let user wait seems is unnecessary.
(compare normal ANR case, if kill app process by command,
ANR dialog will also dismissed, it seems reasonable.)

To check above condition, if ANR process record killed set as true,
it means process already dead & can skip report this ANR.

Change-Id: I483cb02bacb10c32db80ca1097310b02abbac24d
2016-09-17 00:28:20 +08:00
Treehugger Robot
05884ac869 Merge "Stop including libcore/include/ in most of frameworks/base." 2016-09-16 08:36:44 +00:00
Treehugger Robot
85539bed77 Merge "Remove synchronization from getCurrentInputMethodSubtype()" 2016-09-16 05:21:33 +00:00
Gopal Krishna Shukla
fa1886feea Remove synchronization from getCurrentInputMethodSubtype()
getCurrentInputMethodSubtype() acquires InputManagerService.mMethodMap
within its body. There seems to be no reason for holding
InputMethodManager.mH to call getCurrentInputMethodSubtype(). Holding mH
can cause potential deadlock b/w two threads acquiring mH and mMethodMap
in different orders.

Bug: 31247871
Bug: 31273203
Bug: b.android.com/218423
Change-Id: I20cf2c20f49b1b02c0f7a18257b49d4bcc081b5d
2016-09-16 03:41:46 +00:00
Elliott Hughes
f0c606eb3e Stop including libcore/include/ in most of frameworks/base.
frameworks/base/core/jni/android_text_StaticLayout.cpp does actually use
ScopedIcuLocale, so I've left that for now.

Change-Id: I6458cd133871281a747a9da2e304da10b445051a
2016-09-15 13:13:39 -07:00
Treehugger Robot
9d9cf5b383 Merge "Skip ANR for processes that have been killed" 2016-09-14 13:54:37 +00:00
Treehugger Robot
796578f9a9 Merge "app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal." 2016-09-14 13:07:05 +00:00
Narayan Kamath
5638991c82 app_main: failure to PR_SET_NO_NEW_PRIVS is always fatal.
Don't make allowances for older kernels. Kernels must handle this
properly since it is now a CTS requirement.

Also remove some unreachable return statements.

Change-Id: I280c4ed5e461d37672236747b5dbb7d1e97ecfec
2016-09-14 10:24:20 +01:00
Treehugger Robot
4b1a8f46d6 Merge "fix NullPointerException in RegisteredServicesCache" 2016-09-13 20:57:11 +00:00
Treehugger Robot
1bb0616c56 Merge "DO NOT MERGE. Listen to ACTION_UID_REMOVED only." 2016-09-12 21:07:40 +00:00
Mitchell Wills
c7b84e6d0d Merge "Add a flag to indicate if a ScanData is for a scan for all channels" 2016-09-12 20:38:20 +00:00
Treehugger Robot
191ddb0c27 Merge changes I104e6133,I54f04c03
* changes:
  Split the zygote logic out of android.os.Process into a new ZygoteProcess class.
  Refactor ZygoteInit to support a WebView-specific zygote.
2016-09-12 19:42:02 +00:00
Mitchell Wills
9bc78e8a25 Add a flag to indicate if a ScanData is for a scan for all channels
BUG=30897947

Change-Id: I919d7fa9c3bf196371e506d23e393a9d609a5b4b
(cherry picked from commit 4bfb391c91)
2016-09-12 11:28:55 -07:00
Elliott Hughes
a4739b86b5 Merge "Move frameworks/base to std::unique_ptr." 2016-09-12 16:50:18 +00:00
Elliott Hughes
93bb56ef15 Move frameworks/base to std::unique_ptr.
Bug: http://b/22403888
Change-Id: Iae2c68b00be7cd9dd215a75cf80b16d7403f6328
2016-09-11 14:50:12 -07:00
Chih-hung Hsieh
5e91082b3c Merge "Fix google-explicit-constructor warnings in media utils." 2016-09-10 17:07:53 +00:00
Treehugger Robot
5379f47d85 Merge "Fix issue that Overview key doesn't work at secondary user" 2016-09-09 21:46:04 +00:00
Robert Sesek
96b49848e7 Split the zygote logic out of android.os.Process into a new ZygoteProcess class.
There is no functional change. This is to support adding new types of zygotes
that all operate using the same protocol.

Bug: 21643067
(cherry picked from commit 94e824bc1b)

Merged-In: Ie673ee816cae34ac20ffb8c774ec3e6461c3fd0a
Change-Id: I104e6133a90dc93a9854836b5e92d3cd542163a3
2016-09-09 12:42:52 -04:00
Tobias Sargeant
b9679dc1fa Refactor ZygoteInit to support a WebView-specific zygote.
This is a non-functional change that separates out functionality
that should be shared between the system zygote and the WebView
zygote from that which is system zygote specific.

* Move MethodAndArgsCaller to Zygote.
* Split out server socket functions into ZygoteServer.
* Add a new (stub, for now) WebViewZygoteInit class.

Bug: 22084679
Bug: 21643067
(cherry picked from commit ba816e0c9e)

Merged-In: I4c508a42af7ab7b53d10570ad53b846df7782cc4
Change-Id: I54f04c03443d10dabe6426697d1ff8a0cc66b985
2016-09-09 12:42:43 -04:00
Treehugger Robot
077678590f Merge "char16 strings returned by JNIEnv::GetStringCritical are not '\0' terminated." 2016-09-09 15:47:44 +00:00
Felipe Leme
ecbdb8834d DO NOT MERGE. Listen to ACTION_UID_REMOVED only.
NMPS was listening to both ACTION_UID_REMOVED and
ACTION_PACKAGE_REMOVED, which not only was redundant but would also
cause problems when a package with shared UIDs was removed.

BUG: 31375684

Change-Id: I78da95ef168321a837ed85ce2787a66a16830a78
2016-09-08 18:15:23 -07:00
Andreas Huber
c84c5568a8 char16 strings returned by JNIEnv::GetStringCritical are not '\0' terminated.
Properly construct String16s from both pointer and length instead.

Bug: 31373735
Change-Id: Ia89df7840a48c4fce06e08fc3ae373e0fadfb44e
2016-09-08 13:52:36 -07:00
Tobias Thierer
63a07e80d6 Merge "Add Base64 from OpenJDK 8u60" 2016-09-08 13:10:15 +00:00
Sergio Giro
8445702920 Merge "java.security.Provider: port to jdk8u60 (second part)" 2016-09-08 12:18:43 +00:00
Paul Duffin
0bd7c54745 Merge "Fix SuppressWarnings typo." 2016-09-08 12:17:05 +00:00
Ian Rogers
e09ac05b35 Fix SuppressWarnings typo.
As Error Prone states:
Suppressing "deprecated" is probably a typo for "deprecation"
Bug: 27723540

(cherry picked from commit a7f834f1ce)

Change-Id: I0c6a9fc0a160769955cccf97ec7decb1f2b9b8fb
2016-09-08 13:11:37 +01:00
Yi Kong
3bc37e9cf7 Merge "Track libcore change 76fa41aa4ac891670446592243b654fac7deb53f" 2016-09-08 09:59:54 +00:00
liulvping
bf76ee74c7 fix NullPointerException in RegisteredServicesCache
https://code.google.com/p/android/issues/detail?id=221932

Change-Id: I67c0b799d10f4b9c8fa0779069d23cc49916b395
Signed-off-by: liulvping <liulvping@xiaomi.com>
2016-09-08 01:20:34 +00:00
Treehugger Robot
efb7bec56a Merge "WifiManager: Remove unused methods" 2016-09-07 21:43:20 +00:00
Yi Kong
a4cc9028bf Track libcore change 76fa41aa4ac891670446592243b654fac7deb53f
Bug: 30992227
Change-Id: I33c25562468f5803e211910f50116b501b66fe56
2016-09-07 16:17:55 +00:00
dooyoung.hwang
b647984f04 Fix issue that Overview key doesn't work at secondary user
If user captures screenshot, screenshot process is started. Screenshot
process also starts services that is defined SERVICES_PER_USER.
As a result Recents class's object is unexpectedly constucted from
screenshot process, and cause to connect with system-user's SystemUI
with mUserToSystemServiceConnection. So, binder proxy from system-user's
SystemUI to secondary-user's SystemUI is replaced with proxy to
screenshot process. In this case Overview key doesn't work at all
until reboot.

Bug:30340532
Change-Id: I84b8b4a02ac3ff781e06d57be19cff56efa76521
2016-09-07 16:03:17 +00:00
Roshan Pius
c4856bd73c Merge "WifiEnterpriseConfig: Refactor set/get field values" 2016-09-07 15:47:40 +00:00
Tobias Lindskog
313177dcca Skip ANR for processes that have been killed
If a controller is attached and decides to kill a process after an ANR,
other ANR reports for that app that are queued up won't be handled until
after the app has died.  This can create a report without the relevant
callstacks because the app is dead by the time the traces are dumped.
Since the trace file is global, the traces recorded for the first ANR
are overwritten, leaving us with no clue as to what happened.

After the app has been killedByAm, it is not interesting to handle ANRs
for that app until it is started again, so killedByAm can be used to
filter out these spurious reports.

Change-Id: I34ba790f6d29d563c819dc2f6ac71a3c8955bb76
2016-09-07 14:36:46 +02:00
Sergio Giro
12d3d4bbba Merge "java.security.cert.X509CRL: add new method verify(PublicKey, Provider)" 2016-09-07 12:08:27 +00:00
Sergio Giro
6767fd28b1 Merge "java.security.PKCS12Attribute: port class from jdk8u60" 2016-09-07 12:07:13 +00:00
Sergio Giro
4c2df18a4d Merge "java.security.SecureRandom: add getInstanceStrong() method" 2016-09-07 12:05:35 +00:00
Sergio Giro
59c0fcf0c8 Merge "java.security: port DomainLoadStoreParameter from jdk8u60" 2016-09-07 12:04:21 +00:00
Yohann Roussel
15c6078f4d Merge "Add a test app for suppressed exceptions" 2016-09-07 09:52:50 +00:00
Etan Cohen
62419a0138 Merge changes from topic 'enable_nan'
* changes:
  Give WakeupMessage the ability to transport an object as well. [DO NOT MERGE]
  [NAN] Add transport type for NAN. [DO NOT MERGE]
2016-09-07 04:19:52 +00:00
Lorenzo Colitti
4171cdf303 Give WakeupMessage the ability to transport an object as well. [DO NOT MERGE]
(cherry-pick of commit eab17da588)

Bug: 23113288
Change-Id: Ic98e3bcb3ea8b0b28a309bd647fb4178311c46a3
2016-09-06 15:54:16 -07:00
Etan Cohen
bd9fdbe022 [NAN] Add transport type for NAN. [DO NOT MERGE]
Add TRANSPORT_WIFI_NAN - specifies a peer-to-peer Wi-Fi NAN data
connectivity request.

While NAN uses Wi-Fi L1 PHY and part of the MAC - it is a different
protocol and constitutes a different transport.

(cherry-pick of commit 7b84987a6a)

Bug: 26564277
Change-Id: I975ebc72d8f97a592d18038b3d6465b7a40efa75
2016-09-06 15:54:10 -07:00
Treehugger Robot
9221c96ae0 Merge "WifiConfiguration: Fix isEnterprise" 2016-09-06 22:51:43 +00:00
Mathieu Chartier
a817838e8b Merge "Avoid profile guided compilation for vmSafeMode" 2016-09-06 22:19:03 +00:00
Treehugger Robot
1cd6248012 Merge "fixes mStartedUsers shoule be locked by mLock, not mVolumes" 2016-09-06 21:09:06 +00:00
Andreas Gampe
421c74f8e7 Merge changes from topic 'cherry_pms_installd'
* changes:
  Release mPackages lock earlier
  OtaDexopt: Special-case system app classpaths
  OtaDexoptService: Run dexopt on all apps
  Frameworks/base: Add compiler stats to Package Manager
  [RFC] Special case system apps for profile optimizations
  Compile core-apps according to their own "reason" for A/B
  Frameworks/base: Add new flow to OtaDexoptService
  Otadexopt: Expose progress percentage
  cp preopted files from B partition during PM init.
2016-09-06 21:02:55 +00:00
Roshan Pius
6cfe668c80 WifiManager: Remove unused methods
Remove the unused hidden methods from WifiManager.

BUG: 29449615
TEST: Compiles, boots up.
Change-Id: Ie7e6f438b23a368e44d35390267d5505e12bb75e
2016-09-06 13:38:31 -07:00
Todd Kennedy
94f9be2ee2 Release mPackages lock earlier
We cannot hold mPackages when calling into generatePackageDexopts().
This method takes Package Manager's mInstallLock. By holding mPackages,
we have lock inversion and hilarity ensues.

Change-Id: Ia11a158677051e3511702f38cde6780e75b256fb
Fixes: 30927731
(cherry picked from commit a8d4f48997)
2016-09-06 10:46:18 -07:00
Andreas Gampe
3f95d0bb6a OtaDexopt: Special-case system app classpaths
Specialize system apps' shared libraries so that classpath checks
are elided.

Bug: 30568568
Change-Id: Id1f2555ef43984b616e01f8596701ccba77895b3
(cherry picked from commit c7e02c1d2a)
2016-09-06 10:45:06 -07:00
Andreas Gampe
14186731f9 OtaDexoptService: Run dexopt on all apps
To avoid work after reboot, dexopt all apps. However, unimportant
apps are optimized with the first-boot reason (which is usually
interpret-only) for space reasons.

Bug: 30468718
Change-Id: Ia05d879957388967c69f9380e50d8a9834afe07d
(cherry picked from commit 115514b236)
2016-09-06 10:44:00 -07:00
Andreas Gampe
7e619a912c Frameworks/base: Add compiler stats to Package Manager
Add a simple class for storing compiler statistics. Capture compile
times for code paths from a package.

Bug: 29223204
Change-Id: I1b066de6a83a739470a42480eee0bfef88423eea
(cherry picked from commit 37e5fdc6b4)
2016-09-06 10:41:59 -07:00