Commit Graph

65 Commits

Author SHA1 Message Date
Tony Wickham
f38d8593bd Add ShortcutsLaunchTest and ShortcutsToHomeTest.
- ShortcutsLaunchTest verifies that launching shortcut
  from the deep shortcuts container works.
- ShortcutsToHomeTest verifies that shortcuts can be
  dragged from the deep shortcuts container.

Change-Id: I6919b69d4ea1c9e0f13a8f236266745c12ef0715
2016-11-14 15:29:10 -08:00
Tony Wickham
05b20b0712 Fix drag and drop test by moving a bit if there are shortcuts.
Change-Id: Icd023f5d095610b6d1aadbf455d068ce7d700768
2016-11-14 14:14:19 -08:00
Sunny Goyal
f0ba8b7ca1 Moving various runnables in LauncherModel to individual tasks
> Adding tests for some of the runnable

Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a
2016-11-09 15:50:08 -08:00
Sunny Goyal
fcb0928256 Fixing text search where a word starting with lower case was not being matched
am: 28a64381b6

Change-Id: Ib5158d42219478c97d6bec5049e3354ee1087094
2016-10-20 09:29:57 +00:00
Sunny Goyal
28a64381b6 Fixing text search where a word starting with lower case was
not being matched

Bug: 32249413
Change-Id: I0f5e24052759a734fe0df3bd3d0bf2e7ef7f2713
2016-10-19 07:54:22 +01:00
Sunny Goyal
66b24572e4 Exposing custom actions using keyboard shortcut
Keyboard shortcuts:
  ctrl+A => Open all apps
  ctrl+S => shows deep shortcuts
  ctrl+O => shows custom actions popup

This also removes the direct delete/uninstall key shortcuts, making
actidental icon removal less likely

Bug: 24065447
Change-Id: Iae63370c0f33620628567cffd4df024064d4d02e
2016-09-23 15:57:08 -07:00
Sunny Goyal
cc555bbc9e Adding support for searching word segments when camelcase is used in the title
am: e4a3e0cfaf

Change-Id: I98380419701f598ac87bf81d3c173bf26b5281e6
2016-09-12 18:19:06 +00:00
Sunny Goyal
e4a3e0cfaf Adding support for searching word segments when camelcase is used in the title
Bug: 30880421
Change-Id: If642d24408fe0e80b5a0dd9a2a57d2f3c2d92ea9
2016-09-09 18:11:35 -07:00
Sunny Goyal
10629b077c Moving some image handling classes to .graphics package
Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
2016-09-02 12:34:33 -07:00
Sunny Goyal
a2125e1d10 Bug fix in Alarm where it was not getting called correctly if the
new timeout was set that was smaller than the previously set timeout

> Using uptimeMillis in Alarm to avoid errors due to system time
changes
> Adding an extra check in Wait in case Thread.sleep eats up
all the timeout

Change-Id: Id1fac5e8fdb81a0c3c7a6a5e50586b2a2f180d06
2016-08-30 11:04:25 -07:00
Sunny Goyal
ec944ad7b0 Build fix: Updating SDK for tests
Change-Id: I1377dce808335f65eb0799b7053c84853f57980a
2016-08-01 10:08:27 -07:00
Tony Wickham
c39edf54e6 Filter shortcuts down to 4 if there are more.
- We take the first 4 in sorted order, except we remove up to 2
  static shortcuts to make room for dynamic ones if they exist.
- Added ShortcutFilterTest with testSortAndFilterShortcuts().
  This asserts that the filtered list is sorted and has the
  expected number of static and dynamic shortcuts based on
  inputs with various amounts of each.

Bug: 28980830
Change-Id: I832b6b21144f17c74bb8b90a840d6620e99911b8
2016-07-29 16:10:43 -07:00
Sunny Goyal
ba162aa7d2 Merge "Adding logic to pull in workspace data from another Launcher3 based provider. This allows OEMs to keep the user's homescreen intact while changing the default home app package." into ub-launcher3-calgary 2016-07-13 16:02:18 +00:00
Sunny Goyal
6f21ff341b Merge "Defining the list of predefined device profiles in xml. This allows the profiles to be easily customized by derivatives." into ub-launcher3-calgary 2016-07-11 21:16:33 +00:00
Sunny Goyal
a5c8a9eb66 Adding logic to pull in workspace data from another Launcher3 based
provider. This allows OEMs to keep the user's homescreen intact while
changing the default home app package.

Bug: 28536314
Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
2016-07-09 16:19:26 -07:00
Sunny Goyal
f03bd4f547 Build fix.
Missed some traces of key-value backup

Change-Id: Ifda94aa27aa53625bfb7ca173c6750c1b2433669
2016-07-09 15:43:07 -07:00
Sunny Goyal
819e1936bb Defining the list of predefined device profiles in xml.
This allows the profiles to be easily customized by derivatives.

