OSDN Git Service

android-x86/frameworks-base.git
9 years agoMerge "No need to specify EC curve name in EcIesParameterSpec."
Alex Klyubin [Tue, 14 Apr 2015 20:22:51 +0000 (20:22 +0000)]
Merge "No need to specify EC curve name in EcIesParameterSpec."

9 years agoMerge "Make specifying self-signed cert parameters optional."
Alex Klyubin [Tue, 14 Apr 2015 19:59:02 +0000 (19:59 +0000)]
Merge "Make specifying self-signed cert parameters optional."

9 years agoMake specifying self-signed cert parameters optional.
Alex Klyubin [Tue, 14 Apr 2015 19:48:17 +0000 (12:48 -0700)]
Make specifying self-signed cert parameters optional.

This removes the need to specify the three parameters of the
self-signed certificate (serial number, subject, validity range) when
generating key pairs in AndroidKeyStore. This is achieved by
providing sensible defaults for these parameters:
* serial number: 1
* subject: CN=fake
* validity range: Jan 1 1970 to Jan 1 2048.

Bug: 18088752
Change-Id: I5df918b1ef8b26ed3ddd43828c4c78c9fa58cd43

9 years agoMerge "Add Debug.getRuntimeStat()."
Hiroshi Yamauchi [Tue, 14 Apr 2015 19:08:30 +0000 (19:08 +0000)]
Merge "Add Debug.getRuntimeStat()."

9 years agoAdd Debug.getRuntimeStat().
Hiroshi Yamauchi [Thu, 2 Apr 2015 19:26:10 +0000 (12:26 -0700)]
Add Debug.getRuntimeStat().

Export runtime stats (currently GC stats) through this method.

Bug: 19825248
Change-Id: I147a0e9bc6bdfe4dc29d74e44f0af6349c51d9f8

9 years agoMerge "Add name to ScriptGroup2.Builder.create() method"
Yang Ni [Tue, 14 Apr 2015 16:15:54 +0000 (16:15 +0000)]
Merge "Add name to ScriptGroup2.Builder.create() method"

9 years agoMerge "Add android.net.IpPrefix#contains()"
Erik Kline [Tue, 14 Apr 2015 07:58:32 +0000 (07:58 +0000)]
Merge "Add android.net.IpPrefix#contains()"

9 years agoAdd android.net.IpPrefix#contains()
Erik Kline [Mon, 13 Apr 2015 06:33:34 +0000 (15:33 +0900)]
Add android.net.IpPrefix#contains()

This was originally to avoid RuntimeException in RouteInfo#matches():
    When an IPv6 prefix with a length greater than the max permitted
    for IPv4 is matched against an Inet4Address, the call to
    NetworkUtils throws RuntimeException.

Change-Id: I92e2bd19a4e7d656cf682fd27678da07e211850d

9 years agoAdd name to ScriptGroup2.Builder.create() method
Yang Ni [Fri, 3 Apr 2015 00:47:56 +0000 (17:47 -0700)]
Add name to ScriptGroup2.Builder.create() method

This name will be used to name the .so file generated for the
script group with fused kernels.

Change-Id: I46e351c8412740512f56b7915b14f36183c6eeaf

9 years agoMerge "BatteryStats: Adds an additional condition to avoid ArrayIndexOutOfBounds."
Ruchi Kandoi [Tue, 14 Apr 2015 00:17:09 +0000 (00:17 +0000)]
Merge "BatteryStats: Adds an additional condition to avoid ArrayIndexOutOfBounds."

9 years agoMerge "Add a name to ScriptGroup2.Builder.create method"
Yang Ni [Mon, 13 Apr 2015 22:52:30 +0000 (22:52 +0000)]
Merge "Add a name to ScriptGroup2.Builder.create method"

9 years agoAdd a name to ScriptGroup2.Builder.create method
Yang Ni [Mon, 6 Apr 2015 23:58:57 +0000 (16:58 -0700)]
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

9 years agoNo need to specify EC curve name in EcIesParameterSpec.
Alex Klyubin [Mon, 13 Apr 2015 17:20:24 +0000 (10:20 -0700)]
No need to specify EC curve name in EcIesParameterSpec.

