94982 Commits

Author SHA1 Message Date
Dianne Hackborn
6b96e2f000 Merge "Two REMOVE_PROVIDER messages caused by race condition." 2013-03-27 00:17:41 +00:00
Guobin Zhang
9e3e526650 Two REMOVE_PROVIDER messages caused by race condition.
Fix a bug in unstable ContentProvider.
IllegalStateException: ref counts can't go to zero here: stable=0 unstable=0
IllegalStateException: unstable count < 0: -1

There is a race between main thread and background database thread. Main thread
is responsible for handling the REMOVE_PROVIDER message. Database thread starts
insert or query request again and again. acquireProvider in db thread will often
snatch provider from the jaws of death, sometime it fails to remove REMOVE_PROVIDER
which is already fired out from MessageQueue. But completeRemoveProvider in main
thread gets suspended when trying to execute the critical section. If db thread
released the provider before main thread resumes the execution, then two
REMOVE_PROVIDER messages will be executed.

Change-Id: I8588aa1d1a8bc444dcd2adf6f8bc3f055cebbdc4
Signed-off-by: Guobin Zhang <guobin.zhang@intel.com>
2013-03-27 00:17:27 +00:00
Elliott Hughes
083bfa5a4c Merge "Remove dead DateUtils code that was never in an API level." 2013-03-26 22:25:22 +00:00
Elliott Hughes
fbf37c79bd Remove dead DateUtils code that was never in an API level.
Also rewrite @deprecated comments to use an initial capital so they
look right in the generated documentation.

Also improve formatIpAddress documentation.

Change-Id: I317ebe411ef76e16a4535318ce73e00b63af38da
2013-03-26 15:11:28 -07:00
Elliott Hughes
6c75deb505 Merge "Remove the fixed-length buffer in DdmHandleNativeHeap.getLeakInfo." 2013-03-26 21:39:51 +00:00
Elliott Hughes
a480dafbf2 Remove the fixed-length buffer in DdmHandleNativeHeap.getLeakInfo.
It was possible to overrun this buffer, and even if you did fill
the buffer in a single read and exit the loop, the "string" still
wouldn't be terminated.

Bug: 8468088
Change-Id: Ia19f4d26dfd79e7b63807a7ec9540b932163d246
2013-03-26 13:18:52 -07:00
Geremy Condra
2aee33c1cd Merge "BackupManagerService files need new security labeling." 2013-03-26 05:10:38 +00:00
Geremy Condra
48718c85b4 Merge "Proper security labeling of multi-user data directories." 2013-03-25 21:17:46 +00:00
Geremy Condra
4bcea1222c Merge "Add seinfo parsing to PackageManagerService." 2013-03-25 21:07:37 +00:00
rpcraig
1e0c8e6989 Proper security labeling of multi-user data directories.
This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.

Change-Id: Iacaba6d9d18d5337e65713960d14efe32006b330
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 14:35:00 +00:00
Robert Craig
d3f8d0333c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 06:33:03 -04:00
Kenny Root
f6c4dba2d3 Merge "KeyStore: change migrate to duplicate" 2013-03-21 21:56:54 +00:00
Kenny Root
5f1d965f7d KeyStore: change migrate to duplicate
After discussion, it was determined that duplicate would be less
disruptive and it still fit in the current HAL model.

Change-Id: I2f9cae48d38ec7146511e876450fa39fc92cda55
2013-03-21 14:24:19 -07:00
Wink Saville
e4679750c5 Merge "Fix Watchdog HeartbeatHandler to run on correct thread" 2013-03-21 04:49:28 +00:00
Kenny Root
20345bd81b Merge "Update SELinux JNI to use helpers" 2013-03-20 22:26:03 +00:00
Kenny Root
cd19e3f2db Update SELinux JNI to use helpers
Change-Id: Ifc707eafd1ecbba64c93fa2250c4334d0ce40005
2013-03-20 15:24:25 -07:00
Kenny Root
424570273b Merge changes I65f7a915,I32098dc0
* changes:
  KeyStore: add "migrate" command
  KeyStore: add API to uid versions
2013-03-20 22:00:10 +00:00
Kenny Root
bd79419ef8 KeyStore: add "migrate" command
To support the WiFi service, we need to support migration from the
system UID to the wifi UID. This adds a command to achieve the
migration.

