Commit Graph

334 Commits

Author SHA1 Message Date
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
Winson Chung
dc61c4d414 Refactoring to single path for overview mode.
Change-Id: I590a813c6f031342d75c3a6c3e9c9afda1808f2e
2015-04-21 15:54:22 -07:00
Winson Chung
e655639609 Merge "Accounting for recent changes in padding when detecting backgound taps to close AllApps." into ub-launcher3-burnaby 2015-04-17 22:56:48 +00:00
Winson Chung
466663edee Accounting for recent changes in padding when detecting backgound taps to close AllApps.
- Also ensuring that we keep the search bar visible in all apps only if it is being overridden.

Change-Id: Iba980ecec255da80aff8ff57b42ad99d70a2122a
2015-04-17 12:51:27 -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
3fa3c12761 Fixing pallpaper parallex in rtl.
The rtl mode, the first screen should correspond to the last
opage offset (since page offset are always defined as
left-to-right)

Change-Id: Ie31139166bd71c423c63968760493ec572af81e9
2015-04-15 13:54:27 -07:00
Winson Chung
0f78572066 Initial changes to support a fixed all-apps layout.
- Dynamically update padding and background depending on fixed bounds and searchbar
- Fixes issue with drag layer bg getting clobbered when rotating launcher
- Tapping outside the bounds of all apps should close all apps
- Fixing typo causing widgets to not show in sw720dp devices

Bug: 20127840

Change-Id: I29c3f905bdee940f938ffe054f58434887073092
2015-04-09 13:18:31 -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
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
e9909f58c2 Removing UninstallShortcutReceiver
> Removing support due to its flacky design. Removing a shortcut
causes a full reload. Also we do not have any concept of owner, so
any app can remove any shortcut.

Bug: 11372484
Change-Id: I781c922fac7dc77ea82cd0a2af74a5fca22500de
2015-04-01 10:11:11 -07:00
Winson Chung
3d9490ab95 Removing more code with API 21 dependencies.
Change-Id: I16c914334ce0694b84626269ae4bb5e83082c739
2015-03-24 18:02:01 -07:00
Sunny Goyal
5319b2bb3b Merge "Removing all dependencies of launcher code on wallpaper-picker" into ub-launcher3-burnaby 2015-03-21 01:19:35 +00:00
Sunny Goyal
6a1e95a3df Removing all dependencies of launcher code on wallpaper-picker
> WallpaperPicker can still depend on launcher code, but not the
other way round.

Change-Id: I93a07f985c3955c638a68a5fad9c09b184a879b9
2015-03-20 18:16:58 -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
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
434e667b5b Merge "Ensuring setQsbSearchBar is called whenever the QSB is created" into ub-launcher3-burnaby 2015-03-10 21:02:46 +00:00
Adam Cohen
ec3682b564 Merge "Enabling accessible drag and drop" into ub-launcher3-burnaby 2015-03-09 19:47:33 +00:00
Adam Cohen
c9735cff2e Enabling accessible drag and drop
-> Using the context menu, and a new two stage system, this allows
   users to curate icons and widgets on the workspace
-> Move icons / widgets to any empty cell on any existing screen, or
   create a new screen (appended to the right, as with regular drag
   and drop)
-> Move icons into existing folders
-> Create folders by moving an icon onto another icon
-> Also added confirmations for these and some existing accessibility actions

Limitations:
-> Currently, no support for drag and drop in folders
-> Considering moving the drag view so it doesn't occlude any
   content (in particular, when user changes pages)
-> In this mode, accessibility framework seems to have
   problems with the next / prev operations

Bug: 18482913

Change-Id: I19b0be9dc8bfa766d430408c8ad9303c716b89b2
2015-03-09 11:29:28 -07:00
Sunny Goyal
95deb3a57c Fixing icon disappearing on dropping to workspace
> It was created in ag/645900

