214783 Commits

Author SHA1 Message Date
Chih-Hung Hsieh
21c0f29597 Fix google-explicit-constructor warnings.
* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I7422d703de17c4266d2a022990d0e1df40f48226
2016-08-15 14:45:02 -07:00
Treehugger Robot
76ce8e5242 Merge "Fix clang-tidy warnings in libs/hwui." 2016-08-11 23:20:47 +00:00
Jakub Pawlowski
5671277d2a Merge "Add LE Secure Connection data parsing (1/4)" 2016-08-11 22:32:23 +00:00
Jakub Pawlowski
747711ce9b Add LE Secure Connection data parsing (1/4)
Bug: 30460956
Change-Id: I8d6e721b3b04f5ca9e3e02f7f2b90487482e1b37
2016-08-11 22:18:19 +00:00
Hans Boehm
d0197ac340 Merge "Do not stack allocate RefBase object in AaptAssets::filter" 2016-08-11 17:18:22 +00:00
Hans Boehm
25dfa75ee3 Do not stack allocate RefBase object in AaptAssets::filter
Doing so is likely to trigger log messages in the future, and will
hinder diagnosis of other problems.

Bug: 30292538
Change-Id: I2cb8c507e43d06d4afa7e35b564416c1474c81d1
2016-08-10 19:56:50 -07:00
Chih-Hung Hsieh
f35c939cd7 Fix clang-tidy warnings in libs/hwui.
* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
Test: build with WITH_TIDY=1

Change-Id: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
Merged-In: Iab3e6636f60a70cb124f29dc19f20f842fa8dfda
2016-08-10 23:26:59 +00:00
Robert Greenwalt
2438a33e54 Merge "[NetworkPolicy]: Fixes the crash issues caused by null pointer." 2016-08-10 21:07:26 +00:00
zhangshuxiao
bad369d63e [NetworkPolicy]: Fixes the crash issues caused by null pointer.
When handleRegisterNetworkAgent in ConnectivityService,
the networkinfo of NetworkAgentInfo will be set to null.
So we need to handle the null pointer of state.networkInfo.

Change-Id: I2a278f1f1b2455057fd2ed323ff4df340c3cbca9
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
2016-08-10 03:49:54 +00:00
Chad Brubaker
5b63231a31 Merge "Add stub isCTVerificationRequired methods" 2016-08-09 19:13:01 +00:00
Yi Kong
67aaa079ee Merge "Track libcore change ee24b6322448ac919231a668e308ebd719aa52d7" 2016-08-09 17:59:07 +00:00
Yi Kong
f646aa14cd Track libcore change ee24b6322448ac919231a668e308ebd719aa52d7
Change-Id: I73dd6af604304ea4eb8e01990454f491af659602
2016-08-09 16:43:32 +00:00
Neil Fuller
294ab080f4 Merge "Tidy up MockWebServer usage" 2016-08-09 16:05:38 +00:00
Neil Fuller
d0c0c8dcab Merge "Add a finalize() method to StrictJarFile" 2016-08-09 10:43:18 +00:00
Tobias Thierer
f61a449ee9 Merge "Ensure apps cannot prevent uncaught exceptions being logged." 2016-08-09 08:55:35 +00:00
Treehugger Robot
78a72f0698 Merge "fix safeMode status in AppWidgetService" 2016-08-08 21:36:46 +00:00
Tobias Thierer
addbf9015a Ensure apps cannot prevent uncaught exceptions being logged.
Let RuntimeInit use an UncaughtExceptionPreHandler to log an exception
rather than relying on UncaughtHandler, which apps can replace. This
makes it easier to diagnose application death, especially during app
compatibility testing for a new version of Android.

Test: Verified manually, with the help of a small sample app (not
checked in), that stacktraces for RuntimeExceptions thrown on main
or background threads are logged even when the app set a default
UncaughtExceptionHandler that swallows the exception with no action.

Note that such an inappropriate UncaughtExceptionHandler will still
cause threads to die without the app being killed, which it should be.
In an exception then happens on the main thread, the app will freeze
until the ANR dialog kicks in after a few seconds. I have manually
verified that this behavior is unchanged from before this CL.

No new integration tests are included because the default system
behavior has not changed.

