174880 Commits

Author SHA1 Message Date
Alex Klyubin
558184f52f Merge "Make the new AndroidKeyStore API conformant." 2015-04-07 17:39:08 +00:00
Dmitriy Ivanov
d95e58cb60 Merge "Load libraries directly from apk" 2015-04-07 17:28:15 +00:00
Dmitriy Ivanov
dec4688f40 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
2015-04-07 17:25:23 +00:00
Olawale Ogunwale
d229f442d5 Merge "Add a timeout state to frozen windows" 2015-04-07 17:14:32 +00:00
Alex Klyubin
c46e9e7da4 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
2015-04-07 09:18:00 -07:00
Craig Mautner
3aacbbc025 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
2015-04-07 09:14:36 -07:00
Olawale Ogunwale
8928c7271b Merge "[ActivityManager] Improve task order of getRunningTasks." 2015-04-07 12:45:38 +00:00
Olawale Ogunwale
437db6106b Merge "[ActivityManager] Do not add service to reschedule after removing users." 2015-04-07 03:36:30 +00:00
riddle_hsu
ddc74155c9 [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
2015-04-07 11:30:09 +08:00
Fyodor Kupolov
36b26adde8 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
2015-04-06 19:04:08 -07:00
Jason Sams
7200f661c1 Merge "Fix minor blur doc bug" 2015-04-06 23:38:05 +00:00
Yang Ni
6422ee7105 Merge "Rewrote FieldPack::createFieldPack for alignment" 2015-04-06 23:28:23 +00:00
Yang Ni
8bcbf47245 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
2015-04-06 14:49:53 -07:00
Robert Greenwalt
069f4cbccb Merge "Fix memory leak in Connectivity Service when phone app crashes" 2015-04-06 17:34:51 +00:00
Olawale Ogunwale
47c1cf4b35 Merge "[ActivityManager] Fix ServiceRecord leakage" 2015-04-06 15:25:04 +00:00
Olawale Ogunwale
655ef08144 Merge "[ActivityManager] Examine bad process before clean up application record" 2015-04-06 15:24:41 +00:00
Olawale Ogunwale
baedbfbbb1 Merge "[ProcessStas] fix index out of bounds when add duration." 2015-04-06 15:23:30 +00:00
Maunik Shah
4b647f4c4d 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
2015-04-04 21:48:24 +05:30
Olawale Ogunwale
1d359daa60 Merge "Remove the window whose client process has died or become zombie" 2015-04-04 16:12:40 +00:00
Andreas Gampe
f8cb672f12 Merge "Frameworks/base: Pass variant and feature-set to runtime" 2015-04-04 04:23:12 +00:00
Andreas Gampe
605cca1a98 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
2015-04-03 16:08:20 -07:00
Richard Uhler
7b08b35bde Reuse dexopt method for both dex2oat and patchoat.
Change-Id: Ib9a6373f98474f1242367b5285086251a9d580e5
2015-04-03 13:53:03 -07:00
Elliott Hughes
efcbaec141 Merge "Only Windows doesn't have %zd." 2015-04-03 20:16:24 +00:00
Elliott Hughes
b12f2410c7 Only Windows doesn't have %zd.
Change-Id: I0e4b0fdc61641c5ecb724fd096bd2315dcf8ed4a
2015-04-03 12:56:45 -07:00
Alex Klyubin
64b0062a37 Merge "Load fewer classes when AndroidKeyStore provider is installed." 2015-04-03 19:47:17 +00:00
Alex Klyubin
6def5afcbc Load fewer classes when AndroidKeyStore provider is installed.
This avoids loading all AndroidKeyStore crypto SPI classes when the
AndroidKeyStore provider is instantiated and installed. This provider
is installed early on during the initialization of each app. Most apps
don't need these classes loaded.

Bug: 18088752
Change-Id: Ib43c9dd6a7d434b128916e0f9c8652ba61df0d47
2015-04-03 12:45:16 -07:00
Alex Klyubin
08963653fc Merge "Rename KeymasterException to KeyStoreException." 2015-04-03 19:13:49 +00:00
Chad Brubaker
377885e1e6 Merge "Mark all test keys as no auth required" 2015-04-03 19:13:37 +00:00
Alex Klyubin
b292e49b32 Merge "Obtain SPI without using Reflection." 2015-04-03 19:13:18 +00:00
Alex Klyubin
a0f656f9bd Obtain SPI without using Reflection.
Bug: 18088752
Change-Id: I76d42e17f5f28af6fd9a96ee812d286f6c6a085b
2015-04-03 12:09:56 -07:00
Miao Wang
6aed9ec1b8 Merge "[RenderScript] update exception reporting for copyTo() after autoPadding added." 2015-04-03 17:38:14 +00:00
Miao Wang
d9b6328509 [RenderScript] update exception reporting for copyTo() after
autoPadding added.

 - This CL fixes recent CTS failures about copyPadded after
   lmp-mr1-dev changes pushed to aosp.

Change-Id: Ica1f4fd934cd83ca4357ea7e7c82dcc7f844b689
2015-04-03 09:15:39 -07:00
Fyodor Kupolov
3d8b7f4d50 Merge "Support for storing OAT files in app directory" 2015-04-02 23:11:11 +00:00
younghwan1.kim
cd005ebf76 [ActivityManager] Do not add service to reschedule after removing users.
Some service which has persistent attribute has restarted again and
again after removing users.
but it dies right after launching because it is not valid in owner mode.

This patch will check service's userId whether userId is alive or not.
And then if userId is not alive, then service will bring down.

Change-Id: Id99bf3c651b88e377f1fd6bec8aaad81318d7579
2015-04-03 08:08:30 +09:00
Alex Klyubin
b4834ae3fa Rename KeymasterException to KeyStoreException.
The code in question talks to KeyStore which returns error codes
which are a mix of keystore and keymaster error codes. To better
match the layering of KeyStore on top of keystore and keymaster,
this CL renames KeymasterException into KeyStoreException. It also
adds human-readable error messages to exceptions raised by keystore
rather than keymaster (e.g., key not found).

Bug: 18088752
Change-Id: I4cd1235e16518c9f2e8c5557a457774c6e687b88
2015-04-02 15:57:27 -07:00
Chad Brubaker
ce7ad24b63 Mark all test keys as no auth required
Now that auth token checks are in keystore keys without any auth tags
are invalid.

Also adds a test to check that a key with auth required fails when none
is present.

Change-Id: I0d5d44d70a849978e9b2e809675b8343c6650ff2
2015-04-02 14:41:37 -07:00
Jason Sams
37192dcde3 Fix minor blur doc bug
Change-Id: I4c129d9d3c93d8a36c887e5c594b4402aca5745e
2015-04-02 14:10:53 -07:00
Alex Klyubin
3cc9e5d68d Merge "Improve the AndroidKeyStore-backed HMAC state machine." 2015-04-02 21:06:28 +00:00
Alex Klyubin
9635a56acf Merge "Expose new key use constraints in KeyPairGeneratorSpec." 2015-04-02 21:03:11 +00:00
Alex Klyubin
d2eec1a786 Merge "Add exception types for AndroidKeyStore key validity issues." 2015-04-02 20:24:48 +00:00
Alex Klyubin
855fa31eb5 Expose new key use constraints in KeyPairGeneratorSpec.
The constraints are currently ignored.

Bug: 18088752
Change-Id: Iabd2018200afb2bf8ac1748d1def47af74bfb9d3
2015-04-02 10:04:33 -07:00
Olawale Ogunwale
e4d4e22f26 Merge "[ActivityManager] Avoid improper resume top activity." 2015-04-02 16:39:18 +00:00
riddle_hsu
558e849a77 [ActivityManager] Avoid improper resume top activity.
When there is a process died, only resume top if
it contains visible activity.

This can fix case 1 in
https://android-review.googlesource.com/#/c/120901/

Change-Id: I45584e76f9e863980d04bbb593d7d26a8900acd0
2015-04-02 16:43:13 +08:00
tiger_huang
950ee77fc7 Remove the window whose client process has died or become zombie
Window Manager Service would fail to report window-resized to the
process which has become zombie. This would cause the window to
freeze screen continuously. In this case, we assume the process has
died and remove its window to recycle resources and to prevent it from
freezing the screen.

Change-Id: Ic7384731bf9a1fa8b9602d4f1dbee7492db126c5
2015-04-02 06:42:18 +00:00
Elliott Hughes
64c8a07345 Merge "Early return in RemoteViewsAdapter is too late" 2015-04-01 23:34:25 +00:00
Alex Klyubin
0b188927f4 Add exception types for AndroidKeyStore key validity issues.
Bug: 18088752
Change-Id: I7494cb6a793e2b57bb849a4253bba2803778c161
2015-04-01 16:22:00 -07:00
Alex Klyubin
a80eee052d Improve the AndroidKeyStore-backed HMAC state machine.
This defers the start of a new KeyStore operation after Mac.doFinal
until the next Mac.update or .doFinal. Previously, the a new KeyStore
operation was started immediately, at the end of doFinal.

Bug: 18088752
Change-Id: I2d594067ef261f519631d09f7a6087b715801656
2015-04-01 16:03:03 -07:00
Alex Klyubin
97467d82a3 Merge "Cleanse HTTP, HTTPS, and FTP URLs in Uri.toSafeString." 2015-04-01 20:15:53 +00:00
Alex Klyubin
3f24a1d94a Cleanse HTTP, HTTPS, and FTP URLs in Uri.toSafeString.
This makes the hidden API android.net.Uri.toSafeString omit most parts
of HTTP, HTTPS, and FTP URLs to avoid leaking anything unsafe. Only
the host and port are retained for these URLs.

Bug: 19215516
Change-Id: I2e9e33d9afaa9de5dd07a40532d56f0a2179f62a
2015-04-01 13:09:22 -07:00
Alex Klyubin
04047af628 Merge "Use Keymaster-friendly validity dates." 2015-04-01 20:01:00 +00:00