Commit Graph

3568 Commits

Author SHA1 Message Date
Christopher Tate
b911676209 Avoid parceling redundant ApplicationInfo objects within PackageInfo
Two benefits:

  1) marshaling one flattened ApplicationInfo as part of a PackageInfo parcel
     rather than one per included ComponentInfo; and

  2) producing one ApplicationInfo at unmarshaling time and sharing the
     reference to it among all included ComponentInfo instances, rather
     than the previous implementation that generated a separate
     ApplicationInfo instance for each ComponentInfo.

In some cases there can be many hundreds of ComponentInfo objects embedded
in a single PackageInfo, so coalescing duplicates is a significant win
for both payload size and object pressure.

Bug 19519502
Bug 20453802

Change-Id: Ib888810dad4471084fab9ead1ebb5e0b932905f1
2015-09-10 14:04:01 -07:00
Tao Bai
ab5bca1519 Merge "Load app resource as shared library." 2015-09-09 16:08:12 +00:00
Tao Bai
a6d7e3fb9c Load app resource as shared library.
- Added aapt command line flag --app-as-shared-lib to build app resources
  that could be loaded as shared lib at runtime.
- Added new method AssetManager.addAssetPathAsSharedLibrary() to load an
  app resource as shared library.

Bug 22487604

Change-Id: Ib9b33c35f9c2b7129f3ba205de03d4564623ea39
2015-09-08 18:48:42 -07:00
Wale Ogunwale
b1a4bf2c4b Ignore empty locale list when diffing Configuration objects
b46fdd4 introduced the concept of locale list to Configuration objects.
However, the change alway returned a locale difference when the delta
object locale list is set to the defualt (empty). We now don't return
a difference if the delta object as an empty locale list which is
consistent with what we did before the change and in line with how we
diff other configuration fields.

Bug: 23744091
Change-Id: I8c2c39d9a7e91e6a3a283312b745c4fdf6874396
2015-09-03 15:08:51 -07:00
Roozbeh Pournader
cdc5673633 Merge "Make res.Configuration support locale lists." 2015-09-01 17:55:49 +00:00
Nick Kralevich
26637cb3fd am 1293b953: am 712205ba: am 9d586927: Merge "Automatically assign default seinfo labels using the string "default"."
* commit '1293b953c4c82dfc8738ba1dfc48f7739df78c69':
  Automatically assign default seinfo labels using the string "default".
2015-09-01 17:06:15 +00:00
Nick Kralevich
712205bac0 am 9d586927: Merge "Automatically assign default seinfo labels using the string "default"."
* commit '9d586927102b597845607ccc82661e350821de82':
  Automatically assign default seinfo labels using the string "default".
2015-09-01 16:37:59 +00:00
Robert Craig
5e16bc5a14 Automatically assign default seinfo labels using the string "default".
default seinfo values are those for which policy lacks a
matching stanza in the corresponding mac_permissions.xml
file. Prior to this change the null object reference was
used to represent the non-matching state. This is in
contrast to a policy supplied default stanza which will
assign a non null seinfo value. Confused yet?

Basically, two default states were distinguished in the
code to describe the two cases where either a policy stanza
spelled out the base case seinfo label or not. Policy
writers could either supply a default stanza or rely on
the class instantiated value assigned by the ApplicationInfo
object. The hope was that the later assignment could be
used to help distinguish the cases where policy writers
intentionally white listed apps. This change will just use
the hard coded "default" string implicitly to describe all
cases and removes the idea of a policy supplied default stanza.

Change-Id: Ib7b01ee004775f24db9a69340a31784b967ce030
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2015-09-01 05:51:04 -04:00
Fyodor Kupolov
3f1099b062 Merge "Non-system users can now have restricted profiles" 2015-08-28 21:44:54 +00:00
Roozbeh Pournader
b46fdd427c Make res.Configuration support locale lists.
We also deprecate the locale attribute, but works around the cases in
which people would call it.

Also add various methods to LocaleList to support the features
Configuration requires.