Bug: 29624607
Change-Id: Ie87377b0bcadc3ba4083a8ab1bedb8f3dd95a4bd
2016-08-08 17:59:28 +01:00
Treehugger Robot
3f67a1855e Merge "Fix random crash in libhwui" 2016-08-05 18:23:14 +00:00
Tobias Thierer
e49469aed1 Merge "APIs for ProcessBuilder.Redirect" 2016-08-05 12:36:35 +00:00
Przemyslaw Szczepaniak
50f3429d14 Merge "Track libcore change 0e393b4d628541e84e31210342f4103315c07e23" 2016-08-05 09:36:41 +00:00
Hans Boehm
497ac5eccb Merge "Update SMP documentation." 2016-08-05 01:59:38 +00:00
Hans Boehm
9e629adc4a Update SMP documentation.
The old version was seriously obsolete, primarily in that it ignored
C11 and C++11 atomics and the programming model underlying them.  As
a result it paid way too much attention to hardware characteristics,
which 0.001% of application programmers should really be aware of.
And some of those hardware descriptions were also obsolete.

This is a fairly complete rewrite.

Bug: 18523857

Change-Id: Icc14a390f74486193486c2ba07a86b05611e7d3c
2016-08-04 14:21:48 -07:00
Andre Eisenbach
5cfe8a8315 Merge "Fix bad index usage" 2016-08-04 20:20:02 +00:00
Jakub Pawlowski
d167db19a9 Fix bad index usage
Bug: 27999121
Change-Id: Ie2ba6f71bbf6f789a3c1016ba2f0051b809ac87e
2016-08-04 20:19:52 +00:00
Chih-hung Hsieh
a11a8e5086 Merge "Enable clang for arm64." 2016-08-04 17:13:53 +00:00
Chih-Hung Hsieh
248bed0334 Enable clang for arm64.
emutls should work now with latest prebuilt clang/llvm.

BUG: 25642296
Test: build and boot up on arm64 emulator.

Change-Id: I5c8dd36a1575436e5fd56e91f7c285f2b3e6546f
(cherry picked from commit 8ffb6b76f7a72e14882e09f882494e5f7d5fc45d)
2016-08-04 17:09:55 +00:00
Tobias Thierer
f1d119ccd3 Merge "Add API for setsockoptInt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, value)" 2016-08-04 10:51:14 +00:00
Andre Eisenbach
f28f6bb2b0 Merge "HFP 1.7 profile update (3/4)" 2016-08-04 01:06:47 +00:00
Mudumba Ananth
709b11ef7a HFP 1.7 profile update (3/4)
-> Android Framework changes to add support for
   an API to send indicator change in AG.
-> Added a system intent for broadcasting assigned number(ID)
   of the supported HF indicators and their values (if received)

Bug: 19983867
Change-Id: If26a7ae5da5686da72ebca9ec3decfe086e2ffb6
(cherry picked from commit 0d98ebf997b24e96d0328b4195a22832f9ae2664)
2016-08-03 17:55:04 -07:00
Treehugger Robot
b7eb1d7eaf Merge "Remove write type from GATT descriptor writes (1/4)" 2016-08-03 23:54:35 +00:00
Jakub Pawlowski
8e970d6ab4 Remove write type from GATT descriptor writes (1/4)
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used
for this sub-procedure".

Change-Id: I141dd24ed5911d5d485b52a1b661835b9960921a
2016-08-03 10:42:47 -07:00
Tobias Thierer
4122b913f3 Add API for setsockoptInt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, value)
Test: "make" succeeds.

Bug: 30402085
Change-Id: I4bc4b5dcfab04ac756578c2fae7a337e74587b66
2016-08-03 18:16:14 +01:00
Tobias Thierer
258a554f62 Merge "Stop profiling on uncaught exception." 2016-08-03 10:42:37 +00:00
Jakub Pawlowski
d13954e8c6 Merge "GATT Server refactoring (2/4)" 2016-08-03 10:21:44 +00:00
Tobias Thierer
b68106cf2a Merge "Fixes the system server crash issue caused by uncatched exception." 2016-08-03 09:54:53 +00:00
Tobias Thierer
554284edf3 Merge "remove x attribute of java file" 2016-08-03 09:54:24 +00:00
Treehugger Robot
1085be0ce3 Merge "Zygote: Add CAP_WAKE_ALARM to system_server to properly support timerfd alarms" 2016-08-03 00:04:19 +00:00
Jakub Pawlowski
d75f512aa2 GATT Server refactoring (2/4)
Bug: 27999121
Change-Id: Ia5f91298a4b01b62adebc8adc30f27f757259588
2016-08-02 20:45:06 +00:00
Ganesh Mahendran
7f7df65475 remove x attribute of java file
java file do not need x attribute, so this patch
removes it.

