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
--classpath hasn't been properly supported or used for as long as
git history exists, and the non --runtime-init classpath is useless
without it.
Also, forking and exec' a bare dalvikvm instance from the zygote seems
somewhat pointless since we might as well just execute it directly.
Change-Id: Ib07d822d448e7b431d7564381f9cd11735fd1113
Change 3fe595108f47fffd changed our pipe creation to CLOEXEC,
which doesn't work so well for wrapper processes that call exec.
Sending down the PID pre-exec won't work so well because wrappers
are arbitrary and might fork themselves before finally starting
the child application process.
Change-Id: I065f0f2150dc1ff04d2b2e8b25f06b4c754809b9
Drop privileges only if we're root. Zygote.preloadClasses can
be called from a non-root uid / gid in the case of wrapped classes,
so we shouldn't die from the resulting EPERM.
Change-Id: Ie3fbe50a17ec49bcbcb875c3a2ee1e1a3a62e88d
The name wasn't chosen without much thought and is intended
to be a temporary fix to keep devices booting while a better
name is decided upon.
bug: 18335678
Change-Id: Ic3451255d870f3395cfbcaa08a7764d93defc350
Introduces new module that provides network-related features for
the StrictMode developer API. The first feature offers to detect
sockets sending data not wrapped inside a layer of SSL/TLS
encryption.
When a developer enables, we ask netd to watch all outgoing traffic
from our UID, and penalize us accordingly if cleartext sockets are
detected. When enabled, netd captures the offending packet and
passes it back to the owning process to aid investigations. When
death penalty is requested, all future traffic on the socket is
blocked, which usually results in a useful stacktrace before the
app is actually killed.
Bug: 18335678
Change-Id: I3adbc974efd8d3766b4b1a23257563bb82d53c29
Moving HttpResponseCacheTest.java from
frameworks/base/core/tests/coretests/src/android/net/http
to
cts/tests/tests/net/src/android/net/http/cts
Change-Id: I61a07c53f8d0ef55d35b928f244e4680725b76ef
This replaces IKeystoreService.java with IKeystoreService.aidl and
changes the methods that passed down a byte[][] to instead pass down a
KeystoreArguments which is currently a thin parcelable wrapper around a byte[][].
Change-Id: I6367bcf57562f41a27aab14f1903b74995cb65c2
OkHttp recently changed the behavior of their caching with
commit e74e3f3bf744ef7f4d8ee724a7cf2347e486cfab - it is now
neccessary to close the inputstream (or disconnect the
HttpURLConnection) for a response to be cached.
This change is (effectively) a no-op prior to the upgrade.
The behavior is undefined as to whether closing the
input stream is required for caching. OkHttp's new behavior
is consistent with other HttpURLConnection implementations
tried.
Change-Id: Iaf57371651296ac84850971ef60a9338cead57c0
If the manifest doesn't specify large heaps, we now call
VMRuntime.clampGrowthLimit to release heap virtual address space
which won't ever get used.
Bug: 18387825
Bug: 17131630
Change-Id: I61fdcd70c70234256637eeebefe3abb22b91095d
mServer cannot set null, because string from resource always returns
non-null charsequence
Change-Id: I8d6a6fdbc34267ee361e7bd20719887268161870
Signed-off-by: Young-Ho Cha <ganadist@gmail.com>
When decrypting a device, a tmpfs is temporarily mounted as /data,
the size of which is usually small. When the zygote, system server
and necessary apps are brought up, they will be compiled into the
tmpfs.
If the system image contains prebuilts, they will be relocated instead
of compiled. This is unnecessary. In this special situation it is
acceptable to run out of the prebuilt oat files without relocation,
which can save space in the tmpfs.
This patch ensures that the boot image is not being relocated.
Change-Id: I42bfb7e3039574b7e4f2772e0d395f093d59ed1b
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>