Change-Id: Iacc537e5fc1a3d4c1ea7e5517347876ca4e07e0a
2015-08-27 17:54:01 -07:00
Fyodor Kupolov
06a484adb9 Non-system users can now have restricted profiles
In the non split system user, only USER_OWNER is allowed to have restricted
profiles. This is now changed in split user mode, where multiple secondary
users can have restricted profiles.

Added UserInfo.restrictedProfileGroupId field, which defines parent/child
relationship between secondary users and linked restricted profiles. Adjusted
shared accounts handling logic to not assume that USER_OWNER is the only owner.

Bug: 23191995
Change-Id: I5f3fc2aa4f229103d6e75ec2c3dfce866b8007de
2015-08-27 15:38:29 -07:00
Alan Viverette
02fc5fef36 Extract drawable inflation to its own class, inflate from class name
Bug: 22627299
Change-Id: Icd2ac88af4f3102e08e52f6f0f7565839da6437a
2015-08-27 13:16:09 -04:00
Fyodor Kupolov
2170ee43a1 Merge "Limit the number of apps running as system user" 2015-08-26 22:14:36 +00:00
Fyodor Kupolov
d3a182e573 Merge "Renamed primaryUserOnly to systemUserOnly" 2015-08-26 17:25:51 +00:00
Fyodor Kupolov
7db5af124e Limit the number of apps running as system user
For the system user, enable apps based on the following conditions:
- app has no launcher icons or has INTERACT_ACROSS_USER_FULL permission
- app is whitelisted
- app is not in the blacklist

Bug: 23283899
Change-Id: I90fa266e8cfb28d002e5f792998fdddb6a1e6969
2015-08-26 10:18:10 -07:00
Fyodor Kupolov
4f5de340c9 Renamed primaryUserOnly to systemUserOnly
In the split mode, broadcast receivers and activities marked as
systemUserOnly will be running as system. This is a non-functional change for
non-split system user mode.

Bug: 22958572
Change-Id: I0f7d4f4a81275bc326bf630a776c695e8b5291a6
2015-08-25 18:26:49 -07:00
Xiaohui Chen
bd0e03bb76 More USER_OWNER cleanup.
Bug: 19913735
Change-Id: I408a92d9dbab2a096407efccb91e2a8bdc22714d
2015-08-24 16:42:37 +00:00
Filip Gruszczynski
db0fa33f44 Merge "Using initial activity layout to position the launching activity." 2015-08-24 14:39:03 +00:00
Filip Gruszczynski
9b1ce52f25 Using initial activity layout to position the launching activity.
The activity can be positioned in the center or in one of the corners.
From there it shifts its position and tries to find a spot where it
doesn't collide with other activities.

The CL also includes a few fixes necessary to pipe the information about
the initial layout through the system.

Change-Id: I2aaf5b6d20044aafec713b7bd4193b05cfbd16f3
2015-08-24 07:35:38 -07:00
Fyodor Kupolov
3a22ad0ac4 am 09dbd46a: am 037281d4: am 563f974d: am d7cdbd4d: am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit '09dbd46af8faa60419a97e926463dc25fbd0513f':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-22 01:22:32 +00:00
Fyodor Kupolov
09dbd46af8 am 037281d4: am 563f974d: am d7cdbd4d: am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit '037281d4a9a22fa55b643e785ff32144cfa61591':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-22 00:41:08 +00:00
Fyodor Kupolov
950297d27f am e6c64508: Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev
* commit 'e6c64508aba566b5bd4ac9cd87a07358b13f5a06':
  Fixed a typo in convertRestrictionsToBundle JavaDoc