Change-Id: I31ca5bf9763292517fa5ee3ccd867897bca45bad
2015-03-05 10:27:01 -08:00
Sunny Goyal
64b3fcc9f7 Ensuring setQsbSearchBar is called whenever the QSB is created
> On launcher3 when the QSB is created for the first time after a
widget drop, it is not set in searchDropTarget and as a result
the "Remove" and "App Info" drop targets are not visible until
Launcher3 restarts and rebinds QSB

Change-Id: I599a9a18cc5d46af790b3145dae2eb385b32b20e
2015-03-04 13:59:21 -08:00
Sunny Goyal
9282059e44 Fixing wrong check to determine the drag source
> target it the drop target, i.e., the InfoDropTarget or DeleteDropTarget

Change-Id: If4a9f8eb72ee6afb4d80c7df6f0f2ada4bc35b22
2015-03-02 15:39:01 -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
1587d5362f Refactoring common methods
Change-Id: Id6d3072dd3a6d7f54e9591abbeffd9bd51c7403d
2015-02-26 18:19:22 +00:00
Hyunyoung Song
31178b8237 [key event focus handling] (1)hotseat <-> icon now symmetric, (2)support DEL keycode
TL;DR; (1) Key event navigation from and to the hotseat and icons in the workspace
is now symmetric. Since there is one more icon in the hotseat, only left
N-1 icon navigation was symmetric.

(2) KeyEvent.KEYCODE_DEL and KeyEvent.KEYCODE_FORWARD_DEL can now delete icons
from the workspace. The focus move to the previous icon where the focus
traveled from.

Also contains minor styling and indexing issues.

Bug: 15408321
Bug: 19381790

Change-Id: I16cbcb2693e92eebb830997d01c0bf674073dd51
2015-02-24 22:14:11 +00:00
Sunny Goyal
387f4a7b36 am fce720f3: Merge "Fixing crash when dragging and dropping a restored widget." into ub-launcher3-almonte
* commit 'fce720f39adcf8a35b93978c36ab0e8833a74e3e':
  Fixing crash when dragging and dropping a restored widget.
2015-02-17 20:39:42 +00:00
Sunny Goyal
fce720f39a Merge "Fixing crash when dragging and dropping a restored widget." into ub-launcher3-almonte 2015-02-17 20:34:56 +00:00
Sunny Goyal
2434d40ef2 Fixing crash when dragging and dropping a restored widget.
> When the widget is in pending state, AppWidgetProviderInfo is not available

Bug: 19364311
Change-Id: If3126a375853e6e710c6eba4b8824e18f3f0d391
2015-02-17 12:00:30 -08:00
Adam Cohen
97079bc7d5 am 80e6beb4: Ensure that layers are properly removed after animation
* commit '80e6beb48ca71a321f667e79fe35a7ab2fb4c2bf':
  Ensure that layers are properly removed after animation
2015-02-14 01:05:58 +00:00
Adam Cohen
80e6beb48c Ensure that layers are properly removed after animation
Bug 19243980

Change-Id: Ic1d54f92051f7d937878898cae210ec18ecbaff8
2015-02-13 16:39:10 -08:00
Sunny Goyal
14334bda03 Merge "Removing code for the unused 'upgrade path'" into ub-launcher3-master 2015-02-12 18:23:28 +00:00
Hyunyoung Song
09cd92221e Remove meaningless bug id from from addDumpLog and Log.d methods
b/11683562
b/6557954

Change-Id: Icd0e237ebb09ac868928328f45a3b30cf19a20df
2015-02-11 12:58:33 -08:00
Sunny Goyal
66cfdc2549 Removing code for the unused 'upgrade path'
Change-Id: Ib9eca92284b0eabbe36ffaaf26c62a6ce3cfd3e9
2015-02-11 11:55:36 -08:00
Sunny Goyal
c46bfef5df Removing support library dependency
> Removed FolderAutoScrollHelper as folders are currently not scrollable

