Commit Graph

1423 Commits

Author SHA1 Message Date
Sunny Goyal 952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Hyunyoung Song e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Hyunyoung Song 8e5464b544 Remove flicker when multiple apps are added/removed/updated on widget tray
Bug: 36718342

1.The flicker was also happening partially because notifyWidgetProviderChanged
callback also made the entire widget list to update in addition to
packageManager update.

2. Now that adapter calls notifyItemInserted, Removed, the recycler
view uses it's internal animation to elegantly move items or insert
them. (added benefit!)

3. Added tests for WidgetsListAdapterTest

$ adb shell am instrument -w -e class com.android.launcher3.widget.WidgetsListAdapterTest com.google.android.apps.nexuslauncher.tests/android.support.test.runner.AndroidJUnitRunner

com.android.launcher3.widget.WidgetsListAdapterTest:.

Time: 0.337

OK (6 test)

Change-Id: I0818d546532631bf889fae560118decff64ec5a4
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2017-08-23 18:04:37 -07:00
TreeHugger Robot b55b6264ae Merge "Remove LAUNCHER3_ALL_APPS_PULL_UP Bug: 63712253 Verified: all apps transition fully functional Verified: NO_ALL_APPS_ICON = false case also works." into ub-launcher3-dorval-polish2 2017-08-21 19:22:56 +00:00
Hyunyoung Song d725f644b7 Remove LAUNCHER3_ALL_APPS_PULL_UP
Bug: 63712253
Verified: all apps transition fully functional
Verified: NO_ALL_APPS_ICON = false case also works.

Change-Id: I779fb7bd4927c5923da3f85590d912dbbbcdef4d
2017-08-21 11:59:14 -07:00
Sunny Goyal b23980cc0e Fixing duplicate/inconsistent definitions for model and callbacks
> 2 implementations for filtering workspace items
> 2 implementations for binding widgets
> duplicate logic for add and update appInfo

Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
2017-08-17 11:05:56 -07:00
Sunny Goyal 1d7f45d8f8 Fixing various tests
> Migrating UI tests to AndroidJUnit4 for better support
> Removing obsolete RotationPreference test
> Fixing broken FileLogTest and AndroidJUnit4
> Removing InvariantDeviceProfileTest as it does not work well with
  resource overlays

Change-Id: I0abb1df6765d76d86c1c6c84e8ac35eb9a6bcdaa
2017-07-31 11:03:54 -07:00
TreeHugger Robot b57fdd8c1f Merge "Adding A feature flag to disable widgets and a corresponding build target Launcher3Go without widgets support" into ub-launcher3-dorval-polish2 2017-07-24 03:11:18 +00:00
Sunny Goyal 64a75aa305 Adding A feature flag to disable widgets and a corresponding build
target Launcher3Go without widgets support

Bug: 62353159
Change-Id: Ia03d2235a9bcf75f9ef191924f81630e63a2c684
2017-07-21 14:10:13 -07:00
Sunny Goyal b72d8b2c8b Using common fling detection logic for notification and all-apps
> Refactoring SwipeDetector to both allow vertical and horizontal swipes
> Using SwipeDetector and common overscroll effect for notification swipes
  instead of a separate logic

Change-Id: Ib706ee179811ade59ddb68184e1c202365d147c4
2017-07-20 01:33:10 -07:00
Sunny Goyal eb297820a2 Using collator for string matching am: 05d2df1678
Change-Id: I0e25b3d84cac2d09491aa87c7dafb2c24e12d556
2017-07-18 18:23:35 +00:00
Sunny Goyal 05d2df1678 Using collator for string matching
This provides a better matching for non-latin characters on N and above

Bug: 63763127
Change-Id: I220487d242ff547311ddd13e7af380a7e47eec0e
2017-07-18 11:23:23 -07:00
yingrenw d791f3a4fa Launcher3: Can't search out local app by Chinese
Description:
Chinese content type is Character.OTHER_LETTER.
When key matches,it check the content type. And
if type is Character.OTHER_LETTER, it doesn't
support search and break.

When the content type is Character.OTHER_LETTER,
make it work normally.

