- Technically the IME window is above the Bubble window, but when
traversing the windows top-down for calculating the final exclusion
region for SysUI, the IME is placed just above its target (the
embedded task), and the Bubble's full touchable region effectively
overrides the IME's requested exclusion region
Fixes: 190338512
Test: Expand a bubble, swipe from IME edge
Change-Id: Idd71eabfaba1be4bc6fc90d09db28d3f9e9106c5
If the frames of insets source window and the frame of an app window
are changed in the same layout pass, we should dispatch the insets
calculated from the new insets source frames and the new app window
frame. So when the app frame is not up-to-date, we defer dispatching
insets to the app.
Fix: 160732586
Test: Add logs to check if we dispatch the correct insets to apps while
rotating the display.
Change-Id: Ic9e71d8eabde51067b740b35404ae7c9b68228d7
Fixes: 190463685
Test: launch app and see no exception breaking the creation of
splash screen view.
Change-Id: Icae3b189068f074fdc061d0c510faceb024a26c6
Memory churn is high when swapping the ResourcesImpl of a Resources
object. Each time Resources#setImpl is invoked, all themes based on
that Resources object are assigned new ThemeImpl objects that are
created using the new ResourcesImpl.
ThemeImpls can only belong to one Theme object, so the old
implementation is discarded and the theme takes ownership of the new
ThemeImp.
This creates performance problems when framework overlays are toggled.
Toggling overlays targeting the framework causes all themes across all
processes to recreate and reallocate all of their themes. By rebasing
the ThemeImpl on the new ResourcesImpl without deallocating the native
theme memory, we reduce churn and produce less garbage that needs to
be garbage collected.
Bug: 141198925
Test: atest libandroidfw_tests
Test: atest ResourcesPerfWorkloads
Change-Id: I03fb31ee09c9cfdbd3c41bcf0b605607dab54ed7
In rotated coordinates, the vertical and horizontal are
different directions. Otherwise the end of animation
doesn't match the destination position.
Bug: 175836469
Test: setSourceRectHint with non-zero left.
Change-Id: Ia5e282c0a1bab9cbf77e964b4a4bc8ea4514cfb9
- SplashscreenContentDrawer.ColorCache needs INTERACT_ACROSS_USERS_FULL
to register the broadcast receiver.
Bug: 190516351
Test: Build Andorid Auto OS and check if CarLauncher is showing.
Change-Id: Ib0700a0f2ba1c31ffc60199a3aa8019961464efe
When we fail to create an SkSurface from a dequeued
buffer we then call cancelBuffer on that buffer. However,
we don't update our tracking to say the buffer is no
longer dequeued with and doesn't own the fence any more.
I don't think this is the main issue causing the crash in
the attached bug because I don't think we're seeing the
error in the logs for this chunk of code. However this
possibly related issue was found while tracking down our
use of the dequeue_fence fd.
Test: manual building and running of phone
Bug: 187240173
Change-Id: Icb4099eeea5be6aedd5376e07a6e3454f5d1d1e3
Themes are represented in the native layer using an array where the
entry id of resource ids are used to index into the array. This causes
native allocation size of a theme to correlate with the largest
attribute resource id in the styles applied to the theme.
From manual testing, I determined that on average in 1P apps and
system_server only 10-20% of the space allocated for themes actually
hold theme attribute values and the rest is empty/unused space.
Using std::vector and std::lower_bound to create a sparse array
representation will reduce amount of memory allocated by themes while
having a minimal impact on the performance of querying the attributes
defined in a theme.
From testing with ResourcesPerfWorkloads, this increased time spent in
the resources synthetic benchmarks by ~1%.
Bug: 141198925
Test: atest libandroidfw_tests
Test: atest ResourcesPerfWorkloads
Change-Id: Iec512b31b0545b0898ff248cd23f074a20fff45d
Included in this CL
- Increase the corner radius from 8dp to 16dp
- Scale the round corner radius in transition
Tested with the following scenarios
- Enter PiP in button navigation mode
- Double-tap to resize PiP
- Pinch to resize PiP
TODO
- Round corner when enter PiP with auto-enter being enabled
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gA2dQNBNTA8xFExWqmOkRY
Bug: 187441996
Test: manual, see video
Change-Id: I43db31f966007795351a8e2ca7dd08417f6f0df7
Fixes: 190348616
Test: builds
We're now using more complex shaders in more places. This allows us to
store more of them.
Change-Id: I1be3da0458c4b64f7082a2e1bc0d08b0824bbeba
The background color of splash screen starting window may depend
on the declared window background and the content if icon. That
may be expensive operations if the drawables are not using pure
color. Because the attributes to compute the colors are simple,
it only need a few fields to identify whether the incoming request
has been computed. So it is worth to cache them with very small
extra memory. The cache of a package will be cleared if the package
is removed or replaced.
It may save the creation time up to 20ms (depends on the complexity
of the drawable).
Bug: 190176296
Test: atest StartingSurfaceDrawerTests#testColorCache
Test: Cold/warm launch app twice and compare the duration of
trace name "makeSplashScreenContentView". The second time
should be faster. Re-install the app and launch again,
the trace will contain "peekWindowBGColor" that means
that cache for the package was cleared.
Change-Id: I61158416694a226999843fa8fc6a8b23d6893f02
The overscroll logic could get stuck previously, which lead to
a forehead visible on the lock screen.
This improves the logic and animation to look much better.
Fixes: 190029393
Test: expand shade, observe nice overshoot, no forehead on lockscreen
Change-Id: I2c9d5313626d3037c7bd3c942820c391da99b459
Fixes an issue where you'd collapse the bubble
accidentally when performing back gesture in the padding
around the expanded view.
This means things will hide 'on up' rather than 'on down'
but I think that's fine / more expected behavior.
Removed some old code.
Test: manual - expand the bubble stack, open a 2nd activity in the
bubble, perform gesture back => 2nd activity goes
away & the bubble doesn't collapse
Bug: 190102948
Change-Id: I016bd9b3091938974f3330f4d005d4ef6bcccfee
* stackAnimationController#isStackOnLeftSide depends on the position
being set which happens when a view gets added so we should add
the view & then set mStackOnLeftOrWillBe
* removed unused code
Test: manual 1) have no bubbles
2) add a bubble (needs to be on left side -- this is
the default unless you've placed the stack on right
side beforehand)
=> observe that the update dot & badge are on the right
hand side of the bubble
Bug: 185438888
Change-Id: I6129aff7c352fad8d29a6c243549f0d3580d62c8
* Sometimes the dot doesn't show when it should, this was happening
because the mAfterFlyoutHidden might not be set for updates
to the flyout
Test: manual 1) add a new bubble, before the flyout for it has
animated away, add a second bubble, before 2nd
bubble's flyout as animated away, add another update
to it
2) wait for the flyout to animate away, ensure the
update dot is visible
Bug: 185438888
Change-Id: I7e21ee87cb2ad02871330178668bc07962485e2d
* orders the target below the PIP surface
* adds scale relative to the dismiss target size when PIP is in
the target
Test: manual - get a pip, drag it to dismiss => it appears on top of
the circle and then animates away with it
- get a pip, make it larger with 2 finger gesture,
drag it to dismiss => it appears on top of the circle
and fits nicely in the circle bounds
Bug: 183657564
Change-Id: I5c096c2b5f41a667df37b4c6668c4862a212c7e2
- large colored circle, uses same accent color that launcher
has for remove / uninstall
- added a shrink animation for the target when the bubble is
stuck via the magnet
- no longer desaturate the bubble being dismissed but rather add
a bit of an alpha
Bug: 183657564
Test: manual - get a bubble, drag it around & dismiss it, notice
the animation
Change-Id: If0d0d86b7389f0fa3314598266cd83ecabdc6a9b
dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
ResourcesHardeningTest is not a test module name.
This is a partial revert of ag/14505818
Bug: 189953380
Test: none
Change-Id: Iebf50714918d64eb52183c1f140ac8dba38b2ae5
Since onSurfaceStatsAvailable gets called on binder-thread, we
need to ensure that instance doesn't get released while
onSurfaceStatsAvailable is calling reportFrameMetrics.
Test: Boots
Bug: 188934435
Change-Id: Iafe582d6fe4087a3c4274ee39a2803abaa363fd2
Before adding the snapshot start window, remove any existing window
at the same task if any. Also make sure if starting window was create
failed, the window should be remove after it been added.
Bug: 185318171
Test: manual test without ag/14308714
Change-Id: I5de7d54907bc0318c6d979c44ca8e64a5fcea062
The previous attempt[1] of improving SystemFonts API is not good enough
for users. To further improve the performance, calculate font uniqueness
in native code. From Android S, the system font information is stored
in native code and has more information for skipping duplication check.
Bug: 188201287
Test: atest FontFamilyUpdateRequestTest
Test: atest FontListParserTest
Test: atest FontManagerTest
Test: atest NativeSystemFontTest
Test: atest PersistentSystemFontConfigTest
Test: atest SystemFontsTest
Test: atest SystemFontsUniqueNameTest
Test: atest UpdatableFontDirTest
Test: atest UpdatableSystemFontTest
Test: minikin_tests
Change-Id: Ib375dcda0f278c93ec8dd21636d7a22b4174f214
This was only hiding if you interacted with the bubble, now it
will hide if you tap anywhere.
Also makes sure the bubbles are ordered above the education.
Bug: 189225662
Test: manual - wipe device, get first bubble, tap anywhere other
than the bubble & observe that the user education
fades away.
Change-Id: I3750ca79de717e81492070b38d1af0518f1a7a3f