174848 Commits

Author SHA1 Message Date
Ruchi Kandoi
3afca74a2a Merge "BatteryStats: Adds an additional condition to avoid ArrayIndexOutOfBounds." 2015-04-14 00:17:14 +00:00
Yang Ni
07cd641b6f Merge "Add a name to ScriptGroup2.Builder.create method" 2015-04-13 22:52:31 +00:00
Yang Ni
ad6b44aaa1 Add a name to ScriptGroup2.Builder.create method
The name is not used in any meaningful way yet, but would be used
to name the file for generated code for fused kernels in other
coming CLs.

A script group name cannot be null or empty, or longer than 100
characters. It can only contain letters, digits, '-', or '_'.

Change-Id: I95fdbf58e6689da91ca98c2057dfa1a803d3b27b
2015-04-13 14:32:18 -07:00
Alex Klyubin
d1af38a478 Merge "Use JCA names for block modes, paddings, and digests." 2015-04-13 17:01:30 +00:00
Alex Klyubin
5927c9f1b1 Use JCA names for block modes, paddings, and digests.
This replaces int-based enums from KeyStoreKeyConstraints with
String values commonly used in JCA API.

As part of under the hood refactoring:
* KeyStoreKeyCharacteristics and KeyStoreKeyConstraints have been
  merged into KeyStoreKeyProperties.
* KeymasterUtils methods operating on KeymasterArguments and
  KeymasterCharacteristics have been moved to their respective
  classes.

Bug: 18088752
Change-Id: I9c8b984cb3c28184adb617e34d87f2837bd1d3a1
2015-04-13 09:59:04 -07:00
Wale Ogunwale
8f0e0c1f3d Merge "Clean-up state if we have an exception when acquiring provider" 2015-04-13 04:25:29 +00:00
Alex Klyubin
c1c6528d2b Merge "Add EcIesParameterSpec to enable ECIES crypto." 2015-04-11 02:17:01 +00:00
Alex Klyubin
0ee9376ef4 Add EcIesParameterSpec to enable ECIES crypto.
Bug: 18088752
Change-Id: I597b019106c500188e0fbbc9608722668c08b421
2015-04-10 14:57:28 -07:00
Chad Brubaker
386c4e9ea9 Merge "Fix testSaw_ungrantedUid_Bluetooth" 2015-04-10 21:42:23 +00:00
Shawn Willden
97fce66f7d Merge "Make several key crypto parameters repeatable" 2015-04-10 21:21:37 +00:00
Chad Brubaker
6a5af8cf14 Fix testSaw_ungrantedUid_Bluetooth
Keystore.saw returns [] on no result, not null, so the test was
incorrectly failing.

Change-Id: I22dcf85c5d6c5c0368848bc784c3215c092d9ea8
2015-04-10 14:15:17 -07:00
Olawale Ogunwale
4406568eba Merge "Check caller status precisely when registering receiver." 2015-04-10 20:14:54 +00:00
Chad Brubaker
59f977c698 Make several key crypto parameters repeatable
Bug: 19509156
Change-Id: Ic584d8a6bf5601f9754563b67b3cc6b3ca6b5ff9
2015-04-10 12:20:04 -06:00
Alex Klyubin
a270264c61 Merge "Track more changes to keymaster_defs.h" 2015-04-10 17:51:49 +00:00
Wale Ogunwale
73e239bdc9 Clean-up state if we have an exception when acquiring provider
We can get a number of exceptions (e.g. SecurityException) when
a process is acquiring a provider. We need to clean-up correctly
so that other threads that try to acquire the provider the progress.

Bug: 20122809
Change-Id: Icac1d391df7e8c24198be89035b1c5a23da834cf
2015-04-10 09:32:26 -07:00
Nick Kralevich
08d76a946b Merge "Impose an ordering on created SELinuxMMAC Policy objects." 2015-04-10 16:10:27 +00:00
Alex Klyubin
55f7c2770f Track more changes to keymaster_defs.h
KeyStoreTest needed to be adjusted because OCB is no longer supported.

Bug: 18088752
Change-Id: I7594daaa5e97423d34726b07cc79e3ee28418d95
2015-04-10 08:58:38 -07:00
riddle_hsu
b15506f95e Check caller status precisely when registering receiver.
Fine tune commit 9ac9609f.
Because process may reuse same process record to restart.
It is better to check below conditions to skip:
1. Simple dead and has been cleaned.
 => .thread will be null
