Commit Graph

148 Commits

Author SHA1 Message Date
Steven Ng 08ef694509 Adjust font, color, margin, corners for all widgets tray
Test: manually
Bug: 179797520
Change-Id: Ib78aae05e021da272ef2f754c876d24a4c14bcb0
2021-03-17 22:43:12 +00:00
Alina Zaidi 2e732e95d9 Bug fixes for widget picker search.
SearchBarController
- Use Extended Edit Text to handle close keyboard action well.
- On press enter while search remove focus from bar and hide keyboard.
- On cancel button press hide keyboard and also reset search targets to empty so that on next search session the previous results dont flash (show for a short time before reflecting users query).

WidgetsFullSheet
- Make sure expanded header are reset when user leaves personal/work recycler views. Search recycler view resets its expanded header on every search already.
- Show 'no search results' view if no search result present.
- Update WidgetListBaseRowEntryComparator to show personal profile widgets first.

Test: Tested prototype locally.
Bug: b/157286785
Change-Id: Ibaa208c4091783e14ac0887caf559e867185df5a
2021-03-17 14:43:04 +00:00
Alina Zaidi d07acba048 Add a WidgetsSearchBar(Launcher3) and a WidgetsSearchController.
- Make WidgetsSearchBar in Launcher3 initialize WidgetsSearchController with SimpleWidgetsSearchPipeline
- Modify SimpleWidgetsSearchPipeline to filter widgets entries on widgets/shortcut labels also.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: I65f5fa0240ffb6d22023167e4e86d94d83bbd9f7
2021-03-15 11:25:08 +00:00
Alina Zaidi 334e65935b Have a recycler view to show search results.
-Have a recycler view layout for search widgets list.
-Make WidgetsFullSheet implement interface- SearchModeListener to get notified when user is using search and also when search results are ready.
-Have a WidgetsListSearchHeaderViewHolderBinder for search result headers which shows subtext in header as concatenated string of widget/shortcut labels.
-Modify WidgetsListAdapter and WidgetsDiffReporter to work well with search recycler view.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: Ie29d9f295fddb6d727b5fc26a360f514f2f4a763
2021-03-11 21:27:51 +00:00
Alina Zaidi c322510b2a Merge "Implement pipeline for a simple search based on query string matching on app names in WidgetsListBaseEntries." into sc-dev 2021-03-11 00:18:00 +00:00
Steven Ng 3c08f580c3 Merge "Widgets recommendation backend" into sc-dev 2021-03-09 10:05:55 +00:00
Steven Ng 3a8353256a Widgets recommendation backend
Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:

1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
   the recommendation.

Test: run PredicationUpdateTaskTest

Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
2021-03-08 23:37:51 +00:00
TreeHugger Robot d333224f19 Merge "Convert Launcher Android.mk to Android.bp to setup RoboTests" into sc-dev 2021-03-08 08:12:53 +00:00
Hyunyoung Song 5a007fe0f6 Convert Launcher Android.mk to Android.bp to setup RoboTests
Bug: 181083996
Test: m Launcher3 && install Launcher3 and test basic things
Test: m RunLauncherRoboTests (90 tests run and 3 fails)

Change-Id: Icdc839d06413409cbd52d10a5ef9fe27b0a57baa
2021-03-07 22:42:42 -08:00
Alina Zaidi c6fe0dd4fa Implement pipeline for a simple search based on query string matching on app names in WidgetsListBaseEntries.
This will be the default search for AOSP widget picker and a fallback search for Pixel widget picker.

