summaryrefslogtreecommitdiffstats
path: root/dalvik
Commit message (Collapse)AuthorAgeFilesLines
...
| * Make System.loadLibrary use open(2) rather than stat(2).Elliott Hughes2012-11-051-30/+17
| | | | | | | | | | | | | | This will let us remove read permission from directories containing .so files. Bug: 6485312 Change-Id: I72daa265ce54747fc91cdb9d915a05a2464041bb
* | am 4e8aff78: Merge "Remove various content-free package.html files."Elliott Hughes2012-10-113-22/+0
|\ \ | |/ | | | | | | * commit '4e8aff7851667954f8c964829cd20c1e86288814': Remove various content-free package.html files.
| * Remove various content-free package.html files.Elliott Hughes2012-10-113-22/+0
| | | | | | | | Change-Id: I0d8097751b8a61d202b87ed5067d38ff0802c89a
* | Access to all users' external storage.Jeff Sharkey2012-08-281-0/+2
| | | | | | | | | | | | | | | | System services holding this permission have external storage bound one level higher, giving them access to all users' files. Bug: 7003520 Change-Id: I8a81582f9ef07089a1fab3e8f6c3ffe657bb1c1b
* | Multi-user external storage support.Jeff Sharkey2012-08-161-36/+19
|/ | | | | | | Add flags for mounting external storage and pass into JNI. Bug: 6925012 Change-Id: I3704ef1616339f9f5f854f734b58efa7a02b67a4
* Include library path information in BaseDexClassLoader for better error ↵Brian Carlstrom2012-08-011-1/+6
| | | | | | | | reporting in Runtime.loadLibrary (cherry-pick of b6a576f43f1c23bb92493590a04bf9c72f092438.) Change-Id: I6f34862327cf99d8c6f9a7e9aa3aeab47985969b
* Improve the BaseDexClassLoader detail message, and make ScopedLocalRef more ↵Elliott Hughes2012-08-011-1/+1
| | | | | | | | | | | | unique_ptr-like. (cherry-pick of 1c459db4ea31c1f284353bc71bfd2dbc97ca53d7.) Conflicts: include/ScopedLocalRef.h Change-Id: Id01cb907406cc93f6b0f6ddaa8e7fb3714d18c53
* Use float comparison for setTargetHeapUtilization constants.Ian Rogers2012-08-011-1/+1
| | | | | | (cherry-pick of f655188036ceab8968a510ae67455a27917546cf.) Change-Id: I587ad497ee9ac38f4052cdfdd861e8b24dd80712
* Fix HttpURLConnection CloseGuard warning due to lack of close on GZIPInputStreamBrian Carlstrom2012-07-271-2/+2
| | | | | | | | | | | | | | | | java.lang.Throwable: Explicit termination method 'end' not called at dalvik.system.CloseGuard.open(CloseGuard.java:184) at java.util.zip.Inflater.<init>(Inflater.java:82) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:96) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81) at libcore.net.http.HttpEngine.initContentStream(HttpEngine.java:523) at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:831) at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:274) at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:486) at ... Bug: 6602529 Change-Id: I9b49cbca561f8780d08844e566820087fdffc4d7
* am 4ee3fff2: Merge "Extend forkAndSpecialize to take further input arguments."Kenny Root2012-06-211-5/+8
|\ | | | | | | | | * commit '4ee3fff217e72eccf5d1b1d7e252a214b0233bb3': Extend forkAndSpecialize to take further input arguments.
| * Extend forkAndSpecialize to take further input arguments.Stephen Smalley2012-01-181-5/+8
| | | | | | | | | | | | | | | | | | Extend forkAndSpecialize to take two further input arguments, a seInfo string and the niceName for the process. These can be used as further selectors in determining the SELinux security context for the process. Change-Id: If3a654070025e699b2266425f6eb8ab7e6b8c562
* | Merge "Refuse to write optimized dex files to a non-private directory."Jesse Wilson2012-01-081-0/+16
|\ \
| * | Refuse to write optimized dex files to a non-private directory.Jesse Wilson2012-01-061-0/+16
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's infeasible to test if other applications can write to a given directory, particularly since directories like /sdcard/ are accessible to named groups like sdcard_rw. Instead we take a shortcut and just test that the optimized directory is owned by the current process. I tested this manually; the '/data/data/vogar.test.java.StatTest/' app directory could be successfully used but other directories ('/data', '/sdcard', '/') throw exceptions as expected. Bug: http://b/4609061 Change-Id: Ia72b50aa3c73051b0c03c06c0bc7c0470f76b212
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-051-1/+1
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: Ia340ff04d8e9c6344df07a9f921147d06f367bfe
* | Track removal of unsupported experimental opcodes.Elliott Hughes2012-01-052-2/+42
|/ | | | Change-Id: Id97e603ce8dc4cc3246f99c5b215b0f862a700dd
* Only tag/untag sockets when open.Jeff Sharkey2011-10-251-2/+6
| | | | | Bug: 5274621 Change-Id: Icc42a80c8cce6adb20d16ca2bb1fb51e2a8e8e1b
* Fix typo in Javadoc for onReadFromDiskCasey Ho2011-08-171-1/+1
| | | | Change-Id: I7d8d683bd81fd96e826584cf502e418b29acab61
* Document a semantic change to setTargetSdkVersion.Elliott Hughes2011-07-101-1/+3
| | | | | | | (The actual change is in another project, confusingly.) Bug: 4772166 Change-Id: Ib7c242a2d2a7d1cbf468b09319392a5b8cca2e18
* Allow an app's targetSdkVersion to be set by the zygote (libcore).Elliott Hughes2011-07-081-0/+7
| | | | | Bug: 4772166 Change-Id: I33ff94e92e8e840e2a397c34b293a25c013a2052
* resolved conflicts for merge of ba450023 to masterJesse Wilson2011-07-071-15/+22
|\ | | | | | | Change-Id: Ib8e7b68547f139b38ce2790c13a5748801faf9bd
| * Use a clear warning in the DexClassLoader docs.Jesse Wilson2011-06-291-18/+20
| | | | | | | | | | | | | | Cherry-pick of I0cc4bb3ec86b1c3c578c548f6fc646bce9e45745 http://b/4609061 Change-Id: I8ef78c4117f67b1b517d4512b28e73533f64645c
* | Add a constant for enabling logging of third-party JNI activity.Elliott Hughes2011-07-061-0/+2
| | | | | | | | Change-Id: I7038c894f98e713047cdc23e65c972962c75183e
* | Move socket tagging to frameworks/base.Jesse Wilson2011-06-282-132/+76
| | | | | | | | Change-Id: I6f6f840d5d5eee6ca2170fc127fd525155dd40b8
* | Migrate setThreadStatsTag() from String to int.Jeff Sharkey2011-06-281-24/+34
| | | | | | | | | | | | | | Also write out tag as unsigned int. Bug: 4948913 Change-Id: I314655d0698df26e545107b4dea37ce4629be01a
* | Remove an unused internal native.Elliott Hughes2011-06-231-8/+0
| | | | | | | | Change-Id: I562deaf3991018a828757c87afcc27f9901942f7
* | Implement the finalizer watchdog.Jesse Wilson2011-06-202-6/+7
| | | | | | | | | | Change-Id: Ia4aaf5f0ef5a2f5f7e6ec3e8b4c4e300c9e1b2ee http://b/4144865
* | blockguard: tweak netfilter cmd handling, document function.JP Abgrall2011-06-091-3/+23
| | | | | | | | | | | | | | | | Remove the unneeded string replace. Add comments and function doc. Change-Id: I69d435ca175e1a3c7a1dc28cdd2cf51c249ca8d0
* | BlockGuard: bandwidth control: enable and simplify talking to kernel.JP Abgrall2011-06-031-25/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will let the BlockGuard attempt to set tags. For now, it will silently do nothing if the needed /proc/net/xt_qtaguid/ctrl file is not available. It distinguishes "t"agging from "u"ntagging. For now, it does not pass down the tag as a string, but just its hash. It doesn't attempt to control the module when nothing needs doing. This needs the kernel with the new xt_qtaguid netfilter module. And the new system/netd bandwidth management support that sets up the iptables. Change-Id: Ie20def02f8d6aa4b67249f1b46ec5aefb9396305
* | am 46fc50e8: Merge "Support wrapping app processes to inject debug ↵Jeff Brown2011-05-241-0/+27
|\ \ | | | | | | | | | | | | | | | | | | instrumentation. Bug: 4437846" * commit '46fc50e810eaab93f2787b355257ab1e837d8bf7': Support wrapping app processes to inject debug instrumentation. Bug: 4437846
| * \ Merge "Support wrapping app processes to inject debug instrumentation. Bug: ↵Jeff Brown2011-05-241-0/+27
| |\ \ | | | | | | | | | | | | 4437846"
| | * | Support wrapping app processes to inject debug instrumentation.Jeff Brown2011-05-201-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Bug: 4437846 Change-Id: I8d66b13f1c1dc9c30f72033f190121979a44b212
| * | | Disable verbose socket logging.Jeff Sharkey2011-05-171-1/+1
| |/ / | | | | | | | | | Change-Id: I3b8a1a532b186fee81cca0c7eb9199a436570999
* | | Expose accept(2).Elliott Hughes2011-05-191-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of PlainSocketImpl.accept is made ugly by the fact that the SocketImpl we mutate may share its FileDescriptor with a SocketChannel, so we need to mutate the FileDescriptor itself, and can't simply swap in a new one. I've raised http://b/4452981 to see if we can integrate the nio and io socket classes more closely, to avoid this kind of mess. Bug: 3107501 Change-Id: I4964b64c25e936a44d1e4c22504ca29bba247ab6
* | | Implement recvfrom(2).Elliott Hughes2011-05-191-26/+3
| | | | | | | | | | | | | | | | | | | | | This one's a little bit hairy because of multiple return values. Bug: 3107501 Change-Id: I3bd35647d94bb6bc2192d6f31a39ecca07a3926e
* | | Add sendto(2) and reimplement all network writes in terms of it.Elliott Hughes2011-05-161-30/+0
| | | | | | | | | | | | | | | | | | | | | Note that this doesn't fix http://b/4182806. Bug: 3107501 Change-Id: I9b56eae226389a63a12b4c0499d40d5a54a462e2
* | | Quieten socket tagging.Elliott Hughes2011-05-161-1/+1
| | | | | | | | | | | | | | | | | | This is pretty noisy, and not our problem. Change-Id: I5fbd54ccbcbf66d089455efd68cf68e5a91aef20
* | | Remove OSNetworkSystem.close.Elliott Hughes2011-05-161-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | For now I'm keeping AsynchronousCloseMonitor as a special case in native code. We can see about doing something more general-purpose in a later pass. Bug: 3107501 Change-Id: Ib79b9fc0bebfafc2d14896d957bd8591ae8e6e97
* | | resolved conflicts for merge of 1e8d508f to dalvik-devJeff Sharkey2011-05-131-3/+92
|\ \ \ | |/ / | | | | | | Change-Id: Id0739d4e567b112cbea48f5ecb7dd46425da1a36
| * | Add Socket tagging for granular data accounting.Jeff Sharkey2011-05-131-4/+92
| | | | | | | | | | | | | | | | | | | | | | | | Changes BlockGuard to maintain a set of "tags" for the current thread, which it communicates to kernel before each Socket use. Also changes HttpConnectionPool to tag/untag sockets as they are recycled. Change-Id: I33e614f1f570466bdffbf07cc5c718f18b8f3773
* | | Reimplement OSNetworkSystem.isConnected in Java.Elliott Hughes2011-05-121-8/+0
| | | | | | | | | | | | | | | | | | We can do this in Java now we've exposed poll(2). Change-Id: I9f2700d09134198c1cd2681e3814fb482e8e271c
* | | Expose poll(2) and reimplement java.nio.channels.Selector.Elliott Hughes2011-05-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | This also adds UnsafeArrayList<T>, which is like ArrayList but lets you access the underlying array (as opposed to ArrayList.toArray which creates a copy). Bug: 3107501 Change-Id: I8dc570a9fd7951b1435047017ea7aa19f8f8fc53
* | | Clean up the select(2) implementation.Elliott Hughes2011-05-111-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wasn't planning on touching this code (since I want to replace it), but the purported "fix" for http://code.google.com/p/android/issues/detail?id=6309 was actually a regression. The supplied test fails on the RI. This patch replaces the bogus test with new tests, and reverts the old "fix". This was found while trying to work out what "true" and "false" return values from OSNetworkSystem.select are supposed to mean. This patch also switches to a more traditional int return value. Bug: 3107501 Change-Id: Iddce55e081d440b7eb3ddcf94db7d0739dc89c70
* | | DatagramSocket.disconnect is really a connect(2) of an AF_UNSPEC sockaddr.Elliott Hughes2011-05-101-4/+0
| | | | | | | | | | | | | | | Bug: 3107501 Change-Id: Ib04369b9ca63ff3fe7eb87dcbf2926fe704813e3
* | | Expose connect(2).Elliott Hughes2011-05-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new NET_FAILURE_RETRY in Posix.cpp is intended to replace the legacy one in NetFd.h, but during the transition we need both. The new one also takes care of the asynchronous Socket.close semantics, and changes the behavior when the FileDescriptor is invalid on entry: that is now reported as EBADF; it's only reported as "Socket closed" when we've been round the loop at least once, giving us reason to believe the socket was ever open. Having had to debug this distinction, I think the new semantics are less confusing. Bug: 3107501 Change-Id: I243dc4fa2eddde7ba40e9b66ec8fc555bc4e80f9
* | | Expose bind(2).Elliott Hughes2011-05-091-6/+0
|/ / | | | | | | | | | | | | | | | | | | I've renamed the java.net.InetAddress to struct sockaddr conversion functions too, after initially screwing up this patch by copy & pasting a usage of the one that only one caller actually wants. Now the name's so ugly no-one will be likely to use it by accident. Bug: 3107501 Change-Id: I869a8d27fc40e462505e02bf25a67e771a403e92
* | Fix non-blocking connects.Elliott Hughes2011-05-031-3/+1
| | | | | | | | | | | | | | | | | | | | The key change here is reintroducing the boolean return value, which we need as long as the native code treats EINPROGRESS as a special case which doesn't throw. The rest is just drive-by incremental cleanup of the code. Change-Id: I761b052adbb14e912c3853a35327f8a589cd4023
* | Rewrite blocking connects in terms of the non-blocking primitives.Elliott Hughes2011-05-021-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies OSNetworkSystem, getting us closer to replacing the connect(2)-related bits with our new POSIX interface. It also lets us remove cruft on the Java side that was resetting the socket's blocking/non-blocking state (which should never have been touched), which in turn fixes bug 4193212. Detail messages for socket timeouts get better too, now we're throwing on the Java side. The only thing that's worse is that we used to get away with throwing a checked exception from native code, which simplified our "throws" clauses. Now we actually have to jump through a few hoops to make javac happy. (Especially awkward because SocketTimeoutException isn't a SocketException.) Stupid checked exceptions. Bug: 4193212 Bug: 3107501 Change-Id: I00695d22094e6d785458dfbb7050fbaecf2db89f
* | Finish setsockopt(2).Elliott Hughes2011-04-061-5/+0
| | | | | | | | | | Bug: 3107501 Change-Id: I8f026dcba78acb555834bdcc594e114238f3cc52
* | Ensure that the zygote is single-threaded before forking.Elliott Hughes2011-04-051-0/+18
| | | | | | | | | | | | | | We really need to wait for the pthreads to exit. Bug: 4235038 Change-Id: Ic0ce32be80bcdc27ff8fc6ac27fa37f7c3e17e0c
* | Implement reference queuing in managed code.Carl Shapiro2011-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a thread to the core library which receives a list of references after a garbage collection and enqueues each element. This list is constructed by linking together the pendingNext field of cleared references into a circular queue. To support this change, the pendingNext field has been replaced by the new zombie field for the purposes of providing a strongly reachable location within a FinalizerReference class instance. Change-Id: Id09133e44c850797e7f14c5471123a036d027c80