Bug: 8122243
Change-Id: I65f7a91504c1d2a2aac22b9c3051adffd28d66c1
2013-03-20 11:57:46 -07:00
Kenny Root
78ad849163 KeyStore: add API to uid versions
In previous commits, we added the ability to specify which UID we want to
target on certain operations. This commit adds the ability to reach those
binder calls from the KeyStore class.

Also fix a problem where saw() was not reading all the values returned via
the Binder call. This changes the semantics to return a null instead of
failing silently when it's not possible to search.

Change-Id: I32098dc0eb42e09ace89f6b7455766842a72e9f4
2013-03-20 16:50:06 +00:00
John Michelau
116415271b Fix Watchdog HeartbeatHandler to run on correct thread
The HeartbeatHandler for the System Server Watchdog has been running
on the wrong thread due to a race condition in initialization.  It's
designed to run on ServerThread, so that it can catch lockups in the
main looper of the System Server.  It has been running on
ActivityManagerThread instead, so it does not detect lockups on the
ServerThread as it should.

ActivityManagerService is calling Watchdog.getInstance() before
ServerThread calls Watchdog.getInstance().init(), so the handler is
being bound to the ActivityManagerThread instead of the ServerThread.

Explicitly bind HeartbeatHandler to ServerThread, so that the Watchdog
catches lockups on this critical thread.

Change-Id: Iccb184ac3adb817feb86ed4ee0e50e443bf74636
2013-03-19 14:39:33 -05:00
Elliott Hughes
ebebb80b4a Merge "Remove dead code from DateUtils." 2013-03-19 18:45:54 +00:00
Elliott Hughes
9a6fa1d637 Remove dead code from DateUtils.
This stuff is @hide, @deprecated, unused, and was never in any API level.

Change-Id: I87d132d77d7296a2de8527e05c2def362cab1c37
2013-03-19 11:36:12 -07:00
Elliott Hughes
71558f1faf Merge "Fix times in debugging output to use H rather than k." 2013-03-19 16:50:39 +00:00
Elliott Hughes
e79af7dffb Merge "Fix build." 2013-03-19 01:11:02 +00:00
Elliott Hughes
0a65ac90fa Fix build.
Change-Id: Icb7fb60f00251ab01c8f9844572bb349e45c6c41
2013-03-18 18:10:24 -07:00
Elliott Hughes
64a277d837 Fix times in debugging output to use H rather than k.
Bug: 8359981
Change-Id: I4fccf3ed7e469b77f6e755dacbcd025005390505
2013-03-18 17:47:22 -07:00
Elliott Hughes
a8974d3f0a Merge "Clean up (some of) our many clocks to use H instead of k." 2013-03-19 00:28:42 +00:00
Elliott Hughes
cdafd37f31 Clean up (some of) our many clocks to use H instead of k.
Bug: 8359981
Change-Id: I3c0c38c2bf5adc4b5bdc11c3d10cf41dd8fb6462
2013-03-18 17:21:33 -07:00
Elliott Hughes
6317315e73 Merge "Deliberately break DateFormat.format's formatting of 'k' for compatibility." 2013-03-18 22:07:22 +00:00
Elliott Hughes
fc55c2ba49 Deliberately break DateFormat.format's formatting of 'k' for compatibility.
Bug: 8359981
Change-Id: I44ed816c644f94783c77952d544c5444b966868b
2013-03-18 14:59:59 -07:00
Craig Mautner
fda1bff8a8 Merge "Correct the target app token for input method window" 2013-03-18 15:56:48 +00:00
Carrie Xu
5c97184c3a Correct the target app token for input method window
The root cause is:
There is a defect in window manager service: When a new
activity that can be ime target is added into window manager
but the Z order of input method window don't need to be
changed, then the target app token of input method window
would not be updated to new one. This defect may cause that
the layer of input method window is calculated incorrectly.

The solution:
Correct the target app token for input method window.

Change-Id: I008311e3c9b1cf5fc320b614d8675c183c506d50
2013-03-18 11:45:14 +09:00
Robert Greenwalt
519ba7b10c Merge "update APN version for MVNO" 2013-03-16 00:18:52 +00:00
Nick Kralevich
38bfb5a7bf Merge "app_process: don't pollute the environment" 2013-03-15 20:55:53 +00:00
Nick Kralevich
9a9350550a app_process: don't pollute the environment
Give a hoot — don't pollute!