Test: Tested prototype locally. Also added robolectric test.
Bug: b/157286785
Change-Id: Iad3bf2f46b2a89383a52c756fd1b9f65ecbeb40b
2021-03-07 21:23:37 +00:00
Yogisha Dixit 741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Bob Badour 8182d214e1 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3" am: 541d0855ac am: 3be35ec269 am: 8824a5cd61
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1587746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia1a355fb2ed5bebd8cfff2f5da2eef14428bfe15
2021-02-24 23:53:29 +00:00
Bob Badour 3be35ec269 Merge "[LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3" am: 541d0855ac
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/1587746

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icc96bfa8a3d59a19194a154baeaffaea1281af0a
2021-02-24 22:25:46 +00:00
Steven Ng e8d92342fa Replace horizontal ScrollViews with tables in the full widgets picker
Test: Run gnl test, AddWidgetTest
      Run Robolectric tests for widgets
      Manual test video: https://drive.google.com/file/d/1uwCtVNIlC9150kv5eEfILfP5r5M7ARYm/view?usp=sharing

Bug: 179797520
Change-Id: I2f4cdf84338a91b63967879d0c9268c312ace19b
2021-02-24 19:49:15 +00:00
Bob Badour 4bdf380625 [LSC] Add LOCAL_LICENSE_KINDS to packages/apps/Launcher3
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  Android.mk
  robolectric_tests/Android.mk
  tests/Android.mk

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia348bba8ca075e87070ff8a605ca79ffcbea9982
Merged-in: Ia348bba8ca075e87070ff8a605ca79ffcbea9982
2021-02-21 20:34:37 -08:00
Vinit Nayak a34af18b0e Update System settings content observer to cache values.
Existing ContentObserver will cache values and overwrite
them when the value itself is modified or caller force
updates.

Bug: 149571513
Test: Wrote unit tests, mostly for caching logic.
Not meant to test ContentObserver contract for registering an
observer.

Change-Id: I12835f6c2be27ce17f65a55c51c4ef85c63b4487
2021-02-16 20:58:53 -08:00
Hyunyoung Song c860448bca Merge "Fix WidgetsListContentEntryTest static initialization error" into sc-dev 2021-02-15 22:54:12 +00:00
Steven Ng d2526d6a9a Merge "Make all widgets collapsed in the full widget picker by default" into sc-dev 2021-02-15 22:18:24 +00:00
Steven Ng e92bc55d12 Make all widgets collapsed in the full widget picker by default
Changes:
1. Add a WidgetListHeader view for showing icon, app name and a subtitle.
2. Only WidgetListHeaders are always visible to users in the full widget
   picker.
3. Only one widgets list from an app is visible in the full widget picker
   at any one time.

Test: Auto: run add robolectric tests under widget/picker
      Manual: Open full widgets picker. Then, expand and collapse apps.
      Video: https://drive.google.com/file/d/1gzfeEm5IOAu0qHsO77OTS2eMfU7CHJiL/view?usp=sharing

Bug: 179797520
Change-Id: Idac58be23dfeafcb79b3c61b4972d3addb462de1
2021-02-15 17:46:38 +00:00
Hyunyoung Song 9dbb9fe868 Merge "Revert "Update Robolectric SDK to 30"" into sc-dev 2021-02-14 04:44:21 +00:00
Steven Ng 53d3427b4e Fix WidgetsListContentEntryTest static initialization error
Test: m RunLauncherRoboTests

Bug: 180158637
Change-Id: I26316dddd41b1519e8deb0e049355cdce71aac4f
2021-02-13 20:46:07 +00:00
Hyunyoung Song 5fb8aae805 Revert "Update Robolectric SDK to 30"
This reverts commit 5ed0907cd3.

Reason for revert: b/180139562

Change-Id: I9520993ee925935ab621239686377a39e2e25590
2021-02-13 07:34:54 +00:00
Steven Ng 2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
Changes made:
1. Model: added an abstract class for storing common information for
   entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
   data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
   to its new class.
4. Move some widgets picker classes into a new picker package.

Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
      WidgetsListRowViewHolderBinderTest.
      Manual: open the all apps widgets tray and navigate the list.

Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
2021-02-10 21:23:40 +00:00
Steven Ng 5ed0907cd3 Update Robolectric SDK to 30
Test: Run robolectric tests, such as WidgetsListAdapterTest, from
      Android Studio. (Need manually update JDK to v9.0)

