Commit Graph

9800 Commits

Author SHA1 Message Date
Tracy Zhou
475d160745 Merge "Enable Grid Preview flag" into ub-launcher3-master 2020-03-03 19:16:06 +00:00
Jon Miranda
7edcd7803f Makes spring variable dynamic resources so that they can be changed via plugin
Bug: 147302669
Change-Id: Ia4e74ff46a4d8338a56ea75ed826b69102c42d93
2020-03-02 18:48:23 -08:00
Vinit Nayak
acaf0749b3 Adjust target and src rects for swipe to home animation
Floating icon animation runs entirely in portrait
since that's what orienation launcher starts in.
Current app window target rects are in landscape to
be able animate to Overview correctly (which is not
in portrait since the leash from WM is in the same
orientation as that of foreground app).
Invert that rect as the animation from app window
to floating icon progresses.

Fixes: 148528795
Change-Id: Ie1149a1a8904afc80bd1986f8d67b6f2d88c49f2
2020-03-02 18:02:52 -08:00
Vinit Nayak
a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Vinit Nayak
1901939be7 Modify input points to register in correct swipe touch regions
While the recents task list is frozen, launcher
will continue to listen for touch regions in
all orientations of apps it has seen while frozen.
Ex. Start w/ portrait app, then quick switch to
90-deg landscape app, touches in the navbars of both
those orientations will be treated as valid.
Once the task list unfreezes, only the orientation
that is currently displayed will have a valid navbar
touch region

fixes: 140116135
Test: tested manually in all 4 orientations with
quickswitch, swipe to recents and swipe to home
Attempted to write unit tests, but only basic ones
since there are some limitations on the MotionEvent
API for mocking

Change-Id: I8d3751571a939497b44e0dd249a0248299ba5ceb
2020-03-02 15:28:38 -08:00
Tracy Zhou
20d2683d92 Enable Grid Preview flag
Bug: 144052839
Test: grid preview with v1 algorithm
Change-Id: Ic788995b899bf25c5420120a95e71e4a565ba22a
2020-03-02 15:21:53 -08:00
Tracy Zhou
6d80cbc1d9 Merge "Render user's actual workspace in ThemePicker preview (Part 6)" into ub-launcher3-master 2020-03-02 21:30:47 +00:00
Tracy Zhou
bd22546683 Render user's actual workspace in ThemePicker preview (Part 6)
Didn't test out widgets in Part 5. So in this change,
- Added some widget classes to the PreviewContext WHITELIST
- Manually update widget model after loading workspace since we do not attach widget listeners to the LauncherAppModel for preview.

Change-Id: I0a555b2319b2e91432dbd58289ddb66aca1384df
2020-03-02 00:44:55 -08:00
Vadim Tryshev
2707bdfbed Merge "Fix remaining cause of a leak in SecondaryDropTarget" into ub-launcher3-master 2020-02-29 03:21:52 +00:00
vadimt
908e9bb1cc Fix remaining cause of a leak in SecondaryDropTarget
Bug: 139137636
Change-Id: Ib94c5804616910ee562d63c022579042bb1727f5
2020-02-28 18:02:30 -08:00
Vadim Tryshev
d8995a6fda Merge "Revert "TAPL: Verifying activity start/stop events"" into ub-launcher3-master 2020-02-28 22:29:47 +00:00
Vadim Tryshev
3dd64ca3a8 Revert "TAPL: Verifying activity start/stop events"
This reverts commit 1186700c9a.

Reason for revert: Fails in the lab

Change-Id: I6715a058c76d96752b904331968b46a07ce93f85
2020-02-28 22:28:16 +00:00
Vadim Tryshev
64a932ed2a Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-02-28 19:22:32 +00:00
Vadim Tryshev
2fe6fb9671 Merge "Fixing activity leak via alarm in SecondaryDropTarget" into ub-launcher3-master 2020-02-27 22:28:59 +00:00
Samuel Fufa
a421143dd7 Enable support for same page hotseat migration
Bug: 142753423
Test: Manual
Change-Id: Ib53a64629a595c412e30ca5ff46077efc73a3f3e
2020-02-27 13:47:03 -08:00
vadimt
3d64ffd4a5 Fixing activity leak via alarm in SecondaryDropTarget
Change-Id: I12c099ee1bb55d9db81e14d27d2eb09fbbc83e0f
2020-02-27 12:45:45 -08:00
Zak Cohen
eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
vadimt
1186700c9a TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: I5851aafb6d04398c5727712eaf8561916a30c4c5
2020-02-27 11:12:35 -08:00
Vadim Tryshev
9f62bc10af Merge "Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu" into ub-launcher3-master 2020-02-27 19:08:29 +00:00
TreeHugger Robot
b066af18a5 Merge "Update mEndRect when closing ArrowPopup" into ub-launcher3-master 2020-02-26 07:59:20 +00:00
vadimt
dbc7583054 Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu
Change-Id: I04199f46024b05f05d04ba2be7a797842bb48527
2020-02-25 18:17:04 -08:00
TreeHugger Robot
f172419189 Merge "Fixing log message" into ub-launcher3-master 2020-02-26 00:50:47 +00:00
Sunny Goyal
bb18f4c9c6 Fixing log message
Change-Id: I0668ea273a54ea741b1b871a50a8738c0ec4788b
2020-02-25 15:27:06 -08:00
Zak Cohen
9a4df4dba1 Overview Actions - Enable by default.
Enable the Overview Actions feature flag by default.

