59806 Commits

Author SHA1 Message Date
dcashman
fc4c0bf8bc ZygoteConnection: remove obsolete security checks.
SELinux guarantees that only the system_server and permissive domains such as su
are allowed to connect to the zygote socket. Remove obsolete security checks
that were only applicable when other processes could connect.

Bug: 19624279
Change-Id: I1c925d7facf19b3953b5deb85d992415344c4c9f
2015-03-09 12:37:08 -07:00
Andreas Gampe
7a4cb563a2 Merge "Frameworks/base: Remove unnecessary Pattern instance" 2015-03-07 01:03:14 +00:00
Andreas Gampe
055678b5fe Frameworks/base: Remove unnecessary Pattern instance
Using a static Pattern in UriMatcher prevents compile-time
initialization.

It is also not efficient, as String.split has a fast path for simple
splits.

Bug: 19542228

Change-Id: Ie9e5bfe6da04c6d05ec10b1426d0cd136ef46ef2
2015-03-07 00:19:01 +00:00
Andreas Gampe
18e99c1288 Frameworks/base: Remove unnecessary Pattern instance
Using a static Pattern in ActivityThread prevents compile-time
initialization of ActivityThread and GestureDetector, which depends
on the former.

It is also not efficient, as String.split has a fast path for simple
splits.

Bug: 19542228

Change-Id: I5bb843c08c81e0d259bb8afafa87a8467bb1730e
2015-03-07 00:18:15 +00:00
Mathieu Chartier
6909c0e1e7 Add JIT system properties
Added the following runtime options.
"dalvik.vm.usejit" -> "-Xusejit:"
"dalvik.vm.jitcodecachesize" -> "-Xjitcodecachesize:"
"dalvik.vm.jitthreshold" -> "-Xjitthreshold:"

Bug: 17950037
Change-Id: I4996cdd1e34a1743d83c37069f545e6e09bccdb9
2015-03-05 17:02:54 -08:00
Andreas Gampe
f9345e93db Frameworks/base: Add removeAll for ArraySet
Add a simple ArraySet.removeAll(ArraySet) method. This avoids two
allocations, a MapCollections helper and an Iterator object, over
the removeAll(Collection) code.

KeySetManagerService heavily calls removeAll during boot (about 9K
times in AOSP). This reduces GC stress and optimizes the removal
(about half the time the removed collection has only one element).
The removal method in KeySetManagerService is also done under a lock,
so that it gates parallelization efforts in PackageManagerService.

Bug: 19498314
Change-Id: Ib0e483adfd09831cd66ab19a820ebf6544a2b66f
2015-03-04 17:14:10 -08:00
Mark Salyzyn
ca50cd2114 jni: Add paranoia regarding android_logger_list_read
Change-Id: Ic52be201ec7efaef6a385aaf8ea523554aa06f22
2015-02-26 14:49:17 -08:00
Narayan Kamath
8cba382f04 Merge "Bad month value in DatePicker in Calendar Mode" 2015-02-26 17:42:24 +00:00
You Kim
49e6c4adbf Bad month value in DatePicker in Calendar Mode
Calendar MONTH field is zero based. Use predefined month.

Change-Id: I957bf385dc8e877e8698dacad68808f4d9d8a6d0
2015-02-26 19:06:16 +09:00
Dan Albert
b78cce6f92 Merge "Update autogenerated gl functions." 2015-02-25 22:50:25 +00:00
Mark Salyzyn
18998c9852 jni: switch to ANDROID_LOG_* mode flags
Change-Id: I8aea5bf4faf79a96fa8485f7707e7484cd11d7a3
2015-02-25 18:07:21 +00:00
Narayan Kamath
6e208cddad Merge "Remove wrong javadoc comment" 2015-02-24 10:04:33 +00:00
Chad Brubaker
598f9b2a19 Merge "Add Keymaster 0.4 binder API" 2015-02-23 22:20:39 +00:00
Chad Brubaker
45ff13ea28 Add Keymaster 0.4 binder API
This adds the classes for creating and serializing arguments and results
from keymaster as well as the enum values from
hardware/libhardware/include/hardware/keymaster_defs.h which will be
needed for argument creation as well as converting keymaster error
codes into Java exceptions.

