5065 Commits

Author SHA1 Message Date
Jerome Gaillard
57415885f0 Delete Canvas_Delegate.nClipRegion after Change I71f9bd68
Test: layoutlib tests
Change-Id: I9c04fa258cdaf06972b205e5dd5d3b505e5bea17
2017-01-16 15:22:42 +00:00
Jerome Gaillard
02d091aa2a Merge "Update layoutlib following Change Id10ca97f on FontFamily" 2017-01-16 14:24:57 +00:00
Jerome Gaillard
8dd288f420 Merge "Add measure only call to layoutlib" 2017-01-16 14:24:15 +00:00
Jerome Gaillard
1a376e2df4 Merge "Create a mock Display Mode" 2017-01-16 14:20:51 +00:00
Bartosz Fabianowski
9e0642287e Merge "Add install reason" 2017-01-14 12:58:20 +00:00
Zak Cohen
9013325c3a Merge changes from topic 'vrmode'
* changes:
  Set ui mode in UiModeManagerService to vrheadset when VR mode is enabled.
  Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
2017-01-13 23:15:00 +00:00
Bartosz Fabianowski
a34f53f61b Add install reason
This CL allows a reason to be specified when installing a package. The
install reason is a sticky piece of metadata: When a package is e.g.
installed via enterprise policy and an update is then manually
installed or sideloaded, the install reason will remain "policy."
The install reason is tracked separately for each user.

With this CL, two install reasons exist: "policy" and "unknown." Other
install reasons will likely be supported in the future.

Bug: 32692748
Bug: 33415829
Test: Tested manually with "adb install" / "adb uninstall"

Change-Id: I0c9b9e1b8eb666bb6962564f6efd97e41703cd86
2017-01-13 16:51:28 +01:00
TreeHugger Robot
4391fae30e Merge "Compile bit on darwin, use -j when invoking make" 2017-01-12 19:38:54 +00:00
TreeHugger Robot
d96cc6e250 Merge changes I2ff9bd44,I946e681e,If72df07b
* changes:
  Handle content insets for snapshots
  Always remove starting window in performShow
  Initial implementation of snapshots
2017-01-12 17:39:15 +00:00
Jeff Sharkey
9bc89af3f1 Add API for apps to declare their "category".
Upcoming platform features need to cluster apps together into broad
categories to help summarize information to users.  (For example,
when presenting battery, network, and disk usage.)

We are tightly limiting the set of categories to keep them easily
presentable to users when summarizing information.  This feature is
not designed to be a general-purpose taxonomy, nor should it be
allowed to become one.

Older apps may not have defined a category in their manifests, so
allow the installing app to define a category on their behalf.

Test: builds, boots
Bug: 33815939
Change-Id: I785b882ee7c18072ef47d56e0fc19ad72888e1b7
2017-01-12 09:53:44 -07:00
Jorim Jaggi
e2c77f9035 Handle content insets for snapshots
Pass information about content insets of a snapshotted task to
SystemUI and use it there to correctly offset the snapshot
when drawing.

Test: Open app, go to recents, make sure app aligns before
and after the animation.
Bug: 31339431
Change-Id: I2ff9bd44534bd8f66b591385da1e1e3aec40b6c5
2017-01-12 16:28:19 +01:00
Jorim Jaggi
02886a82d8 Initial implementation of snapshots
All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
2017-01-12 16:28:01 +01:00
Jerome Gaillard
7a1cab2c96 Update layoutlib following Change Id10ca97f on FontFamily
Test: layoutlib tests

