120383 Commits

Author SHA1 Message Date
Narayan Kamath
104da1e495 Merge "Fix broken assumptions in LocalePicker." 2014-07-01 17:57:26 +00:00
Narayan Kamath
3fa99ec77e Merge "Remove bogus 2 char limit for locales and countries." 2014-07-01 17:52:00 +00:00
Narayan Kamath
6e84f8c1b9 Merge "Fix native crashes when APKs can't be opened." 2014-07-01 17:48:27 +00:00
Narayan Kamath
f56399f6ab Merge "Fall back to "tl" if "fil" is absent." 2014-07-01 17:48:27 +00:00
Narayan Kamath
e4345dbd2a Fall back to "tl" if "fil" is absent.
For JB-MR1, there was a hack that used "tl" where
we really meant "fil" because ICU didn't have localizations
for "fil". This has now been fixed, and we now support 3 letter
language codes for AAPT so we can use "fil" where required.

For the benefit of apps that need to target older platforms,
we fall back to "tl" if the app has assets for "tl" and the
resource locale is "fil".

See bugs 7291355, 7207176 and 8049507 for more context.

Change-Id: I1ac8502525f99b40f9091d5efd2df33518d47a41
2014-07-02 10:53:43 +01:00
Brian Carlstrom
a6e06889fc Merge "Add profiler type options" 2014-07-01 14:58:13 +00:00
Nick Kralevich
9b1a7d4570 Merge "Allow different SELinux policies for third party apps." 2014-07-01 19:16:01 +00:00
Robert Craig
83b54ecab7 Allow different SELinux policies for third party apps.
Prior support forced all third party apps
to be resolved against the default stanza
of the mac_permissions.xml file when assigning
seinfo labels. This meant that all third party
apps, in effect, were untrusted regardless of
cert and therefore received the same selinux domain.
This also had the unfortunate side effect of forcing
certain third party apps into the wrong domains
because of shared userid requests among apps.

This patch removes that restriction and instead
allows all apps, regardless of location, to be
matched against the full mac_permissions.xml
policy file. This then allows all apps signed
with known good certs to receive the same selinux
domains of other apps with whom they share trust.

Change-Id: Iba569c046135c0e81140faf6296c5da26a243037
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2014-07-01 13:53:11 -07:00
Marco Nelissen
db816cef0d Merge "Make sure we clean up" 2014-07-01 14:59:07 +00:00
Narayan Kamath
37151b5032 Remove bogus 2 char limit for locales and countries.
Locale settings are persisted to system properties
and not to system settings, so the values read here
are used pretty much everywhere.

bug: 15873165
bug: 10090157

Change-Id: Ie7cda166439112c615afbd38253cf4fbb5791242
2014-07-01 13:50:18 +01:00
Narayan Kamath
b27c137087 Fix broken assumptions in LocalePicker.
This code assumed that the locale is always 5 chars in
length and was of the form xx-YY. This is not necessarily
true. The language can be 3 letters in length and the locale
might have a script and variant.

Also cleans up several nasty pieces of code and eliminates
unnecessary array copies and improves readability by using
idiomatic java.

bug: 15873165
bug: 10090157

Change-Id: Iab1cfd7b78e5772b1245654f2153caf63a96033d
2014-07-01 11:12:24 +01:00
Narayan Kamath
ec4516470d Fix native crashes when APKs can't be opened.
There was lax / incomplete error checking around the
construction of Apk handles. This change changes the ApkHandle
API and makes it throw IOException if the zipfile couldn't
be opened.

Additionally :
- Fix a resource leak in DefaultContainerService
- Report errors correctly during package moves.

bug: 15563874
Change-Id: Ic71a10709eb82b8f53405bbfb2320e80aa96b771
2014-06-30 17:14:29 +01:00
Narayan Kamath
1dc550fa73 Merge "Fix packing of values at offset 16." 2014-06-26 21:28:22 +00:00
Narayan Kamath
b297591622 Fix packing of values at offset 16.
Our bitmask for setting the highest bit to 0 for
0b11100000 (0xef) instead of 0b01111111 (0x7f) so
we would end up setting bit 5 of each offset to
zero. Fix this and expand test coverage by adding
a fake language (tgp) that has this bit set in both
its bytes.

This issue was discovered while adding CTS tests for
"tgl".