Bug: 179690223
Change-Id: I7c0c696971bd950e83705f5006c70cb260d5b121
2021-02-08 19:07:36 +00:00
Sunny Goyal 6638b56667 Merge "Preventing crash when a gesture starts after home activity change but before the update has been received by Launcher" 2021-01-19 18:04:20 +00:00
Sunny Goyal 53e3b14029 Preventing crash when a gesture starts after home activity change but
before the update has been received by Launcher

Bug: 175645691
Test: Verified using a test launcher
Change-Id: I3f726894bdc941878bb8f8eba7c4701e1218c0dd
2021-01-13 16:21:02 -08:00
Schneider Victor-tulias 6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias 229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias 84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Sunny Goyal 3751be0f1c Removing obsolete shadows
Change-Id: I9dcaa69e4e86130642be15e3585f5898dd866839
2020-11-18 21:45:14 +00:00
Sunny Goyal 986ea0da60 Fixing Robolectic model tests
Some tests were broken because of refactoring in LauncherModel.

Change-Id: I55aa32d75a4d16338796a1b1765717fd72ba4b33
2020-11-12 01:01:55 +00:00
Xin Li 2ef7e39983 Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Id9c756552c08d7690b99987dafadc13448a0c236
Change-Id: I93903c258f834a9e9537b88882d77a6660482638
2020-10-08 23:46:34 -07:00
Hyunyoung Song 95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Xin Li 05bfabfc02 Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I88f54d5cf388aeacbf1da48e3e5f1e89f37ba836
Change-Id: I2e4012ae6bf1cf4e5e5cb76790cd2451e313febc
2020-08-28 13:11:13 -07:00
Sunny Goyal 762d06136c Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses
a separate xml file. Unlike prefs, it does not keep the items
in memory and is just a wraper over reading/writing a file.

Bug: 160748731
Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
2020-08-11 13:23:29 -07:00
Raman Tenneti d0a660cf22 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance. DO NOT MERGE
Fixed check-style errors.

These files are AOSP specific files and they don't exist in the internal code.

See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: m and Launcher3Tests
$ find out -name "Launcher*.apk" -print -exec ls -l {} \;
  out/target/product/bonito/testcases/Launcher3Tests/arm64/Launcher3Tests.apk
  -rw-r----- 1 rtenneti primarygroup 947525 Aug  4 16:22 out/target/product/bonito/testcases/Launcher3Tests/arm64/Launcher3Tests.apk

  out/target/product/bonito/system_ext/priv-app/Launcher3QuickStep/Launcher3QuickStep.apk
  -rw-r----- 1 rtenneti primarygroup 9249956 Aug  4 16:20 out/target/product/bonito/system_ext/priv-app/Launcher3QuickStep/Launcher3QuickStep.apk

Change-Id: I428eaa50ada96567a3b583eca1aa8ee2d8b85e6b
2020-08-05 17:17:35 +00:00
Raman Tenneti ab98166c36 AOSP/Launcher3 - Update language to comply with Android's inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make and Presubmit verify.

Change-Id: I44e903046dd4cd9c7c07872fc56a8d552eb09522
2020-08-04 00:35:03 +00:00
Jayaprakash Sundararaj 1d96ba03ab Refactor FolderNameInfos.
Bug: 159508969

Change-Id: I984e7a4fc321392d06157c705392c1ba5672f348
2020-06-19 23:12:22 -07:00
Sunny Goyal b64fc6c26f Fixing jump when swiping up in landscape and in waterfall cutout
> Adding tests for TaskViewSimulator to ensure proper calculations
> Disabling orientation listener while user is interacting with quickstep