Change-Id: Ic8872a43993bcb0a157c5e3f0ce423af9b47f606
2017-01-12 15:06:46 +00:00
Seigo Nonaka
e96cbd2773 Merge "Check the count of the families in a default collection." 2017-01-12 06:02:58 +00:00
Romain Guy
d973affed2 Compile bit on darwin, use -j when invoking make
Test: ran the host tool and checked the output
Change-Id: Idd561139348779982b8c01977fcc18fdfbd0134d
2017-01-11 18:34:57 -08:00
Phil Weaver
9fa89381bf Merge "Add flag and listener for a11y volume requests." 2017-01-11 21:57:09 +00:00
Diego Perez
54ffb4358c Add measure only call to layoutlib
Change-Id: Ie36a5218a0356f394356fce2b327f35f57a26951
(cherry picked from commit 7a6d487f9254aaa175976e5832cea78a1a79c9e7)
2017-01-11 20:12:14 +00:00
Diego Perez
57c3440fdc Create a mock Display Mode
Recycler view gets the refresh rate of the display during its setup.
Implementing a Mode that returns a fake refresh rate.

Bug: 32328330
Change-Id: I1025641ec37ca3ec90309b30ad270fd996fd8d46
(cherry picked from commit 4a1c85c71f4de5faeeab2791f80dd7a1ad423f2c)
2017-01-11 20:11:51 +00:00
Jerome Gaillard
5058633a58 Merge "Separate render and verify in tests" 2017-01-11 19:54:46 +00:00
Zak Cohen
1a6acdbb86 Introduce new UI_MODE_TYPE_VR_HEADSET and qualifier.
Bug: 30989383
Test: Unit test for aapt2
Change-Id: I66dc65af6327b94fed74538bee08cada0b8be4fa
2017-01-11 11:44:47 -08:00
Wale Ogunwale
e1fe7fa288 Added TaskWindowContainerController
For linking TaskRecord in AMS to Task window container in WMS.

Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
Change-Id: I16248f3e96e5087ba24198a48a3bd10a12ae76a6
2017-01-11 09:19:35 -08:00
Diego Perez
8a7546e1fc Separate render and verify in tests
Test: Test refactoring. Tests still pass
Change-Id: Icdee3eb9ef1b2639418110583ac74a3fd5362166
(cherry picked from commit 564b00dd5201711c25a3580aa21be8b36bfaf923)
2017-01-11 15:58:31 +00:00
Diego Perez
5becc4872f Merge "Call onApplyWindowInsets after requestApplyWindowInsets" 2017-01-11 15:57:15 +00:00
Seigo Nonaka
9092dc2fa8 Check the count of the families in a default collection.
After I9e01d237c9adcb05e200932401cb1a4780049f86, Minikin can
accept up to 254 font families. To make sure we don't exeed this limit,
introduce an assertion to fontchain_lint.py

Bug: 33562608
Test: m fontchain_lint
Change-Id: I35fc104fd4763f77145bef0e7c5facf30fa99644
2017-01-11 17:46:52 +09:00
Adam Lesinski
6a893bc04e Merge "AAPT: Dump maxSdkVersion for implicit permissions" 2017-01-09 18:56:07 +00:00
Jerome Gaillard
9758e22d2c Implement delegate for new native method from Bitmap
The method Bitmap.nativeCopyPreserveInternalConfig was introduced by
Change Ic128dfed.

Test: Run layoutlib tests
Change-Id: I13da7deece9eb1d0d3e6a42203522fcf0b332ba9
2017-01-09 14:27:01 +00:00
Jerome Gaillard
63389daeed Merge "Update layoulib following changes in Android source code" 2017-01-09 13:12:52 +00:00
Phil Weaver
4acc16d1b6 Add flag and listener for a11y volume requests.
We're adding a dedicated volume level for accessibility. Services
can use the new flag to request that this volume be activated for
accessibility usages.

To let AudioManager know when the request state changes, adding a
hidden convenience method to check if any active service requests
the a11y volume stream. This method can be used to enable the
stream and to decide when to show the UI to change its volume.

AudioManager wanted a listener for changes to this flag, so rather
than add yet another special-purpose listener, I've added one that
gets called back whenever there are state changes in a11y services.
These changes happen infrequently enough that we shouldn't need
more targeted methods.

Bug: 30448020
Bug: 27899567