Change-Id: Ibb6de03000951c907c252049771039ab7466187a
2014-06-30 16:20:27 +01:00
Jason Sams
7165bd6d74 Merge "Add check and throw for failed Intrinsic init." 2014-06-25 17:35:00 +00:00
Wei Jin
54fc18b925 Add profiler type options
This is related to the CL that adds a new type of profile data.

Change-Id: I3e4e502da8e1b0dd9b32ddcbc5d11eca0d1ba2e5
2014-06-24 12:16:55 -07:00
Stephen Hines
924ed1fae1 Merge "Switch from size_t -> uint32_t for dimensions array." 2014-06-24 07:39:41 +00:00
Stephen Hines
bc5d3eeedc Switch from size_t -> uint32_t for dimensions array.
Change-Id: I159586e98dd47be9b9f5db0f3e27d1072533134c
2014-06-25 00:03:39 -07:00
Narayan Kamath
71dfc7e9ac Merge "Memory leak in parsePackage" 2014-06-24 06:22:45 +00:00
Narayan Kamath
2a0f9e6a52 Merge "Explicitly list out the list of cache subdirs to prune." 2014-06-24 06:33:30 +00:00
Narayan Kamath
989ab6d38d Merge "Update javadoc for android.os.Bundle." 2014-06-24 06:22:45 +00:00
Stephen Hines
44023a4f20 Merge "We need to update mPos when we copy a FieldPacker via its data[] member." 2014-06-24 00:37:45 +00:00
Stephen Hines
fcb3161e57 We need to update mPos when we copy a FieldPacker via its data[] member.
Bug: 15756600

This change also adds a TODO/FIXME related to subAlign() and our tracking
mechanism for it. We need to further investigate how to make subAlign() work
properly if a user copies their FieldPacker.

Change-Id: I861e529abd11e378f7c73b510d7f418b940fe480
2014-06-23 17:35:04 -07:00
Jason Sams
1c8da1ccce Add check and throw for failed Intrinsic init.
Change-Id: Icd53b3edd8e887d3692e5815dc0c38cd68b7aeb1
2014-06-23 15:15:08 -07:00
Robert Greenwalt
0b57289678 Merge "DO NOT MERGE refactor wifi p2p's startDhcpServer function" 2014-06-23 21:56:07 +00:00
Jianzheng Zhou
78c8e7c8bf DO NOT MERGE refactor wifi p2p's startDhcpServer function
Add getTetheredDhcpRanges() interface and call it before calling
mNwService.startTethering() to update dhcp ranges. This will allow p2p app
to run well concurrently with other tethering app(e.g. usb tethering).

Change-Id: I5e8ffeb5d2d396f48b897cd9396f133e25ecca57
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
2014-06-23 21:02:45 +00:00
Marco Nelissen
0eee8ac275 Merge "Fix thumbnail bug" 2014-06-23 14:50:49 +00:00
Henrik Baard
5f7ce10c93 Memory leak in parsePackage
The method parsePackage failes to delete some resources
in case of failures.

Added delete of "package" in the cases that was previously
missed.

Change-Id: I183e9ec5864c5ed18bb48410ab41317cb3d96bda
2014-06-23 14:03:46 +02:00
Marco Nelissen
b416af13e7 Fix thumbnail bug
When there was no thumbnail for a given image, the getThumbNail() convenience
method could return a previously-returned thumbnail instead of null.

b/15771860
https://code.google.com/p/android/issues/detail?id=40714

Change-Id: Ibd18e048145bf347469f800afdf436247ea6b693
2014-06-20 14:10:00 -07:00
Calin Juravle
a06f5fa656 Merge "Fix the initialization of some profile properties" 2014-06-20 03:03:45 +00:00
Brian Carlstrom
0924ef6592 Merge "Treat missing package usage data as a separate case" 2014-06-21 03:13:40 +00:00
Craig Mautner
5957d6a889 Merge "Fix frontOfTask assignment." 2014-06-20 21:00:34 +00:00
Danny Baumann
ec4e780e5c Fix frontOfTask assignment.
If all activities of a given stack were finishing, no activity was
marked as front-of-task. This confused ActivityManager, so make sure
there's always exactly one activity marked as front-of-task.