Change-Id: I30d6c05cecab483f0e9d8063907f7bc0ef2bb104
2013-03-15 13:14:52 -07:00
Nick Kralevich
f7ec4e61eb Merge "Never call app_main more than once" 2013-03-15 19:08:50 +00:00
Nick Kralevich
1fe21bd1b6 Never call app_main more than once
Different kernels seem to handle ADDR_COMPAT_LAYOUT differently,
sometimes passing it to its children, sometimes not. If it's not
passed to its child successfully, we can end up in a restart loop.

Instead of testing for the presence of ADDR_COMPAT_LAYOUT, use an
environment variable instead, which is handled more predictably.

Bug: 8392487
Change-Id: Ia531dd2abb4e1cd46f3430d844e644f53581f530
2013-03-15 11:59:03 -07:00
Nick Kralevich
1ae6ae2094 Merge "Don't use ADDR_COMPAT_LAYOUT on the emulator" 2013-03-14 23:46:20 +00:00
Nick Kralevich
5fa1ee779e Don't use ADDR_COMPAT_LAYOUT on the emulator
For the emulator, we want people to see memory as it
actually is, not how we're hacking around buggy apps. Don't
set ADDR_COMPAT_LAYOUT on the emulator.

For reasons that I don't understand, personality(ADDR_COMPAT_LAYOUT)
does not persist across an exec on the emulator. app_main gets
into a tight loop restarting itself because of this. This change
also works around that bug.

Change-Id: Ia73a7d2d623c25cf39d248145d97307945d554da
2013-03-14 16:31:34 -07:00
Nick Kralevich
f732108e86 Merge "Respawn app_main if ADDR_COMPAT_LAYOUT is not set" 2013-03-14 22:28:01 +00:00
Nick Kralevich
8a0a929422 Respawn app_main if ADDR_COMPAT_LAYOUT is not set
Bug: 8358800
Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
2013-03-14 15:21:12 -07:00
John Reck
733329a274 Merge "Fix NPE when pasting non-text from Clipboard" 2013-03-12 20:24:14 +00:00
Kenny Root
7ad514094c Merge "Switch TLS Channel ID API from ECPrivateKey to PrivateKey." 2013-03-12 20:05:09 +00:00
Daniel Sandler
1bc1699c31 Merge ""[+>" more icon was never shown in PhoneStatusBar" 2013-03-12 19:51:32 +00:00
Mats H Carlsson
cd231432ff "[+>" more icon was never shown in PhoneStatusBar
"[+>" more icon was never show in status bar because
the member variable for this icon was not initialized
from resources. This fix enables "[+>" icon to appear
in status bar when the number of indications in status
bar becomes large.

Bug: 8368569
Change-Id: Ieb3412eed831052d69c0cf63c9b4230c38171e4a
2013-03-12 19:51:07 +00:00
Alex Klyubin
ac5eb03a7c Switch TLS Channel ID API from ECPrivateKey to PrivateKey.
This is to accept both the "transparent" and "opaque" ECC private
keys. "Transparent" keys provide structured access to their key
material -- these are instances of ECPrivateKey. "Opaque" private
keys are not required to provide structured (or even any) access to
their key material -- these are instances of PrivateKey.

Change-Id: Ib22e18b45b638b429f994ed965416c753226c4ee
2013-03-12 10:33:13 -07:00
Nils Holmström
df337f30e9 Fix NPE when pasting non-text from Clipboard
When copying a link from a bookmark and then pasting it into
a textfield a NullPointerException will occur.
A ClipData.Item is not guaranteed to always contain a text string
and therefore getText() can be set to null.

Using method coerceToText() instead of getText() makes sure that
a text string is always returned.

Change-Id: I81343c0371835a3a7a52045dcd1760e69e59a967
2013-03-12 20:49:14 +09:00
Elliott Hughes
c9e0cd2ac7 Merge "Fix DateFormat k and h, and implement K and H for the first time." 2013-03-11 22:03:18 +00:00
Elliott Hughes
7a89f62877 Fix DateFormat k and h, and implement K and H for the first time.
Bug: 8359981
Change-Id: I52ef937a77e9e28f2719c2ee6f59e4b74514f0b2
2013-03-11 14:49:44 -07:00
Elliott Hughes
21d3f29483 Merge "use Calendar in DateUtils format method" 2013-03-11 20:11:20 +00:00