Test: Adding CTS in linked CL.
Change-Id: Ifc53314dc7d9a6ee3d50b04ebcc1a87280cafa5e
2017-01-06 09:38:53 -08:00
Wale Ogunwale
26c0dfed7a Support for WindowContainer controllers and listeners
- WindowContainerController class allows a component outside window manager
to create a window container and communicate directly with it to make
changes. For example, the ActivityRecord class in activity manager uses the
AppWindowContainerController class to create and communicate with
AppWindowToken window container class which is its counterpart on the window
manager side.
- WindowContainerListener interface allows a component outside WM to get
notified of changes to a window container. For example, the ActivityRecord
class in AM implements the AppWindowContainerListener interface to get
notified of changes to the AppWindowToken container.

Bug: 30060889
Test: Existing tests pass and manual testing.
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Change-Id: I2896bfa46a80b227052528c7da8cf4e56beab4bc
2017-01-06 09:11:02 -08:00
Jerome Gaillard
39bdc174ae Update layoulib following changes in Android source code
This reflects modifications from Id2374bba and I99e1942d.

Test: Run layoutlib tests
Change-Id: I5cd56d8417b997b99be668825d950de661d75818
2017-01-03 15:32:53 +00:00
Adam Lesinski
2386df23ac AAPT: Dump maxSdkVersion for implicit permissions
Bug: 32599997
Test: Manual
Change-Id: I13bdcf097625e3cb5fb35da1eb2544b0f8906e79
2016-12-28 16:07:24 -05:00
TreeHugger Robot
280cdfcbc0 Merge "AAPT2: Treat non-AAPT attributes as Attributes with no format specified." 2016-12-28 19:29:22 +00:00
Adam Lesinski
38665547bb AAPT2: Treat non-AAPT attributes as Attributes with no format specified.
Attributes in XML like "class" should be treated as attributes with no
format specified. That means that something like 'version="1"' will
be interpreted as an Integer value instead of as a string.

This is more in line with the old AAPT behaviour.
Bug: 30763349
Test: make libaapt2_tests

Change-Id: I02fe41617e3c62c354714056198ef480d62afee7
2016-12-28 12:40:35 -05:00
TreeHugger Robot
0abb3003a1 Merge "Tighter equals/hashCode method checking." 2016-12-22 00:49:12 +00:00
TreeHugger Robot
a090de5c8b Merge "Detect non-static abstract inner classes." 2016-12-21 22:21:17 +00:00
Jeff Sharkey
40d623e676 Tighter equals/hashCode method checking.
Test: false-positive no longer triggered
Bug: 32721082
Change-Id: I49b6225a7282d0bb84b0dfb4cabe56e9f68186a9
2016-12-21 13:58:42 -07:00
Jeff Sharkey
26c8090647 Detect non-static abstract inner classes.
Test: script detects issue
Bug: 32982018
Change-Id: I4e3521bf603f6272bfe5583e3d4977dd5b59afe8
2016-12-21 13:42:03 -07:00
Joe Onorato
73c109a089 turn off warning that proto generated code causes.
Test: make
Change-Id: Ife3006dc16691dd95a2cc3d36c9b8832970601c9
2016-12-20 22:28:56 -08:00
Joe Onorato
5a991adaf5 Fix varargs bug that made incident_report print incorrectly.
Test: incident_report 3000
Change-Id: I397677ecd6e50ad143518416c8fa3e408139189b
2016-12-20 22:28:56 -08:00
Joe Onorato
7669012623 Clean up file names for protos
Test: cts-tradefed run singleCommand cts -d --module CtsIncidentHostTestCases
Change-Id: Iea2fc81768082e8e01afa8df86e113665020e7f6
2016-12-20 22:28:56 -08:00
Michael Rosenfeld
0521b69fd9 Merge "Clean up local hprofs" am: 9ab94e15c7 am: 1876d82450 am: 67fd9f3968
am: bf5546b1e2

Change-Id: I0a84ef4f43e10cc9692b5541eb3379b042daab17
2016-12-19 18:28:38 +00:00
Diego Perez
9b34676d5d Create new layoutlib-legacy to be included in the SDK
This version of the jar file only contains a Bridge that returns an
error (or an image if you ask for it) contaning a message that says that
the SDK version of layoutlib is not supported.

