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
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
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
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
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
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
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
- 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
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
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
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
The only caller was removed in f91f06a5991451e4af3cf99eba791cb3009810d2.
Bug: 18388178
Bug: 18322220
Change-Id: I222363186ad1b9e25c8d8bf0f3928e42cf9bd275
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
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
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
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
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
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
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
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