221701 Commits

Author SHA1 Message Date
Digish Pandya
2e4f67c388 Fix HWUI Path Cache dangling pointer
When precache, PathTexture is added to PathCache, and it is released after drawn if we want to clean it.
But the PathCache LRU still holds the entry of the PathTexture object. When trim the cache in
the end of each frame, LRU finds that its mListener is not NULL and invoke the functor, however,
mListerer points to the released PathTexture object and is a dangling pointer, thus leads to crash.
Smart pointer don't help here since they only manage scopes, while PathTexture is also controled by
its cleanup field.
The fix is to also remove the LRU entry of PathTexture*, it will also release the texture object
and there won't be texture leaks.

Change-Id: Iaa0621df5dc71532e9e75b38ad94384353930b95
2015-11-09 14:22:25 +05:30
Mark Lu
4e59db328d Fix system watchdog timeout when reading too many usage events.
Symptom:
As issue link:
https://code.google.com/p/android/issues/detail?id=193100

RootCause:
UsageStatsService.onDisplayChanged executed in system main thread,
If calling UsageStatsManager.queryEvents with too many events before it
(i.e. in daily usage event file,
too many activity resume / pause events or configuration change
during monkey test),
System will be blocked then watchdog timeout.

Solution:
Let display listener executed in background thread handler

Change-Id: Ic894d112612400ed8fb7ba843b3309fdc4f66fe1
2015-11-09 07:24:48 +00:00
Jeff Sharkey
5d7e951686 Merge "More APIs for encryption-aware apps." 2015-11-08 21:32:56 +00:00
Jeff Sharkey
e17ac15697 More APIs for encryption-aware apps.
Apps can mark manifest components as being encryption-aware, which
means they can safely be run before the credential encrypted storage
is available.

Start adding filtering logic so that we only return these components
when a user is running "with amnesia."  That is to say, only device
encrypted storage is available, so the user is running but with only
partial knowledge of its data.

To avoid calling into ActivityManager with the PackageManager lock
held, we quickly determine user state and splice the state into the
flags for later per-component evaluation.

Bug: 22358539
Change-Id: Idc56ec29f1ef04da8963e004314d7f5e47400997
2015-11-08 13:29:16 -08:00
Filip Gruszczynski
5e69fda6d9 Ignore wallpaper when looking for a position for a free window.
Wallpaper wanders through the window list, for example to position
itself directly behind keyguard. Because of this it will break the
ordering based on WindowState.mBaseLayer. There might windows with
higher mBaseLayer behind it and we don't want the new window to
appear above them. An example of this is adding of the docked stack
divider. Consider a scenario with the following ordering (top to
bottom): keyguard, wallpaper, assist preview, apps. We want the dock
divider to land below the assist preview, so the dock divider must
ignore the wallpaper, with which it shares the base layer.

Bug: 25564817
Change-Id: I5bab792d972f845931b54db9f9ae5ff9a4a0e9b3
2015-11-08 12:58:34 -08:00
Nick Kralevich
368513fa99 system_server: allow /proc read access to other UIDs
Add system_server to AID_READPROC, to allow system_server to read
/proc entries associated with other UIDs.

Bug: 23310674
Change-Id: I1602b8ee30670cde4ed56e2f901524c105895352
2015-11-07 17:04:04 -08:00
Chad Brubaker
da3dc74f49 Merge "Support nested domain-config elements" am: 749501e88e am: b549899d0b
am: 8427d98f7c

* commit '8427d98f7c3d6c1c05d78c5a9202c4110c3732b5':
  Support nested domain-config elements
2015-11-07 22:28:24 +00:00
Chad Brubaker
0420d8de74 Merge "Add xml source for network security configuration" am: ead46ecc84 am: 0cb8f01410
am: 06d93173b1

* commit '06d93173b1fe98013a41f3a35993dea8e60e48ad':
  Add xml source for network security configuration
2015-11-07 22:27:01 +00:00
Chad Brubaker
8427d98f7c Merge "Support nested domain-config elements" am: 749501e88e
am: b549899d0b

* commit 'b549899d0b6b95032a9c75e64c9276acd85510d1':
  Support nested domain-config elements