Test: Manually tested
Change-Id: I3d24df86a3112c52858649c3286270a31496961b
2016-12-19 12:03:49 +00:00
Michael Rosenfeld
bf5546b1e2 Merge "Clean up local hprofs" am: 9ab94e15c7 am: 1876d82450
am: 67fd9f3968

Change-Id: I8eaea581cfda4844c3ea81f7ee63f0cfc40ef3e0
2016-12-18 00:28:42 +00:00
Michael Rosenfeld
2b62809c70 Clean up local hprofs
* After use
* Upon failure

Test: manual tool use
Change-Id: I2669e190c3792522c121158ea2aec84fe577c9e3
2016-12-16 16:24:29 -08:00
Joe Onorato
b69b95f0bd Fix the mac build
Change-Id: Id4a5c3b1a6fbebcf2079152c31a907536d7f950d
2016-12-16 13:16:40 -08:00
Joe Onorato
1754d744a7 First checkin of incident reporting.
There are a few major pieces here:

incidentd
---------
This daemon (started by init) runs and accepts incoming requests to take
incident reports.  When prompted, it calls into various system services
and fills in an IncidentProto data structure, and then writes the report
into dropbox.

The next steps for incidentd:
    - Security review of SELinux policies. These will be a subset of
      the dumpstate permissions.  Until this is done, incidentd is
      not started at boot time.

incident
--------
This shell command calls into incidentd, and can initiate an incident
report and either capture the output or leave for dropbox.

incident_report
---------------
This host side tool can call adb shell with the correct parameters
and also format the incident report as text.  This formatting code
was left of the device on purpose.  Right now it's pretty small, but
as the number of fields increases, the metadata and code to do the
formatting will start to grow.

The incident_report command also contains a workaround to let it
work before incidentd is turned on by default.  Right now, it is
implemented to call adb shell dumpsys <service> --proto directly,
whereas in the future it will go through the full incidentd flow.

incident_section_gen
--------------------
A build-time tool that generates a stripped down set of information
about the fields that are available.

libincident
-----------
This library contains the code to connect to incidentd, and the
meta proto definitions that are used by the framework protos.
The basics are here now, but they are not fully fleshed out yet.
The privacy.proto file contains annotations that can go in the
proto file that we will later use to filter which fields are
uploaded, and which are used by local sources.  For example, a
device in a test lab is safe to upload much much more information
than a real user.  These will share the same mechanism, but the
user's output will be filtered according to these annotations.

frameworks/core/proto
---------------------
These .proto files contain the definitions of the system's
output.  There is one master android.os.IncidentProto file that
is the top level of an incident report, but some other services
(notification, fingerprint, batterystats, etc) will have others
that are used directly by the logging mechanism.

Other files which are shared by several of the services also go
here, such as ComponentName, Locale, Configuration, etc.  There
will be many more.

There is also a first iplementation of a dump method handling
--proto in the fingerprint service.

IncidentManager
---------------
The java API to trigger an incident report.

Test: Not written yet
Change-Id: I59568b115ac7fcf73af70c946c95752bf33ae67f
2016-12-15 11:23:05 -08:00
TreeHugger Robot
2894d0ac51 Merge "Untangle creation of Task from addition of AppToken in WM." 2016-12-13 00:56:09 +00:00
Wale Ogunwale
72919d2c31 Untangle creation of Task from addition of AppToken in WM.
Makes it easier to follow what is going on and also clean-up in
preparation of stand way for AM to interact with containers in WM.

Test: Existing tests pass and manual testing
Change-Id: I91754b6d974dce2f696453cdaed175efb0f10c73
2016-12-12 15:09:03 -08:00
Jerome Gaillard
3be8766edc Merge "Fix path to JUnit jar for IDEA module in layoutlib" 2016-12-12 21:13:26 +00:00
Diego Perez
dae2232ca7 Merge "Fix status and nav bar translucency" 2016-12-12 18:16:32 +00:00