Change-Id: I807722ac3f40688f032228294d61a4266d0e9e60
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
2016-08-02 19:33:26 +00:00
Tobias Thierer
8ad86a3d1a Stop profiling on uncaught exception.
When "handling" an uncaught exception, make an attempt to stop
profiling. In case profiling was active, this will avoid losing
the profiling buffer.

This change is required as a base in order for
https://android-review.googlesource.com/#/c/249721/
to merge cleanly.

(Cherry picked from commit 4c79fea9efea7cfa739cf5b5f525ddadb28e52a6)
Bug: 26291225
Change-Id: I35f352e5f28eafe4702da9eae587c3b65c360b3a
2016-08-02 17:32:39 +01:00
Chad Brubaker
bd62098a54 Add stub isCTVerificationRequired methods
Bug: 28746284
Change-Id: Iebeecba7356ac57fedb06d71de63aa9900f2ccd8
2016-08-02 07:57:16 -07:00
Przemyslaw Szczepaniak
bc7820ec76 Track libcore change 0e393b4d628541e84e31210342f4103315c07e23
Bug: 28666126
Change-Id: Ib63e14c5c72fd3a13f09a90358cb137e318a3653
2016-08-02 12:01:07 +00:00
songjinshi
c5e249b9e0 Fixes the system server crash issue caused by uncatched exception.
The restat method of the StatFs may throw an IllegalArgumentException,
so we must to catch it and throw an IOException for the caller
of the trimToFit(),this fix can improve system stability.

https://code.google.com/p/android/issues/detail?id=218359

Change-Id: I54a2f569eea67d3ab628944e3586ca918ec70283
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2016-08-02 09:47:09 +08:00
Treehugger Robot
6eb30f2060 Merge "libsigchain: intercept bsd_signal on lp32" 2016-08-01 22:39:16 +00:00
Dimitry Ivanov
4c5281862f libsigchain: intercept bsd_signal on lp32
bsd_signal is a deprecated synonym for the signal. Nevertheless
there are apps and libraries calling this function.

libsigchain needs to intercept these calls and handle them the same
way it handles signal() call.

Bug: http://b/30562229
Test: readelf --dyn-sym app_process32 and check that bsd_signal is exported
      readelf --dyn-sym app_process64 and check that bsd_signal is not exported
Change-Id: Iec584070b42bc7fa43b114c0f884aff2db5a6858
2016-08-01 14:19:26 -07:00
Fyodor Kupolov
3e151273a3 Merge "Fix the API compatibility of "UriMatcher#addURI"" 2016-08-01 17:34:32 +00:00
Hidehiko Tsuchiya
5acd41d155 Fix the API compatibility of "UriMatcher#addURI"
The previous patch (ef23bf19 Allow leading slash in path...) made
a single slash path unmatchable.
To solve it, this patch stops removing a slash character if the path
only has a slash character.
Now, a single slash is a matchable path for a URI without path string.

Bug: 29524484
Change-Id: I90b357aa48be1a3e0cf36e75ed2a9d6532908972
2016-07-30 01:47:50 +00:00
Neil Fuller
b69f61472a Add a finalize() method to StrictJarFile
Bug: 25896372
Test: Booted device, installed CTS apps
Test: run cts --class android.util.cts.StrictJarFileTest
Change-Id: I35e238dadd48d2c4ca53ac37a4c5aacdd471a93a
2016-07-29 14:26:35 +01:00
John Stultz
5733f387be Zygote: Add CAP_WAKE_ALARM to system_server to properly support timerfd alarms
The when the timerfd alarm logic was added to the kernel, an oversight was made
and the interface does not check for the CAP_WAKE_ALARM permissions as required
via other kernel methods to trigger an alarm timer.

In v4.8-rc kernels, the change 2895a5e5b3a ("timerfd: Reject ALARM timerfds
without CAP_WAKE_ALARM") was added by Eric Caruso <ejcaruso@google.com>.

After this change (which may be backported to -stable), the AlarmManager will
fail on the first timerfd_create call, and will not be able to set the time
or handle other necessary functions.

The solution here is to add CAP_WAKE_ALARM to the system_server process.

Change-Id: Ifdb16f3ef42711e553f727165de3922d484b5be4
Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-07-28 12:41:04 -07:00
Sergio Giro
877d6e75e6 Merge "api: destroy() and isDestroyed() methods are now default in Destroyable" 2016-07-27 11:30:55 +00:00