Commit Graph

1360 Commits

Author SHA1 Message Date
Winson Chung
24ab40cebe Move remote animation definition runner to wrapped class
- Add call to unregister for remote animations from the system
  when the launcher activity is destroyed to prevent a lingering
  reference from the system to the old activity. But separately,
  to not have to wait for the system to GC before clearing the
  binder ref, we also wrap all runner implementations so that
  they can be cleaned up after a GC in our process only.

Bug: 139137636

Change-Id: Ib6276cac80b446440ec101fe00eae6ca41fdf32c
2020-01-17 21:34:54 +00:00
Sunny Goyal
a7a5bf3101 Adding support for multiple Model clients
Bug: 137568159
Change-Id: Ia4db800b19cc80c695fcb9ea28e07709dfd08c6a
2020-01-10 12:23:27 -08:00
Tracy Zhou
4d7b244f3f Render user's actual workspace in ThemePicker preview (Part 2)
With this change, we can also render folders in preview. It's built on top of part 1.

Test: Go to grid options, choose a different grid option, and see user's workspace rendered in the preview
Bug: 144052839
Change-Id: Iaf6d8af6b909ece4147ea250d95dec3d2c0019d3
2020-01-08 15:42:58 -08:00
vadimt
baf5fbbe58 TAPL: logging incoming intents
Even though ActivityTaskManager already logs intents, logging this will
simplify flake/error investigations that are considered to be too
time-consuming.

Also, this will make it possible in future to programmatically detect
whether the bug is introduced by the system or Launcher.

Bug: 133010698
Change-Id: I7dcadd95baa23f29bb661d6b42280bd2a2f0e099
2019-12-16 18:56:09 -08:00
TreeHugger Robot
41dd48a718 Merge "Diagnosing the reason for opening context menu" into ub-launcher3-master 2019-12-11 21:29:38 +00:00
Sunny Goyal
337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
vadimt
bc5d7e68e8 Diagnosing the reason for opening context menu
Adding it permanently. System tests using TAPL sometimes run into
mysterious hard-to-diagnose problems (like, a menu opens for no apparent
reason), so we'll need to keep diags like this forever.

Change-Id: I25fcab94931fa4f6e1bda34d5705de5dd411188a
2019-12-09 13:53:05 -08:00
Tony Wickham
ff828d2f24 Merge "Fix recents scale sometimes lagging behind window scale" into ub-launcher3-master 2019-11-20 05:07:12 +00:00
TreeHugger Robot
f982b0dcc8 Merge "[a11y] fix the issue where launcher announces item added to homescreen before it does" into ub-launcher3-master 2019-11-19 07:29:44 +00:00
Pinyao Ting
c90742775b [a11y] fix the issue where launcher announces item added to homescreen before
it does

Test:
1. long press on home screen -> widgets
2. enable talkback
3. add a custom shortcut to home screen (i.e. 1x1 widgets, e.g. drive
scan in Google Drive, Driving Mode in Google Maps ... e.t.c )
4. verify talkback announces "item addded to homescreen" after it does
get added to the homescreen
5. repeat the same test for widgets (e.g. calendar)

Bug: 141527338
Change-Id: I232e6e796c9edb81128f816c71a33310c3700e73
2019-11-14 22:37:24 +00:00
Tony Wickham
4df42f85a4 Fix recents scale sometimes lagging behind window scale
We were previously offsetting the launcher animation progress based
on when we got onGestureStart, which meant it would lag behind if
onGestureStart came late. Now that we track the window instead of
the launcher shelf, and we don't show the launcher animation right
away in fully gestural mode anyway, we should remove this to ensure
the launcher part of the animation always lines up with the app
window.

We also reapply state whenever predictions are enabled, e.g. when
launcher starts after being force stopped, and previously this was
canceling the existing state animation. We don't want to do that
because predictions can be enabled at any point on a cold start,
and cancelling the existing state animation means that RecentsView
shows up in fullscreen and not attached to the app window for the
duration of the gesture.

Bug: 144454486
Change-Id: I65a2c71c9acd2f5345941ea2cff7d32c04b7be3f
2019-11-13 16:37:32 -08:00
TreeHugger Robot
1ca9c89b01 Merge "[DO NOT MERGE] Folder name suggest Bug: 142498588" into ub-launcher3-master 2019-11-09 02:52:21 +00:00
Hyunyoung Song
4c74620d6a [DO NOT MERGE] Folder name suggest
Bug: 142498588

Change-Id: I735c842522f08db1fb9a11f731b63f8dba5a298f
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2019-11-08 15:07:48 -08:00
Pinyao Ting
5eee5f4da0 enable custom shortcut test
Bug: 141568904
Change-Id: Ie51ef6f7a2f5d4579689a82184bdd7681a266d04
2019-10-31 17:09:40 -07:00
Sunny Goyal
3a1eadd37b Adding support for remote app action provider.
> Connect to a predefined content provider to get package specific action
> Add that action to shortcut menu and task menu