Bug: 158781568
Bug: 156891776
Change-Id: I299c3b1243ac0dbf28faee1b8566c77ea3954e33
2020-06-18 00:29:00 -07:00
Sunny Goyal 55e2b1635f Adding a new attribute to speficy folder label directly in layout
Bug: 158141109
Change-Id: I84dccf43981abc910c0d9e75bf316c6b27b3606b
2020-06-09 15:47:21 -07:00
Sunny Goyal 28daf4a76f Removing multiple system RPCs to packageMAnager and userManager from UI thread
Bug: 158427348
Change-Id: Ibb1837fe932000b69cf5683bb01727fc32abca91
2020-06-08 17:56:36 -07:00
Tracy Zhou ef474d2959 Merge "Improve V2 grid migration algorithm" into ub-launcher3-rvc-dev 2020-06-03 22:52:36 +00:00
Tracy Zhou b48e289e63 Improve V2 grid migration algorithm
- Reset next X when finding the next available space for placement
- Cache icons by screen id in a map so that we don't need to load it each time
- Update tests accordingly

Test: Manual and unit test
Fixes: 155828336
Change-Id: I848775725a624b7a62154224c0745cd680d2e5f0
2020-06-03 15:19:11 -07:00
Sunny Goyal 142dcd8489 Fixing exception when applying transaction while the surface is released
> Check surface before applying transaction
> Keeping the release check around even if it release true the first time, as some other check may defer release
> Waiting on animation complete before releasing a surface

Bug: 148885018
Bug: 148194313
Change-Id: Ieb2b98492ff7df165e6b28a108b5f2cbc7ded32d
2020-05-29 16:08:28 -07:00
Tracy Zhou ed5f3082b0 Special handling when a db for one grid option is not setup yet
- Init KEY_MIGRATION_SRC_WORKSPACE_SIZE and KEY_MIGRATION_SRC_HOTSEAT_COUNT
- Load default workspace only when default db is created, not when peeking into dbs of other grid options during grid preview / migration

Fixes: 154184711
Test: run grid preview and migration right after a cleared cache Pixel Launcher
Change-Id: I86c7072b8c4a9da76e289c55ab440071f192fc38
2020-04-22 18:13:42 -07:00
TreeHugger Robot cee56f039e Merge "Adding common code for instrumentation and robolectric tests" into ub-launcher3-rvc-dev 2020-04-22 17:49:22 +00:00
Sunny Goyal 0e7a338e8b Fixing SecondaryDisplay Launcher
> All apps layout broken in landscpae UI
> Crash when manager profile is added
> Wrong icon size on low resolution

Change-Id: If01dacf9f62a0384ebd8b31b62500178416d3ab4
2020-04-21 23:19:11 -07:00
Sunny Goyal 34ff8cb3c1 Adding common code for instrumentation and robolectric tests
Change-Id: Ia338f0565868bb174ef5f6721924944792866be6
2020-04-20 14:42:30 -07:00
Sunny Goyal e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Sunny Goyal c57a79721d Using config for robo test configuration so that it can easily be customized
Change-Id: Ibd0957ac5c28fae1f88d524cda29bbc84a7ff7bc
2020-04-09 11:32:38 -07:00
Sunny Goyal 8b37c57804 Fixing widget sheet not scrolled using external mouse
> Fixing crash when some properties are not initialized if draw is not called
> Adding robolectic support for UI testing
> Adding robo tests to verify workspace, all-apps, widgets and folder scrolling

Bug: 147312357
Change-Id: Id7756e07f06396359e441cdff2e4f992bdcb97bb
2020-03-31 12:17:09 -07:00
Tracy Zhou f601872a0a The new grid migration algorithm
go/grid-migration-v2

When changing grid from option 1 to option 2, we calculate the diff and add the icons that are in option 1 but not option 2, to option 2's workspace, according to the reading order.

Test: manual and unit tests
Fixes: 144052802

Change-Id: Id01f69e90ce656a9b7c9051fed499807ee9ac0f7
2020-03-13 14:56:38 -07: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
Tracy Zhou c7f39fc66d Merge "Follow up change to GridBackupTable per V2 backup / restore (multi-db)" into ub-launcher3-master 2020-02-13 21:18:04 +00:00
Tracy Zhou 02cb060775 Follow up change to GridBackupTable per V2 backup / restore (multi-db)
Removed the code to handle table copying across dbs. We don't really need this since per ag/10298497, we can just copy db files directly.

