Commit Graph

189 Commits

Author SHA1 Message Date
Sunny Goyal
83a8f042ad Moving LauncherAccessibilityDelegate to accessibility package
Change-Id: I510204a5a12abf2da2757f3e3f8b0e8869a6b04a
2015-05-19 12:52:30 -07:00
Sunny Goyal
2bba4c37c6 Removing some thread priority management logic
> Not saving folder id in onSaveInstance as it is not used.

Change-Id: I176beb77cafe27ec4b7500d65dc86287d2f2e0cb
2015-05-18 15:57:14 -07:00
Sunny Goyal
f5cd998c25 Starting the loader if the previous loader is not complete, instead of binding page synchronously
Bug: 21107637
Change-Id: If04952c7d5c8a38a739ce5536ecac394011ab61a
2015-05-18 15:22:47 -07:00
Sunny Goyal
a214a63bfe Preventing homscreen getting filled with secondary user apps, when launcher
starts for the first time

> Sorting the apps in the work folder by install time

Change-Id: Ia475b4ff3197d90e6dffe070c12c0aa16be9e292
2015-05-15 11:53:10 -07:00
Sunny Goyal
1936ec048c Removing empty folders in loader
Bug: 21050720
Change-Id: Id174bb1e18b070e32273d66649f0e286e3546f89
2015-05-12 11:03:24 -07:00
Winson Chung
82b016cb56 Trim all whitespace from titles and labels.
Bug: 20953160

Change-Id: I1610df5e445a4139522226f68fa6439926bc70c6
2015-05-08 22:22:39 -07:00
Hyunyoung Song
219d048711 Widgets should also be bound when binding all apps.
b/20915830

Change-Id: I772156f8a8d361f485fb4d7edc447c2cee2edf23
2015-05-07 12:51:42 -07:00
Sunny Goyal
8a8f03d10a Merge "Skipping package update tasks if loader has not yet run." into ub-launcher3-burnaby 2015-05-07 17:08:24 +00:00
Sunny Goyal
c905efc89c Skipping package update tasks if loader has not yet run.
Bug: 20754508
Change-Id: Id2ddcff42cd41e4f9875ad6ef95f648365502b75
2015-05-06 16:59:02 -07:00
Sunny Goyal
77919b93b9 Updating the icon cache after all apps has been bound.
> Updating the cache DB version to reset existing cache.

Bug: 20834835
Change-Id: I298ca9ddcc4dd270b25b767447ecde01ef41a916
2015-05-06 16:54:08 -07:00
Sunny Goyal
deb189fd10 Merge "Adding workprofile shortcuts after the loader has completed" into ub-launcher3-burnaby 2015-05-06 16:48:47 +00:00
Hyunyoung Song
9892e58740 Use valid context inside LauncherModel when calling loadAndBindXXX
b/20851075

Change-Id: Ie3feb387a142d4e11a0a18bbcc4fd4932cfe4439
2015-05-05 10:08:29 -07:00
Hyunyoung Song
227239e7c0 update widgets model when package is updated
Fixing a bug where onProviderChanged is called before Package update.
And icon loaded on the widget tray is the default icon.

Change-Id: I4ffea846d057920fd894537432ac5881642bc570
2015-05-04 18:17:35 -07:00
Hyunyoung Song
80068f518c Merge "WidgetTray performance improvement (less sorting): Part 1" into ub-launcher3-burnaby 2015-05-04 23:28:55 +00:00
Hyunyoung Song
8821ca9a6a WidgetTray performance improvement (less sorting): Part 1
- No longer return sorted list from the package manager since, the only
time the widget list requires to be sorted is when recycler view renders
them.
- Made getWidgetsAndShortcuts private to guarantee that widgets are
being loaded in the worker thread.