Change-Id: Ide5c09d04112e86c8e19c2f9e66c88c15b3fd04e
2019-10-23 17:51:13 -07:00
Sunny Goyal
210e174c9c Subclassing Launcher instead of using UiFactory
Allows us to override only the required methods, instead of providing
a proxy method for everything

Change-Id: I816dcdb2a8d5432496050118ded0f2bbe7122cf7
2019-10-21 11:10:21 -07:00
Winson Chung
c9bf6d45ac 9/ Clean up swipe shared state
- Add TaskAnimationManager which keeps track of the animation state whose
  lifecycle can be longer than the gesture.  Move some of the logic related
  to cleaning up old animations into this class (called when the state is
  shared across gestures).
- Instead of calling into the shared state directly via UIFactory, add
  callback to cleanup the animation and shared state from Launcher

Bug: 141886704

Change-Id: Ib6140b37162f7460a20fa1046cfd4f4068e4a1c6
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-16 17:17:34 -07:00
Winson Chung
5cc62c7d0b Fix a couple trace issues
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
2019-10-16 12:34:58 -07:00
Pinyao Ting
b9f25e631b include error log to debug the issue custom shortcut not working
Bug: 141568904
Change-Id: I7e6b9aa4c3e1314aee18cbea81efa881b574923c
2019-10-14 15:55:21 -07:00
Sunny Goyal
17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
TreeHugger Robot
fedd5f1fd7 Merge "Removing host deletion on startup and corresponding callbacks" into ub-launcher3-master 2019-10-07 18:28:44 +00:00
Tracy Zhou
c8611b3afe Merge "Live tile should switch to screenshot before finishing recents animation" into ub-launcher3-master 2019-10-03 00:08:09 +00:00
Tracy Zhou
387279d938 Live tile should switch to screenshot before finishing recents animation
Fixes: 139439373
Test: Launch a new app from shortcuts in Overview mode. Make sure the
live tile stays put (no hole). Same with touching empty space in
Overview to go home.

Change-Id: I6cacf2842e21f9856d0021cea9fddf4f870f09f0
2019-10-02 16:53:02 -07:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Sunny Goyal
01615a69d2 Removing host deletion on startup and corresponding callbacks
> Launcher deletes the phantom widget ids in loader

Bug:141376165
Change-Id: Icf0542535f194f9abc67e7190f34cb60f69e9f66
2019-10-02 12:08:26 -07:00
Sunny Goyal
e84c5b82be Unifying activity tracker callback
> Using a common class for both Launcher and RecentsActivity
> Removing static refenrece to LauncherModel and using a common pattern for
  tracking activities

Bug: 141376165
Bug: 137568159
Change-Id: Ic1897abe6913ec78e25725118eedf5b468d5ec70
2019-10-01 13:54:26 -07:00
Winson Chung
a879f9c481 Adding binder tracking support in tests
- Whitelist specific binder calls when handling touch during swipe up
  gestures
- Only track binding for touch handling and certain launcher lifecycle
  changes for now

Bug: 140246642
Change-Id: I6ba30280dd17da358662870f8719ae851536ad8b
2019-09-18 17:08:05 -07:00
Samuel Fufa
6915245924 Merge "Remove launcher widget onAppWidgetRemoved" into ub-launcher3-qt-future-dev
am: d61f73d935

Change-Id: Ib283b5db54c17dce4b8c09d70e52f10f95a6a315
2019-09-12 15:11:20 -07:00
Samuel Fufa
44043ec3eb Remove launcher widget onAppWidgetRemoved
Test: manual
Bug:79462255
Change-Id: Ib5dd32d9db11acf27cb9e0e6fee266b57cff1828
2019-09-11 13:21:11 -07:00
Sunny Goyal
b1d7de25f8 Adding support for overlay and corresponding plugin to Launcher
Updating various task callbacks to handle overlays

Change-Id: I80077508ad35c31269c873f51f0105302a9e6a5d
2019-09-10 08:08:28 -07:00
Winson Chung
9a82ca3054 Merge changes I4532e429,I532645de into ub-launcher3-qt-future-dev
am: 478414a7c3

Change-Id: Ic9af7149c297e23fd8c3645fd0a83dd5f45e0cce
2019-09-09 14:51:52 -07:00
Winson Chung
478414a7c3 Merge changes I4532e429,I532645de into ub-launcher3-qt-future-dev
* changes:
  Defer listening on widget host until after the state transition ends
  Migrate to using DefaultDisplay
2019-09-09 21:39:18 +00:00
Sunny Goyal
ba02fa4585 Lazily binding folder pages and icons
am: ac6f69f78d

Change-Id: Id85dad476f49244c711c687d5a95d36197034946
2019-09-09 12:42:30 -07:00
Winson Chung
ef52876739 Defer listening on widget host until after the state transition ends
Bug: 140246642
Change-Id: I4532e4298f04ff5c6dea04ccda89320995cadb80
2019-09-09 10:24:53 -07:00
Winson Chung
13c1c2cd65 Migrate to using DefaultDisplay
- Remove extra binder calls to get the default display

