2600 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Neil Fuller
3966e89c7a Merge "Track BufferIterator changes in libcore" am: 021e8ff2af am: 4ff3c27817 am: 228793a0c9
am: 28c9cd63d0

Change-Id: Ie08fb740f1c8683cdef7115937f448918cd29a4d
2016-12-12 17:51:23 +00:00
Neil Fuller
28c9cd63d0 Merge "Track BufferIterator changes in libcore" am: 021e8ff2af am: 4ff3c27817
am: 228793a0c9

Change-Id: I86aa0f62941802a7f26957d475575bf9c92ba2ca
2016-12-12 17:45:15 +00:00
Neil Fuller
021e8ff2af Merge "Track BufferIterator changes in libcore" 2016-12-12 17:23:18 +00:00
Jerome Gaillard
71fc5791fd Merge "Implement NativeInterpolatorFactoryHelper_Delegate method" 2016-12-12 12:37:39 +00:00
Steve McKay
ea93fe7539 Replace ContentProvider SQL args w/ Bundle & Constants.
Test: cts-tradefed run cts-dev -m CtsContentTestCases
Bug: 30927484
Change-Id: Idb9dbc2b80896e9f8474a0db71353b7a3810d597
2016-12-09 12:31:44 -08:00
Jerome Gaillard
404091b0a9 Implement NativeInterpolatorFactoryHelper_Delegate method
The method createPathInterpolator was add in Commit 9e9eeeeb78.

Test: Run layoutlib tests
Change-Id: Id17e05762bf7e5a994aa8066f11805b58a00f5ce
2016-12-09 15:58:40 +00:00
Neil Fuller
5ba69e46ed Track BufferIterator changes in libcore
Addition of a new method pos().

Bug: 31008728
Test: make
Change-Id: Id5fcb13104a8580ffaa7d4f8d3c473fe14ac5ccd
2016-12-09 14:59:26 +00:00
Jerome Gaillard
41bcee32fe Fix path to JUnit jar for IDEA module in layoutlib
Necessary after change in makefiles from AOSP commits 21cf84f8b3
and 4a064d2010.

Test: Run layoutlib tests from IDEA
Change-Id: I7359c5f41726972c45ff99f34ed5ecb036946034
2016-12-09 14:55:14 +00:00
Diego Perez
289f090abe Adding missing SurfaceView methods
Some methods were not implemented in the mock SurfaceView and they were
causing some custom components to fail on the preview.

Bug: http://b.android.com/158592
Test: This is a mock class, not tested.
Change-Id: Id8faa7e6b5edf1238b02ae07f3dd59dc6539cb62
2016-12-07 12:28:14 +00:00
Diego Perez
48a285ce1b Fix status and nav bar translucency
Bug: http://b.android.com/204831
Test: Added new UI tests
Change-Id: I992f4ccc391d9a4a0dda941689ec29fb44acf69b
2016-12-07 09:41:42 +00:00
John Reck
f32adf4475 Clean up ApplyStyle JNI
Bug: 32573798

Mark input uint32_t[] as const. Use Read-only JNI
array access for input as it's faster than critical access.

Use non-movable arrays for TypedArray so that the address can
be resolved and stored, avoiding the need to do JNI array
access for the output.

Indicies is always non-null, so remove the optional checks.

Eliminate unused return value.

Benchmark results:
twelveKeyInflate 4963us -> 4713us
simpleViewInflate 73us -> 60us

Test: Device boots, benchmarks show faster

Change-Id: Ic3bde5aee31407d8903913f97f2218daf074499a
2016-12-02 12:49:20 -08:00
Doris Liu
8a5a950ac0 Fix LUTInterpolator lookup table position calc am: 0940834c8c
am: 00d348ec26

Change-Id: I563b65b61d3bac80ea81521478e295963508890c
2016-12-01 01:39:23 +00:00
Doris Liu
00d348ec26 Fix LUTInterpolator lookup table position calc
am: 0940834c8c