EC curve parameters will be obtained from the provided EC key.

Bug: 18088752
Change-Id: Ic99353a6566c8d4ce2b6b73d0309edaa40f84fa6

9 years agoMerge "Use JCA names for block modes, paddings, and digests."
Alex Klyubin [Mon, 13 Apr 2015 17:01:28 +0000 (17:01 +0000)]
Merge "Use JCA names for block modes, paddings, and digests."

9 years agoUse JCA names for block modes, paddings, and digests.
Alex Klyubin [Fri, 10 Apr 2015 20:28:03 +0000 (13:28 -0700)]
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

9 years agoMerge "Clean-up state if we have an exception when acquiring provider"
Wale Ogunwale [Mon, 13 Apr 2015 04:25:27 +0000 (04:25 +0000)]
Merge "Clean-up state if we have an exception when acquiring provider"

9 years agoMerge "Add EcIesParameterSpec to enable ECIES crypto."
Alex Klyubin [Sat, 11 Apr 2015 02:17:00 +0000 (02:17 +0000)]
Merge "Add EcIesParameterSpec to enable ECIES crypto."

9 years agoAdd EcIesParameterSpec to enable ECIES crypto.
Alex Klyubin [Fri, 10 Apr 2015 17:20:48 +0000 (10:20 -0700)]
Add EcIesParameterSpec to enable ECIES crypto.

Bug: 18088752
Change-Id: I597b019106c500188e0fbbc9608722668c08b421

9 years agoMerge "Fix testSaw_ungrantedUid_Bluetooth"
Chad Brubaker [Fri, 10 Apr 2015 21:42:23 +0000 (21:42 +0000)]
Merge "Fix testSaw_ungrantedUid_Bluetooth"

9 years agoMerge "Make several key crypto parameters repeatable"
Shawn Willden [Fri, 10 Apr 2015 21:21:36 +0000 (21:21 +0000)]
Merge "Make several key crypto parameters repeatable"

9 years agoFix testSaw_ungrantedUid_Bluetooth
Chad Brubaker [Fri, 10 Apr 2015 21:15:01 +0000 (14:15 -0700)]
Fix testSaw_ungrantedUid_Bluetooth

Keystore.saw returns [] on no result, not null, so the test was
incorrectly failing.

Change-Id: I22dcf85c5d6c5c0368848bc784c3215c092d9ea8

9 years agoMerge "Check caller status precisely when registering receiver."
Olawale Ogunwale [Fri, 10 Apr 2015 20:14:52 +0000 (20:14 +0000)]
Merge "Check caller status precisely when registering receiver."

9 years agoMake several key crypto parameters repeatable
Chad Brubaker [Thu, 5 Mar 2015 22:46:16 +0000 (14:46 -0800)]
Make several key crypto parameters repeatable

Bug: 19509156
Change-Id: Ic584d8a6bf5601f9754563b67b3cc6b3ca6b5ff9

9 years agoMerge "Track more changes to keymaster_defs.h"
Alex Klyubin [Fri, 10 Apr 2015 17:51:44 +0000 (17:51 +0000)]
Merge "Track more changes to keymaster_defs.h"

9 years agoClean-up state if we have an exception when acquiring provider
Wale Ogunwale [Thu, 9 Apr 2015 22:42:12 +0000 (15:42 -0700)]
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

9 years agoMerge "Impose an ordering on created SELinuxMMAC Policy objects."
Nick Kralevich [Fri, 10 Apr 2015 16:10:26 +0000 (16:10 +0000)]
Merge "Impose an ordering on created SELinuxMMAC Policy objects."

9 years agoTrack more changes to keymaster_defs.h
Alex Klyubin [Fri, 10 Apr 2015 02:59:00 +0000 (19:59 -0700)]
Track more changes to keymaster_defs.h

KeyStoreTest needed to be adjusted because OCB is no longer supported.

Bug: 18088752
Change-Id: I7594daaa5e97423d34726b07cc79e3ee28418d95