Bug: 63534074
Change-Id: I3713f24c9206fe16a8da2a23e6c90d68079dd533
(cherry picked from commit a9f4bffbfc)
2017-07-18 08:28:11 +00:00
yingrenw a9f4bffbfc Launcher3: Can't search out local app by Chinese
Description:
Chinese content type is Character.OTHER_LETTER.
When key matches,it check the content type. And
if type is Character.OTHER_LETTER, it doesn't
support search and break.

When the content type is Character.OTHER_LETTER,
make it work normally.

Bug: 63534074
Change-Id: I3713f24c9206fe16a8da2a23e6c90d68079dd533
2017-07-12 10:44:20 -07:00
Hyunyoung Song f40e94955c Add tests to SwipeDetector (formerly VerticalPullDetector).
Change-Id: I09ab4f22d7204ad806825ab0d6374c2b9616bf39
2017-07-06 14:32:35 -07:00
Rajeev Kumar 692aeec287 Close cursor after use in RestoreDbTaskTest.
Change-Id: I799fe29ecd602141cac61314c087e3154e12b102
2017-06-27 17:05:19 -07:00
Sunny Goyal 01088543c9 Fixing GridMigrationTask tests
Bug: 62907570
Change-Id: Id165e70930025ccf13a1a105acbdc0fb59ee7e32
2017-06-22 15:26:05 -07:00
Tony 887bd1fe1a Show more shortcuts when last notification is dimissed
We currently only show 2 shortcuts when notifications are
present, but support up to 4 otherwise. With this change,
the hidden shortcuts are added back after dismissing the
notifications, instead of only after closing and reopening
the container.

To ensure the transition is as elegant as possible, we also
separated the shortcuts header from the rest of the shortcuts.
That way we can reveal the new shortcuts without removing the
header (the shortcuts come out from behind the header).

Bug: 38036250
Change-Id: Ie9ab35f9be57cec1d5345e9e70e84e09ea52c9fc
2017-06-15 16:21:34 -07:00
Sunny Goyal e86f11fa38 Adding support for loading workspace in the absence of Launcher.
> LoadWorkspace can be called with a LoaderResult which does not bind anything.
> Synchronous bind does not look for a valid page id, and will fallback to the
  current pageId similar to full load flow

Bug: 37616877
Change-Id: If14491dc79c5b85ae1019cc93e4e08759df3387d
2017-06-08 09:39:34 -07:00
Sunny Goyal a474a9bcf5 Simplifying logic for managed for icon addition
> Checking for duplicate icons before adding new icons

For O and above, icon addition is controlled using
SessionCommitReceiver.
As long as the Launcher is the default app, it will keep adding
icons on the homescreen. Apps installed while launcher was
not the default homescreen, no icons will be added.

For below O, icons are added based on package event. As long as
the Launcher process is running, it will keep adding icons on the
homescreen. Apps installed while the launcher app was dead, no
icons will be added.

Bug: 37528649
Bug: 37082950
Bug: 34112546
Change-Id: Ic99501fa476c00474a479f2a36c24614bfa3f4bf
2017-05-22 13:31:04 -07:00
Sunny Goyal 05f30889d6 Adding support for DB downgrade
Adding a schema file for handling DB downgrade. This schema file is part of
the backup/restore set, and hence is available on a device with lower app version.

Bug: 37257575
Change-Id: I69c8ef5f28d5209be6e6679412c7459d4eeda5d0
2017-05-09 12:59:04 -07:00
Sunny Goyal 161f96bc77 Moving apps search related logic into a custom layout file
This will allow derivative projects to easily change the search behavior
by simply overriding the xml file

Bug: 37616877
Change-Id: Ib8d6a2dab06819a52611e9a3d97c70c5a49bbf97
2017-05-08 14:43:32 -07:00
Tony ca4e6b4b59 resolve merge conflicts of 26b174659 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
2017-03-30 18:10:05 -07:00
Tony Wickham 26b1746593 Add support for system shortcuts in popup container
- Currently the system shortcuts are just widgets and app info
- As shortcuts, they live in ShortcutsItemView
- They are populated either as icons only (if there are deep
  shortcuts) or as icons + text
- Widgets are disabled until binding them is complete (we request for
  them to be bound on long-press now). We should revisit this.

Bug: 34940468
Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
2017-03-30 16:35:56 -07:00
Tony Wickham c455293fa3 Merge "De-dupe shortcuts with the same id as the main notification." into ub-launcher3-dorval
am: c3dfed43eb