Change-Id: I61046756361d43d9f02eea370c2cbd07c3638ea3
2015-02-23 14:12:37 -08:00
Dan Albert
10caf0390d Update autogenerated gl functions.
Corresponding frameworks/native change:
https://android-review.googlesource.com/#/c/134491/

Since this fixes the int-to-pointer cast issues, stop ignoring that
warning.

Change-Id: I85134dc151ba368e4619e36125264b2b3f104202
2015-02-23 10:47:19 -08:00
Valter Strods
7014b26c3e Clean up Javadocs for UEventObserver
This commit removes a couple of apostrophes from the word "UEvents" as
the apostrophes would only be needed if something that belongs to the
UEvent was being talked about. Instead, the UEvents are being talked
about themselves - as a bunch.

Change-Id: I6a7908c6b73c0739102b632d2499e0f1e3c2d47f
2015-02-23 10:48:32 +00:00
Narayan Kamath
0a7936b7c5 Merge "Fix a couple of issues with system_server forking." 2015-02-19 10:17:32 +00:00
Robert Greenwalt
e460f88d37 Merge "Support single PDP network for Unite operator of Moldova" 2015-02-19 00:39:22 +00:00
Piotr Jastrzebski
e7e9238180 Merge "Register DDM handlers at the beginning of main method." 2015-02-16 12:47:08 +00:00
Yohei Yukawa
efd9abb7df Merge "Prevent duplicated registration of OnComputeInternalInsetsListener" 2015-02-14 15:08:07 +00:00
Narayan Kamath
b6b044ae82 Fix a couple of issues with system_server forking.
- Remove the obsolete --runtime-init arg. its prescence
  was preventing other arguments from being parsed.

- Be stricter about unparsed args - throw if we see arguments
  we don't expect. This was already implemented but broken
  (probably implemented by a crap programmer).

bug: 19378905
Change-Id: Id8b6158db7ef6368dd13ae61f591cdf2b278dfd1
2015-02-13 17:45:06 +00:00
Piotr Jastrzebski
da74a628f5 Register DDM handlers at the beginning of main method.
Compiler initializes RuntimeInit during compilation and stores an
initialized version of the class in oat file. Same thing happens to
DdmServer which handles DDM packets in JDWP thread started during JVM
creation. This means that after the creation of JVM all
DDM packets are handled by DdmServer.dispatch and since it's already
initialized during compilation it has all framework related handlers
already registered. If a packet arrives before AndroidRuntime.startReg
is called then framework native methods are not yet registered and the
processing of the packet fails with UnsatisfiedLinkError.

To fix this problem the registration of framework related DDM handlers
is moved to the beginning of ZygoteInit.main and RuntimeInit.main. This
means that the handlers won't be registered until main method is called
and that's guaranteed to be after AndroidRuntime.startReg is called. It
also guarantees that DDM packets will be properly handled as soon as
Java code is executed.

Bug: 18081539.
Change-Id: I9c674f53f3f62d58c46886e0b60698182e08f0c3
2015-02-13 13:32:25 +00:00
Jeff Brown
ec403e8f47 Merge "Call startInput on return from sleep mode" 2015-02-13 02:00:02 +00:00
Neil Fuller
a8e8cdbb17 Merge "Remove usages of FloatMath" 2015-02-12 09:26:47 +00:00
Neil Fuller
e573aa9371 Remove usages of FloatMath
Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: Iec8fb663ed54eb967050f6ff25a36ba534204c4d
2015-02-12 09:20:31 +00:00
Tao Bao
67bfa0b083 Use ICU for relative time formatting
Rewrite the DateUtils' relative time formatting APIs
(getRelativeTimeSpanString, getRelativeDateTimeString) to use ICU ones.
Two APIs that take withPreposition parameter are not changed. Because
(a) ICU doesn't provide functionality to format preposition; (b) They
are not really computing relative time but instead calling
formatDateRange() to get the absolute time/date string.

Bug: 19146457
Bug: 5252772
Change-Id: Iea8d699d63cc4438513910da66d038912e44fb8d
2015-02-11 17:50:21 -08:00
Alex Klyubin
b9f8a5204a Move hidden ApplicationInfo flags into a separate field.
The public API field android.content.pm.ApplicationInfo.flags can
support only 32 flags. This limit has been reached. As a short term
workaround to enable new public flags to be added, this CL moves flags
which are not public API into a separate new field privateFlags and
renames the affected flags constants accordingly (e.g., FLAG_PRIVILEGED
is now PRIVATE_FLAG_PRIVILEGED).