9 years agoCheck caller status precisely when registering receiver.
riddle_hsu [Wed, 4 Feb 2015 12:52:03 +0000 (20:52 +0800)]
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

9 years agoMerge "Fix GL_INVALID_OPERATION in font renderer when font cache is limited."
John Reck [Fri, 10 Apr 2015 15:32:00 +0000 (15:32 +0000)]
Merge "Fix GL_INVALID_OPERATION in font renderer when font cache is limited."

9 years agoMerge "Fixing memory leak in RenderBufferCache"
John Reck [Fri, 10 Apr 2015 15:27:01 +0000 (15:27 +0000)]
Merge "Fixing memory leak in RenderBufferCache"

9 years agoImpose an ordering on created SELinuxMMAC Policy objects.
Robert Craig [Fri, 10 Apr 2015 15:02:33 +0000 (11:02 -0400)]
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>
9 years agoMerge "Add support for setting the cache directory."
Tim Murray [Fri, 10 Apr 2015 00:51:14 +0000 (00:51 +0000)]
Merge "Add support for setting the cache directory."

9 years agoAdd support for setting the cache directory.
Tim Murray [Tue, 7 Apr 2015 22:43:24 +0000 (15:43 -0700)]
Add support for setting the cache directory.

Change-Id: I2bf1874705b877a8a8262ab49b47fe8241e603d5

9 years agoMerge "Track recent keymaster_defs.h changes."
Alex Klyubin [Fri, 10 Apr 2015 00:01:18 +0000 (00:01 +0000)]
Merge "Track recent keymaster_defs.h changes."

9 years agoTrack recent keymaster_defs.h changes.
Alex Klyubin [Thu, 9 Apr 2015 23:58:58 +0000 (16:58 -0700)]
Track recent keymaster_defs.h changes.

Bug: 18088752
Change-Id: If47bb7cc7a385941db9f12d478676594e9bc9d86

9 years agoMerge "Split key origin into TEE/not and generated/imported."
Alex Klyubin [Thu, 9 Apr 2015 23:34:44 +0000 (23:34 +0000)]
Merge "Split key origin into TEE/not and generated/imported."

9 years agoMerge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category""
Mathieu Chartier [Thu, 9 Apr 2015 23:14:27 +0000 (23:14 +0000)]
Merge "Add dalvik subitems for -d in dumpsys meminfo "Total PSS by category""

9 years agoAdd dalvik subitems for -d in dumpsys meminfo "Total PSS by category"
Mathieu Chartier [Thu, 9 Apr 2015 21:32:31 +0000 (14:32 -0700)]
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

9 years agoSplit key origin into TEE/not and generated/imported.
Alex Klyubin [Thu, 9 Apr 2015 22:50:17 +0000 (15:50 -0700)]
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

9 years agoMerge "Start passing volume UUID to installd."
Jeff Sharkey [Thu, 9 Apr 2015 21:41:11 +0000 (21:41 +0000)]
Merge "Start passing volume UUID to installd."

9 years agoMerge "Fix minor issues in new Javadocs of AndroidKeyStore."
Alex Klyubin [Thu, 9 Apr 2015 21:40:58 +0000 (21:40 +0000)]
Merge "Fix minor issues in new Javadocs of AndroidKeyStore."

9 years agoFix minor issues in new Javadocs of AndroidKeyStore.
Alex Klyubin [Thu, 9 Apr 2015 21:33:11 +0000 (14:33 -0700)]
Fix minor issues in new Javadocs of AndroidKeyStore.

Bug: 18088752
Change-Id: Ie84cc6066c82f2659da17a1eb158c2e3acf5094d

9 years agoStart passing volume UUID to installd.
Jeff Sharkey [Thu, 9 Apr 2015 20:18:44 +0000 (13:18 -0700)]
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

9 years agoMerge "Add asymmetric crypto constants for AndroidKeyStore API."
Alex Klyubin [Thu, 9 Apr 2015 20:02:39 +0000 (20:02 +0000)]
Merge "Add asymmetric crypto constants for AndroidKeyStore API."

