Commit Graph

79 Commits

Author SHA1 Message Date
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