Commit Graph

29 Commits

Author SHA1 Message Date
Winson Chung
f502e5faec Revert "Adding support for hiding widgets from the widget tray and reconfiguring widgets"
This reverts commit b29a5fa55c.

Reason for revert: Temporary revert for build.

Change-Id: I58045ad1ce28d398a5216ba4fbbcdba1196942ec
2018-03-05 18:06:52 +00:00
Sunny Goyal
b29a5fa55c Adding support for hiding widgets from the widget tray and reconfiguring widgets
> Removing AppInfo target
> Switching between uninstall and setup based on the drag view

Bug: 63931362
Change-Id: Iccd6f965fa3d61992244a365efc242122292c0ca
2018-03-02 13:20:09 -08:00
Sunny Goyal
076839c321 Moving various runtime flags into the common base class.
Caching the ststemApp status for workspace shortcuts.

Change-Id: I25663e1f04a9768afcca000294adcbb00ea1db7b
2017-10-31 11:00:28 -07:00
Sunny Goyal
0236d0b0ba Caching the uninstall disabled state for each userHandle
> Removing static access to varios drop targets
> Creating a cache at UI level with 5sec timeout

Bug: 67104426
Change-Id: Ide6e2e0c01606f9b5fb9281f95dc009873c18fb9
2017-10-24 14:55:54 -07:00
Sunny Goyal
1797af41d1 Cleaning up drag state management.
When the drag is started, the UI automatically goes into spring loaded mode. On a successful
drop, it is the responsibility of the {@link DropTarget} to exit out of the spring loaded
mode. If the drop was cancelled for some reason, the UI will automatically exit out of this mode.

Bug: 34692289
Change-Id: Ic611739a43bb8d9279b587aaee3039326c143e8b
2017-10-16 13:06:52 -07:00
Sunny Goyal
3dce5f3f50 Merging duplicate logic for deferred drop handling in Worksace and Folder
> All the logic is contained in UninstallDropTarget
> Also fixing a bug were mWaitingForResume was not cleared

Bug: 34692289
Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
2017-10-06 09:07:36 -07:00
Sunny Goyal
1ce9c476f7 Removing some methods from the DragSource
This makes is easier to create new DragSource and sets up
proper default values in DragOptions

Change-Id: I6cb0b1df41b9730cf29f785fe85fe7f0b573ee3a
2017-10-03 16:18:46 -07:00
Sunny Goyal
6b0aa870b8 Caching system app flag to avoid unnecessary system calls
when scrolling

Bug: 65493000
Change-Id: If60ec6dec23e7efa1031d72e76775fa2449bcd7b
2017-09-29 07:55:25 -07:00
Jon Miranda
c56e3ff2ee Show progress dialog when uninstalling an app in Launcher3Go.
This ensures that the uninstall activity will finish only after
the task is completed.

We initially assumed that this was always the case, but in Android
Go the uninstall activity finishes before the uninstall is completed.

Bug: 64033585
Change-Id: Ic5d8dd99e2fecd0c9cb24093ee66668b4b38cb1a
2017-08-23 12:13:24 -07:00
Sunny Goyal
1fe0c2ca08 Simpifying uninstall drop target to check item type instead of class instance
Bug: 64719848
Change-Id: I34c13b461e204fbdc2c5b4ed6fa92564ebd5439a
2017-08-15 12:55:16 -07:00
Sunny Goyal
da1dfa32d0 Creating a custom drawable to customize shadow.
> Fixing DrapTargetBar set to visible (with alpha = 0) in the start
causing unnecessary draw

Bug: 37616877
Change-Id: Iaaff96099910f504f6e2f81c9376ddacde50ff6a
2017-04-27 05:35:28 -07:00
Sunny Goyal
f2db25398a Fixing wrong check being used for application status
Earlier we were relying on activity list to check is an app is
installed or not. It fails if the app only exposes widgets and
no visible activity. Hence dragging an icon to AppInfo sometimes
causes the icon to get disappear.

