Bug: 171774227
Test: manual testing
1. randomly add/remove widgets to workspace
2. create a backup (Settings > System > Backup)
3. reset the device
4. restore from the backup
5. verify all of the widgets are restored properly
Change-Id: Id65e474dd9349aca715d7e6b88f8d58bc63066ae
There are 2 reasons not to use MotionEvent#getEventTime:
1. There is an existing TouchEventReported metric for touch latency.
2. In instrumentation test, the event time is set when creating
the motion event for injection. It may cause the results to be
5 times slower than the real case. That may lead to miss the
cost from app to system.
Bug: 166614700
Test: Enable statsd log: "adb shell cmd stats print-logs"
Touch gesture navigation bar or launch app from launcher.
adb logcat | grep statsd | grep "(48)"
Change-Id: Ica5e7df685fe737bbc3ac60c3ec35bad15466726
> Workspace snapshot is logged when the workspace loads (at most once a day)
> Removing unnecessary thread jumping when logging folders
> Preference snapshot is logged on process start and whenever something changes
Change-Id: I93767de89b11522d843c0e8300d1f108c78f6d90
BubbleTextViews animate the update from their placeholder icons to their high res icons. Added a field to allow restricting what BubbleTextViews' icon updates should be animated. Updated SearchResultIconRow to store the icon Drawable rather than the resource id to prevent unecessary redrawing.
Fixes: 170966269
Demo: https://drive.google.com/file/d/1FBdEl11mHZk1SpCMRY4XZAGt5TVZ01W4/view?usp=sharing
Change-Id: Ib55dafdf5b5fed00d343af5f95f3dd3f08c4ee8e
Directly transition Activity to PiP mode in launcher if the Activity
claims auto-pip support. Video is taken by commenting out the
requirement of setting the auto-pip flag.
Note that we need app to actively push up-to-dated
PictureInPictureParams to the framework, otherwise we won't be get
- PictureInPictureParams on first entering
- Staled PictureInPictureParams if the aspect ratio is changed
Video: http://rcll/aaaaaabFQoRHlzixHdtY/abenIxLFI1pZzF2O8t4TbS
Bug: 143965596
Test: see demo videos
Change-Id: Iea9a6ff39a79431ac1afa14aea812c500b3ca3b2
The attaching animation can take longer than the transition to recents
when you let go, and the ADJACENT_PAGE_OFFSET calculation is different
when there's a running task vs not. So after the transition to recents
ended, the calculation of the still playing attaching animation would
change, causing the jump you see in the bug. Now we make sure to end
the attaching animation if it's still running when we settle on an
end target to avoid this issue.
Fixes: 168563692
Change-Id: I3f37aecf9c93f2ec63dbdce561e7f5ba11be89cc
Merged-In: I3f37aecf9c93f2ec63dbdce561e7f5ba11be89cc
(cherry picked from commit 1cc12ebc12)
Some listeners such as ScreenPinnedInputConsumer only care about the
first pause detection and thus clear the MotionPauseDetector in
onMotionPauseDetected(). Because clear() sets mOnMotionPauseListener
to null, we need a second null check before onMotionPauseChanged().
Fixes: 169329910
Change-Id: I4fc30d67ad808a5b0c8feb10cc5392d7cae042b1
The attaching animation can take longer than the transition to recents
when you let go, and the ADJACENT_PAGE_OFFSET calculation is different
when there's a running task vs not. So after the transition to recents
ended, the calculation of the still playing attaching animation would
change, causing the jump you see in the bug. Now we make sure to end
the attaching animation if it's still running when we settle on an
end target to avoid this issue.
Fixes: 168563692
Change-Id: I3f37aecf9c93f2ec63dbdce561e7f5ba11be89cc
- This is a workaround of b/163815566, where DisplayMetrics is stale
when onDisplayChanged is called.
- Instead of relying on stale DisplayConext, get the DisplayMetrics
from the Display directly.
- Also optimized how DisplayController.Info is created by passing in
Display only
- Use mDisplayContext.getDisplay directly if availalbe
Bug: 163815566, 160544577
Test: DPI looks correct on device boot
Change-Id: I2a7454bb8cf2073ce592e8662781b87fc998444f
(cherry picked from commit 177c38243dc3bf245d1f7db3c265dfb56522f441)
In order to experiment with presenting more predicted content to the
workspace I have added a flag to expand smartspace to two rows.
This CL does not include any app relocation. If an app lives in a space
the expanded smartspace will occupy, it will be removed from workspace.
Change-Id: I38354dc81a34a495828cf7a69ddb04cc137e2e4e