Change-Id: I261f43a665b742697e3224e1e9852ccc526badcd
2015-01-20 11:49:12 -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
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
Adam Cohen
08072c05bf Prevent multiple workspace state animators from being started
-> Probably an issue with the way we're wrapping ViewPropertyAnimator
   which can lead to us acting like it's valid to have multiple
   instances of a VPA. In reality I think this is very problematic.
-> For now, we can just make sure the previous animation is canceled
   if it hasn't yet completed.

Bug 18428886

Change-Id: I097eec08ec68ed098e68866fb5eda72734c51b00
2014-11-18 18:18:26 -08:00
Sunny Goyal
416541cc0e Adding a few null checks.
1) During migration, if launcher2 has deleted user data,
migration oes not happen
  2) If Launcher3 does not has bind widget permission,
QSB would be null.

Bug: 18388507
Change-Id: Ief81f6f77ce154e7b3ecd4b77caf24239401e738
2014-11-14 12:36:13 -08:00
Sunny Goyal
594d76dc66 Using the default search widget in Launcher3
> Removing all logic related to search and voice overlays
from Launcher3
> Using the widget provided by global search provider on the
homescreen
> Removing VoiceButtonProxy, as it is not being used anymore

Change-Id: Ie8b09b44f7213c8fa11bce685914442e4884295d
2014-11-11 10:17:56 -08:00
Adam Cohen
8c4ca9277d Fix edge case where LauncherOverlay scroll woudln't be reset
-> If the Workspace has a single page and the user goes from overscrolling
   in one direction, and then the other, the LauncherOverlay scroll wouldn't
   be set to 0 until the scrolling settled

Change-Id: I29ee9abdfa023ae3599d1590cdaebf457e2220fa
2014-10-24 17:42:33 -07:00
Adam Cohen
24e18aea81 Merge "First pass of the Launcher Overlay interface / impl" into ub-now-queens 2014-10-23 00:41:58 +00:00
Adam Cohen
c2d6e897db First pass of the Launcher Overlay interface / impl
-> Added simple reference launcher extension
-> Make launcher able to handle a null qsb

Change-Id: Ib1575243cac800a335e95bbf00cdc394bb4741c3
2014-10-22 17:40:39 -07:00
Sunny Goyal
1231c0743c Merge "Updating ItemInfo objects in the worker thread" into ub-now-queens 2014-10-21 18:30:20 +00:00
Adam Cohen
9211d42f13 Use LauncherCallbacks model instead of method overrides
-> When extending the Launcher Activity, instead of overriding
   public and protected methods, create a proper interface
-> This helps define the interface when extending Launcher
   more formally and more clearly

Change-Id: Ib38e8a376b2242d4078bf6856bb145f5b5f0da80
2014-10-15 11:49:50 -07:00
Sunny Goyal
4390acea35 Updating ItemInfo objects in the worker thread
> Launcher was making non-trivial updates to ItemInfo objects
on UI thread. These updates were getting skipped when the
Activity gets destroyed (possibly due to onConfigurationChange)
> Unregistering SessionCallback on application onTerminate,
rather than activity onDestroy

Bug: 17941096
Change-Id: Iad4a50871fe09470f26139b44a2e9886833032f1
2014-10-14 14:39:26 -07:00
Sunny Goyal
1a745e8f18 Keeping icons in disabled state when SD-card is unmounted
> changing shortcutInfo.isDisabled to be a flag based variable
> on received OnPackageUnavailable, icons are disabled from desktop
instead of being removed. Icons in all apps are removed

Bug: 15852084
Bug: 16238283
Change-Id: I126d23c709682a917d4bbb84de71032593dce8f9
2014-10-08 11:07:11 -07:00
Sunny Goyal
b50cc8c5d6 Updating icons for sortcuts when the target app updates.
Bug: 17398260
Change-Id: I055abb971d1f72245e8616ac2ce07bcdf37cdd52
2014-10-07 14:56:58 -07:00
Sunny Goyal
acefecbff3 Merge "Updating promise icon's bitmap and label when onBadgingChanged is received" into ub-now-porkchop 2014-09-19 19:58:07 +00:00