9 years agoMerge "Add missing mapping between JCA and keystore HMAC names."
Alex Klyubin [Thu, 9 Apr 2015 19:57:12 +0000 (19:57 +0000)]
Merge "Add missing mapping between JCA and keystore HMAC names."

9 years agoAdd asymmetric crypto constants for AndroidKeyStore API.
Alex Klyubin [Thu, 9 Apr 2015 18:38:44 +0000 (11:38 -0700)]
Add asymmetric crypto constants for AndroidKeyStore API.

Bug: 18088752
Change-Id: Iee72a4c230f3a2cd30d9eb4d29c4301f3e113f31

9 years agoMerge "Ensure alignment of Res_png_9patch."
Dan Albert [Thu, 9 Apr 2015 18:09:09 +0000 (18:09 +0000)]
Merge "Ensure alignment of Res_png_9patch."

9 years agoEnsure alignment of Res_png_9patch.
Dan Albert [Wed, 8 Apr 2015 01:38:42 +0000 (18:38 -0700)]
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

9 years agoAdd missing mapping between JCA and keystore HMAC names.
Alex Klyubin [Thu, 9 Apr 2015 16:28:38 +0000 (09:28 -0700)]
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

9 years agoMerge "Hide KeyStoreParameter.Builder.setRandomizedEncryptionRequired."
Alex Klyubin [Thu, 9 Apr 2015 16:51:02 +0000 (16:51 +0000)]
Merge "Hide KeyStoreParameter.Builder.setRandomizedEncryptionRequired."

9 years agoHide KeyStoreParameter.Builder.setRandomizedEncryptionRequired.
Alex Klyubin [Thu, 9 Apr 2015 16:42:09 +0000 (09:42 -0700)]
Hide KeyStoreParameter.Builder.setRandomizedEncryptionRequired.

This wasn't meant to be public API yet.

Bug: 18088752
Change-Id: I40e57fd9121348086ae88ad9fa54f930547b77ba

9 years agoMerge "Require IND-CPA by default for new AndroidKeyStore keys."
Alex Klyubin [Thu, 9 Apr 2015 16:12:08 +0000 (16:12 +0000)]
Merge "Require IND-CPA by default for new AndroidKeyStore keys."

9 years agoMerge "Reuse dexopt method for both dex2oat and patchoat."
Richard Uhler [Thu, 9 Apr 2015 14:13:26 +0000 (14:13 +0000)]
Merge "Reuse dexopt method for both dex2oat and patchoat."

9 years agoMerge "Re-enable -Wall and -Werror that were lost in a merge"
Colin Cross [Thu, 9 Apr 2015 00:49:55 +0000 (00:49 +0000)]
Merge "Re-enable -Wall and -Werror that were lost in a merge"

9 years agoRe-enable -Wall and -Werror that were lost in a merge
Colin Cross [Thu, 9 Apr 2015 00:29:00 +0000 (17:29 -0700)]
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

9 years agoRequire IND-CPA by default for new AndroidKeyStore keys.
Alex Klyubin [Wed, 8 Apr 2015 20:36:22 +0000 (13:36 -0700)]
Require IND-CPA by default for new AndroidKeyStore keys.

Bug: 18088752
Change-Id: I01e44b7155df4326b5c9d83dda57f889c1f23ec7

9 years agoMerge "Prevent windows from freezing screen while timeout"
Olawale Ogunwale [Wed, 8 Apr 2015 21:56:09 +0000 (21:56 +0000)]
Merge "Prevent windows from freezing screen while timeout"

9 years agoMerge "Add more digests to AndroidKeyStore API."
Alex Klyubin [Wed, 8 Apr 2015 21:32:08 +0000 (21:32 +0000)]
Merge "Add more digests to AndroidKeyStore API."

9 years agoAdd more digests to AndroidKeyStore API.
Alex Klyubin [Wed, 8 Apr 2015 21:15:57 +0000 (14:15 -0700)]
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

9 years agoMerge "Fix typo"
Alex Klyubin [Wed, 8 Apr 2015 18:16:36 +0000 (18:16 +0000)]
Merge "Fix typo"