Change-Id: I60bbede53d61f117596e90eb3363a4cb5eac7245
2017-03-27 17:56:55 +00:00
Tony Wickham 2f5bb16915 De-dupe shortcuts with the same id as the main notification.
- Pass NotificationKeyData, which includes the shortcut id, instead of
  just the notification key from NotificationListener
- Remove the shortcut with the same shortcut id as the first
  notification, if it has one, in PopupPopulator#sortAndFilterShorcuts()
- Add some unit tests

Bug: 36571718
Change-Id: I308941b34c525b34686583476e3f82ccb8b7e2d8
2017-03-24 14:18:53 -07:00
Sunny Goyal afc3f09240 Adding support for showing the widget preview based on the provided RemoteViews
am: c65a0085d7

Change-Id: Iabea96bb74294e2775a08427c17e154020d9bc40
2017-03-17 18:41:31 +00:00
Sunny Goyal c65a0085d7 Adding support for showing the widget preview based on the provided RemoteViews
Bug: 35811129
Change-Id: I336e48cd00cfec2e617ac73bd8a81419b0944aa7
2017-03-17 11:25:29 -07:00
Mario Bertschler 817afa3447 Show promise app icon in All Apps while installation process.
This CL only modifies the model and is behind a feature flag
which per default is set to false.
The app icon will appear as a promise icon, it reacts on icon
or label changes and the icon will be remove on finishing the
installation process. With this CL the progress of the installation
process is not visible.

Bug: 23952570

Change-Id: I510825d0b0b1b01eb14f7e50f0a2358b0d8b99b5
2017-03-17 09:21:35 -07:00
Sunny Goyal 88c07e5b81 Updating test as per API changes
Change-Id: I746bf48254ebfcad18426d47c61a54f8a11f5cf8
2017-03-07 23:36:06 +00:00
Sunny Goyal f410ca77c7 Updating test as per API changes
Change-Id: I746bf48254ebfcad18426d47c61a54f8a11f5cf8
2017-03-07 15:27:13 -08:00
TreeHugger Robot 93ce56fdb2 Merge "Separating the config and flags in different directories so that it is easier to override one or the other" into ub-launcher3-master 2017-03-07 22:42:14 +00:00
Sunny Goyal b265ba7449 Removing DeferredHandler and using a simple Handler to post callbacks
DeferredHandler was added when we were posting each icon separately,
to prevent starvation. But since then we have moved to binding batct
items during bind.

Also fixing waitForIdle not waiting the second time. waitForIdle was
using a global variable to maintain state, and was not waiting properly
when its called the second time before binding deep shortcuts

Original Change-Id: I9c1289cb3bfb74f86e53ec7ac6dd76bb39666b2d

Change-Id: I9e6b3ae65fbd3aec3a46092efc5249c4525efedf
2017-03-07 13:44:52 -08:00
Sunny Goyal 3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
TreeHugger Robot f55ad3d411 Merge "Adding some tests for request pin shortcut/widget flow" into ub-launcher3-dorval 2017-02-22 23:53:26 +00:00
Sunny Goyal d9843357d0 Adding some tests for request pin shortcut/widget flow
Bug: 33584624
Change-Id: I49df36f60d2ae071b9d2c77c9c3300e010cd3bb9
2017-02-22 15:46:40 -08:00
Sunny Goyal dd96a5e4fd Simplifying Model data load state management
Instead of maintaining 3 different states, each tied to a subset of data,
maintaing a single state that represents all the data. Individual subset
data is invalidated in rare cases and these invalidates are tightly tied
to the UI. This also allows us to add new data to the model, without worring
about classifying the data into a subset.

Bug: 34112546
Change-Id: Id9cb273de35b79e84a2ef8d6556fcf1e72fb4b75
2017-02-22 15:45:14 -08:00
TreeHugger Robot 93bc3c1e41 Merge "Separating methods for updating the model to a sepatate class." into ub-launcher3-master 2017-02-16 21:56:39 +00:00
Sunny Goyal 43bf11d9c9 Separating methods for updating the model to a sepatate class.
Removing static access to model update methods, to allow for better
access control and testing