2.The process has restarted with new pid but has not attached yet.
 => .thread will be null
3.The process has restarted and attached.
 => The IBinder will be different

Change-Id: Ic052f5025558ca93e1a6ab11bca61fe995126bb9
2015-04-10 15:41:19 +00:00
John Reck
a08f6a66e9 Merge "Fix GL_INVALID_OPERATION in font renderer when font cache is limited." 2015-04-10 15:32:01 +00:00
John Reck
d56e087b55 Merge "Fixing memory leak in RenderBufferCache" 2015-04-10 15:27:02 +00:00
Robert Craig
4caa6b1efb Impose an ordering on created SELinuxMMAC Policy objects.
Imposing an order on Policy objects allows us to extend the
policy writers ability to union mac_permissions.xml files.
Policy developers can now create new mac_permissions.xml
entries under their device specific directories. This is
in contrast to current methods which only allow differing
stanzas to appear outside the base mac_permissions.xml.

Also, report on stanzas with duplicate input selectors and
treat these as errors. There are some ambiguities that can
arise otherwise.

Lastly, impose an XOR condition on signer stanzas w.r.t seinfo
and package tags. This finer distinction helps the union feature
of policy to become clearer and simpler to code.

Change-Id: Idd86df8ad9a63d1b8ba6e8270670814ca6cee8d2
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-04-10 11:14:37 -04:00
Tim Murray
6d718c2f43 Merge "Add support for setting the cache directory." 2015-04-10 00:51:15 +00:00
Tim Murray
47f31582b6 Add support for setting the cache directory.
Change-Id: I2bf1874705b877a8a8262ab49b47fe8241e603d5
2015-04-09 17:50:39 -07:00
Alex Klyubin
ba2836e6cf Merge "Track recent keymaster_defs.h changes." 2015-04-10 00:01:19 +00:00
Alex Klyubin
862e6c7814 Track recent keymaster_defs.h changes.
Bug: 18088752
Change-Id: If47bb7cc7a385941db9f12d478676594e9bc9d86
2015-04-09 16:58:58 -07:00
Alex Klyubin
c6eb62882b Merge "Split key origin into TEE/not and generated/imported." 2015-04-09 23:34:45 +00:00
Mathieu Chartier
da164973f3 Merge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"" 2015-04-09 23:14:28 +00:00
Mathieu Chartier
537691fc2d Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
Example output of "adb shell dumpsys meminfo -d":

Total PSS by category:
   193605 kB: Dalvik
               87561 kB: .Heap
               77863 kB: .LOS
               15333 kB: .Zygote
               12848 kB: .NonMoving
                6770 kB: .GC
                2597 kB: .LinearAlloc
                1180 kB: .JITCache
                1180 kB: .IndirectRef
   103936 kB: EGL mtrack
   101827 kB: Native

Bug: 17643507

(cherry picked from commit 546edc5a31bb5a843048e11d8afb0b1f6441ddb4)

Change-Id: If34627cf93ba5305b428d2278f350a2649d63d5e
2015-04-09 15:53:17 -07:00
Alex Klyubin
b503c52f07 Split key origin into TEE/not and generated/imported.
This is to match the upcoming changes in Keymaster HAL API.

Bug: 18088752
Change-Id: I602d56d1c29a839583be1d9efa681a6fab6642db
2015-04-09 15:50:17 -07:00
Jeff Sharkey
1d3c77a21e Merge "Start passing volume UUID to installd." 2015-04-09 21:41:12 +00:00
Alex Klyubin
97d2d7c427 Merge "Fix minor issues in new Javadocs of AndroidKeyStore." 2015-04-09 21:41:00 +00:00
Alex Klyubin
7882a7fcd4 Fix minor issues in new Javadocs of AndroidKeyStore.
Bug: 18088752
Change-Id: Ie84cc6066c82f2659da17a1eb158c2e3acf5094d
2015-04-09 14:33:11 -07:00
Jeff Sharkey
790a4ecac7 Start passing volume UUID to installd.
This change adds new method overloads to provide volume UUID.  The
older methods remain for now, and pass through the "null" UUID to
reference internal storage.