Bug: 140633033
Change-Id: I532645deac101a6065d90484b87a67b67aa717f5
2019-09-09 10:21:28 -07:00
Jon Miranda
f5197fce3d Add tests for play promise icons.
Bug: 139021165
Change-Id: I45469b7523d8aea12c34d460c7b69c571a415675
2019-09-05 15:45:51 -07:00
Sunny Goyal
ac6f69f78d Lazily binding folder pages and icons
Folders are bound before they are opened and unbound on close. This
allows us to recycle the views in folders

Bug: 139051851
Change-Id: Ic1ed3265c0f583af54d73dab6f2751bc95266ea9
2019-09-05 17:17:11 +00:00
Pinyao Ting
c7a6c2979c migrate custom widgets in comply with plugin framework
Bug: 139888225
Change-Id: I8a3d0fe2689ad5ba24b19309728bbad0b6287f71
2019-08-30 12:06:22 -07:00
Samuel Fufa
ca37b8afe5 Add support for searchwidget in layout files.
Test: Manual
Bug:139703885
Change-Id: I86b36187d95bb5db59dbf6ae2e20373d23e55aa1
2019-08-23 10:58:13 -07:00
Samuel Fufa
84245e84c8 Default name's language of folder won't change after changing the system language
Test: Manual - Create unnamed folder and change system language. Folder
name should pickup new language.
Bug:78611156
Change-Id: Ie06baebe5b9a64e91630c581b75b674f363b9973
2019-08-15 09:56:12 -07:00
Sunny Goyal
11a50747ed Refactoring some folder binding logic:
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind

Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
2019-08-14 12:03:09 -07:00
Pinyao Ting
49a3e699f9 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 20:41:58 -07:00
Sunny Goyal
9275c820e0 Merge "Fix DEFER_UPDATES_NEXT_DRAW flag is not unset when binging happens twice" into ub-launcher3-qt-r1-dev am: 0a9e91b6e4
am: 2c848d029c

Change-Id: I827430185fbab9433f74f402f382cb004ab744c3
2019-08-05 17:45:45 -07:00
Sunny Goyal
2c848d029c Merge "Fix DEFER_UPDATES_NEXT_DRAW flag is not unset when binging happens twice" into ub-launcher3-qt-r1-dev
am: 0a9e91b6e4

Change-Id: Iad5027f7925981de0720ca960e5a8ffdd2a1463c
2019-08-05 17:39:41 -07:00
Sunny Goyal
6b6d0a3972 Fix DEFER_UPDATES_NEXT_DRAW flag is not unset when binging happens twice
Bug: 138646754
Change-Id: I76eccdb812013299e18f197ba17ff858a01a6338
2019-08-05 17:20:10 -07:00
Becky Qiu
29e8ef3611 Log the right workspace id for -1 screen for stop and resume.
am: bfc2da1fd8

Change-Id: Iafe8c7cc05d0fb76a3e8768bb8513b4696861c78
2019-08-01 16:51:54 -07:00
Becky Qiu
bfc2da1fd8 Log the right workspace id for -1 screen for stop and resume.
Test: manual
Bug: 137952354

Logs after this fix:
08-01 12:01:36.220 17105 17105 D UserEvent: action:STOP
08-01 12:01:36.220 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:36.220 17105 17105 D UserEvent:  Elapsed container 5511 ms, session 5511 ms, action 0 ms
08-01 12:01:36.220 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent:
08-01 12:01:38.042 17105 17105 D UserEvent: -----------------------------------------------------
08-01 12:01:38.042 17105 17105 D UserEvent: action:RESUME
08-01 12:01:38.042 17105 17105 D UserEvent:  Source child:WORKSPACE id=-1
08-01 12:01:38.042 17105 17105 D UserEvent:  Elapsed container 7334 ms, session 7334 ms, action 0 ms
08-01 12:01:38.042 17105 17105 D UserEvent:

Change-Id: Ic2d88eee3ff7a0e28d5c7e4cab8ee61952ed95ee
2019-08-01 22:55:42 +00:00
Sunny Goyal
87dcde6d6c Separating apps list callback from model callback and simplifying various events
Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-25 11:29:16 -07:00
Vinit Nayak
f9b585b507 Don't specify 1P Launcher3 type if 3P Launcher is active
Instead of referencing Launcher directly (which may not be
present when there's a 3P launcher), reference the lowest
common ancestor of Launcher and RecentActivity to avoid
ClassCastExceptions.

Test: Visually inspected that Pixel Launcher crash dialog
no longer pops up.
* Install 3P launcher
* In developer options enable "enable freeform windows"
* Restart phone for settings to take effect
* Try to use it on any app you have in recent tasks

Fixes: 135419782
Change-Id: Ie1f54880ab46956b23e253850ca7f79b161da9bd
2019-07-19 11:11:35 -07:00