Change-Id: Iaec2b7a0eda34581c8e48b7dc44817013632dabe
2016-07-07 16:57:49 -07:00
Sunny Goyal
eb77aaea89 Removing Key-Value pair backup logic as Launcher now uses full-data backup
Change-Id: I3bbaec2b33afe8c1da3ca1468c7c733cc3194604
2016-06-23 16:31:54 -07:00
Hyunyoung Song
fce71421bf Merge "Fix LauncherInstrumentationTestCase#openAllApps() method. b/29535532" into ub-launcher3-calgary 2016-06-22 17:00:41 +00:00
Hyunyoung Song
8cea8194e0 Fix LauncherInstrumentationTestCase#openAllApps() method.
b/29535532

Change-Id: Iebf20c2fe66ad244b04658b15ade21d579fb2c12
2016-06-22 09:59:40 -07:00
Sunny Goyal
803896767b Fixing bug in GridSizeMigrationTask, where it was not accounting for
an extra space when there is no all-apps icon

Bug: 29569843
Change-Id: Ib768f0d069aed413bd8f4c2aa86ab1d3d657680e
2016-06-22 09:51:07 -07:00
Sunny Goyal
bb011dad4e Adding a flag (enabled by default) to remove the all-apps button.
All apps can still be opened by clicking the caret.

Bug: 29398447
Change-Id: I61f1b05cea83a0a49d7cc16c518c5419618ba779
2016-06-17 08:17:22 -07:00
Sunny Goyal
e8f7d5a67e Executing the DB migration during startup instead of restore.
This allows proper execution of DB.onUpgrade task if the app updates
after the restore

Change-Id: I4c40167b30e1d7040b3a38be70d834f7b215e540
2016-06-08 16:14:59 -07:00
Sunny Goyal
47328fd53f Removing the SearchDropTarget bar as it no longer contains the QSB
> Renaming it to simply DropTargetBar
> Moving AppInfo to the top bar as well
> The workspace pages will extend to the top edge (minus some padding).
Since the QSB is no longer displayed on top of every page, there is
no reason to reserve the space.
> In spring-loaded mode, the workspace cell layout will scale enough
to make room for the drop target bar at the top

Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
2016-06-06 16:15:46 -07:00
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
c0cc264b03 Fixing comments
Change-Id: I412fef8e07d91548beb8a5431d6aa86611237f69
2016-05-27 12:11:45 -07:00
Sunny Goyal
0b50421583 Merge "Adding some UI tests > Launcher app from all-apps > Drag icon to all-apps and launch it > Add widget from widget tray" into ub-launcher3-calgary 2016-05-27 19:00:44 +00:00
Sunny Goyal
ff4ba2d995 Refactoring out grid occupancy management in a separate class
Change-Id: I37a830c0f2eb0a0dd4f5fc78fa29127cb18cb3c2
2016-05-27 09:12:26 -07:00
Sunny Goyal
6d02c7a033 Adding some UI tests
> Launcher app from all-apps
> Drag icon to all-apps and launch it
> Add widget from widget tray

Change-Id: I6bd6128a7b560a23a887d1fb40bfcda25b9b02e7
2016-05-26 17:20:22 -07:00
Sunny Goyal
bc543af01c build fix
Change-Id: Ib31b7b4efa96897e7ea04412a9deae14a432b6c0
2016-05-10 16:28:32 -07:00
Sunny Goyal
c190dbfb78 Adding full backup handler for launcher3
Bug: 28302573

Change-Id: If0889a3b00b88b134b19d7f790159dfafdcdb004
2016-05-10 15:27:24 -07:00
Sunny Goyal
b5b55c8012 Removing LauncherProvider dependency in DatabaseHeler
This will allow DatabaseHeler to easily be moved to an independent class

Change-Id: I9a3d5d3380ed0af246d7a01553a492467c3096b0
2016-05-10 12:30:47 -07:00
Sunny Goyal
713edfce26 Adding a utility class for persistant logging.
The logs are kept for at max 48 hours. It uses two log files and switches
between the two based on the day of the year.

Change-Id: I9a99499b3445a62f29f62a5cd13db20b1783bcd3
2016-05-09 12:47:42 -07:00
Hyunyoung Song
9345ebfc5c Add test size annotation.
Rational/Background:

@MediumTest: An integration or functional test that validates the
interaction of one or more application modules on a single machine.
(should run under 1 sec: Usually get killed after 5 min)
@LargeTest: A system test, integration test, or end-to-end test that
verifies that a complete application works and accounts for the behavior
of external subsystems.
(Usually get killed after 15 min)