The new privateFlags field is not public API and should not be used
for flags that are public API.

The flags that are moved out of ApplicationInfo.flags are:
* FLAG_HIDDEN,
* FLAG_CANT_SAVE_STATE,
* FLAG_FORWARD_LOCK, and
* FLAG_PRIVILEGED.

NOTE: This changes the format of packages.xml. Prior to this CL flags
were stored in the "flags" attribute. With this CL, the public flags
are stored in a new "publicFlags" attribute and private flags are
stored in a new "privateFlags" attribute. The old "flags" attribute
is interpreted by using the old values of hidden/private flags.

Change-Id: Ie23eb8ddd5129de3c6e008c5261b639e22182ee5
2015-02-11 11:06:40 -08:00
Pirama Arumuga Nainar
51772b7601 Store compiled code in Context.getCodeCacheDir()
bug 16345623

Use Context.getCodeCacheDir for EGL shader cache and RenderScript
compiled code.

Change-Id: I54c4e43674bd1f9342ae13059cb8899f4a3f4734
2015-02-10 13:17:30 -08:00
Calin Juravle
fd523efcde Merge "Get the instruction set that the libraries of secondary Abi is supported." 2015-02-10 16:13:30 +00:00
Neil Fuller
37e5a941ed Merge "Avoid static initialization of Layout from TextUtils" 2015-02-09 17:29:59 +00:00
Elliott Hughes
41ba04eed9 Remove obsolete 'numeric_date_template'.
The only caller was removed in f91f06a5991451e4af3cf99eba791cb3009810d2.

Bug: 18388178
Bug: 18322220
Change-Id: I222363186ad1b9e25c8d8bf0f3928e42cf9bd275
2015-02-06 18:18:06 -08:00
Neil Fuller
d950ad034c Avoid static initialization of Layout from TextUtils
This works around a bug in standalone (e.g. non-Zygote)
runtimes when a device is attached to a host that is running
DDM.

There is a race condition:

When the runtime receives a HELLO from DDM it calls
TextUtils.isEmpty().

Calling any TextUtils methods statically initializes
Layout. Layout has dependencies on other classes, which in
turn have dependencies on native methods that are not always
registered when the call takes place. Registration and DDM
handling are done in separate threads.

This is not a fix, merely a workaround until the race can
be resolved.

Bug: 18081539
(cherry-picked from commit d29bdb266d54b4551f42776bb790e80147a279d0)

Change-Id: Id0d8578eab9e59d479a7c1b2e7ea1890ac0c8de6
2015-02-06 17:34:37 +00:00
Lorenzo Colitti
21702263d9 Merge "Add a unit test for StaticIpConfiguration." 2015-02-05 00:21:57 +00:00
Christopher Ferris
7254c123a1 Fix comment according to review.
Change-Id: I784f2051cd173425e9a9570ac4555cf835dd277d
2015-02-04 10:40:12 -08:00
Lorenzo Colitti
83faf72f84 Add a unit test for StaticIpConfiguration.
Change-Id: I68c735def8a242da0c8f95b7c5ea680ed902dab7
2015-02-04 17:28:35 +09:00
Robert Greenwalt
deef702e60 Merge "Deutsche Telekom VVM free SMS shortcodes DE" 2015-02-03 16:44:02 +00:00
Lorenzo Colitti
c565a5675a Merge "Also include the domain when parceling StaticIpConfiguration." 2015-01-30 07:07:49 +00:00
Lorenzo Colitti
fba459d345 Merge "Fix DhcpResults.setDomain() and StaticIpConfiguration.toLinkProperties()" 2015-01-30 07:00:38 +00:00
Christopher Ferris
e32df45fe1 Fix wrap property creation when truncating.
If a property name gets truncated, make sure it doesn't end in a '.'
since that makes the name illegal.