Change-Id: I2c35973c1226e831514380dd38fc2f88b1b91d02
2015-05-04 16:28:20 -07:00
Sunny Goyal
756a28aeec Adding workprofile shortcuts after the loader has completed
Change-Id: Id466d8e164feeac427d969d6bc0ed3ca7a218ac4
2015-05-04 10:52:26 -07:00
Sunny Goyal
957c13f032 Handling managed profile creation in the model as the activity
can get killed in the background.

Change-Id: I95f62cf268fe642c9a2bb4975eb92bf8e12d23a9
2015-05-01 13:02:20 -07:00
Sunny Goyal
dfde999ccd Various managed profile fixes
> When matching existing shortcut, match the uri as intent doesn't implement equals
 > Fixing user matching when searching for apps in all-apps

Bug: 20749743
Change-Id: I14f3e2134e774727176e865d74108ef79de874d6
2015-05-01 12:32:31 -07:00
Sunny Goyal
a911672f45 Simplifying add to workspace by not going through the worker thread
Change-Id: I3260786bee257aea93ade49e6fa18008232addbe
2015-04-29 14:58:17 -07:00
Sunny Goyal
f7a29e83f0 Removing some unused method params from CellLayout
> Replacing various distance calculations with Math.hypot
> Moving findVacantCell to Utilities

Change-Id: I0cb194b603e52b3bb2b29a095bb4da2bb408ab13
2015-04-24 15:28:20 -07:00
Sunny Goyal
e2df0620c1 Adding LongArrayMap as a replacement for HashMap<Long, E>
Change-Id: I4710e6db69abcdbd897a8401fc8b980c09e2ffef
2015-04-24 12:35:29 -07:00
Sunny Goyal
d33860f2cc Clearing all pending runnables when Launcher is destroyed.
Change-Id: I00596c11116b5579c1f013b268b6c0b5239f0aa7
2015-04-23 16:18:40 -07:00
Sunny Goyal
756adbc3e4 Fixing missing updates in package install sessions
> Ensure icon cache never returns null icon
> Enabling install shortuct receiver only after workspace has finished binding
> Making all the model changes for package installs on worker thread and only
posting the updaes on the UI
> Making shortcut exists check on the loaded items and not on the DB
> Explicitely using worker thread for PckageInstallListener
> Removing backward compatibility support from PackageInstallerCompat

Change-Id: I9592771b9670c1c1c84c8208cae8dafa7b393e65
2015-04-22 10:08:14 -07:00
Sunny Goyal
7372fc659e Merge "Using a different userManager class as getUserForSerialNumber gives a valid userHandle for deleted user." into ub-launcher3-burnaby 2015-04-22 01:44:56 +00:00
Hyunyoung Song
d4af148444 Remove duplicate calls to getSortedWidgetsAndShortcuts
Note: this is a manual CP of the CL that was submitted to ub-launcher3-almonte

b/19904873

Change-Id: I2e56bc0c7524caa2ef3c5fb00f35cb032cd1860b
2015-04-21 16:07:30 -07:00
Sunny Goyal
7f834d2b30 Using a different userManager class as getUserForSerialNumber gives
a valid userHandle for deleted user.

> Also chaching the user handles during loader to avoid multiple
calls for UserManager

Bug: 19389411
Change-Id: I95af3b41b2c9d2ea41d9a75b1020656f57f5e4c9
2015-04-21 10:13:03 -07:00
Sunny Goyal
fa401a10e7 Updating drop button targets
> Splitting DeleteDropTarget into delete and uninstall
> Showing UninstallDropTarget for app shortcuts on workspace
> Showing InfoDropTarget only when developer options is enabled

Change-Id: I4396571d2199d1581bb9c733aef88ab9b0ebd79d
2015-04-16 15:52:04 -07:00
Sunny Goyal
18bf8e2ffd Automatically adding managed profile shortcuts to homescreen.
When the managed profile is created, a "Work" folder is created
and added to the homescreen. All work profile apps are added to this
folder and icons for subsequent installs (withing a fixed time frame)
are automatically added to this folder.
If this folder get deleted or the time-frame expires, icon for any new
install is placed on the homescreen.