Bug: 33241335
Change-Id: Ieb71e298a0930dd0a831cf09bd1e998514a427fd
2017-03-01 17:38:12 -08:00
Sunny Goyal
3e9be43b6e No more LauncherActivityInfoCompat
Bug: 32745285
Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
2017-01-11 13:06:50 -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
0f76b56865 Refactoring FlingToDelete
> Moving all fling related logic to FlingToDeleteHelper from DragController
> Removing fling related methods from DragSource and DropTarget
> Moving fling animation logic from DeleteDropTarget to FlingAnimation
> Simplifying DropTargetBar to directly look for all valid drop targets.
  This makes it easier to add new DropTarget in xml.

Change-Id: I7214d2d30c907ab93c80d92d9f9be6dda2d63354
2016-12-13 23:39:16 -08:00
Sunny Goyal
8e0e1d7609 Moving come helper methods to corresponding classes
> Moving isPackageEnabled to InstallShortcutReceiver
> Moving the deep shortcut map to the data model
> Removing appInfo.flags. Instead fetching the flags when needed

Change-Id: I654dd8acefa7b7d183b0419afbe112bef001d536
2016-10-10 20:58:56 +00:00
Sunny Goyal
d5bd67dfa9 Adding support for result callback when starting uninstall-application activity
Change-Id: Ieaca4fbd0ae0156f24c8863ccbef61d4d6d30ba1
2016-03-22 13:57:58 -07:00
Tony Wickham
ce86e194c4 Show App Info when dragging widgets from the workspace.
Bug: 24190195
Change-Id: I65f67b7c1a1ae895035942aa97e40186ea5a206f
2015-09-18 16:06:55 -07:00
Tony Wickham
734dfbe272 Dragging app from workspace to App Info doesn't consume the app.
In other words, the app stays on the workspace after showing the info.

Change-Id: Ibcf925c2c4c083b16ce0510a9fcedbe3fcef5b9d
2015-09-16 16:22:36 -07:00
Sunny Goyal
c268148f06 resolved conflicts for merge of 9fc953b9 to ub-launcher3-master
Change-Id: Ia3e845a2e336c846cceefdc2d1e8c6786753f1b1
2015-08-17 14:43:41 -07:00
Sunny Goyal
9fc953b94d Version code cleanup
> Renaming Lmp to Lollipop
  > Lollipop_MR1 instead of directly using 22
  > Using M APIs directly instead of reflection

Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
2015-08-17 13:26:01 -07:00
Sunny Goyal
aa8ef119f1 Refactoring ItemInfo
> Changing dragObject to ItemInfo
> Removing dropPos which is always null
> Removing requiresDbUpdate which is only used in CellLayout

Change-Id: I753ddaae0880c8a9bfee5a1266095ff34610284a
2015-06-30 10:26:49 -07:00
Sunny Goyal
40b626b930 Updating assets
Bug: 21304080
Change-Id: I26cf435779b477f0961d8e0d56dd6b86b418a3be
2015-06-05 08:47:40 -07:00
Sunny Goyal
3a644ed1ce Using color filter when animating the drop target instead to TransitionDrawable
> No more flickering when crossfading between two bitmaps in small duration
> Allows us to control the color directly without depending on the assets

Change-Id: Ie7ed8bb94baf560e9b939cca624ed1bad457732c
2015-05-21 10:30:46 -07:00
Sunny Goyal
7066003b20 Various lint error fixes.
> Fixing some RTL errors by specifying both marginStart and marginLeft
> Moving all layout direction checks to Utilities
> Explicitely adding @TargetApi before every method

Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
2015-05-14 12:28:07 -07:00
Sunny Goyal
3a2698b308 Updating drop target assets
Change-Id: I33f7dc30b10a617ae4784f067491ab01b27b7733
2015-04-28 21:38:56 -07:00
Sunny Goyal
1a70cef988 Accessibility fixes
> Enabling top bar buttons in accessibility drag-drop
> Unifying logic to show delete/uninstall/app-info targets
> Announcing cell loction as 1-index instead of 0-index

Change-Id: Ibc7801f77e938b2646f0655462cbe9b7f781818b
2015-04-24 10:47:56 -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