59783 Commits

Author SHA1 Message Date
Yohei Yukawa
efd9abb7df Merge "Prevent duplicated registration of OnComputeInternalInsetsListener" 2015-02-14 15:08:07 +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
Narayan Kamath
37ad4b0242 Choose the right executable for wrapped applications.
64 bit zygotes should exec app_process64, whereas 32 bit
zygotes should exec app_process32.

Change-Id: I63b56400e0478cd2bb206c98da6858be558f0525
2015-01-19 16:09:17 +00:00
Narayan Kamath
f48029f00a Remove support for --classpath and make --runtime-init the default.
--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
2015-01-19 15:04:58 +00:00
Narayan Kamath
6ac7e67168 Fix handling of wrapped processes [part 1].
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
2015-01-19 14:17:49 +00:00
Narayan Kamath
23e68780be Fix handling of wrapped processes [part 2]
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
2015-01-16 17:40:35 +00:00
Narayan Kamath
e5515772af Fix a property name that's longer than 31 chars.
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
2015-01-16 14:04:56 +00:00
Neil Fuller
f9c04f1788 Merge "Removing HttpResponseCacheTest" 2015-01-16 10:19:28 +00:00
Jeff Sharkey
f24e490058 Merge "Offer to detect non-SSL/TLS network traffic." 2015-01-16 01:11:27 +00:00
Jeff Sharkey
605eb79c95 Offer to detect non-SSL/TLS network traffic.
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
2015-01-15 15:59:03 -08:00
Neil Fuller
60cf05c1b3 Removing HttpResponseCacheTest
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
2015-01-15 16:00:42 +00:00
Chad Brubaker
aa7a646eeb Merge "Generate IKeystoreService using aidl" 2015-01-14 20:31:29 +00:00
Chad Brubaker
7a2c973db7 Generate IKeystoreService using aidl
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
2015-01-13 18:29:15 -08:00
Craig Mautner
66b4d48469 Merge "Prevent system server dump stuck by pipe buffer full." 2015-01-13 04:08:05 +00:00
Neil Fuller
837261cc99 Merge "Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade." 2015-01-12 14:50:36 +00:00
Olawale Ogunwale
ebdfb6e864 Merge "[ActivityManager] Distinguish FG or BG receiver finished" 2015-01-12 13:45:13 +00:00
Neil Fuller
62d0677b0f Fix HttpResponseCacheTest in anticipation of an OkHttp upgrade.
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
2015-01-09 11:50:50 +00:00
Mathieu Chartier
9a6c45eedd Merge "Call VMRuntime.clampGrowthLimit for small heap apps" 2015-01-09 00:17:16 +00:00
Mathieu Chartier
24cee07160 Call VMRuntime.clampGrowthLimit for small heap apps
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
2015-01-08 14:42:20 -08:00
Jeff Sharkey
dbcb4a16d4 Merge "check ntpserver as empty string instead of null" 2015-01-08 00:57:43 +00:00
Young-Ho Cha
0eda7dfcac check ntpserver as empty string instead of null
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>
2015-01-08 09:34:01 +09:00
Andreas Gampe
022b1ba188 Merge "Core/jni: Disallow relocation for decryption" 2015-01-07 22:05:12 +00:00
neo.chae
155118fee8 Core/jni: Disallow relocation for decryption
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>
2015-01-07 13:28:36 -08:00