Bug: 17410319
Change-Id: I49f4e437707d5eabe4eec85320765bf6ba7fde97
2015-04-10 19:37:13 -07:00
Hyunyoung Song
3f471440a8 WidgetTray revamp work
- RecyclerView is rendering
- Animation is connected
- Drag and drop is now handled
- UI tweaking: background, margins, more to come.
- Flicker and preview not loading issue:
  fixed height for the horizontal scroll view.
- Shortcuts are added
- Widget Preview loading should support shortPress for drop
- UI tweaks left: overlay of arrow when there are more items to scroll
- icons are added in the section header
- Sorting of widget sections and widget horizontal list
- Adding all the padding constants to dimen.xml file
- RecyclerView should only support one view type

For items to be addressed in follow up patches OR CLs,
TODO is added to the comment.

b/19897708

Change-Id: Ibfc4da1696a23d20bada93db46e126706eb13cdc
2015-04-08 19:01:34 -07:00
Winson Chung
c517f4ce65 Ensuring that work-profile applications are mixed in with other apps.
Bug: 20046158
Change-Id: I833c1a1467889db07f9ec33ca77641322901958e
2015-04-06 14:51:13 -07:00
Sunny Goyal
1d4a2df091 Removing ContentObserver from LauncherModel, and calling reload
whereever necessary

Change-Id: Ia4a8abdfe2be9703f3217a60527d3a1220b33bdc
2015-04-01 10:20:18 -07:00
Sunny Goyal
5b0e669169 Rewrite: Widget preview loader logic
> Widget previews are saved in data dir instead of cache dir
> Expiring widget previews similar to IconCache
> Removed support for setting thread priorities

Bug: 19865031
Change-Id: Ib6033c2b1ff8ae61bba8762ca994ccd8217d3c75
2015-03-20 17:31:11 -07:00
Adam Cohen
091440a9cb Reducing method count by eliminating synthetic accessors
Elimates 304 methods based on dex analysis

The java compiler generates sythetic accessor methods for all private
fields, methods and contructors accessed from inner classes. By marking them
package-private and @Thunk instead, sythentic accessor methods are no
longer needeed. These annotated elements should be treated as private.

Change-Id: Id0dc2c92733474250d8ff12fa793d3a8adeb1f26
2015-03-20 11:15:54 -07:00
Robin Lee
26ace12135 Don't clobber widgets with the same component.
By not storing them in a HashMap keyed against ComponentName (which is
almost guaranteed to conflict with other widgets when managed profiles
are in play).

Bug: 19444068
Change-Id: I6ffce78e8aaf265196239670404cbdaff9fa09be
2015-03-19 21:23:13 +00:00
Sunny Goyal
34b6527cef Lazy loading high res icons
> Loading low-res icons for icons which are not visible on
the homescreen.

Change-Id: I8ac7bf09f6030ed554cb60a4cd402f3f36ffe12b
2015-03-17 15:05:23 -07:00
Sunny Goyal
5d85c44fd8 Adding sort switch in FolderPagedView
> Adding options column in DB to store generation purpose flags
> Storing isSorted flag in FolderInfo
> Adding a switch for A-Z sorting (only visible if pageCount > 1)
> When in sorted mode, spring-load snaps to the target location for 1.5 seconds

Change-Id: I8c7c778d2cc3ccbd35a2890a1a705e1c1a7e9a66
2015-03-17 14:49:38 -07:00
Hyunyoung Song
70a48befe4 Fix widget refresh issue on package install/uninstall
Culprit CL: https://googleplex-android-review.git.corp.google.com/#/c/592303/3/src/com/android/launcher3/LauncherModel.java

b/19658229

Change-Id: I02b0b2a0ed9bc3200bbe1edcb251cf0efe939e53
2015-03-11 16:36:52 -07:00
Winson Chung
b745afbdd7 Initial changes to break out AllApps into its own view.
- Moves launcher state-transition code into its own class
- Moves all-apps related code into a separate view/set of classes
- Implements a basic list view for all apps

