mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
This ensures that the background of the widget will not disappear after cancelling opening the widget activity. Normally, when opening and closing the widget activity, the following procedures are executed: tap on widget -> opening animation initialized -> opening animation finished -> close the activity -> closing animation initialized -> closing animation finished The steps above would work fine. However, a different set of procedures is followed if we try to cancel opening the widget activity: tap on widget -> opening animation initialized -> opening animation started -> swipe back before opening animation is completed -> closing animation initialized -> opening animation finished -> closing animation started -> closing animation finished During the animation initialization process, FloatingWidgetBackgroundView would be initialized. It will then cache the original background and replace with a temporary drawable with alpha set to 0. The background is only restored at the end of the animation. If two FloatingWidgetBackgroundView is initialized on the same app widget view before one of them is finished, the second floating view will treat the temporary drawable as the original background. At the end of the closing animation, the temporary drawable with an alpha value of 0 will be set for the app widget view, causing the background of the widget view to disappear. This CL stores the original drawables into the background view so they could be retrieved during the initialization process of the floating background view. Test: Manual Fix: 259526083 Change-Id: Iefa29b22b690076a4fc3fc77fe6eea4b6316f852
45 lines
1.8 KiB
XML
45 lines
1.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2020 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
<resources>
|
|
<item type="id" name="apps_list_view_work" />
|
|
<item type="id" name="view_type_widgets_space" />
|
|
<item type="id" name="view_type_widgets_list" />
|
|
<item type="id" name="view_type_widgets_header" />
|
|
<!-- Used for A11y actions in staged split to identify each task uniquely -->
|
|
<item type="id" name="split_topLeft_appInfo" />
|
|
<item type="id" name="split_bottomRight_appInfo" />
|
|
|
|
|
|
<!-- Do not change, must be kept in sync with sysui navbar button IDs for tests! -->
|
|
<item type="id" name="home" />
|
|
<item type="id" name="recent_apps" />
|
|
<item type="id" name="back" />
|
|
<item type="id" name="ime_switcher" />
|
|
<item type="id" name="accessibility_button" />
|
|
<item type="id" name="rotate_suggestion" />
|
|
<!-- /Do not change, must be kept in sync with sysui navbar button IDs for tests! -->
|
|
|
|
<item type="id" name="quick_settings_button" />
|
|
<item type="id" name="notifications_button" />
|
|
<item type="id" name="cache_entry_tag_id" />
|
|
|
|
<item type="id" name="saved_clip_children_tag_id" />
|
|
|
|
<item type="id" name="saved_floating_widget_foreground" />
|
|
<item type="id" name="saved_floating_widget_background" />
|
|
</resources>
|