2015-11-07 22:23:00 +00:00
Chad Brubaker
06d93173b1 Merge "Add xml source for network security configuration" am: ead46ecc84
am: 0cb8f01410

* commit '0cb8f014105b9e8e3bdb12cf091ef61e8c575333':
  Add xml source for network security configuration
2015-11-07 22:21:40 +00:00
Chad Brubaker
b549899d0b Merge "Support nested domain-config elements"
am: 749501e88e

* commit '749501e88e5fa6bdc6594a9db5c232e31bdda867':
  Support nested domain-config elements
2015-11-07 22:16:10 +00:00
Chad Brubaker
0cb8f01410 Merge "Add xml source for network security configuration"
am: ead46ecc84

* commit 'ead46ecc843e3686ff5ae8008f4452fc79f847e7':
  Add xml source for network security configuration
2015-11-07 22:14:36 +00:00
Chad Brubaker
749501e88e Merge "Support nested domain-config elements" 2015-11-07 22:11:04 +00:00
Adam Lesinski
400136e06a Merge "AAPT2: Accept aliases defined for external resource types" 2015-11-07 22:11:00 +00:00
Chad Brubaker
ead46ecc84 Merge "Add xml source for network security configuration" 2015-11-07 22:10:50 +00:00
Adam Lesinski
caf4a89f18 Merge "AAPT2: Disambiguate merging of resources" 2015-11-07 22:09:37 +00:00
Adam Lesinski
fa10505cea AAPT2: Accept aliases defined for external resource types
Resource types that are typically stored outside of the resource table
(like layout, xml, drawable) can only have aliases (reference to another
resource).

Change-Id: Idb768801f02bb142e5be5e438904f221499bd756
2015-11-07 13:34:39 -08:00
Chad Brubaker
bd173c28fc Support nested domain-config elements
Nested domain-config inherit unset parameters from the domain-config
they are nested in. This helps avoid copy and pasted configs that are
almost the same except a few minor differences for a domain with
slightly different requirements.

For example: Consider a domain-config for example.com that, among other
settings, does not enforce hsts. Now if you want the rules for
example.com to apply to secure.example.com except that hsts _is_
enforced you can make a nested domain-config for secure.example.com
under example.com that sets hstsEnforced="true" and nothing else.

Change-Id: I9e33f7e62127fd7f4f15c3560fff2f2626477bd4
2015-11-07 13:31:04 -08:00
Roozbeh Pournader
47f71a697a Use the full locale list in resourceQualifierString().
Previously, only the first locale was dumped to the output in
android.content.res.Configuration#resourceQualifierString(). Now the full
locale list is part of the output.

Change-Id: I5d4b73738a14d48533ee96c38dbc6c4b204ea998
2015-11-07 11:55:38 -08:00
Adam Lesinski
83f2255f69 AAPT2: Disambiguate merging of resources
Merging local app resources is slightly different than merging
resources from a static library.