9 years agoFix typo
Alex Klyubin [Wed, 8 Apr 2015 18:08:37 +0000 (11:08 -0700)]
Fix typo

Change-Id: I1c47ade98ad3ae41dc55e7bcafcad6901b559c89

9 years agoMerge "Refuse to reuse IV in encryption mode in AndroidKeyStore."
Alex Klyubin [Wed, 8 Apr 2015 18:04:38 +0000 (18:04 +0000)]
Merge "Refuse to reuse IV in encryption mode in AndroidKeyStore."

9 years agoMerge "Add BlockMode.GCM constant to AndroidKeyStore API."
Alex Klyubin [Wed, 8 Apr 2015 17:51:12 +0000 (17:51 +0000)]
Merge "Add BlockMode.GCM constant to AndroidKeyStore API."

9 years agoRefuse to reuse IV in encryption mode in AndroidKeyStore.
Alex Klyubin [Wed, 8 Apr 2015 16:42:16 +0000 (09:42 -0700)]
Refuse to reuse IV in encryption mode in AndroidKeyStore.

This makes IV-using Cipher implementations backed by AndroidKeyStore
refuse to be reused. After Cipher.doFinal completes, invoking update
or doFinal will raise an exception. This is to make it harder to
violate the security best practice of not reusing IV in encryption
mode.

Bug: 18088752
Change-Id: I5102f9e8b2ff428254294703e48948ea8576603d

9 years agoPrevent windows from freezing screen while timeout
tiger_huang [Tue, 7 Apr 2015 09:35:13 +0000 (17:35 +0800)]
Prevent windows from freezing screen while timeout

The original logic lets windows be able to freeze screen again (by
setting win.mOrientationChanging=true) after WINDOW_FREEZE_TIMEOUT is
triggered before mInnerFields.mOrientationChangeComplete is set to
true. In this case, we would lose the protection of
WINDOW_FREEZE_TIMEOUT. If the app never finishes drawing the window,
the screen would keep freezing that the user cannot operate the
device.

Change-Id: I45a0a9e4b3f8d5b0b0043229bfa4890236ae8ab2

9 years agoMerge "[ActivityManager] Avoid NullPointerException if no crash info"
Olawale Ogunwale [Wed, 8 Apr 2015 16:07:44 +0000 (16:07 +0000)]
Merge "[ActivityManager] Avoid NullPointerException if no crash info"

9 years agoMerge "[ActivityManager] Finish the failed-to-pause activity"
Olawale Ogunwale [Wed, 8 Apr 2015 12:51:11 +0000 (12:51 +0000)]
Merge "[ActivityManager] Finish the failed-to-pause activity"

9 years ago[ActivityManager] Avoid NullPointerException if no
louis_chang [Wed, 8 Apr 2015 10:04:11 +0000 (18:04 +0800)]
[ActivityManager] Avoid NullPointerException if no
crash info

Symptom:
This issue happens because the ANR process got killed
(because it crashed) before the ANR dialog dismissed.
In that case, the process record is marked as crashed
(ProcessRecord.crashing = true). When the ANR dialog
dismissed by user, it will cause NullPointerException
when writeToParcel while performing IPC because there
is no crash info (ApplicationErrorReport.crashInfo = null)

Solution:
Check crashinfo before access it

Change-Id: I2995de57684c1e13aab8297f5eea1e82ca3b7ad8

9 years ago[ActivityManager] Finish the failed-to-pause activity
louis_chang [Wed, 8 Apr 2015 08:35:55 +0000 (16:35 +0800)]
[ActivityManager] Finish the failed-to-pause activity

Symptom:
In some scenario, the mPausingActivity may be replaced by other
activity. When previous activity paused, the completePausedLocked()
won't be invoked because it is no longer the mPausingActivity. If
the activity is also pending to finish, it would never be done
because the activity kept in PAUSING state. Since the activity's
window also remain visible and is above on Wallpaper, user would
see it when back to home.

Solution:
Finish the failed-to-pause activity if the activity is pending to
finish.

