Commit Graph

2953 Commits

Author SHA1 Message Date
Jeff Sharkey
9f837a99d4 Reduce PackageManager RAM usage: ArrayMap/Set.
Transition PackageManager internals away from heavier HashMap/HashSet
to use drop-in ArrayMap/ArraySet replacements.  Saves ~38% RAM and
thousands of objects on a typical device.

Bug: 18115729
Change-Id: Ie107d2fee4b7baa4e3c3923231b4be877d1a5d2f
2014-10-24 12:26:45 -07:00
Yigit Boyar
d422dc358f Added a generic configuration and theme based cache
For now, only animators use it but we can consider migrating
drawable cache to it as well.

Bug: 17456416
Change-Id: I571b96856805edb171f0fc52e6bff5a365f46b70
2014-10-23 11:46:01 -07:00
Adam Powell
0b3c11260a Intent chooser callback
Let an app specify an IntentSender as an extra for ACTION_CHOOSER that
will be notified of the user's chosen target. Apps can use this to
implement things like one-touch last used affordances without
implementing their own one-off chooser UI.

Bug 17363684

Change-Id: Ic5d1d0e0c7a0bae3eda6b1d6ade993f3ba865cfa
2014-10-21 12:17:50 -07:00
Adam Lesinski
9086562a6a Minor resource notation/compatibility fixes
- Change the format of mnc/mcc when printing a resource-qualifier
  formatted string from a Configuration object.
- Correctly bump the SDK to 21 when using anydpi in a resource qualifier.

Change-Id: I3c31e344dc5384d45398d6e9f264a073abab65d1
2014-10-17 01:21:50 +00:00
Jeff Sharkey
2df7628591 am 203ed4db: am 88a6ed54: Merge "Reduce PackageInstaller Binder memory pressure." into lmp-dev
* commit '203ed4db9656cc3047c65e12e3969d21652d4ccf':
  Reduce PackageInstaller Binder memory pressure.
2014-10-15 16:58:49 +00:00
Jeff Sharkey
203ed4db96 am 88a6ed54: Merge "Reduce PackageInstaller Binder memory pressure." into lmp-dev
* commit '88a6ed5477eb6fa0453f9f29adef4c11b6eeade0':
  Reduce PackageInstaller Binder memory pressure.
2014-10-15 16:53:09 +00:00
Jeff Sharkey
97d47ed036 Reduce PackageInstaller Binder memory pressure.
When restoring hundreds of apps on low-DPI devices, we end up sending
icon Bitmaps inline in the response instead of splitting into ashmem
regions.  To avoid triggering TransactionTooLargeException, switch to
using ParceledListSlice under the hood.

Bug: 17926122
Change-Id: Ib4da6775e79d2fcb4aaea15f58ed998df203a5f9
2014-10-15 09:19:54 -07:00
Jeff Hao
1201d2a018 am dbfbb175: Backport of ordering apps for boot dexopt.
* commit 'dbfbb17512fe6a5b3c7198d60b6a149969174a71':
  Backport of ordering apps for boot dexopt.
2014-10-14 22:31:16 +00:00
Jeff Hao
dbfbb17512 Backport of ordering apps for boot dexopt.
This is a squashed commit of the following changes:

1. Order apps by priority when performing boot dexopt.
   (cherry picked from commit 65cde7d42d)

2. Improve priority ordering of apps when performing boot dexopt.
   Added core apps and updated system apps.
   (cherry picked from commit 272bf3a274)

3. Stop boot dexopt when low on memory.
   (cherry picked from commit 1d892dcb6b)

Bug: 17641843
Change-Id: Ie32f1c21047d3462aaf728f7633fecf647ba2b47
2014-10-14 15:02:37 -07:00
Jeff Hao
6b7515dd0d Merge "Improve priority ordering of apps when performing boot dexopt." into lmp-mr1-dev 2014-10-09 18:06:48 +00:00
Dianne Hackborn
d83e9e4280 am 0761b1b5: am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '0761b1b5ebb453a411e3289c1c972dbfddcee880':
  Put in real "code" (aka marketing) name.