Change-Id: I9afe004dbf1b2fe50df422fd28bceea9230a4704
2017-02-16 13:50:14 -08:00
Sunny Goyal c9a489c75c Adding minSDK for test targets
Bug: 35079440
Change-Id: Ie27eebe7afaed6a80efc43cb41f651e8acabc835
2017-02-15 10:39:35 -08:00
Tony Wickham f3d02e4716 Merge "Refactor DeepShortcutsContainer to PopupContainerWithArrow" into ub-launcher3-master 2017-01-25 22:23:53 +00:00
Tony Wickham 540913eadf Refactor DeepShortcutsContainer to PopupContainerWithArrow
- Also added PopupItemView, which takes animation logic from
  DeepShortcutView, and which DeepShortcutView now extends.
- Renamed ShortcutFilter to PopupPopulator, which has support
  for new item types (not yet used). Also moved populating
  logic (e.g. UpdateShortcutChild Runnable) to PopupPopulator.

Bug: 32410600
Change-Id: Ib6e444ac7ca99c80ba438801c26e62d9542e0ad9
2017-01-25 11:21:47 -08:00
Sunny Goyal 81e4491450 Fixing loadWorkspace
> Adding checks on legacy shortcuts
> Checking restore status based on package and not componentName

Bug: 34123342
Change-Id: I442699e4ebb34ae66aa25c512bfcdc1b4fd5ae2a
2017-01-24 22:55:36 -08:00
Sunny Goyal 658058b960 Adding some widget addition flow tests
> Added two dummy widget providers: with config and without config
> Added tests for verify widget config flow

Change-Id: I4577f085abe8f8b82047b644c71cc9065358153a
2017-01-23 15:28:25 -08:00
Sunny Goyal c1ad0ce8ae Only marking items not already restored as restore
> Moving the restore property to LoaderCursor

Bug: 34123089
Change-Id: I1f992ef086d65e0b3cf18d3b2cf37a4f254c97d2
2017-01-13 10:38:41 -08:00
Sunny Goyal 3e9be43b6e No more LauncherActivityInfoCompat
Bug: 32745285
Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
2017-01-11 13:06:50 -08:00
Sunny Goyal 87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Sunny Goyal 1cc1c9ad83 Enforcing background thread when accessing iconCacheDb.
> Moving any icon cache access to background thread
> Updating Apps list to avoid loading icons for ignored apps

Bug: 21325319
Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
2017-01-10 23:42:49 -08:00
Sunny Goyal aaf86fe9a0 Refactoring some loadWorkspace logic in a separate class
Bug: 34112546
Change-Id: I8a43ed1646056aa1957ac3d6ea82018691df6386
2017-01-10 13:53:50 -08:00
Hyunyoung Song b0d77fe35f Revert "Build empty test apk until junit dependency issue is sorted out."
This reverts commit 4c82c33a64.

Change-Id: I39c142e2b0e882245a6928264465578e4ddc12c9
2017-01-05 10:55:42 -08:00
Sunny Goyal a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal 7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal 1cd01b023a Ensuring that ShortcutInfo always has an icon
> Making iconBitmap public instead of a getter (similar to AppInfo)
> Removing getIcon() which can lead to IO on UI thread
> Removing updateIcon and handling the update at the caller

Bug: 21325319
Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
2016-12-13 10:31:12 -08:00
Hyunyoung Song 4c82c33a64 Build empty test apk until junit dependency issue is sorted out.
Change-Id: Ib63a654139e43c433011d0f7b761905426aff24d
2016-12-08 14:58:44 -08:00
Sunny Goyal b7f5431232 Merge "Moving ShortcutInfo creation in InstallShortcutReceiver to background thread" into ub-launcher3-master 2016-11-30 16:42:31 +00:00
Sunny Goyal 2bcbe13c64 Moving ShortcutInfo creation in InstallShortcutReceiver to background thread
> Creating shortcut info requires iconCache access

Bug: 21325319
Change-Id: I3317d8b6824aa05b836f3ed3626f169d4d34f783
2016-11-30 05:47:57 +05:30
Sunny Goyal 0993a37838 Merge "Adding a utility class to enforce that icons are always flattened on the background thread." into ub-launcher3-master 2016-11-21 17:02:10 +00:00
Sunny Goyal 32f3dda802 Adding a utility class to enforce that icons are always flattened on
the background thread.

Bug: 21325319
Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
2016-11-19 23:40:07 +05:30
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
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