Change-Id: I087cbe10280d4a60aa5ccfaefe24a223523fb3f2
2014-06-23 08:43:37 +02:00
Brian Carlstrom
0547ce55eb Treat missing package usage data as a separate case
Bug: 15520936
Change-Id: I8e1c6921973f84af7ee94de91721cc4a3436ebaf
2014-06-20 12:53:19 -07:00
Dan Albert
d24f557798 Merge "Use openssl's SHA1 instead of bionic's." 2014-06-20 02:09:57 +00:00
Elliott Hughes
f18961066b Merge "Fixed VM memory leak in AudioSystem JNI interface" 2014-06-20 02:09:57 +00:00
Calin Juravle
e279cd6d21 Fix the initialization of some profile properties
Change-Id: I959cb53f262cfb9d1621e4cd99bec05514f7f11f
2014-06-19 18:51:47 +01:00
Narayan Kamath
ca2197b045 Update javadoc for android.os.Bundle.
Call out the fact that defaultValue is returned if a null
mapping exists for a given key.

bug: https://code.google.com/p/android/issues/detail?id=68453
Change-Id: Ifa6e94c1dee47809f70cadcb668cb98cb8dbef14
2014-06-19 10:46:00 +01:00
Stephen Hines
b02dadd47c Merge "Create FieldPacker.getPos() to get the actual amount of data used for FP." 2014-06-18 22:48:04 +00:00
Jeff Sharkey
b5e05cffcc Merge "Fixing parcel leaks to avoid virtual memory leak" 2014-06-18 22:48:04 +00:00
Maunik Shah
db1a9a3862 Fixing parcel leaks to avoid virtual memory leak
Client has to call recycle() on parcel object after its usage
otherwise native layer of binder won't clear the resources of
parcel which were allocated for IPC

Change-Id: Ib31ddcc92aa4ebd80bb66729922b9133692e9c9e
2014-06-19 19:44:21 +05:30
Brian Carlstrom
8e21e21550 Merge "Switch from core to core-libart" 2014-06-18 22:48:04 +00:00
Brian Carlstrom
dbcae5ceb7 Switch from core to core-libart
Bug: 14298175
Change-Id: I89db18bf3d88f9511cb2ad943c64ecdbaf09d96f
2014-06-18 17:43:27 -07:00
Denver Coneybeare
d0eb55360f Fix javadoc typo in Message.java: "arg1" -> "arg2"
Change-Id: I245eadaf322dce9e27af30d8dbb6d97ca0d296ce
2014-06-18 15:45:14 -04:00
Stephen Hines
fa1275a6e7 Create FieldPacker.getPos() to get the actual amount of data used for FP.
We need larger buffers to handle 64-bit RS object types, but 32-bit code
will never fill all of the getData().length bytes. This allows us to retain
our verification code.

We have to modify an existing use of FieldPacker that was doing partial
updates of the underlying buffer. This was really relying on the old data
to be implicitly selected and written back, but that is not guaranteed by
the original API. This also required a fix to the FieldPacker.reset() API,
which was not allowing the FieldPacker to ever point to the final entry in
its buffer.

Change-Id: Idcd52790ac2b0ab1eff3f043e7eec2832953f04b
2014-06-18 00:24:44 -07:00
Colin Cross
88b37edaea Merge "Fix reading memory usage for 64-bit processes" 2014-06-17 21:47:03 +00:00
Colin Cross
0c6bc73c5e Fix reading memory usage for 64-bit processes
64-bit process will have virtual addresses that don't fit in an
unsigned long if ActivityManagerService is in a 32-bit process,
and the locations of the '-' and ' ' characters in the maps
are not predictable.  Fix the sscanf for finding the start of the
mapping, and use it again to find the end of the mapping.  Also
fix a few 64-bit warnings.

Change-Id: I8855c76085142768be1d45346f1032fd37cbe4eb
2014-06-17 15:25:45 -07:00
Jason Sams
47de306050 Merge "Fix element size on 64b" 2014-06-17 21:42:00 +00:00
Jason Sams
b49dfeaea9 Fix element size on 64b
RenderScript Element types know their own size.  This
change properly tracks the new object sizes.

Change-Id: I3cbf76a7ec5f68056ed5599e9406cea05ba86969
2014-06-18 13:17:57 -07:00
Narayan Kamath
8df5bd08c2 Explicitly list out the list of cache subdirs to prune.
We don't want directories like profiles and the former
profile-cache from being included in the prune. SELinux would
have prevented the move, but that's very brittle.

bug: 15677279

Change-Id: I2ff5db056757ffacaf108bb07b02dc0cac7172dd
2014-06-17 13:07:45 +01:00