Change-Id: I68f174aa9e1bf82c4e46ce9549c78a8dc4623f46
2015-03-10 18:14:22 -07:00
Sunny Goyal
5b437d8957 Merge "Removed disableAllApps flag" into ub-launcher3-burnaby 2015-03-02 19:33:35 +00:00
Sunny Goyal
c9acdd51c4 Removed disableAllApps flag
Change-Id: I50ba511b8493bca2506ab6010f141c093bfa7499
2015-02-26 12:35:09 -08:00
Sunny Goyal
4fbc3828c5 Updating IconCache to maintain a persistent of icons
> IconDB maintains a DB of icons keyed on ComponentName + User
> During loader, icons & labels are loaded first from the DB, and
if the entry doesn't exist, loaded using packageManager
> After the loader completes, IconDB updates any entry which might have
changed, while the launcher was dead.

Change-Id: I7a6021cb6d1ca1e66fa5a0bdd21e1543e0cf66fc
2015-02-26 19:08:44 +00:00
Sunny Goyal
66cfdc2549 Removing code for the unused 'upgrade path'
Change-Id: Ib9eca92284b0eabbe36ffaaf26c62a6ce3cfd3e9
2015-02-11 11:55:36 -08:00
Adam Cohen
158da0802d am b76c165a: Fix ClassCastException due to typo
* commit 'b76c165aadb4deb144ec3b1267aa1faf304638e9':
  Fix ClassCastException due to typo
2015-01-30 19:29:28 +00:00
Adam Cohen
b76c165aad Fix ClassCastException due to typo
issue 19159790

Change-Id: I5f9fa0e3672c10a460606dcb13b158bd4e614813
2015-01-30 10:29:26 -08:00
Sunny Goyal
bb3b02f562 Replacing hotseat icon to an appropriate system app
> During backupi, store the hotseat target app type, based on some predefined
common system apps
> During restore, save this app type in the restore flag, if it is a hotseat app
> During first launcher load, if an app is not being restored, try to replace it
with an appropriate replacement for that type, otherwise delete it.

Bug: 18764649
Change-Id: Ic49e40bd707bd8d7de18bbab8b1e58a0a36426a2
2015-01-22 10:54:50 -08:00
Sunny Goyal
c1b7c2ecbd Simplifying loadScreenDB to load the screen IDs in sorted order
Change-Id: I5551b5c12cdc2b0e304a06d2e8edbe81e124a55c
2015-01-20 11:46:46 -08:00
Sunny Goyal
71b5c0b988 Adding accessibility controls
> Adding 'Remove' option to workspace items
> Adding 'Add to workspace' to all apps and widget list items, which
adds the item to the first available space, giving preference to
the current workspace screen
> Adding 'App info' and 'Uninstall' options to appropriate items

Bug: 18482913
Change-Id: Ifab7423af2d9ba502b5a2771b37bb5436b3df937
2015-01-16 17:40:41 -08:00
Sunny Goyal
08f7261d11 Adding a rank column for itemInfo
> Rank is used to determine position of an item
in a folder.

Bug: 18590192
Change-Id: I2826a7c570b4cc58e719d685f17a24ec6133804f
2015-01-13 22:19:56 +00:00
Adam Cohen
5940042d39 Supporting custom widgets provided by launcher
-> This change provides integration for widgets provided by
   the launcher package which can run arbitrary code.

Change-Id: I6052da5c4afed7ee72e3b44d045b9c46f2d84c42
2014-12-05 16:18:41 -08:00
Sunny Goyal
2a66bbf3f0 Disabling auto addition of managed profile shortcuts
Bug: 16188104
Change-Id: Ib6464c22140df6d60112eb35f5983718b3db6288
2014-11-20 17:02:24 -08:00