2015-08-21 23:12:14 +00:00
Fyodor Kupolov
e6c64508ab Merge "Fixed a typo in convertRestrictionsToBundle JavaDoc" into mnc-dev 2015-08-21 23:04:09 +00:00
Fyodor Kupolov
7d35fc3898 Fixed a typo in convertRestrictionsToBundle JavaDoc
Bug: 23408097
Change-Id: Ie06c33aa7b9a953dec645d1763e27dcb506764f0
2015-08-21 11:25:55 -07:00
Filip Gruszczynski
c12e6780e4 Merge "API for specifying size/gravity of launching activity." 2015-08-20 22:43:25 +00:00
Filip Gruszczynski
848fe6bef2 API for specifying size/gravity of launching activity.
Change-Id: I4d75b3fa56ff9c35be9beeba81e3ec9ab28a9996
2015-08-20 15:27:36 -07:00
Fyodor Kupolov
e67177d79a am 9125dbbf: am 1ffb592e: am 78985f3f: am ea57b592: am 1773ded8: Merge "Fixed key comparison in equals method" into mnc-dev
* commit '9125dbbf932efafa7a86ddb3e45598f230a81952':
  Fixed key comparison in equals method
2015-08-20 20:27:35 +00:00
Fyodor Kupolov
9125dbbf93 am 1ffb592e: am 78985f3f: am ea57b592: am 1773ded8: Merge "Fixed key comparison in equals method" into mnc-dev
* commit '1ffb592e0b0bf68e2d1db13712dc1c9810507140':
  Fixed key comparison in equals method
2015-08-20 20:19:36 +00:00
Fyodor Kupolov
8a363bb13d am 1773ded8: Merge "Fixed key comparison in equals method" into mnc-dev
* commit '1773ded84684593f459b19f3271d471b38f14f85':
  Fixed key comparison in equals method
2015-08-20 19:56:02 +00:00
Fyodor Kupolov
1af7a83939 Fixed key comparison in equals method
Bug: 23376695
Change-Id: Ie4bd55a88f5f86fd8de7b087d0a5f1755951e90d
2015-08-20 10:24:14 -07:00
Nicolas Prévot
be8b98b939 Merge "Allow non-owner users to have managed profiles." 2015-08-20 14:48:18 +00:00
Nicolas Prevot
b818681dca Allow non-owner users to have managed profiles.
In the split system user model:
The only users that are not allowed to have managed profiles are:
- purely system user (user 0)
- guest users
- restricted profiles
- managed profiles

In the non-split system user model, the behavior does not change:
only the primary user can have managed profiles.

BUG:22956426
Change-Id: If908c30f110fd3e740770174f050c9b6cf87ce1b
2015-08-20 14:15:19 +01:00
Xiaohui Chen
98404fdc0b Clean up USER_OWNER reference.
Bug: 19913735
Change-Id: I441672b360fa0fff5453f72c88f9577b5cc8eecf
2015-08-19 18:34:46 +00:00
Dianne Hackborn
83eb8493b2 am 0ce3a291: am 914eda00: am 574f9b42: am ac11522e: am 06f552cf: Merge "Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo..." into mnc-dev
* commit '0ce3a291fb4fdbfd041e605c0cb71dff4f681e8a':
  Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo...
2015-08-16 03:02:55 +00:00
Dianne Hackborn
0ce3a291fb am 914eda00: am 574f9b42: am ac11522e: am 06f552cf: Merge "Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo..." into mnc-dev
* commit '914eda0070cde26325db3d2a2e9bbf0a9e612107':
  Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo...
2015-08-16 02:55:05 +00:00
Dianne Hackborn
b774ed20ec am 06f552cf: Merge "Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo..." into mnc-dev
* commit '06f552cf9a89cd129beda8318a4832bd56d00796':
  Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo...
2015-08-14 22:27:14 +00:00
Dianne Hackborn
ae49872100 Add debugging for issue #23190084: [APPComm][Dev Test] {Unable to share photo...
...from Camera360 to Hangouts }

In the short URI toString, include a small summary of the ClipData (instead
of just saying it has a clip data).  This makes it a lot easier to understand
what is happening when you look at the log of activity starts.

Also separate out the activity manager dump of URI permission grants from
its dump of providers, so it is easy to just look at that state.

Change-Id: I68093d9f279944e1aa9a29347075f237f4f55ed3
2015-08-14 14:08:43 -07:00
Chris Tate
848dd4bfc9 am 14e12258: am 13845aea: am b2d4c550: am b47890c4: am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '14e122582c45e236bf2e4c59d10438816f2eed09':
  Make "Ask every time" actually work that way