Local app resources may not have a package name set, but we do take interest in the
ID set for the package (should be 0x0 or match the ID of the app we're building).

Static library resources have an explicit package name defined for them, so we
only merge resources from that package.

Change-Id: I95e559ae94cc1df6972e77a347b1b37a93674c4d
2015-11-07 11:51:23 -08:00
Roozbeh Pournader
0d02bd8442 Removed unused setLocale() method.
The setLocale() method in android.content.res.AssetManager was not
used. Removing it to reduce maintenance cost.

Change-Id: I1b168fe84c2465d1ebc2b62bb965eda885e1220a
2015-11-07 11:22:24 -08:00
Adam Lesinski
b444afc0f4 Merge "AAPT2: Add support for clearer in-progress public attributes" 2015-11-07 18:07:01 +00:00
Chad Brubaker
5f96702f58 Add xml source for network security configuration
XmlConfigSource parses an ApplicationConfig from an xml resource.
Currently this supports app-wide default configuration via the
base-config element, per domain via the domain-config element and
inheritance of unset properties at parse time.

Inheritance of unset properties is currently only:
domain-config -> base-config -> platform default configuration
Where the most specific value is used.
For example: If the base-config specifies trust anchors, all connections
will use those anchors except for connections to a domain which has a
domain-config that specifies trust anchors, in which case the
domain-config's trust anchors will be used. If the domain-config or
base-config don't set trust anchors, or don't exist, then the platform
default trust anchors will be used.

Nested domain-config entries, debug-overrides, and thorough
documentation of the xml format will follow in later commits.

Change-Id: I1232ff1e8079a81b340bc12e142f0889f6947aa0
2015-11-06 22:24:01 -08:00
Chad Brubaker
eea9672b3d Merge "Fix incorrect hstsEnforced lookup" am: 1347cb81f4 am: 90b9ed5c82
am: d28d4bcf9b

* commit 'd28d4bcf9b6c9d8142fbed995250d41a59387c72':
  Fix incorrect hstsEnforced lookup
2015-11-07 02:53:50 +00:00
Chad Brubaker
d28d4bcf9b Merge "Fix incorrect hstsEnforced lookup" am: 1347cb81f4
am: 90b9ed5c82

* commit '90b9ed5c82f5a3bd754bebe69a8883b65d3f95cc':
  Fix incorrect hstsEnforced lookup
2015-11-07 02:47:59 +00:00
Chad Brubaker
90b9ed5c82 Merge "Fix incorrect hstsEnforced lookup"
am: 1347cb81f4

* commit '1347cb81f402c628f3346ea350a5862749901d59':
  Fix incorrect hstsEnforced lookup
2015-11-07 02:42:05 +00:00
Chad Brubaker
1347cb81f4 Merge "Fix incorrect hstsEnforced lookup" 2015-11-07 02:37:45 +00:00
Jeff Sharkey
94d0b64d4f Merge "Initial file-based encryption public APIs." 2015-11-07 02:37:21 +00:00
Jeff Sharkey
15447798a3 Initial file-based encryption public APIs.
Define two explicit directories where device-encrypted and
credential-encrypted data will be stored.  Third-party apps only
need access to the device-encrypted directory, so that's the only
API exposed for now.

General cleanup in how ApplicationInfo details are derived.

Bug: 22358539
Change-Id: If0a0108721a4aa1c3052b4912e08604bbf24e1ae
2015-11-06 18:35:27 -08:00
Adam Lesinski
6a85b54d50 Merge "AAPT2: Fix inclusion of comments in R.java javadoc" 2015-11-07 02:31:20 +00:00
Adam Lesinski
27afb9e889 AAPT2: Add support for clearer in-progress public attributes
Before, the ID assigned to a public resource without an explicitly set id
was more difficult to figure out. It would be the next available ID.

AAPT2 introduces a new way to specify public attributes in progress.

<public-group type="attr" first-id="0x0101047f">
  <public name="foo" />
  <public name="bar" />
  ...
</public-group>

The IDs assigned to each resource is auto-incremented starting from `first-id`.
This also keeps resource's with the same type grouped together so that
the auto-incrementing nature is evident.

Also, due to how AAPT2 was implemented, this is required :P

Change-Id: I95ea92ad0405e87ed0b1766879bb2f1d9d0b636e
2015-11-06 18:25:04 -08:00
Chad Brubaker
825c3f91ed Fix incorrect hstsEnforced lookup
Change-Id: I00364d8c1d3311bebd3ad88e557860e694ba5018
2015-11-06 18:08:12 -08:00
Makoto Onuki
7d22f8b64c Merge "Make sure to persist user restrictions in UMS" 2015-11-07 01:21:13 +00:00
Jim Miller
d72d5ac598 Log fingerprint state in KeyguardUpdateMonitor.
Attempt to track down bug 24508587

Change-Id: Ifb998e2752ec515c36dd302c2abeb1ab27f3a2f3
2015-11-07 00:48:33 +00:00
Suprabh Shukla
a50a8ec06f Merge "Fixing recent tasks not getting restored at startup" 2015-11-07 00:44:18 +00:00
Adam Lesinski
b274e35abf AAPT2: Fix inclusion of comments in R.java javadoc
Comments weren't being copied when merged from the various
resource tables.

Also refactored the JavaClassGenerator to omit a class
if no entries exist for it.

Change-Id: I6eaa89b7b3715bc05403635a2baf0d1db3efd142
2015-11-06 16:37:57 -08:00
Suprabh Shukla
74f9f165c2 Fixing recent tasks not getting restored at startup
Check for empty list before reading activity at index 0.

Change-Id: If87e3c4d2cedd86fdb427ddfb27d1f32f8f93412
2015-11-07 00:15:31 +00:00
Tao Bai
788f7433bd Merge "Add test to cover loading shared-lib with appAsLib as true. This patch made AppAsLib_test use its own resource" 2015-11-06 23:49:40 +00:00
George Mount
e998c3f5f6 Improve DatePicker focus for keyboards.
Bug 24873983

Focus moves properly within the SimpleMonthView and between
components of the DatePicker.

Change-Id: I61778f9b4f19536ff6c7a512f9b4faf7bf4447a7
2015-11-06 15:48:52 -08:00
Winson
13d30660ef Fixing issue with canceling the thumbnail in addition to the app window.
Bug: 25392381
Change-Id: Ib507f53bcd2aad4771c2546f5e8bfe771769e9a2
2015-11-06 15:30:29 -08:00
Winson
7395ef0cdb Reverting debug flag.
Change-Id: I918d43827ecd7be52b41fb632850775161aa3902
2015-11-06 14:54:41 -08:00
Tao Bai
dd337646a9 Using addAssetPathAsSharedLibrary to load asset.
This will alllow framework to overrdie the resource id even the
package resource is app.

Change-Id: I176166e7c51ceb5e84101deb3f467a826f484251
2015-11-06 14:43:12 -08:00
Winson
6b92c6e524 Adding fast alt-tab trigger to prevent full animation.
Change-Id: I3df7a99977d0c2687eea084a95a0953429e8ff47
2015-11-06 14:42:14 -08:00
Tao Bai
1375e5f180 Add test to cover loading shared-lib with appAsLib as true.
This patch made AppAsLib_test use its own resource

Bug 22487604

Change-Id: Iac4cc949f1b25c326a287a49e0b031bf6831e9e9
2015-11-06 14:33:49 -08:00
Makoto Onuki
9e935a3bc9 Make sure to persist user restrictions in UMS
Bug 25565111

Change-Id: Ic48ce728a1c2b55d70276a37b9a359407167edf1
2015-11-06 14:24:24 -08:00
Winson
1b58561f66 Fixing up some more focus edge cases.
- Disallow touch while alt-tabbing
- Allow keyboard to focus tab while scrolling
- Cleaning up some old classes that aren’t really being used

Change-Id: Ibabea093afb711b07f398677d25735421b7c7e53
2015-11-06 13:48:45 -08:00
Chad Brubaker
6e92454065 Merge "Fix directory check in UserCertificateSource" am: 1483ee3aa5 am: 2d7d8401a9
am: a8fd356640

* commit 'a8fd35664070134f0596238ad0c5bdaa3adc221b':
  Fix directory check in UserCertificateSource
2015-11-06 21:28:24 +00:00
Chad Brubaker
52fe096d86 Merge "Fix incorrect hasPerDomainConfigs check" am: c5c51dafb3 am: dd6d0918c4
am: a21b4a528d

* commit 'a21b4a528dc7c728b3546899c90758d583f35495':
  Fix incorrect hasPerDomainConfigs check
2015-11-06 21:26:55 +00:00
Chad Brubaker
74e67e04a5 Merge "Use a builder for NetworkSecurityConfig" am: 7e98f2e697 am: 478fad3cf5
am: 54b4b8fdfc

* commit '54b4b8fdfc336b8a4902637e622c3ede879edcde':
  Use a builder for NetworkSecurityConfig
2015-11-06 21:25:31 +00:00
Chad Brubaker
a8fd356640 Merge "Fix directory check in UserCertificateSource" am: 1483ee3aa5
am: 2d7d8401a9

* commit '2d7d8401a9c1e03f8f141415b25cfb415df73695':
  Fix directory check in UserCertificateSource
2015-11-06 21:19:02 +00:00