Bug: 149236106
Test: N/A
Change-Id: I90bd7b6779fcaa841c71f5d0f27ec91907f926fc
2020-02-12 18:08:06 -08:00
TreeHugger Robot 6929b9a197 Merge "Log Hotseat onboarding user actions" into ub-launcher3-master 2020-02-12 18:36:04 +00:00
Samuel Fufa b641ac2a62 Log Hotseat onboarding user actions
+ Resolve notifiaciton dot scale issue

Bug: 147336566
Bug: 148232056
Change-Id: I0120dc183a876fda38f4682425697378c7be20f3
2020-02-12 10:02:53 -08:00
jayaprakashs e534d3b5f9 Introduce FolderNameInfo class.
* Introduce FolderNameInfo class for passing down the folder name
suggestions from FolderNameProvider.
* Use FolderNameInfo for storing the serialized suggested names for
Folders. It is parsed and used in FolderEdit.

Bug: 148417030
Bug: 148916551
Bug: 148432151

Change-Id: Idaa81e203cc42889be15d0845230b4508521041c
2020-02-11 11:36:28 -08:00
Chihhang Chuang a16ce7ea6a Fix build break from generating robo test code coverage
Use absolute path for LOCAL_INSTRUMENT_SOURCE_DIRS, because Jacoco fail
to get the source code path to parse the code coverage.

Test step:
1. tapas RunLauncherRoboTests
2. make -j30 dist (Make sure RunLauncherRoboTests does not break)
3. make -j30 RunLauncherRoboTests-jacoco dist
4. See the coverage report

Bug: 149001617
Change-Id: If82a839ae52c20c7eb269090976de05fa5d462c4
2020-02-07 10:16:45 +00:00
Tracy Zhou 7df93d28d4 Setup infrastructure (multi-db support) for the new grid migration algorithm
We'll have a db for each grid option and a db for back up / restore.

TODO(pinyaoting): support back up / restore using the new infrastructure, particularly calls to GridBackupTable should use different DBs when the feature flag (NEW_GRID_MIGRATION_ALGORITHM) is on.

Bug: 144052802
Test: N/A

Change-Id: I644a3e70148bd78204a747a337446a3c038f616f
2020-02-05 19:55:05 -08:00
Pinyao Ting 5f8a1ab718 include reboelctric test for restore
Bug: 141472083
Change-Id: Ibee123b01c74316d493d3aa229acf4a4f815f60b
2020-01-28 15:02:39 -08:00
Sunny Goyal 94fa76fbeb Updating feature flags subclassing
> Preventing debug flags to get change listener on release device

Bug: 147913781
Change-Id: I2bd0456918c5d3224c714b153c4565b1ef41d7c0
2020-01-21 14:22:58 -08:00
Sunny Goyal c0e9df6dd6 Removing some unnecessary LauncherProvider overrides
Change-Id: Ia07919309bd4fe942af152881642fe24de9b00ee
2020-01-16 14:57:39 -08:00
Pinyao Ting 9be1cfde79 include roboelectric test to verify db backup is created when
initializing the db for the very first time.

Bug: 141472083
Change-Id: I84d3487bb296bf445323906e8a2d3734b1aa8594
2020-01-16 12:30:48 -08:00
Sunny Goyal a7a5bf3101 Adding support for multiple Model clients
Bug: 137568159
Change-Id: Ia4db800b19cc80c695fcb9ea28e07709dfd08c6a
2020-01-10 12:23:27 -08:00
Hyunyoung Song 97253ec3ab Change the load logic of FolderNameProvider
Work profile apps are suggested as "Work" folder name

Bug: 147359653
Bug: 147359733

Change-Id: Idb2438de9c71c85cfeca6a6b0e116174ea2f3b62
2020-01-08 23:31:58 -08:00
Sunny Goyal 9ae9b60043 Updating Robolectric tests
> Adding multi-thread support
> Simulating actual loader loading flow
> Moving some android tests to robolectic