2014-10-09 13:03:21 +00:00
Jeff Sharkey
b424849533 am b01a5ba2: am 562262cc: Merge "Bring along more ApplicationInfo fields." into lmp-dev
* commit 'b01a5ba2b7c1bc22e30d6cc16c30f8e1215701cd':
  Bring along more ApplicationInfo fields.
2014-10-09 13:03:07 +00:00
Dianne Hackborn
0761b1b5eb am 89b19695: Merge "Put in real "code" (aka marketing) name." into lmp-dev
* commit '89b196958fee07475765bd3c458098464ba16f2e':
  Put in real "code" (aka marketing) name.
2014-10-09 00:14:54 +00:00
Jeff Sharkey
b01a5ba2b7 am 562262cc: Merge "Bring along more ApplicationInfo fields." into lmp-dev
* commit '562262cc89838529316ff2f3e511c0d876b08677':
  Bring along more ApplicationInfo fields.
2014-10-09 00:14:25 +00:00
Jeff Hao
272bf3a274 Improve priority ordering of apps when performing boot dexopt.
Added core apps and updated system apps.

Bug: 17641843
Change-Id: Ia00ea3399cf1e1acaef45ff8df8f754442de5185
2014-10-08 20:36:24 +00:00
Dianne Hackborn
89b196958f Merge "Put in real "code" (aka marketing) name." into lmp-dev 2014-10-08 17:59:19 +00:00
Jeff Sharkey
7f1a57a3e7 Bring along more ApplicationInfo fields.
When we added scan paths, we forgot to bring them along through
Parcel and copy constructor.

Bug: 17900178
Change-Id: I0ee9374f909d375768045976fd88cee7431f7d4d
2014-10-08 10:14:53 -07:00
Dianne Hackborn
955d8d69ea Put in real "code" (aka marketing) name.
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
2014-10-07 20:17:19 -07:00
Alan Viverette
0660042a26 Merge "Mutate and apply theme if needed before caching themed drawables" into lmp-mr1-dev 2014-10-07 22:09:49 +00:00
Alan Viverette
727cae197b Mutate and apply theme if needed before caching themed drawables
This ensures that drawables are completely separated from their cached
constant states before applying a theme. After this, we can remove the
implicit (and incomplete) mutation in the clone constructors.

Also implements missing mutate() method on ClipDrawable.

BUG: 17646144
Change-Id: If0d66b0a85724d76e0a4f506758c7ba3c0aa3410
2014-10-07 15:08:47 -07:00
Jeff Sharkey
fcc059dcf0 am 1d5ef81e: am 99586dc0: Merge "Reduce PackageInstaller I/O pressure." into lmp-dev
* commit '1d5ef81e29279f769d79315f2a38e747ea92e10f':
  Reduce PackageInstaller I/O pressure.
2014-10-07 00:32:19 +00:00
Jeff Sharkey
1d5ef81e29 am 99586dc0: Merge "Reduce PackageInstaller I/O pressure." into lmp-dev
* commit '99586dc0108d0f4311c8af4d06ed113bbf40a6ee':
  Reduce PackageInstaller I/O pressure.
2014-10-06 23:59:43 +00:00
Jeff Sharkey
99586dc010 Merge "Reduce PackageInstaller I/O pressure." into lmp-dev 2014-10-06 23:51:56 +00:00
Jeff Sharkey
02bd78490d Reduce PackageInstaller I/O pressure.
When performing a restore during initial device setup, we could be
installing hundreds of packages.  Currently, we're writing all
metadata (including heavy icons) for every session mutation!  Because
we're holding the mSessions lock while writing all this heavy data,
we end up causing ANRs when apps call other PackageInstaller APIs.

This patch mitigates by moving the heavy icon data into separate
per-session PNG files, which we only persist when changed.

