summaryrefslogtreecommitdiff
path: root/tools/layoutlib/bridge/src/android
AgeCommit message (Collapse)Author
2017-05-10Removing layout from frameworks/baseDiego Perez
The directory is being moved to its own project in frameworks/layoutlib Bug: 36889565 Test: Built manually Change-Id: I69a1a826d0bac8ede1f9a337c9c1d930bbcd04f3
2017-05-10Merge "Modify font metrics computation to match Android"Jerome Gaillard
2017-05-09Modify font metrics computation to match AndroidJerome Gaillard
On Android, font metrics top and bottom seem 15% larger than ascent and descent. Paint_Delegate is modified to reflect this fact. Test: layoutlib tests updated Bug: 38117115 Change-Id: I4e9995ccbc991fbb857c8e3af45a908ad55db99e
2017-05-09Update Typeface_Delegate following Change Ied73189bJerome Gaillard
Test: layoutlib tests Change-Id: I86ef9794751c6adb3f304ae6e00c5e24428da5dd
2017-05-08Merge "Merge "Fix a NPE with outlineProvider="none"" am: 46a4fbb2e4 am: ↵Sergey Prigogin
65d65ec14b am: a3460f2bb1" into oc-dev-plus-aosp am: 939ba35913 Change-Id: Ib427f57b4a505b1622758773f24c44e1bd69db6d
2017-05-08Merge "Fix a NPE with outlineProvider="none"" am: 46a4fbb2e4 am: 65d65ec14bSergey Prigogin
am: a3460f2bb1 Change-Id: Iccb6dc6a7758abffe2d25bcc8b5dfbb1f600b05c
2017-05-06Merge "Draw rectangle shadow fast in low elevation cases"TreeHugger Robot
2017-05-06Draw rectangle shadow fast in low elevation casesCharlie Tsai
When the elevation is not high, the shadow is similar to just add some dark lines on the edges and corners of rectangle views. Using simple algorithm can also improve the performance and save more memory. Test: The render result of unit test is updated. Bug: 37906145 Change-Id: I28758f868ee6e24e4552368bddfb7ac10fe0a205
2017-05-05Merge "avoid calculate shadow when elevation is 0"TreeHugger Robot
2017-05-04avoid calculate shadow when elevation is 0Charlie Tsai
Test: N/A Bug: 37906145 Change-Id: Ib8dc3f781767271388eb3e6f886267e9d98d67f8
2017-05-02Merge "Ignore density in AdaptiveIconDrawable"Jerome Gaillard
2017-04-25Fix a NPE with outlineProvider="none"Sergey Prigogin
Do not attempt to draw outline when outline provider is null. Test: manually follow the steps in https://b.corp.google.com/issues/37139123#comment1 Bug: https://issuetracker.google.com/37139123 Change-Id: I6e09c187d5a8e1364e2ecbe12bbb5a17ad057965 Signed-off-by: Sergey Prigogin <sprigogin@google.com>
2017-04-25Ignore density in AdaptiveIconDrawableJerome Gaillard
This was introduced in Change Iaa9a5592. Test: layoutlib tests Change-Id: Id4c9f3e75de174106aa086b29cd7d12fa36b0e61
2017-04-25Update AccessibilityManager in layoutlib following I65db0252Jerome Gaillard
Test: layoutlib tests Change-Id: I279754532db1097a65a8683057f8f3893b84af84
2017-04-18Update layoutlib following Changes I7cf390d9 and I65e220acJerome Gaillard
Test: layoutlib tests Change-Id: I605a75d23e49d59a50362bbcf575561a613d4156
2017-04-12Merge "Update Typeface.Builder API to reflect API feedback." into oc-dev am: ↵Seigo Nonaka
1e924df63e am: fa4b862518 Change-Id: I0aa32f46d20a5d46454f2a6057db2ca0e70f1d84
2017-04-12Update Typeface.Builder API to reflect API feedback.Seigo Nonaka
- Stop pooling and remove reset method. - Introduce overloaded constructors instead of setSource methods. - Make italic parameter boolean and treat "not called" as RESOLVE_BY_FONT_TABLE. - Remove constants and move them to Typeface with private static constant. - Fix JavaDoc. Bug: 37082657 Test: android.graphics.cts.TypefaceTest passed Change-Id: I0c50cf3e2d50c0021f7e12bbb7ed7ae89fa1c2a1
2017-04-10Update Bitmap_Delegate following Change I0092fe44Jerome Gaillard
Test: Layoutlib tests Change-Id: I3b1cfb460a6b7ccd6b63bd53194383154a68591c
2017-04-04Merge "Reorganize font enumeration API." into oc-dev am: 2ac9698271Seigo Nonaka
am: de5fa6b3d8 Change-Id: I72a02f3f681b3b5f82cffc317fe0668e842464fe
2017-04-04Fixed Intent parsing error of PreferenceScreenCharlie Tsai
When PreferenceScreen contains the Intent tag with the extra tag, the parsing of xml file is failed and causes the render problem on Layout editor. Test: N/A Bug: http://b.android.com/233302 Change-Id: I987de7aa125299d46fc1b7670f07f3dd4427ee21
2017-04-03Reorganize font enumeration API.Seigo Nonaka
This CL cleans up APIs around font variation settings. - Remove FontConfig and FontManager public API. - Remove FontManagerService from system service. - Extract inner class FontConfig.Axis as top-level class FontVariationAxis. This is used by Typeface.Builder public API to create new Typeface. - Introduce and expose FontVariationAxis utility functions from/to string. - Throws if the invalid font variation settings is passed. Test: android.text.cts.FontVariationAxisTest passes Test: android.graphics.cts.TypefaceTest passes Test: android.graphics.cts.PaintTest passes Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-01Merge "Revert "Layoutlib changes to support the new ResourceUrl"" into oc-devTreeHugger Robot
2017-03-31Merge "Ensure we show the PiP menu in response to KEYCODE_WINDOW." into ↵Winson Chung
oc-dev am: 2af994ec03 am: da7ef8060d Change-Id: I715e2e79b729d28b856a8eda42b099db56cb0184
2017-03-31Ensure we show the PiP menu in response to KEYCODE_WINDOW.Winson Chung
Bug: 36687605 Test: android.server.cts.ActivityManagerPinnedStackTests Test: #testWindowButtonEntersPip Change-Id: I0bb35fd666eb6a438e4676267f6726b44bffb3db
2017-03-31Revert "Layoutlib changes to support the new ResourceUrl"Diego Perez
This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb. Test: N/A Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688 (cherry picked from commit a4e82144b26ee50fca2739abc4f6c7111dc2f3cb)
2017-03-30Fix fonts following 455f1bfc05Diego Perez
Test: Fixes broken tests Change-Id: I62d001c6d0ed84fe1d1d9865b1027be0e1cad8b4 (cherry picked from commit de5a95d42c9e5f4fbcf0064ae8eaa33ab5747637)
2017-03-30Merge "Make layoutlib more lenient with recoverable errors" into oc-dev am: ↵Diego Perez
3134462c5e am: 510916c13f Change-Id: I3c02fde71a2fc7b955b9ad124fe81eccf5a983a3
2017-03-30Make layoutlib more lenient with recoverable errorsDiego Perez
In many cases, throwing an exception will stop the inflation or rendering of a layout. Sometimes, we could recover from some of the failures and render a layout that is "usable". I've done a first pass trying to follow the following rules: - Try simple recoveries by choosing sensible defaults. Not trying complex recoveries. - Only recover if the exception is not part of the class behaviour. Avoided removing declared exceptions or exceptions that are expected by the framework. - I've kept assertions in place so, in most cases, the behaviour will be almost identical to the previous one with assertions enabled. Test: Checked with existing tests Change-Id: I0001fdd3c808cf405c4eb8d734b9bbe63493e05c
2017-03-29Fix fonts following 455f1bfc05Diego Perez
Test: Fixes broken tests Change-Id: I62d001c6d0ed84fe1d1d9865b1027be0e1cad8b4
2017-03-28Merge "Revert "Layoutlib changes to support the new ResourceUrl""TreeHugger Robot
2017-03-24Handle case where canvas is 0x0 for shadowsDiego Perez
Test: N/A Change-Id: Ie837fb4097d7e1e47e8f96c73bb79ac8e7772a6b
2017-03-24Revert "Layoutlib changes to support the new ResourceUrl"Diego Perez
This reverts commit 9fb4d6876a78fb336cb3650aca84bce723f96ecb. Test: N/A Change-Id: I57a09c6f011b8d8c9c2d054b03536e0a6fcc5688
2017-03-23Merge "Layoutlib changes to support the new ResourceUrl"Diego Perez
2017-03-22Update FontFamily_Delegate following Change Ia23ee6a7Jerome Gaillard
Test: layoutlib tests Change-Id: I8815060f9bab65f913a0272e439f6c86a63acbcf
2017-03-22Layoutlib changes to support the new ResourceUrlDiego Perez
Updates the resource handling after the changes to the ResourceUrl API changes. Test: Existing tests should pass Change-Id: I314a20673cf94e4ef27e9712d3fa7b6f69bba796
2017-03-21Fix build following change 0763650Diego Perez
Test: N/A Change-Id: Ie376cb34f0a6ea1f33fab3871abb9db43c5fcf62
2017-03-19Merge "Replace rectangle shadow algorithm"Charlie Tsai
2017-03-18Replace rectangle shadow algorithmCharlie Tsai
Test: Rectangle Shadow test Change-Id: Id9635df8769e85d835dc6f99201b86e5bba110d2
2017-03-17Merge "Fix BitmapShader to work with adaptive icons"Diego Perez
2017-03-17Fix BitmapShader to work with adaptive iconsDiego Perez
Test: Existing test should pass Change-Id: Ie4c78eab4dfacf1eb6060d71edb98b836c4eff78
2017-03-17Update ColorFilter_Delegate following Change I5f74adddJerome Gaillard
Test: layoutlib tests Change-Id: Ifb18946edb0c40e0120868e211c99a304801e740
2017-03-16Update layoutlib following Changes I2500bd4c and If456266fJerome Gaillard
Test: layoutlib tests Change-Id: Idd3993bdc4010fa80a8c78ad80998bc7586322a5
2017-03-14Workaround for broken BitmapShader in AdaptiveIconDrawableDiego Perez
This removes the need of using BitmapShader while we debug the problem in layoutlib. Bug: 36204957 Test: Added new test for adaptive icons Change-Id: I4ff9968b996a1563be8caa0873e7aec8fb5cb151
2017-03-14Merge "Associate rotation watchers with displays"TreeHugger Robot
2017-03-13Associate rotation watchers with displaysAndrii Kulian
Displays can be rotated separately and rotation watcher clients are only interested in rotation of some specific display. This CL adds displayId to rotation watchers and only informs them about changes on their display. Bug: 34242678 Test: Manual and debug. Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
2017-03-13Dont dispatch a11y events that have no subscribersEugene Susla
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no subscribers to a given event Test: steps: - Enable A11yManager.DEBUG - Navigate through a few random activities - In logcat, ensure log messages are present, notifying that certain events won't be dispatched Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227
2017-03-10Move rotation tracking to DisplayContentAndrii Kulian
This CL moves rotation tracking from WindowManagerService to DisplayContent. This way displays can be rotated independently and rotation of the main display won't affect rotation of secondary ones. Bug: 34242678 Test: android.server.cts.ActivityManagerDisplayTests Test: testRotationNotAffectingSecondaryScreen Change-Id: Ic46aaa523482b31ff5ec77f0c2908ceda1156fc0
2017-03-10Update Shader delegates following Change Ib5d33a80Jerome Gaillard
Test: layoutlib tests Change-Id: If0db59dd2400ced9019bb999c014d7d655021fd3
2017-03-08Ignore native color spaces following Change I0164a18fJerome Gaillard
Test: layoutlib tests Change-Id: I2fc2f13621524142d00fb86c45e75ecdb250479a
2017-03-07Update layoutlib following Change Ia12d448aJerome Gaillard
Test: layoutlib tests Change-Id: I66632bcef3a05d3d89e7fc6a37f099100feed0ad