2015-08-14 17:44:39 +00:00
Chris Tate
14e122582c am 13845aea: am b2d4c550: am b47890c4: am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '13845aeae3fc3044f3fc279ca421df6d4f78ee35':
  Make "Ask every time" actually work that way
2015-08-14 17:35:28 +00:00
Chris Tate
d7a164bf3f am 7e7d79ef: Merge "Make "Ask every time" actually work that way" into mnc-dev
* commit '7e7d79ef2f4aa6a8da86af459d419bd24c47b440':
  Make "Ask every time" actually work that way
2015-08-14 17:15:18 +00:00
Christopher Tate
56f0ff3c48 Make "Ask every time" actually work that way
..in link-opening behavior.  If a candidate is marked as "ask
every time," then the user is guaranteed to get a disambiguation
prompt including that candidate even when some other candidate
app is in the "always prefer this over a browser" state.

Bug 23147746

Change-Id: I904d8697a992b3f16f32b1c1b49c2bf9424c7137
2015-08-13 18:56:05 -07:00
Alan Viverette
02e8c2d418 Merge "Rebase system theme on configuration change" 2015-08-13 20:06:18 +00:00
Deepanshu Gupta
8d38e7c905 Merge "Add StyleableRes annotation to TypedArray." 2015-08-13 00:25:54 +00:00
Alan Viverette
395cd017e6 Rebase system theme on configuration change
Also makes native theme accesses thread-safe to avoid a race condition
when modifying the theme off the UI thread. Since drawable loading can
occur off the UI thread, we need to ensure Theme access is thread-safe
anyway.

This reverts commit c12ec70def.

Change-Id: If8fecde76d62738a8e55eddf898eafc468afdba2
2015-08-11 17:27:04 -04:00
Filip Gruszczynski
2349332f9f Only relaunch activity on significant size configuration changes.
Currently if the configuration width/height/smallest width changes, we
relaunch the activity or invoke onConfigurationChanged callback. When it
comes to size based configuration changes it might not be necessary: if
the size change doesn't pass one of the threshold defined by the
resources, it means there is no need to relaunch the activity.

In this CL the ActivityManager will receive the thresholds from the
application and use them to decide, whether to relaunch the activity.
The application reads the thresholds from the resources, specifically
from resource qualifiers used by the app.

Change-Id: Ie3cf0a172dc1ba0b865cf30c2962e7cfd9ad8436
2015-08-10 13:47:31 -07:00
Svetoslav Ganov
64b9b9ad9e am 618e065c: am 546a3449: am e12a685c: am 02d6c013: am 90b030ba: Merge "Do not show removed permissions in the UI - framework" into mnc-dev
* commit '618e065cc14b9069954e462fc25cdc934ee3300f':
  Do not show removed permissions in the UI - framework
2015-08-08 07:22:34 +00:00
Svetoslav Ganov
618e065cc1 am 546a3449: am e12a685c: am 02d6c013: am 90b030ba: Merge "Do not show removed permissions in the UI - framework" into mnc-dev
* commit '546a34490fbb31e40199e325473c5a510b61b55b':
  Do not show removed permissions in the UI - framework
2015-08-08 07:15:24 +00:00
Svetoslav Ganov
8a23ad62c5 am 90b030ba: Merge "Do not show removed permissions in the UI - framework" into mnc-dev
* commit '90b030bae8cc1f13da7948fef4aff1d171a2885a':
  Do not show removed permissions in the UI - framework
2015-08-08 06:58:03 +00:00
Svet Ganov
3e0be7440b Do not show removed permissions in the UI - framework
bug:23043018

Change-Id: Ia5cf49f299eda627d9fde2b34498812afcb3a6d5
2015-08-07 23:06:04 -07:00
Deepanshu Gupta
d7bb3f8029 Add StyleableRes annotation to TypedArray.
Change-Id: Ice79b7791f72485aa3a6c2777334946316e72ff5
2015-08-07 21:59:53 +00:00