Change-Id: Ie17a448f20e8a4b1f18ecc33d22054bbf9e18729
2020-01-06 11:05:42 -08:00
Sunny Goyal 73b5a27b14 Updating some non-final static objects
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects

Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
2019-12-11 13:22:58 -08:00
Sunny Goyal 4b5b0eb60d Moving some tests to robolectric
> Adding support for simulating model load

Bug: 130562632
Change-Id: I1de8c0abe2e74d4e7e47e18914316c339920609a
2019-12-09 11:17:12 -08:00
Sunny Goyal 3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -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 045b4fab76 Removing static listeners from PackageInstallerCompat
Bug: 141376165
Change-Id: I2b49d53a05a04c622ed5a7b723109a6cc230d230
2019-09-30 23:17:15 -07:00
Sunny Goyal cf845f0dbf Fixing some robolectric tests
Bug: 131115553
Bug: 141576665
Bug: 141577881
Change-Id: Idb7e9346f57fea1d0231391477fdd11ad6b96a5c
2019-09-26 18:06:28 +00:00
Hyunyoung Song b1ee7d241e Fix FlagOverrideSampleTest
Bug: 141576561

Change-Id: Id6f14dc71fec651ff35ec859598b761c8502514f
2019-09-24 17:10:34 -07:00
Sunny Goyal 3e3d759db2 Removing flag overrides. All flags should be defined as togglable flags instead.
Change-Id: Ia7b9ff84413096cd5b0c4a9a81a232019f2522d2
2019-09-12 10:17:14 -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
Jon Miranda c84168df80 Add support for adding promise icons for new install sessions by user.
- Added flag PROMISE_APPS_NEW_INSTALLS
- Promise icons only added if flag (above) is on, as well as the setting
  for "Add icon to Home screen"
- Maintains a list of session ids of promise icons that have been added to the
  home screen, so that if the user manually removes the icon, we do not add
  it back to the home screen when the install is completed.
- Queues all applications as promise icons, and replaces with actual
  app info when its being added to the workspace.

Bug: 135633159
Change-Id: I411db59f9bd1b346d98b9bb73f5376a5983b8de5
2019-08-22 10:28:14 -07:00
Hyunyoung Song 27df700f05 Merge "Make TogglableFlag backed by DeviceConfig for e2e testing" into ub-launcher3-qt-qpr1-dev
am: 96eba3aea6

Change-Id: I738256f1623119a61197c03008e098b066161542
2019-08-15 16:03:32 -07:00
Hyunyoung Song d4204437de Make TogglableFlag backed by DeviceConfig for e2e testing
Bug: 138964490

TL;DR;; need this to be part of QQ1 or QD1 to verify if DeviceConfig
can be supported for launcher toggleableFlags.

Not handled in this CL:
- When flag is locally modified, that will override the flag value
How that scenario is handled should be discussed separately and is not
within scope of this CL.

Change-Id: I2e6694a40bee9202ed0b0d559e3b5607634071bf
2019-08-15 14:02:28 -07: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
Sunny Goyal 9dbb27c09c Moving some utilities methods to separate class
Change-Id: I5094b22ddc77c45590cea1a5f5dead0dc7580abf
2019-07-17 15:15:07 -07:00
Amin Shaikh fd329d19f9 Add overlayable test resource for launcher3
Test: make RunLauncherRoboTests
Change-Id: I36b4869d44e8896ef59dce6c554ef94a1fe4d9ec
2019-05-06 09:34:38 -04:00
vadimt 677abe2117 Annotating ignored tests with requests to enable them
Bug: 117106893
Change-Id: Ib8e578913ceebee44a507b5e333e7da07c6120d0
2019-04-22 17:34:29 -07:00
Sunny Goyal 6bbf6004f8 Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
2019-04-22 15:39:40 -07:00
Sunny Goyal 9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Hyunyoung Song deb7cd54e7 Remove FeatureFlags.STYLE_WALLPAPERS
Bug: 129874298
Change-Id: I2785f1e49a4ff60143cc763c3dac0c1bb33b41c8
2019-04-09 17:22:30 +00:00
Tony 60ac5d2b34 Only stabilize tasks during quick switch session
- A stabilization session starts when going to a new task via a quick switch
- A stabilization session ends after 5 seconds on the same task or when completing
  a gesture to go to home or overview