Bug: 17881962, 17567794
Change-Id: I4dee15d4a65a8eb65c381e6bb7477728b6cc30d2
2014-10-06 16:38:15 -07:00
Dianne Hackborn
2f577e83cb am 90d557b7: am 7f7d240b: Merge "Fix issue #17752399: Multiple apps broken by GET_TASKS permission change" into lmp-dev
* commit '90d557b7a68e64e049a44560b76b959ef87f13d7':
  Fix issue #17752399: Multiple apps broken by GET_TASKS permission change
2014-10-06 19:22:53 +00:00
Dianne Hackborn
90d557b7a6 am 7f7d240b: Merge "Fix issue #17752399: Multiple apps broken by GET_TASKS permission change" into lmp-dev
* commit '7f7d240b13b96b617e298c6178af0425308f5ef9':
  Fix issue #17752399: Multiple apps broken by GET_TASKS permission change
2014-10-06 19:17:10 +00:00
Benjamin Franz
31409c0ccd Merge "Introduce new API to get an unbadged icon and unbadge permissions." into lmp-mr1-dev 2014-10-06 16:26:27 +00:00
Dianne Hackborn
2d7576b082 Fix issue #17752399: Multiple apps broken by GET_TASKS permission change
Keep around GET_TASKS as a permission available to apps, so apps still
think they have it and don't get all uppity because they don't.

Add a new REAL_GET_TASKS that is the actual permission now.

Plus some temporary compatibility code until everyone can transition
fromn GET_TASKS to REAL_GET_TASKS.

Change-Id: I12c1102eed24844685dcbd2fa3b612811603958f
2014-10-03 16:26:04 -07:00
Benjamin Franz
ec2d48b96d Introduce new API to get an unbadged icon and unbadge permissions.
Bug: 17125560
Change-Id: I61b884186c96cc54dcaf1d3c7ee8f47610fd1d21
2014-10-03 09:41:08 +01:00
Newton Allen
c68aad9fd0 am d84ce32b: Merge "Fix some documentation typos." into lmp-dev
* commit 'd84ce32bd2d7c3cebac15545504f4fec464a6956':
  Fix some documentation typos.
2014-10-02 16:47:19 +00:00
Newton Allen
8f8a11b7fa Fix some documentation typos.
Change-Id: I747a0ade5c7b9c45d4465bf327952338bbc1cfaa
(cherry picked from commit 4465d1a03e)
2014-09-30 02:52:26 +00:00
Andres Morales
aa1bcd95cf am 858d04cb: Merge "Mark PDB identifier as SystemApi" into lmp-dev
* commit '858d04cbf0962acba1ffc0e5df4113c01ed3abec':
  Mark PDB identifier as SystemApi
2014-09-27 05:27:03 +00:00
Andres Morales
66b63cb825 Merge "Mark PDB identifier as SystemApi" into lmp-dev 2014-09-27 02:26:00 +00:00
Andres Morales
33df937f6f Mark PDB identifier as SystemApi
Had already marked the API itself as system api, just not
the Context.BLAH id. Also update the javadoc as it doesn't
return an FD anymore.

Change-Id: Ic8a5b8c75b0ba0bdf4ad26cf33d5f87eea568376
2014-09-26 17:08:59 -07:00
Jeff Sharkey
2649756975 am 45ef18b6: Merge "Include reason when wiping data." into lmp-dev
* commit '45ef18b63e78fd853865f42d9369a5c9b4dd4ba0':
  Include reason when wiping data.
2014-09-25 16:22:22 +00:00
Jeff Sharkey
004a4b20f8 Include reason when wiping data.
This will help us track down who requested a data wipe.

Bug: 17412160
Change-Id: If8413e5d6377773f37e8b34ae3d26347226a027c
2014-09-24 13:58:09 -07:00
Jeff Sharkey
5c1ac3d443 am e50b0a6c: Merge "More ACTION_CHOOSER ClipData migration." into lmp-dev
* commit 'e50b0a6c86c70f5ddcb69984cb99337ce1d96032':
  More ACTION_CHOOSER ClipData migration.