Test: local
Bug: 145297320
Change-Id: I6f4a2b6e90704b78d1ff1f77bbfea2d8789169ff
2020-02-25 15:09:12 -08:00
Zak Cohen
43a1615796 Hide apps view in transitions if none of its parts are visible.
Check where the all apps view has any pieces visible, if not hide it.

Test: local
Change-Id: I1d9b957b6c10dfbe4beaa56c4fee920844699a6c
2020-02-25 15:09:12 -08:00
Zak Cohen
fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.

Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
2020-02-25 15:09:12 -08:00
Tony Wickham
6382b39ff4 Add null check to sendCustomAccessibilityEvent()
ag/10273975 caused a regression where launcher crashes if RecentsView is
empty.

Change-Id: I1607627be0a9748fd552adc757296d7b6bbfd1e2
2020-02-24 17:44:38 -08:00
Tony Wickham
e6981a606a Update mEndRect when closing ArrowPopup
Generally mEndRect is still correct from when we set it in
animateOpen(), but there are cases where it is no longer valid and
should be recomputed in animateClose(). For example, if you dismiss
notifications, the height of the popup changes between opening and
closing it.

Test: Long press an icon with a notification dot, dismiss all
notifications from the popup and then close the popup. The shadow
follows the outline of the popup, instead of extending well below it.

Change-Id: Ic5d6ad2807ea1ec8aff5e3d6ce8abaa11ce5d33c
2020-02-24 17:33:20 -08:00
Tracy Zhou
4365734017 Merge "Render user's actual workspace in ThemePicker preview (Part 3)" into ub-launcher3-master 2020-02-24 20:01:58 +00:00
Andy Wickham
6b7fbd22dd Merge "Makes all ArrowPopups AccessibilityTargets." into ub-launcher3-master 2020-02-24 18:49:12 +00:00
Sunny Goyal
d2c56525bb Merge "Using LeastSquaresVelocityTrackerStrategy for calculating velocity when detecting motion pause events. This is the same logic used by the platform implementation VelocityTracker" into ub-launcher3-master 2020-02-24 18:30:13 +00:00
TreeHugger Robot
7fa947cb31 Merge "Fix NPE on app launch log" into ub-launcher3-master 2020-02-24 18:24:22 +00:00
Samuel Fufa
5a93eb3baf Fix NPE on app launch log
Bug: 149969889
Change-Id: I60fd283ac082fab1ebf6ea90568e054525c414cc
2020-02-21 18:52:30 -08:00
Sreyas Rangaraju
bc50563915 Merge "OverviewActions: Creating parent view to house RecentsView and Overview Actions." into ub-launcher3-master 2020-02-22 01:11:47 +00:00
thiruram
15d79a9b85 Fixes incorrect FromFolderLabelState in clearcut log when updating folder label.
Bug description: When folder label is updated from a suggested label to a custom label,
EditFolderLabelEvent log expected to have FromFolderLabelState = FROM_SUGGESTED.
Currently FromFolderLabelState is logged as FROM_CUSTOM in such scenarios.

Root cause: Folder label state is decided based on whether IME has entered into compose mode while editing.
This works fine for initial folder creation and also updated to non-empty label(to both custom or suggested).
But when folder is edited from suggested to empty label, its internal state changes from SUGGESTED to CUSTOM as expected.
Later when empty label is updated to suggested again, its internal state remains custom forever.

Fix: Instead of setting folder's internal state based on IME's compose mode, comparing actual folder label with suggestions
and set it to SUGGESTED if any suggestion matches else CUSTOM.