- We track the system task order and copy it for the duration of the stabilization session
- After the session ends, we switch back to the system task order
- Remove ENABLE_TASK_STABILIZATION flag (and also QUICK_SWITCH)

Bug: 111926330
Change-Id: I2c18dff2d20ad02b73a4935ac534e9fc9f5f49c0
2019-02-19 14:54:23 -08:00
Hyunyoung Song 29e5d44a63 Add a flag to turn on theme picker in wallpaper picker
Bug: 122524192
Change-Id: I79bd8bde359a56185c1dd0c10964695263d0f6d5
2019-02-07 14:16:32 -08:00
Sunny Goyal b7096ecda6 Fixing Robolectic tests
Bug: 123652178
Change-Id: Ie8b0a23fb8bd0d46ac59c26d75c81a68e6152beb
2019-01-30 15:47:03 -08:00
Sunny Goyal 161a214ede Adding support for backing up favorites table
Favorites table is copied as a separate table name during the first grid migration.
On subsequent migrations this backup table is used if it exists, otherwise new
backup is created. The backup table is also removed if there is any insert or
delete operation on the db (outside of the migration operation itself).

Bug: 111850268
Bug: 121048571
Change-Id: I6f02f4a355c369ee99d89430971be258f7516f6e
2019-01-03 10:25:44 -08:00
Sunny Goyal c5939393a9 Bye bye workspace screens table
Removing a separate table for workspace screens. List of screens are
automatically parsed using the items in the favorites DB. Order of the
screen based on the screen id and rearranging screens is no longer
supported. In case the screens need to be rearranged, all the items
in the favorites db will need to be updated with new screen ids.

This makes backing up the DB (in the same database) easier as only
one table needs to be duplicates.

Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
2018-12-10 11:43:35 -08:00
Ryan Lothian d813e79ecc Get Robolectric tests passing
+ Default SDK 28 -> 26, as >26 isn't available for
  unbundled make builds.

+ @Ignore 3 test methods that currently fail with
  resource-related errors.

Test: RunLauncherRoboTests succeeds locally
Bug: 119567714
Change-Id: Id6ea42cef050119d892b5af2b1ba1afc4c4f0b28
2018-11-15 20:17:33 +00:00
Sunny Goyal 06a07e9748 Moving come tests to Roboelectric
> Fixing resource loading in robo tests

Change-Id: Id5b8a0e4916a2a200da7a41b03f19846834beb1f
2018-11-12 10:49:59 -08:00
Ryan Lothian af0c0e8b0d Allow overriding flags in Robolectric tests
Bug: 117235618
Change-Id: Ibc01a4fe1de6a38d9fc620e4601fdb2282bf03e1
2018-11-08 17:25:23 -05:00
TreeHugger Robot a47ab8b425 Merge "Make FileLogTest use robolectric" into ub-launcher3-master 2018-11-05 16:59:09 +00:00
Ryan Lothian 499a0c932e Make FileLogTest use robolectric
This allows it to run fast locally on the JVM without an
emulator or physical device.

Change-Id: Idb9c94e6f3fce94a86978ea0709eadd72280432c
2018-11-05 11:44:33 -05:00
Ryan Lothian f4c42bc79a Migrate GridOccupancyTest to Robolectric
This allows it to run fast locally on the JVM without an
emulator or physical device.

Change-Id: I416877d7c335a7b9c8dc7a216ecfeb1013f66891
2018-11-05 10:52:40 -05:00
Ryan Lothian 6699eaf74d Add robolectric tests for launcher
Bug: 117235618
Change-Id: Ia0441133a77069493b0a29a7a2d513a818dc7fe2
2018-10-31 19:32:10 -04:00