A Real Case:
(1) Screen turn off
(2) The top activity T1 crashed
(3) When finish activity T1, the next top activity T2 will be
    scheduled to resume and pause (due to screen off).
(4) The activity T2 is also set to finishing due to T1 crashed.
(5) Before T2 paused and before paused timeout occurs, there has
    a new process started which brings up the next top activity T3
    to resume and pause. So the pausing activity is now replaced.
(6) When activity T2 paused, it cannot completed the pause operation
    T2 will remain in PAUSING and finishing state with its window
    visible. The process won't be killed because the oomadj stays
    at 1 (Visible).

Change-Id: Ib10fded891b21c774b26a93071c717fa50516e22

9 years agoMerge "Prevent possible memory leak in SpanSet"
Romain Guy [Wed, 8 Apr 2015 06:56:24 +0000 (06:56 +0000)]
Merge "Prevent possible memory leak in SpanSet"

9 years agoMerge "third part apps can disable the secret lockscreen"
Jim Miller [Tue, 7 Apr 2015 22:41:17 +0000 (22:41 +0000)]
Merge "third part apps can disable the secret lockscreen"

9 years agoAdd BlockMode.GCM constant to AndroidKeyStore API.
Alex Klyubin [Tue, 7 Apr 2015 22:09:12 +0000 (15:09 -0700)]
Add BlockMode.GCM constant to AndroidKeyStore API.

GCM mode is not yet implemented. This is just adding a constant to
KeyStoreKeyConstraints.BlockMode.

Bug: 18088752
Change-Id: Ibba5b393f56ab9f6bb96d994f110687ab8d65ff3

9 years agoMerge "Fixed memory leak in ExtractEditLayout finish()"
Adam Powell [Tue, 7 Apr 2015 20:56:47 +0000 (20:56 +0000)]
Merge "Fixed memory leak in ExtractEditLayout finish()"

9 years agoMerge "ProgressBar: Fix error of process bar cannot update on some condition."
Adam Powell [Tue, 7 Apr 2015 20:56:33 +0000 (20:56 +0000)]
Merge "ProgressBar: Fix error of process bar cannot update on some condition."

9 years agoMerge "Move cache dir to its own class."
Tim Murray [Tue, 7 Apr 2015 20:33:33 +0000 (20:33 +0000)]
Merge "Move cache dir to its own class."

9 years agoMove cache dir to its own class.
Tim Murray [Tue, 7 Apr 2015 20:24:14 +0000 (13:24 -0700)]
Move cache dir to its own class.

This prevents us from loading the RS static initializer all the time.

Change-Id: I8cea7540e50251aba8c2f199f06f344f991e7d7f

9 years agoPrevent possible memory leak in SpanSet
Romain Guy [Tue, 7 Apr 2015 17:39:45 +0000 (10:39 -0700)]
Prevent possible memory leak in SpanSet

If SpanSet.init() is called several times in a row with different
values, it is possible to change "numberOfSpans" in a way that
will prevent SpanSet.recycle() from nulling out all the spans.