Change-Id: Ieea572ee93fd5567e3128c9bbcea3b670f0f01d9
2020-02-21 16:24:21 -08:00
Sreyas
a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Tracy Zhou
be13d109b7 Render user's actual workspace in ThemePicker preview (Part 3)
go/grid-migration-preview

With this change, we can see actual grid migration in wallpaper preview.

The approach here: we use a tmp table (favorites_preview) here specifically for this preview (to write off the migration results), and load from this tmp table workspace items if migration is necessary and successful. Otherwise, we load from the current workspace.

UPDATED: this change should be completely compatible with the new multi-db grid migration algorithm. Here is why
1. In LauncherPreviewRender#renderScreenShot, I added a check to decide which grid migration preview method we should call. Once v2 preview method is implemented, it should be integrated with other parts of this change perfectly (the reason will be mentioned below).
2. While we have multiple DBs, mOpenHelper in LauncherProvider always points to the current db we are using. Queries using CONTENT_URI is routed to whatever DB mOpenHelper points to, so it works perfectly to directly operate on CONTENT_URI even when we use multi-db underneath the hood.
3. With 1 and 2 mentioned, I believe in order for this preview change to support multi-db, we only need to implement the V2 grid migration algorithm. Because most of what we are doing in this change is wrapped in GridSizeMigrationTask, it's perfectly safeguarded.

Bug: 144052839
Change-Id: Ie6d6048d77326f96546c8a180a7cd8f15b47e4c4
2020-02-21 15:49:00 -08:00
Sunny Goyal
a173193afa Using LeastSquaresVelocityTrackerStrategy for calculating velocity
when detecting motion pause events. This is the same logic used by
the platform implementation VelocityTracker

Bug: 139750033
Change-Id: I87aabd46e58a5caa1395be3a63fd38d0ee75e355
2020-02-21 15:28:06 -08:00
Hyunyoung Song
621c1a8be7 Merge "Update the suggestFolderName when items are added and deleted from folders" into ub-launcher3-master 2020-02-21 20:08:20 +00:00
TreeHugger Robot
b47a08ad1e Merge "Fixes NPE when creating folder with null suggestedFolderNames." into ub-launcher3-master 2020-02-21 20:05:38 +00:00
thiruram
888b516a22 Fixes NPE when creating folder with null suggestedFolderNames.
Bug: 149993849

Change-Id: Ia2758b76aef1812dab225c8a95e7141fcdeefab4
2020-02-21 11:05:37 -08:00
Hyunyoung Song
6d3e5465e2 Update the suggestFolderName when items are added and deleted from folders
Bug: 149935239
Bug: 149967272
Bug: 148900990

Change-Id: I0ed27236ad22579a1f3dcfd35a32252c5b1f6691
2020-02-21 11:00:48 -08:00
TreeHugger Robot
fb5d542f51 Merge "Increase FileLog days" into ub-launcher3-master 2020-02-21 17:33:27 +00:00
Samuel Fufa
46b4f58161 Increase FileLog days
Bug: 142753423
Change-Id: I43ccfe540cb0899a4a4ab6722b6670e830457f60
2020-02-20 16:45:57 -08:00
Andy Wickham
27d3c595cf Makes all ArrowPopups AccessibilityTargets.
This currently includes the menu that pops up when
long pressing an app icon in Launcher or Search, or
long pressing Smartspace. Previously, only the menu
for Launcher apps grabbed accessibility focus after
the open animation completed, and now all three do.

Fixes: 145253300
Change-Id: I147b45d38a04ab9a55eee9b5bd5551b4c7185fcf
2020-02-20 20:36:16 +00:00
Tracy Zhou
7be160170d Merge "Render user's actual workspace in ThemePicker preview (Part 5)" into ub-launcher3-master 2020-02-20 05:53:45 +00:00
TreeHugger Robot
6e82910a45 Merge "Give current TaskView accessibility focus" into ub-launcher3-master 2020-02-20 01:16:42 +00:00
Tracy Zhou
10a285dc24 Render user's actual workspace in ThemePicker preview (Part 5)
This change takes care of rendering widgets using widget provider's layout info.

Test: manual
Bug: 144052839

Change-Id: I7002d8bf653513cdd317736d550a47f61f0ee474
2020-02-19 16:46:25 -08:00
jayaprakashs
9ac4b580a1 null check in showLableSuggestion().
It throws NPE when the data is missing for all the packages and all the suggestions are null.

Change-Id: I4aa36969e1aee00bcfc577a839d6da01d4e67a75
2020-02-19 13:00:01 -08:00
Samuel Fufa
aeb185e744 Merge "Clean up work profile" into ub-launcher3-master 2020-02-19 19:53:38 +00:00