Change-Id: Ib80c00801473d7e60bae87b3b34a381c7f8e7e68
2016-12-01 01:33:52 +00:00
Doris Liu
0940834c8c Fix LUTInterpolator lookup table position calc
BUG: 32830741
Test: running progress bar at 5x duration scale, no flickering
Change-Id: Ie484bdbfdf18bacc4586e36c5142e4523d08bdaa
2016-11-30 23:20:19 +00:00
Kenny Guy
58feeac96b Merge "Allow overriding max profile in debugable builds." 2016-11-29 20:12:17 +00:00
Paul Duffin
10a9bd905c Merge "Use junit-host instead of junit" am: 6063357ae6 am: 6fc0c5ceca am: 32317b3c8d
am: 29bf88aca9

Change-Id: I2f75d5e80d9baa411e7816958d4a6d6d220d0ba9
2016-11-29 15:31:57 +00:00
Paul Duffin
6fc0c5ceca Merge "Use junit-host instead of junit"
am: 6063357ae6

Change-Id: I6522cedeb522fa01530d4f31b6505b4d4c265312
2016-11-29 15:12:46 +00:00
Paul Duffin
4a064d2010 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I3496b9d7e40abf7712a56ba633a2becd0aa17c06
2016-11-29 14:52:42 +00:00
TreeHugger Robot
d25cf04e98 Merge "Add explicit method to dismiss Keyguard" 2016-11-29 14:30:46 +00:00
Kenny Guy
02c8990bd6 Allow overriding max profile in debugable builds.
Support a system property on debugable builds to
override the max number of managed profiles to
allow easier dogfooding of multiple profiles.
Support 3 different badge colours for managed profiles.

Bug: 30473760
Test: runtest -c com.android.server.pm.UserManagerServiceCreateProfileTest frameworks-services
Test: runtest -c com.android.server.pm.UserManagerServiceUserInfoTest frameworks-services
Test: manual - attempting to create 2 profiles with adb fails, passes once I set the property.
Change-Id: Ie7fb19048a04a01572666f229283152254d0ffc3
2016-11-29 14:09:37 +00:00
Paul Duffin
4aab571757 Merge "Use junit-host instead of junit" am: 7dda7e1e81 am: bbb501281e am: 52277efa6c
am: 2d4183ffa5

Change-Id: I1cc3bc8b73d7756c850a1573ca5ff9090e64c184
2016-11-29 10:39:06 +00:00
Paul Duffin
bbb501281e Merge "Use junit-host instead of junit"
am: 7dda7e1e81

Change-Id: Ie070bf5329899f21e3fb65dae6db5fdd50e74ba9
2016-11-29 10:22:34 +00:00
Paul Duffin
21cf84f8b3 Use junit-host instead of junit
Bug: 30188076
Test: make checkbuild
Change-Id: I5d3efbfbe3245a631113674bff1b0aabdc9fe8be
2016-11-28 16:44:44 +00:00
Jerome Gaillard
f149ca784d Override TextServicesManager in layoutlib
When a TextServicesManger is required in layoutlib, provide a fake
one.

Test: Run layoutlib tests
Change-Id: I8c25f4919a2e97b56f705b59747e81cb6f45b07b
2016-11-28 15:54:55 +00:00
Jerome Gaillard
f666c0e2ea Fix layoutlib to reflect recent changes in platform code
Test: Layoutlib tests
Change-Id: I81964233a9e580ccee9c9e9b0cf3525babf30bd4
2016-11-28 10:40:33 +00:00
Diego Perez
5017ece983 Update allwidgets golden image
Test: Updating existing test
Change-Id: Ie66abc77ec6013a8094d6b8be2666b69c973a295
(cherry picked from commit 48d6ec53f9c75571217880ef77902f582723418b)
2016-11-25 12:36:12 +00:00
Jerome Gaillard
8deff10ff9 Merge "Fix shadow painting in layoutlib" 2016-11-25 12:04:03 +00:00