Commit Graph

134 Commits

Author SHA1 Message Date
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
Tony Wickham a3c74d10a7 Setting correct height for search bar widget options bundle.
- Seperate search bar height from its top and bottom paddings
- Report this height plus 8dps top and bottom for the widget options
- Use a separate bottom padding to adjust spacing between QSB and
  the workspace
- Add tests to verify the height of the search bar in both normal and
  tall modes (ran on Nexus 6, 7, and 10)
Change-Id: Ia7557785d1b38194eee869d0460456e8f33447d5
2015-10-29 12:18:28 -07:00
Sunny Goyal fe3db428ab Merge "Refactoring getPreferenceKey method" into ub-launcher3-burnaby-polish 2015-10-20 17:17:08 +00:00
Sunny Goyal f725824fa2 Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard.

Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
2015-10-20 09:41:04 -07:00
Sunny Goyal ead4ab9655 Using UiSelector instead of BySelector
Change-Id: Ie912cc7291a2533f6686bdb34e108be15ce244ac
2015-10-19 17:32:10 -07:00
Sunny Goyal 3d1c0ffba7 Adding tests for rotation preference
Updating the gradle file to run tests directly from AndroidStudio

Change-Id: Iac23dfc6f995477f2406071fbfab3a16ee58ce6f
2015-10-16 17:19:36 -07:00
Hyunyoung Song 35c3c7f517 Start adding unit tests for the invariant device profile / Refactor
- removed redundant code to sort the device profiles
- removed DeviceProfileQuery class
- Added a helper method inside the test to easily generate
interpolation graph looks like:
https://docs.google.com/a/google.com/spreadsheets/d/1a1fdemrOqIDixiql77h0anWzUD3GlYfGsbP2FfIhyPM/edit?usp=sharing

Change-Id: Ia4c54a8d59a049c418c08d1b766f07ac6e1d0944
2015-05-28 15:33:40 -07:00
Hyunyoung Song 61e3a972e7 Add dummy string to Launcher3Tests resources to fix build error.
TL;DR;; since ag/656186 which moved the all-makefiles-under call to the bottom
of the launcher's Android.mk file, resources for test package
will not build without a dummy file. This change is necessary for the
test team to continuously run the android tests.

b/19566571

Change-Id: I4ff422ac019df4447348d953c5dd606d2a0dcc58
2015-03-16 17:23:58 -07:00
Hyunyoung Song 3853171963 [key event focus] DPAD navigates to the nearest item on next/previous page
b/19381790
b/16351792

TL;DR;; Previously, when RIGHT is handled on the right most column of the
current page or when LEFT is handled on the left most column, the next
icon of focus is next page 'first' icon or the previous page 'last icon'.
With this change, the row information is preserved when trying to locate
an icon to give focus in the next/previous page.

Next CL: long awaited unit tests that capture corner cases for different
orientation/ device configuration.

Change-Id: I5278bed45275b3e4cb39fb698df35f90bb45a415
2015-03-03 19:25:16 -08:00
Hyunyoung Song 170a9f3a1c [unit tests] Setup instrument target for the launcher3 unit test
b/19566571

Change-Id: I47da40aa13a3e7c5ec8531e7ef6a9e52f764c565
2015-03-02 11:55:42 -08:00
Hyunyoung Song 53fca52d3b [unit tests] Delete stress package
b/19566571

TL;DR;; no longer working AND also the one test that is
set up is useless to keep.

Change-Id: If44457c7bc19a973450edf5aad3e744daf20624a
2015-03-02 10:55:45 -08:00
John Spurlock 2c38e70acd Fix launcher3 standalone build.
Change-Id: Ibfe14c5960211916222fc49389b8776be6bf768b
2013-09-18 10:51:31 -04:00
Daniel Sandler 325dc23624 Launcher2 is now Launcher3.
Changes include
  - moving from com.android.launcher{,2} to
    com.android.launcher3
  - removing wallpapers
  - new temporary icon

Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b
2013-06-05 23:30:20 -04:00
Tsu Chiang Chuang ee8caea24b changing test to use hidden test api annotations.
Change-Id: If1002c80fdfdc87694890215201314e2372bbe4a
2011-08-05 17:58:58 -07:00
Tsu Chiang Chuang 923aa62463 rectify build files.
Change-Id: I138ac7805cb045f960e32193bad95a73cd8b063e
2011-06-17 12:11:23 -07:00
Tsu Chiang Chuang 8c7a2b7d02 Adding stress test for launcher2 rotation.
Change-Id: I03b7dbdd025af39fc733a91f54633a548225e140
2011-05-25 15:32:00 -07:00