Change-Id: I8b668af3d2ca09c43ad45c6fd72b1d0d80c6b7d3
2016-05-05 11:46:03 -07:00
Sunny Goyal
7eab3cc374 Fixing broken instrumentation tests when run from command line
Change-Id: I923cdbaaaf18c9b765d1e70122b92cd2c1621e06
2016-03-18 17:48:53 -07:00
Sunny Goyal
16466f1bbb Adding UI tests for various bind widget flows
Change-Id: I634302051886baee6b6424f69bc95db860b4823e
2016-03-15 15:34:25 -07:00
Sunny Goyal
eb04507471 Fixing broken testQsbTallHeight for some devices
Change-Id: I0f4f11847602f4767051543ff648c5c32a82961a
2016-02-25 14:51:13 -08:00
Tony Wickham
c32c63c46e resolve merge conflicts of b9759d399b to ub-launcher3-calgary.
Change-Id: I66230c15e5eaeef316d4e2f14b85c6ff1b6e977d
2016-02-01 14:51:35 -08:00
Tony Wickham
b9759d399b Merge "Add extra space for the search bar." into ub-launcher3-burnaby-polish 2016-02-01 22:29:55 +00:00
Tony Wickham
8a75806c1a Add extra space for the search bar.
Also fixed a broken test.

Change-Id: I1c270e69617528ea30f0e26a2101673e9b9fa63c
2016-02-01 14:15:37 -08:00
Sunny Goyal
a22921fc31 Merge "Fixing Test builds" into ub-launcher3-burnaby-polish
am: f7f8cf5743

* commit 'f7f8cf5743810a614079ff7d4202dd0c9cd969ed':
  Fixing Test builds
2016-01-29 21:21:57 +00:00
Sunny Goyal
ca846f8f54 Fixing Test builds
Change-Id: I8524ebc124270feb2e6e69e17ba0e0c6301bce18
2016-01-26 12:17:24 -08:00
Tony Wickham
927050bc28 Fix broken tests.
am: a5cfbe8075

* commit 'a5cfbe807503bf4c2d5853f700191fef34fb3713':
  Fix broken tests.
2016-01-22 23:03:30 +00:00
Tony Wickham
a5cfbe8075 Fix broken tests.
- Missing a comma in one of the focus logic test matrices
- Disable QuickAddwidgetTest, because it isn't that useful and is
  flaky by nature.

Change-Id: Ia85fa578ea563ca525419b68ffcf90cfef8f86d0
2016-01-22 14:45:02 -08:00
Sunny Goyal
f076eae0ca Adding support for migrating the grid between any two valid screens sizes.
The grid is migrated in steps where each step consists of at max one column change and at max one row change.
Adding some unit tests for GridMigrationLogic

Bug: 25958224
Change-Id: Ie54e872ea0925cc4c463edbba0a7201d62b373a0
2016-01-20 11:58:09 -08:00
Tony
2f04430fa4 Added an instrumentation test case for quickly adding a widget.
This would have caught the race condition bugs that caused the "specified child
already has a parent" IllegalStateException (bug 23896857).

Change-Id: I3b408d21113237b0c89a0a7161f504596212bd58
2015-12-04 12:06:13 -08:00
Tony Wickham
329d8bfa04 Cleanup keyboard code.
This should be the last keyboard CL.
- Fix bug: couldn't focus All Apps button in some cases when the All
Apps column was skipped over. Also added test case for this.
- Stop explicitly passing countX and countY to handleKeyEvent, as
these had to match the matrix dimensions anyways.
- Rename createSparseMatrix() - there were 3 methods of the same name,
but all had different purposes. This is confusing both from a
readability standpoint and also when looking at stack traces.

Change-Id: I08ba8411674fcea43a608856c114dee8dbd22398
2015-12-04 09:48:17 -08:00
Tony Wickham
af78b59af1 Make sure pages are always accessible via left/right arrow keys.
- Handle NextPageFirstItem as first focusable item in reading order
- Handle PreviousPageLastItem as last focusable item in reading order
- Check the hotseat after the workspace in both cases above
- Dpad horizontal navigation (left/right) uses these as a last
  resort (Rule3) to guarantee an item takes focus if a page exists

Note that it is necessary to search for a focusable item because
widgets are not yet focusable.

Bug: 25591057
Change-Id: I953648bd76c657d660a38427fdd4108bf9963c23
2015-12-03 14:18:06 -08:00
Tony Wickham
6cbd22279e Add special column for All Apps button in FocusLogic's sparse matrix.
The All Apps button creates a number of edge cases, mainly because it
causes the hotseat to sometimes have an extra column than the workspace.
Previously, we sort of swept these problems under the rug by simply
ignoring the All Apps button if other icons were present in the hotseat,
with the assumption that those other icons should get focus instead of
the All Apps button. (If possible, we want to stay in the same column
when moving from the workspace to the hotseat.) But this doesn't always
work, as in the attached bug where the hotseat doesn't get focus at all
when the All Apps button is an obvious candidate for it.

By adding a specialized column in the focus matrix for the All Apps
button, we ensure that moving down to the hotseat stays within the
original column when possible, while also allowing the focus to switch
to the All Apps button if appropriate. Furthermore, we take care to skip
over the All Apps column when necessary in order to maintain all
previous functionality.

Bug: 25590522
Change-Id: I5d6a8ee69de8834314c4689246fe7d54329b2eef
2015-11-10 11:40:58 -08:00
Tony Wickham
3cfa97d4c1 Added unit tests for b/25434120 regression.
Change-Id: I55b10274c4bb63ec6fd3138236e78a04e3eac91a
2015-11-06 17:08:57 -08:00