Bug: 19196358
Bug: https://code.google.com/p/android/issues/detail?id=82947
Change-Id: Icc1a26593237ca19ad0ebd776a60b3d6290bb355
2015-01-29 12:20:06 -08:00
Lorenzo Colitti
d0cc544039 Also include the domain when parceling StaticIpConfiguration.
StaticIpConfiguration objects are parceled at least as part of the
IpConfiguration objects that are passed to IEthernetManager when an
application sets static IP configuration on Ethernet.

Change-Id: I49991e2f591cc6cf01b503c18eb343b5929efe29
2015-01-29 12:20:55 +00:00
Paul Jensen
b3b70975d9 Fix DhcpResults.setDomain() and StaticIpConfiguration.toLinkProperties()
setDomain() and toLinkProperties() were not setting the domains.
The setDomain() bug affected Wifi and I believe the toLinkProperties()
bug affected Ethernet and Bluetooth reverse-tethering.

(cherry picked from commit c53113b37f33c7ed19660c8ec5bfd578e8bb5409)

bug:18252947
Change-Id: I6235fcd6b875aee516efbb5f880db1a99380355b
2015-01-29 17:12:35 +09:00
Lorenzo Colitti
8316b819b2 Support connecting to networks with misconfigured subnet masks.
In K and earlier, we would connect to a network where the gateway
was not covered by the subnet mask of the IP address. This is an
invalid configuration, but it used to work, and other OSes appear
to accept it too, so support it.

Bug: 19067207

(cherry picked from commit 2dfb79a54adeb4bcf1f62332a9db467fce302ced)

Change-Id: I80088f291466dbd5a47f360dcc1620acee5cf57e
2015-01-28 20:36:37 +09:00
Mikael Gullstrand
82ae3ff4cf Call startInput on return from sleep mode
One manifestation of the problem was that input string disappeared when
returning from sleep mode. When editing a TextView with an IME in
landscape orientation, the text would disappear when returning from
sleep mode. The InputMethodManager would be deactivated when the screen
was put into sleep mode as well as the input connection. However when
returning from sleep mode the InputMethodManager was activated, but the
input connection would not be activated again.

The solution is to check focus of the InputMethodManager
which will create a new active input connection to use.

The change is however not specific to this one problem but fundamentally
addresses the issue of lack of startInput on return from sleep mode.

Change-Id: I95d05110bc1cf310fad23ea1bcbc5890f642d1fc
2015-01-26 10:03:21 +00:00
Narayan Kamath
d30dbb8ae1 Add support for persist.sys.locale.
AndroidRuntime has been changed to read "ro.product.locale" and
"persist.sys.locale" instead of "ro.product.locale.language" etc.
This is passed down as "-Duser.locale" to the runtime.

The system_server has been changed to write out persist.sys.locale
on locale changes.

bug: 17691569

Change-Id: I93360c8795c9620a133656dc491d13d7b6ed162e
2015-01-22 13:48:20 +00:00
Narayan Kamath
aa87e89e81 Merge "Choose the right executable for wrapped applications." 2015-01-21 14:01:57 +00:00
Ying Wang
b643624d2f New trick to install bad dex file.
Previously we use LOCAL_JAVA_RESOURCE_FILES to override the normally
generated classes.dex with a bad dex file.
Now as we have moved Java resource processing before running jarjar, dx
would fail for the bad classes.dex inside the classes.jar.
Instead we override the target specific variable PRIVATE_DEX_FILE to
inject the bad dex file.

(cherry-picked from commit f122d90c290c789e0d0085127beebdcf1935c127)

Bug: 18837479
Change-Id: I73f82c8a15e1d8935d9c2f290ba9456184a56ec7
2015-01-20 12:15:17 -08:00
Neil Fuller
42c2ac00e6 Merge "Fix for broken docs build." 2015-01-20 15:18:59 +00:00
Neil Fuller
ae69120b0f Fix for broken docs build.
Broken by commit 50a01d89606b40dd151ad407d05c3b2867bbdbad

Change-Id: Iab460aa6254d320349f67e747f763bbf06d3e9e7
2015-01-20 15:17:04 +00:00
Neil Fuller
00502e8960 Merge "Changes associated with an OkHttp upgrade" 2015-01-20 12:50:48 +00:00
Neil Fuller
50a01d8960 Changes associated with an OkHttp upgrade
Change-Id: I2a4db602aa7ffdef886e0f1a955715a2551a87a5
2015-01-20 11:59:24 +00:00