2014-09-24 00:05:53 +00:00
Jeff Sharkey
fb488eb2a2 Merge "More ACTION_CHOOSER ClipData migration." into lmp-dev 2014-09-23 23:58:51 +00:00
Jeff Sharkey
c004eef7bb More ACTION_CHOOSER ClipData migration.
Traverse into both EXTRA_INTENT and any EXTRA_INITIAL_INTENTS when
migrating extras to ClipData.  Also, we don't need to promote these
ClipData into the parent, since the platform ChooserActivity will
issue any required permission grants for the final user-selected
Intent.  Even if we wanted to, we can't combine the various child
Intent flags into anything meaningful at the ACTION_CHOOSER level.

Bug: 17580604
Change-Id: I6b5a1f572a7edf8135e059c67a2643d3736e40ab
2014-09-23 16:40:53 -07:00
Alan Viverette
60004caeba am 9e84a6a0: Merge "Fix inaccurate TypedArray.getDrawable() documentation" into lmp-dev
* commit '9e84a6a08b4ff50b745a6eaf35e52b9c7aef4c39':
  Fix inaccurate TypedArray.getDrawable() documentation
2014-09-22 23:58:31 +00:00
Alan Viverette
fde4e3b17a Fix inaccurate TypedArray.getDrawable() documentation
The documentation implied that you could override
Resources.getDrawable(int) to load custom drawables, which is
not the case.

BUG: 16635905
Change-Id: I06c0febe2d6d4194ef5a31f167b378fe311b7a2d
2014-09-22 16:19:51 -07:00
Paul Soulos
f9390f56c6 am b5586e00: Fixes typo in Intent documentation
* commit 'b5586e00ed5eb4b18b58371a54449f9cc8eedca8':
  Fixes typo in Intent documentation
2014-09-19 19:32:36 +00:00
Paul Soulos
628cb74d8a Fixes typo in Intent documentation
bug: 17583712
Change-Id: I37c77644213417751f8261098af44096aef51b14
2014-09-19 19:10:04 +00:00
Dianne Hackborn
f2cf16436b am 31ce4c62: Merge "Fix issue #17564607: Apps in the managed profile can send any intent..." into lmp-dev
* commit '31ce4c62e97cf7357707c894f6992f52a43c6c9d':
  Fix issue #17564607: Apps in the managed profile can send any intent...
2014-09-19 04:17:41 +00:00
Dianne Hackborn
ace27915d2 Fix issue #17564607: Apps in the managed profile can send any intent...
...to the primary user, even if it was not whitelisted to be forwarded.

The path where getActivityInfo is called for the ResolverActivity
would not correctly apply the requested user ID to the result, so
it wouldn't run under the correct user.

Change-Id: I1da47c54bbed26091832a28236d0b06762c92437
2014-09-18 19:01:01 -07:00
Alan Viverette
06e9f5345e am 8766bdcb: Merge "Fix parsing of old-style intent URIs" into lmp-dev
* commit '8766bdcb803698a2a2765bb46ab57bba655b41cf':
  Fix parsing of old-style intent URIs
2014-09-18 21:09:54 +00:00
Alan Viverette
0adf32bc1e Fix parsing of old-style intent URIs
Improves bounds checking to restrict category matches to within the
category(...) item. Fixes CTS failure in IntentTest.testGetIntentOld().

BUG: 17557490
Change-Id: I1859fe18eaa881b771bab373d705d8fbeb6406c4
2014-09-18 12:53:16 -07:00
Jeff Sharkey
2d360218b4 am 1d98fbf2: Merge "Update API naming to follow style guide." into lmp-dev
* commit '1d98fbf27258cbe98e9f7226cc6baedd83a80d3d':
  Update API naming to follow style guide.
2014-09-15 22:01:59 +00:00
Ihab Awad
e11a3b798b am 336c84c3: Merge "Add system feature for ConnectionService API support (1/3)" into lmp-dev
* commit '336c84c35722e221cb3ec5d99c3876a5e5015e2a':
  Add system feature for ConnectionService API support (1/3)
2014-09-15 22:01:41 +00:00
Jeff Sharkey
49c0e7375b Merge "Update API naming to follow style guide." into lmp-dev 2014-09-15 21:51:18 +00:00