Follows the existing pattern where null arguments are passed as "!".

Bug: 19993667
Change-Id: Ia1b7c8550cabc13e4f6e1182eabb650f2c33e44f
2015-04-09 14:19:07 -07:00
Alex Klyubin
aeae0f384f Merge "Add asymmetric crypto constants for AndroidKeyStore API." 2015-04-09 20:02:39 +00:00
Alex Klyubin
8c58ba87bb Merge "Add missing mapping between JCA and keystore HMAC names." 2015-04-09 19:57:13 +00:00
Alex Klyubin
ccfea5024b Add asymmetric crypto constants for AndroidKeyStore API.
Bug: 18088752
Change-Id: Iee72a4c230f3a2cd30d9eb4d29c4301f3e113f31
2015-04-09 11:38:44 -07:00
Dan Albert
d9f32b164b Merge "Ensure alignment of Res_png_9patch." 2015-04-09 18:09:11 +00:00
Dan Albert
a18cee52d9 Ensure alignment of Res_png_9patch.
This doesn't alter the alignment of the data within the struct, but
enforces that this structure will be appropriately aligned when used.

The image_info struct has this struct preceded by a bool, which causes
odd alignment for the members of this struct.

Change-Id: Ia2ef5c81b2f961c0f61858a10a7821d82f600919
2015-04-09 10:41:38 -07:00
Alex Klyubin
5324702a02 Add missing mapping between JCA and keystore HMAC names.
This is a follow-up to 70376a77280551791dae62586a6bb0c77ed9429a where
I forgot to update this mapping.

Bug: 18088752
Change-Id: I322a9abd642ddee3bd2b4f49379b121012e32836
2015-04-09 10:10:34 -07:00
Alex Klyubin
e26347bb74 Merge "Hide KeyStoreParameter.Builder.setRandomizedEncryptionRequired." 2015-04-09 16:51:02 +00:00
Alex Klyubin
223977b914 Hide KeyStoreParameter.Builder.setRandomizedEncryptionRequired.
This wasn't meant to be public API yet.

Bug: 18088752
Change-Id: I40e57fd9121348086ae88ad9fa54f930547b77ba
2015-04-09 09:50:34 -07:00
Alex Klyubin
a482b0469c Merge "Require IND-CPA by default for new AndroidKeyStore keys." 2015-04-09 16:12:09 +00:00
Richard Uhler
f324d245fd Merge "Reuse dexopt method for both dex2oat and patchoat." 2015-04-09 14:13:29 +00:00
Colin Cross
1be312dfb0 Merge "Re-enable -Wall and -Werror that were lost in a merge" 2015-04-09 00:49:56 +00:00
Colin Cross
01f185633c Re-enable -Wall and -Werror that were lost in a merge
-Wall and -Werror were lost during a merge when they were added to
aaptCFLAGS instead of aaptCFlags.  Fix the typo, and the warnings
that crept in while it was disabled.

Change-Id: Ib944b8d6149278e4f3861c1acac277bcd95cc7c2
2015-04-08 17:48:23 -07:00
Alex Klyubin
f853f64998 Require IND-CPA by default for new AndroidKeyStore keys.
Bug: 18088752
Change-Id: I01e44b7155df4326b5c9d83dda57f889c1f23ec7
2015-04-08 16:28:27 -07:00
Olawale Ogunwale
e8a3c320e6 Merge "Prevent windows from freezing screen while timeout" 2015-04-08 21:56:16 +00:00
Alex Klyubin
1da3d7fcf3 Merge "Add more digests to AndroidKeyStore API." 2015-04-08 21:32:09 +00:00
Alex Klyubin
70376a7728 Add more digests to AndroidKeyStore API.
This adds MD5, SHA-1, SHA-224, SHA-384, and SHA-512. SHA-256 was
already there.

MD5 is not exposed for HMAC on purpose, because MD5 has been
deprecated for years.

Bug: 18088752
Change-Id: I4df3d3f6cf10805c7910a1bdb577a91c85055945
2015-04-08 14:17:21 -07:00
Alex Klyubin
c0d6b7cb75 Merge "Fix typo" 2015-04-08 18:16:38 +00:00