aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-07-07Snap for 10453563 from bdecd4ef6264998d9ebf8c7aaabbf05f0438c28e to ↵aml_sdk_341710000aml_sdk_341510000aml_sdk_341410000aml_sdk_341110080aml_sdk_341110000aml_sdk_341010000aml_sdk_340912010android14-mainline-sdkext-releaseAndroid Build Coastguard Worker
mainline-sdkext-release Change-Id: I0c92bffbcfd2e8d70e09107e8bb38f475a725ac2
2023-05-11Add isDisplayInteractive method to BridgePowerManager am: bc473ebba6Antony Sargent
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/22938200 Change-Id: I20b253b6c917eba9646910af883f208ecc8753c6 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-28Add isDisplayInteractive method to BridgePowerManagerandroid14-devAntony Sargent
Bug: 279845136 Test: m layoutlib Change-Id: Idaa10a444b524a473b1accd8b40e7ef3c77b722b
2023-04-13Remove InputManager#getInstance am: 1232b1336aAsmita Poddar
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/22252423 Change-Id: I28522efe40f6a401e989a7bb1cc28e2320ce068a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-04-12Remove InputManager#getInstanceAsmita Poddar
Replace all instances of InputManager with instances of InputManagerGlobal. Bug: b/267758905 Test: Pre-submit Change-Id: I4d08ec51b544c2043e3b30aea98a4147f49056aa
2023-03-23Updated BridgeContentProvider#getStreamTypes with attributionSource am: ↵Ashish Kumar
d4aa7bb81a Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/22180834 Change-Id: I21497284e5cf80b30854a4b9fae94c0e998a2aaf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-22Updated BridgeContentProvider#getStreamTypes with attributionSourceAshish Kumar
Test: build Bug: b/274595210 Change-Id: I8b53bfe9c90d27e0cff3ce67dbd7cde12f47921f Merged-In: I8b53bfe9c90d27e0cff3ce67dbd7cde12f47921f
2023-03-03Add support for InputManagerGlobal am: 64c5f0af1dAsmita Poddar
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/21706120 Change-Id: I41024d276465a60831d674557c22be48d84fe062 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-02Add support for InputManagerGlobalAsmita Poddar
Addressing an instance where the old InputManager constructor was being used. This was done along with ag/21609952 Bug: b/267758905 Test: Pre-submit Change-Id: I2c69323d14b8cf77ebbdc49e90892bdf29ff0450 (cherry picked from commit 536b7b3fe3a4d91f28d15107aa655131a029ca69) Merged-In: I2c69323d14b8cf77ebbdc49e90892bdf29ff0450
2023-02-20Updated BridgeContentProvider with getTypeAnonymous am: 654862edbeAshish Kumar
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/layoutlib/+/21479692 Change-Id: I86f40d72e4f442577088df73cfb312dfe3335d1d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-02-17Updated BridgeContentProvider with getTypeAnonymousAshish Kumar
Test: build Change-Id: Iefd12d036b1c8b2959ebfbfd8180c65d629e1b8c
2023-02-16Merge "Allow for non-existent style in obtainStyledAttributes"Jerome Gaillard
2023-02-15Merge "Add LowPowerStandby StandbyPorts APIs to BridgePowerManager"Robert Horvath
2023-02-15Allow for non-existent style in obtainStyledAttributesJerome Gaillard
If the style ID passed to the method does not correspond to an existing style, use the underlying theme to find the attribute values. Bug: 268488795 Test: To be tested from Studio Change-Id: I48f8893fee5704e5a886fa871e39986dc896bbee (cherry picked from commit 945ba35fbabe2a92ff0ce1f2235a42e177deb1f7) Merged-In: I48f8893fee5704e5a886fa871e39986dc896bbee
2023-02-10Merge "Add LowPowerStandby policy APIs to BridgePowerManager"Robert Horvath
2023-02-10Merge "Add blank impl of goToSleepWithDisplayId to BridgePowerManager"Eric Jeong
2023-02-10Move layoutlib project to use JDK 17Jerome Gaillard
The Android build system now uses JDK 17. This adapts the layoutlib project to do the same, including its IntelliJ configuration. Bug: 74062470 Test: layoutlib tests Change-Id: Id07fa1f2f567e6515d1c3ff174792cc5d718eddc
2023-02-09Merge "Add empty string check for resource loading."Jerome Gaillard
2023-02-09Merge "Enable running LayoutLib tests with `atest`."Jerome Gaillard
2023-02-09Fix IntelliJ structure of the layoutlib projectJerome Gaillard
This creates an IntelliJ module for each Soong library, and adds the corresponding dependencies. Dependencies for IntelliJ modules are not transitive which is why there are more dependencies in the .iml file than the corresponding .bp file. In addition, this cleans up dependencies, IntelliJ libraries, and some broken package names. Bug: 260244331 Bug: 268377045 Test: layoutlib tests from IntelliJ and from running run_tests.sh Change-Id: Ia75554c9cb49e7099be06fe0f112278f945094c8 (cherry picked from commit 1b59f1853cea2e0b5a6e48b851c99a944078efc6) Merged-In: Ia75554c9cb49e7099be06fe0f112278f945094c8
2023-02-08Enable running LayoutLib tests with `atest`.Ang Li
Test: make sdk -j 24; atest -c com.android.layoutlib.bridge.intensive.RenderTests -- \ --test-arg \ com.android.tradefed.testtype.IsolatedHostTest:java-flags:-Dtest_res.dir=${ANDROID_BUILD_TOP}/frameworks/layoutlib/bridge/tests/res \ --test-arg \ com.android.tradefed.testtype.IsolatedHostTest:java-flags:-Dandroid_host_out.dir=${ANDROID_HOST_OUT} \ --test-arg com.android.tradefed.testtype.IsolatedHostTest:exclude-paths:android/view/_Original_ Change-Id: Id2248fd1a635096ca3b921840d0c4862238d20c9 (cherry picked from commit 68b508f4eb34f5f7233582d433b0b3a28f2cffae) Merged-In: Id2248fd1a635096ca3b921840d0c4862238d20c9
2023-02-08Add empty string check for resource loading.Ram Peri
When a resource name is invalid or empty we should return null. Bug: 260244331 Test: run_tests.sh for regression. Change-Id: I70dfff9f2cc9a7a0119d99b17f5359c18f766068 (cherry picked from commit 82120bb6b8d9f496393a2795c02bc769aa327bcb) Merged-In: I70dfff9f2cc9a7a0119d99b17f5359c18f766068
2023-02-08Merge changes Ic16a1f63,I0af578d3Jerome Gaillard
* changes: Refactor parts of layoutlib/bridge/tests into a bridge_client. Test: run_tests.sh. Create new bridge_client for resue.
2023-02-08Merge changes from topics ↵Jerome Gaillard
"cherrypicker-L22200000958462761:N98200001334514406", "cherrypicker-L56600000958367941:N64800001332635495" * changes: Update ATF to use accessibility nodes Add ability to work with Accessibility system [atf] Update layoutlib and add a new test to make sure that setCharacterLocationArgMaxLength method works as expected Update ATF lib@437875558, still keep the ATF lib@371374941 because ats tests still depend on it.
2023-02-08Merge "Delete broken test"TreeHugger Robot
2023-02-08Merge "Delegate SystemProperties.find to avoid call to native_find"TreeHugger Robot
2023-02-08Delete broken testJerome Gaillard
HtmlTest is broken and wasn't supposed to have been merged. It was not added to the test suite that runs on ab/. The feature it was trying to test is actually tested in RenderTest.testHtmlText. Bug: N/A Test: N/A Change-Id: I58fef7ddf534f1d43ee1b7ba221c10388084de6b (cherry picked from commit 156ee849af7590ccdd1084fe30a9fd3c8b75944a) Merged-In: I58fef7ddf534f1d43ee1b7ba221c10388084de6b (cherry picked from commit b0d305cc0a5b3b3e43ca8f91d94bea292db7dd49) Merged-In: I58fef7ddf534f1d43ee1b7ba221c10388084de6b
2023-02-08Update ATF to use accessibility nodesJerome Gaillard
The latest update of the ATF prebuilt allows the use of AccessibilityNodeInfo in addition to View to detect accessibility issues. This updates layoutlib to use that latest prebuilt and enables the accessibility node feature. Bug: 266200622 Test: tests updated Change-Id: If2d0e73bfa2f6c50befc79721b121ba70d6f2066
2023-02-08Add ability to work with Accessibility systemJerome Gaillard
This deletes the stub AccessibilityManager and AccessibilityNodeIdManager to instead use the platform ones in layoutlib. In addition, this sets up more of the ViewRootImpl which is the base for the Accessibility system. This allows for the creation of the AccessibilityNodeInfo hierarchy. Bug: 219402820 Test: test added Change-Id: I91c9c9d2d3c5eaa1d7d0b4c65cfe79a0921bcd27
2023-02-08[atf] Update layoutlib and add a new test to make sure thatShengxiong Xia
setCharacterLocationArgMaxLength method works as expected Test: Existing tests pass Bug: 237789808 Change-Id: Ic31cf8e83760a2abfb36642d626edc554ca64cf0 (cherry picked from commit a935b96cff20d626fb65ef7520d87c214a4a9df5) Merged-In: Ic31cf8e83760a2abfb36642d626edc554ca64cf0
2023-02-08Update ATF lib@437875558, still keep the ATF lib@371374941 because atsShengxiong Xia
tests still depend on it. Test: Existing tests still pass Change-Id: I7d8e40c5e552196453fdfc8ba866e218e629c120 (cherry picked from commit a8658c9f58577d77cdc842835fba2674c27e7c6d) Merged-In: I7d8e40c5e552196453fdfc8ba866e218e629c120
2023-02-08Delegate SystemProperties.find to avoid call to native_findJerome Gaillard
The native method SystemProperties.native_find always triggers a crash when running on non-bionic devices. In order to avoid it, this delegates the only caller of that method, System_Properties.find. Bug: 266199104 Test: Test added Change-Id: Id61f4a83db90c56e0f932d77bf7268ea986cb6e2 (cherry picked from commit 7699ae7782297bee28e48414966a0b03d09b8494) Merged-In: Id61f4a83db90c56e0f932d77bf7268ea986cb6e2
2023-02-08Replace calls to Application.getResources in Html.javaJerome Gaillard
In Html.java, there are several calls trying to get the resources from the application. It first calls ActivityThread.currentApplication(), and then calls getResources on the value returned by the previous call. In layoutlib, ActivityThread.currentApplication() returns null, so the next call to getResources triggers an NPE. To avoid this, we replace the call to getResources by a static call to Application_Delegate.getResources which returns the resources without the need for a non-null Application object. Bug: 262773698 Test: test added Change-Id: If22991ea190de06388c6fee0794e6b271f09c4b7 (cherry picked from commit ebb710ab6a4229fdf03c20bf16fc8fd42eead883) Merged-In: If22991ea190de06388c6fee0794e6b271f09c4b7 (cherry picked from commit f99652c2786b0d38879379d6fa0d7af5b52b10d7) Merged-In: If22991ea190de06388c6fee0794e6b271f09c4b7
2023-02-08Refactor parts of layoutlib/bridge/tests into a bridge_client.Ram Peri
Currently layoutlib/bridge has tests that demonstrate how to use the bridge to inflate layouts and render views. This code is quite useful and is being refactored into a library: bridge_client (layoutlib-bridge-client). Part of the work was already done on 260244331, but most of the code review comments were not adhered to before submitting. Bug: 260244331 Test: run_tests.sh for regression. Change-Id: Ic16a1f63e34798c9124487be5372448a5a2a8f4e
2023-02-08Test: run_tests.sh. Create new bridge_client for resue.Ram Peri
Change-Id: I0af578d39abe2e4864b56e42cbe3df7d70047696 Merged-In: I0af578d39abe2e4864b56e42cbe3df7d70047696
2023-02-08Create a delegating Application ContextJerome Gaillard
Animations in Compose need to store the Application Context which is currently the BridgeContext in Layoutlib. That results in a leak of the BridgeContext which is a problem. Instead this creates an Application Context that delegates back to the Bridge Context through a weak reference. Bug: 243418281 Test: To be checked in Studio Change-Id: Ia35dff0f7b545c497839191e24c67aa99ac9271b (cherry picked from commit 3445b0d6f094695c390214cee2d2424f0caf0654) Merged-In: Ia35dff0f7b545c497839191e24c67aa99ac9271b (cherry picked from commit d6729f7301c3778eea08458e1ce64fd4ba870846) Merged-In: Ia35dff0f7b545c497839191e24c67aa99ac9271b
2023-02-08Merge changes from topics ↵Jerome Gaillard
"cherrypicker-L68700000957155082:N36700001308243670", "cherrypicker-L81500000956310178:N16900001293533014" * changes: Update dynamic colour generation following platform change Fix dynamic colour values for system_*_0 Handle wallpapers as Java resources Use flag to choose whether to display a themed icon Add dynamic theming to layoutlib
2023-02-08Merge "Update golden image"Jerome Gaillard
2023-02-07Add android.os.ext.SdkExtensions to layoutlib.jarJerome Gaillard
This class is needed by Compose. Bug: 249369743 Test: N/A Change-Id: Ic07d1a728e8d6728163dde058d7467ff773daad6 (cherry picked from commit f772e0eb0e1b12e41578ab57bfb420b11020736a) Merged-In: Ic07d1a728e8d6728163dde058d7467ff773daad6 (cherry picked from commit 0f4d5912bc843b301ee69821ff5037b171c930e6) Merged-In: Ic07d1a728e8d6728163dde058d7467ff773daad6
2023-02-07Update dynamic colour generation following platform changeJerome Gaillard
This also updates golden images due to a change of background colour. Bug: 74062470 Test: tests updated Change-Id: I372d394afae5754ab4c94dc20b791fc381983fd1 Merged-In: I372d394afae5754ab4c94dc20b791fc381983fd1
2023-02-07Fix dynamic colour values for system_*_0Jerome Gaillard
Low values are the brightest colors, so all the 0 colours should be white and not black. Bug: N/A Test: DynamicRenderResourcesTest updated and added to the list of tests run by the test script Change-Id: I5d94ab252af8249da4445b873887d3f01024478b (cherry picked from commit 09f0df91c9f6fc200037277f799fa4b9f77dbf85) Merged-In: I5d94ab252af8249da4445b873887d3f01024478b
2023-02-07Handle wallpapers as Java resourcesJerome Gaillard
On the Studio side, wallpapers are included as resources of the Android plugin. This treats them as such. Bug: 227467236 Test: tests updated Change-Id: I62031df0f642cbde448fe32e1627e3a85ce3616b (cherry picked from commit 68ee5d49590b4181dfd401461eecfef1a02d6041) Merged-In: I62031df0f642cbde448fe32e1627e3a85ce3616b
2023-02-07Use flag to choose whether to display a themed iconJerome Gaillard
This allows passing a flag to decide whether or not to draw the themed version of adaptive icons. Bug: 227467236 Test: Test updated Change-Id: I267eb3805ce169859a37fd0456135268f7245888 (cherry picked from commit 5f98848aa07e4f94576111946da761e15af76fcb) Merged-In: I267eb3805ce169859a37fd0456135268f7245888
2023-02-07Add dynamic theming to layoutlibJerome Gaillard
Layoutlib receives the path to an image file to use as a wallpaper. It creates a dynamic theme reusing/copying what the framework is doing. It sets the dynamic theme by overriding access to system colors through the DynamicRenderResources wrapper. Bug: 227467236 Test: tests added Change-Id: Id37b531c5f29e57c37f5390804ddc58d27a9eeb0 (cherry picked from commit c8a05ec2abe059f44ea4371d71dbdcb2630ce4ec) Merged-In: Id37b531c5f29e57c37f5390804ddc58d27a9eeb0
2023-02-07Update golden imageJerome Gaillard
Bug: 74062470 Test: test golden image Change-Id: Ib9f8a792e7b8e36993204fd1aa2b20bcb67f754a Merged-In: Ib9f8a792e7b8e36993204fd1aa2b20bcb67f754a
2023-02-07Use correct padding for nine-patch drawablesJerome Gaillard
Nine-patch drawables have their padding defined as part of the nine patch chunk. This correctly extracts the padding from the chunk and sets it to the drawable. Bug: 195737352 Test: Updated layoutlib tests Change-Id: I2412b59c905cdb9de2247ae5fe5cdbcfcd6bb79f (cherry picked from commit 6af69b033acb84fd5c61b7aa98b65bd7249f4077) Merged-In: I2412b59c905cdb9de2247ae5fe5cdbcfcd6bb79f
2023-02-07Merge "Add InputManager to system services supported by layoutlib"TreeHugger Robot
2023-02-07Merge "Add delegate for DisplayEventReceiver"TreeHugger Robot
2023-02-07Merge "Fix InputMethodManager_Delegate"TreeHugger Robot
2023-02-07Merge "Do not use native InputDevice for layoutlib master"Jerome Gaillard