Because we always use the latest framework code, some resources might
fail to resolve when using old themes (they haven't been backported).
Since this is an artifact caused by us using always the latest code, we
check for some of those values and replace them here.
Bug: http://b.android.com/225105
Test: Included new testActivityOnOldTheme
Change-Id: Ia7a8a27fb81fe0b4a1e0c9610a2033a87720864d
Bug: http://b.android.com/213000
Test: Manually tested on Android Studio. Adding tests for this specific
case requires bringing a new sdk-common prebuilt to the the maintenance
branch so it's not really practical.
Change-Id: I0646aab656d5d5769355c6cc026e877b8784d173
When arrays contain references, if we can not resolve them, just return
the reference string. This matches the behaviour of resource resolution
in BridgeTypeArray.
Bug: http://b.android.com/228620
Test: Updates existing tests
Change-Id: Ia324f18d9128b8abf2ba676a83d4b424914e2c88
android:pointerIcon is a View attribute that can be an enum or a
reference. Layoutlib cannot easily deal with the way that is handled
in the platform. As the property would not have any impact on the
result in layoutlib, that property is bypassed.
Test: Main.testAllWidgets
Change-Id: I38c6c6df45c1836d44b4f80245a453fb432ea251
This CL forces both animateFirstValue and animateLayoutChanges to false
in themes when running layoutlib. This helps with the rendering of some
widgets so they do not rely on animations.
Test: Test as part of testActivity
Change-Id: Ic9214929d3582bc3e0a196d198cc4fb36347c782
This is a workaround for a JDK bug that crashes the VM when
measuring scaled antialsed text.
This disables antialiasing when measuring scaled text in a specific
version of the VM.
Bug: http://b.android.com/211659
Change-Id: I637ed03cf827b65c993550998ac55d42869237ad
The NativeAllocationRegistry delegate free calls might run in the
context of the finalizer thread. If a crash happens during the free
call, it might bring down the finalizer thread and the VM.
Bug: http://b.android.com/213927
Change-Id: I8d4b8ab5b8d0532aad46f27d039a943894e021a0
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
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
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
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
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)
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
Test: Test refactoring. Tests still pass
Change-Id: Icdee3eb9ef1b2639418110583ac74a3fd5362166
(cherry picked from commit 564b00dd5201711c25a3580aa21be8b36bfaf923)
The method Bitmap.nativeCopyPreserveInternalConfig was introduced by
Change Ic128dfed.
Test: Run layoutlib tests
Change-Id: I13da7deece9eb1d0d3e6a42203522fcf0b332ba9
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
- 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
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
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
Necessary after change in makefiles from AOSP commits 21cf84f8b3
and 4a064d2010.
Test: Run layoutlib tests from IDEA
Change-Id: I7359c5f41726972c45ff99f34ed5ecb036946034
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
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