214760 Commits

Author SHA1 Message Date
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
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
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
Marco Nelissen
e40ab18590 Merge "Fix memory leak in MediaScannerConnection" 2016-07-26 15:37:32 +00:00
Tobias Thierer
5296a60e27 APIs for ProcessBuilder.Redirect
This CL is required for the following libcore change:
Revert "Hide ProcessBuilder.Redirect and associated APIs."

Test: Checked that 'make' succeeds.

Bug: 27464570
Change-Id: I7719ab495863d3fc8cdd00fbe19ac40a37b5a6f2
2016-07-26 15:30:44 +01:00
Jesse Hall
189bbd9f6d Merge "bootanimation: Call eglReleaseThread in threadLoop" 2016-07-25 03:36:57 +00:00
Chih-hung Hsieh
5152fd909c Merge "Fix google-explicit-constructor warnings in frameworks/base" 2016-07-22 00:55:18 +00:00
Chih-Hung Hsieh
faecb78a6b Fix google-explicit-constructor warnings in frameworks/base
* Add explicit keyword to conversion constructors.
* Add NOLINT to implicit conversion constructors.

Bug: 28341362
Test: build with clang-tidy
Change-Id: Ie4d37072ab57d1662d18db4de1c8577247f43337
2016-07-21 16:24:06 -07:00
David Gross
ed6625d907 Merge "Update RenderScript docs: reduction, other API 23/24 changes, cleanup." 2016-07-21 16:15:37 +00:00
xiaoli.xb.zuo
3579b0e1a7 Fix memory leak in MediaScannerConnection
This patch adds releasing of MediaScannerConnection in ClientProxy
after disconnecting and releasing of ClientProxy and
IMediaScannerService in disconnection sequence in
MediaScannerConnection.

Bug: 30150344

Change-Id: I1e162e4c9a0b7a741ace20480bcf06f3151a93bf
2016-07-21 20:34:09 +09:00
David Gross
05eef3040e Update RenderScript docs: reduction, other API 23/24 changes, cleanup.
Substantive changes:
- Add discussion of reduction kernels.
- Use RS_KERNEL in place of __attribute__((kernel)).
- Discuss "context" special argument.
- Special arguments x, y, z may be of type int.
- Discuss multiple inputs for mapping kernels.
- Mention that script-side global writes are not visible in Java.
- Rewrite part of discussion regarding when to use support library.
- Change minimum device version for support library from Android 2.2 (API level 8)
  to Android 2.3 (API level 9).

Stylistic changes (better conformance with style guide):
- Proper use of <i> (italic) versus <em> (emphasis).
- Proper case for headings.
- Proper pattern for Android version numbers.
- Do not use e.g. or i.e.
- Prefer active rather than passive voice.
- Prefer present rather than future tense.

Miscellaneous minor editorial changes.

Bug: 27299393
Bug: 30000147

Change-Id: Ie0a26152714cf8f619d4914218f7262d675bb25f
2016-07-20 16:04:35 -07:00
Christopher Ferris
c95e7a3014 Merge "Remove dependency on android_alarm.h." 2016-07-20 18:03:48 +00:00
Stephen Hines
bba87840d3 Merge "Disable warning triggered in Clang r271374" 2016-07-19 22:02:31 +00:00
Pirama Arumuga Nainar
b6709700db Disable warning triggered in Clang r271374
http://b/28149048
http://b/29823425

Disable -Wconstant-conversion that gets triggered in
native/imageproc/to_rgba.c.

Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.

Change-Id: Ia8dbe49a1a8577599244642cbd2e3bb17ec1f83c
2016-07-19 20:31:39 +00:00
Christopher Ferris
338893e47e Remove dependency on android_alarm.h.
android_alarm.h no longer exists in upstream android kernels. Since it's
only used by the AlarmManagerService, copy in the parts of the file that
are needed into that one file.

Bug: 30072483
Change-Id: I5c994dfa2ad261da48a67e5c35dc4b6618b82aa1
2016-07-19 12:23:26 -07:00
Treehugger Robot
e2994438d2 Merge "Handle long process names correctly." 2016-07-19 00:09:24 +00:00
Dmitriy Filchenko
f5b6e5590e Handle long process names correctly.
pthread_setname_np() expects 16 or fewer characters for the name argument. When the process name is longer, we should trim it.

Change-Id: I40be3a4212bdaab900c8eb30fa27aeeb7ed1b0d1
2016-07-18 16:03:05 -07:00
Treehugger Robot
8ee58b3b4e Merge "Remove calls to set_process_name." 2016-07-13 19:50:52 +00:00
Dmitriy Filchenko
342c7dcd02 Remove calls to set_process_name.
BUG:29824203

Change-Id: I67a1eb350cf9ea28c554166986df8fc251b666eb
2016-07-12 15:44:55 -07:00
Treehugger Robot
ee4c8fb9eb Merge "Fix unsafe concurrent access in LegacyTypeTracker" 2016-07-12 13:08:21 +00:00
Hugo Benichi
5224f00b51 Fix unsafe concurrent access in LegacyTypeTracker
This patch adds synchronization inside LegacyTypeTracker so that
getNetworkForType() can safely run concurrently with remove().

Without synchronization if remove() removes the last network for a
given type while getNetworkForType() runs for the same type, it is
possible that getNetworkForType tries to access the head of an empty
list, resulting in a runtime exception.

This issue was found by zoran.jovanovic@sonymobile.com who proposed a
fix in AOSP (Change-Id: Ia963662edb9d643790e8d9439e4dbdcac4c2187b).

This patch differs from the fix proposed by the bug reporter and tries
instead to do the minimum amount of locking to make getNetworkForType
safe.

Bug: 29030387

(cherry picked from commit 78caa25870391f676e1edbd448b5ff3e12a99a1e)

Change-Id: I915aac527fc8828b32bf35fee870add2dfb11d8d
2016-07-12 21:56:40 +09:00
Todd Kennedy
9a3fbe1162 Merge "Solve the infinite loop on clearExternalStorageDataSync" 2016-07-11 14:32:02 +00:00
Shubham Ajmera
18941cb53f Merge "Track libcore change dd5097d93d2f2c211fc79cde4d5f09db48e8808a" 2016-07-11 10:08:40 +00:00