This can lead to memory leaks of large objects through spans
references. User @piwai reported this leak:

     com.squareup.marketfont.MarketSpan
     `-[1] of array android.text.style.CharacterStyle[]
       `-spans of object android.text.SpanSet
         `-mCharacterStyleSpanSet of object android.text.TextLine
           `-[1] of array android.text.TextLine[]
             `-sCached of class android.text.TextLine

The MarketSpan instance is kept alive through a recycled TextLine
which itself contains a SpanSet.

Change-Id: Idfb2233ca16895dbe735c312662eaf0b4a2ecd65

9 years agoMerge "Unnecessary dexopt in installPackageLI"
Fyodor Kupolov [Tue, 7 Apr 2015 18:03:34 +0000 (18:03 +0000)]
Merge "Unnecessary dexopt in installPackageLI"

9 years agoMerge "Make the new AndroidKeyStore API conformant."
Alex Klyubin [Tue, 7 Apr 2015 17:39:06 +0000 (17:39 +0000)]
Merge "Make the new AndroidKeyStore API conformant."

9 years agoMerge "Load libraries directly from apk"
Dmitriy Ivanov [Tue, 7 Apr 2015 17:28:15 +0000 (17:28 +0000)]
Merge "Load libraries directly from apk"

9 years agoLoad libraries directly from apk
Dmitriy Ivanov [Tue, 30 Sep 2014 22:10:48 +0000 (15:10 -0700)]
Load libraries directly from apk

 Introduced new 'extractNativeLibs' attribute to manifest/application.
 Setting it to false prevents installer from extracting library from apk.

 The default value for extractNativeLibs is true.

Bug: 8076853
(cherry picked from commit ff193d642eea7128faad837d19e347cd25212c27)
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1

9 years agoMerge "Add a timeout state to frozen windows"
Olawale Ogunwale [Tue, 7 Apr 2015 17:14:31 +0000 (17:14 +0000)]
Merge "Add a timeout state to frozen windows"

9 years agoMake the new AndroidKeyStore API conformant.
Alex Klyubin [Mon, 6 Apr 2015 22:36:25 +0000 (15:36 -0700)]
Make the new AndroidKeyStore API conformant.

This makes the new AndroidKeyStore API conform with the latest
Keymaster API changes as well as the latest Android framework API
design guidelines.

Keymaster changes:
* Multiple paddings, block modes, and digests can be set on a key.
* "max uses per boot" and "min seconds between use" restrictions will
  not be exposed in the framework API.
* Padding scheme ZERO will not be exposed.

Changes due to Android framework design guidelines:
* Sets of enum values have been replaced with bitsets represented as
  ints.
* Integer has been replaced with int, with null being represented
  with a special value (e.g., -1 or 0) where possible.

Bug: 18088752
Change-Id: Ib21739aa9b42d48895cb7a681e836a5c6d972ac6

9 years agoAdd a timeout state to frozen windows
Craig Mautner [Fri, 6 Mar 2015 01:41:23 +0000 (17:41 -0800)]
Add a timeout state to frozen windows

When an activity stops drawing following a rotation the rotation
screenshot would become stuck on top of all the other windows. The
timeout was being acknowledged but mWindowsFreezingScreen was set to
true which kept stopFreezingDisplayLocked() from dismissing the
screen rotation animation.

By changing mWindowsFreezingScreen from a two state variable to a
three state variable, including a timeout state we allow
stopFreezingDisplayLocked() to continue and dismiss the screen
rotation animtion.

This change also reduces the APP_FREEZING_TIMOEOUT from 5 seconds to
2 seconds.

Bug: 15664090

Change-Id: Ida5aca002a82ec8fe1ea99f0ced814c5c8f01a95

9 years agoMerge "[ActivityManager] Improve task order of getRunningTasks."
Olawale Ogunwale [Tue, 7 Apr 2015 12:45:34 +0000 (12:45 +0000)]
Merge "[ActivityManager] Improve task order of getRunningTasks."

9 years agoMerge "[ActivityManager] Do not add service to reschedule after removing users."
Olawale Ogunwale [Tue, 7 Apr 2015 03:36:29 +0000 (03:36 +0000)]
Merge "[ActivityManager] Do not add service to reschedule after removing users."

9 years ago[ActivityManager] Improve task order of getRunningTasks.
riddle_hsu [Tue, 7 Apr 2015 03:30:09 +0000 (11:30 +0800)]
[ActivityManager] Improve task order of getRunningTasks.

Symptom:
During switching task in same stack, the first result
of getRunningTasks will be the behind stack's top task.
e.g.
 App Task X is starting task Y, the first entry may be home.

Root Cause:
TaskRecord's lastActiveTime is updated when pausing
or resuming. When X task launch a new task Y, Y is
on the top of task history, before X complete pause,
Y's lastActiveTime will be 0 because it is a new task.
Then when comparing the front task with other stack,
other stack will be regarded as the newer one.

Solution:
If the stack is focused stack, give the top task with the last time.

Change-Id: I0adc07608e03d333e0120a0dbc52a0fbbbb12f34

9 years agoUnnecessary dexopt in installPackageLI
Fyodor Kupolov [Tue, 7 Apr 2015 02:04:08 +0000 (19:04 -0700)]
Unnecessary dexopt in installPackageLI

When a new package is created, installNewPackageLI does not need to call
dexopt, since it has already been made.

Bug: 19550105
Bug: 20087446
Change-Id: If6b05bea590eea5f95efebb22a67ccd8cdf632c2

9 years agoMerge "Fix minor blur doc bug"
Jason Sams [Mon, 6 Apr 2015 23:38:05 +0000 (23:38 +0000)]
Merge "Fix minor blur doc bug"

9 years agoMerge "Rewrote FieldPack::createFieldPack for alignment"
Yang Ni [Mon, 6 Apr 2015 23:28:18 +0000 (23:28 +0000)]
Merge "Rewrote FieldPack::createFieldPack for alignment"

9 years agoRewrote FieldPack::createFieldPack for alignment
Yang Ni [Thu, 2 Apr 2015 00:29:14 +0000 (17:29 -0700)]
Rewrote FieldPack::createFieldPack for alignment

b/20032217

Some data types requires data alignment. This has an impact on the
total data size for the FieldPack. Fixed createFiledPack()
implementation to handle this correctly.

Change-Id: I241da19df69bf51cfdaf3b3a1381b446eaacb7fb

9 years agoMerge "Fix memory leak in Connectivity Service when phone app crashes"
Robert Greenwalt [Mon, 6 Apr 2015 17:34:48 +0000 (17:34 +0000)]
Merge "Fix memory leak in Connectivity Service when phone app crashes"

9 years agoMerge "[ActivityManager] Fix ServiceRecord leakage"
Olawale Ogunwale [Mon, 6 Apr 2015 15:25:03 +0000 (15:25 +0000)]
Merge "[ActivityManager] Fix ServiceRecord leakage"

9 years agoMerge "[ActivityManager] Examine bad process before clean up application record"
Olawale Ogunwale [Mon, 6 Apr 2015 15:24:40 +0000 (15:24 +0000)]
Merge "[ActivityManager] Examine bad process before clean up application record"

9 years agoMerge "[ProcessStas] fix index out of bounds when add duration."
Olawale Ogunwale [Mon, 6 Apr 2015 15:23:29 +0000 (15:23 +0000)]
Merge "[ProcessStas] fix index out of bounds when add duration."

9 years agoFix memory leak in Connectivity Service when phone app crashes
Maunik Shah [Mon, 30 Mar 2015 06:06:42 +0000 (11:36 +0530)]
Fix memory leak in Connectivity Service when phone app crashes

Upon crash of com.android.phone process, NetworkFactoryInfo is
not getting removed from HashMap and will get accumulated on
every start of the process.

Change-Id: Iafde28daddfc82728c03208522682b1efc85a121

9 years agoMerge "Remove the window whose client process has died or become zombie"
Olawale Ogunwale [Sat, 4 Apr 2015 16:12:39 +0000 (16:12 +0000)]
Merge "Remove the window whose client process has died or become zombie"

9 years agoMerge "Frameworks/base: Pass variant and feature-set to runtime"
Andreas Gampe [Sat, 4 Apr 2015 04:23:11 +0000 (04:23 +0000)]
Merge "Frameworks/base: Pass variant and feature-set to runtime"

9 years agoFrameworks/base: Pass variant and feature-set to runtime
Andreas Gampe [Fri, 3 Apr 2015 06:12:56 +0000 (23:12 -0700)]
Frameworks/base: Pass variant and feature-set to runtime

This is required so we pick up the settings correctly when compiling
the boot image on device, or compile any dex files through a
DexClassLoader.

Bug: 20055104
Change-Id: Ia3ab2e48855060894b36f7fd360fe17b978e45a6

9 years agoReuse dexopt method for both dex2oat and patchoat.
Richard Uhler [Wed, 25 Mar 2015 23:25:57 +0000 (16:25 -0700)]
Reuse dexopt method for both dex2oat and patchoat.

Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5