Commit Graph

86 Commits

Author SHA1 Message Date
Sunny Goyal
ddec73471e Updating fling to delete anim
Change-Id: I1c63e88b3e605113ea66afca9dcfbc30de1d4c8e
2015-04-30 16:02:36 -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
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
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
Sunny Goyal
c9acdd51c4 Removed disableAllApps flag
Change-Id: I50ba511b8493bca2506ab6010f141c093bfa7499
2015-02-26 12:35:09 -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
Sunny Goyal
8498eb40ee Not opening all apps again when AppInfo or Uninstall is selected
Bug: 17460202
Change-Id: Id67a9637324abceb5b446fff5999db2a0910401b
2014-10-16 12:09:28 -07:00
Jason Monk
6a2c77856f Add sdk version guard to UserManager use
Also switch call to getUserRestrictions to support back to JBMR2
with one call.

Bug: 17300500
Change-Id: I1205730e517c6670f6359a0d448458cae6e8a8d4
2014-09-02 13:13:24 -04:00
Adam Cohen
fe9da818cd Fix for issue 16736964
Change-Id: If150db98346fe10f62fc1160309b66d7a19e9022
2014-08-08 03:55:01 +00:00
Jason Monk
950a467b18 Don't show uninstall icon when user restricted
When the user can't uninstall apps from settings, also don't show
the icon to let them do it from here.

Change-Id: I3b203711630a4ff0ba4a5928667c9f09f9479aeb
2014-07-25 08:54:27 -04:00
Sunny Goyal
651077bdd6 Adding app widget restore support in Launcher3 for android L
When the app is restored, it displays placeholders for all pending widgets.
These placeholders can be moved and removed similar to a widget (size is fixed
to what defined in backup). Once the system notifies the launcher of the new
widget ids, the place holders are replaced with actual widgets.

issue: 10779035

Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
2014-07-21 10:34:21 -07:00
Kenny Guy
d31df54073 Include user handle for uninstall intents.
Add support for uninstalling apps from other profiles.

Bug: 14127299

Change-Id: I1a3724a45c95cf93b958d23a57829efcedfc4291
2014-07-16 16:49:00 +01:00
Kenny Guy
ed13187a74 Launcher3 multi-profile support
Use LauncherApps API and badging APIs instead of PackageManager.
With compatability layer that uses PackageManager pre L.

Adds support to show apps from current user and any managed profiles.

Background: Managed profiles are user sandboxes that are visible from
the primary user and can be launched as if they are a part of this user.
A launcher should now be capable of listing apps from this user as well
as related profiles of this user.

Launching of activities is now via the LauncherApps interface, to allow
for cross-profile app launching. Only activities with category LAUNCHER
can be added as a shortcut on the workspace for a managed profile.

Widgets and non-application shortcuts are only supported for the
current profile. Widgets from the managed profile are not available.

Change-Id: I5f396b1bf7f91ad91a5710ea4a0fd14573972eb9
2014-04-30 23:43:00 +01:00
Nilesh Agrawal
16f3ea870a Allow DISABLE_ALL_APPS to be set using a system property.
- Moving the property to LauncherAppState
 - The property is only read on dogfood builds.

The property can be set using setprop or /data/local.prop

Change-Id: I14c7354efb12edb93f97e81687a6f920cc634e9a
2014-01-09 17:21:09 -08:00
Nilesh Agrawal
dff0bfeb90 Do not allow duplicate shortcuts when ALL_APPS is disabled.
When DISABLE_ALL_APPS is true, we want to have only one shortcut for each activityexposed via the Application's manifest.
We ignore INSTALL_SHORTCUT broadcasts which have launch intents with ACTION_MAIN and CATEGORY_LAUNCHER.
Applications can still create shortcuts pointing to an already exposed component if they provide data or extras in the intent.

Change-Id: I0b05283ea6c522d197e0262c2997f7298e08740b
2013-12-17 15:26:00 -08:00
Michael Jurka
3ed4a4dd3d am 10a8935e: Merge "Use AsyncTasks instead of creating new threads" into jb-ub-now-jolly-elf
* commit '10a8935ef1fc8f073e276fddc85bf66513050c81':
  Use AsyncTasks instead of creating new threads
2013-12-03 07:07:19 -08:00
Mathew Inwood
1eeb3fc9d8 Generalize support for 'App Info', 'Uninstall' and 'Delete'
This allows other DragSource's to allow this behaviour, instead of it being
tied to specific source types.

Change-Id: I06b7c39b1b34a0ae141245bcc13b6a0873a4c0fd
2013-11-28 10:17:07 +00:00
Michael Jurka
4346746ef3 Use AsyncTasks instead of creating new threads
Change-Id: If166869dfbeb84d4dee2203f5b98a22b9d20719d
2013-11-14 12:38:45 +01:00
Michael Jurka
addcba65e9 Change drop target to "uninstall" when in All Apps
Bug: 10909250
2013-10-09 19:04:17 -07:00
Winson Chung
e01af631dc Hiding delete for AppsCustomize widgets. (Bug 10884035)
Change-Id: I8bb4e94b34a627fc32f42cd9c22480b8fa45a651
2013-09-26 10:44:12 -07:00
Michael Jurka
c05d313e5a Merge "Solve fling-to-delete bug" into jb-ub-now-indigo-rose 2013-09-16 18:05:17 +00:00
Michael Jurka
5e7af5d790 Fix issue with deleting in-app shortcuts
Also, don't show remove target for system apps
when dragging from All Apps

Bug: 10414133
Bug: 10635796
2013-09-14 19:01:28 +02:00
Michael Jurka
b605102cfd Solve fling-to-delete bug
Delete target didn't hide after a fling because
onDragEnd was being called twice
2013-09-14 18:08:46 +02:00
Michael Jurka
ed3d4df1f5 Allow deleting folders and from all apps
Bug: 10635796
2013-09-12 20:52:26 +02:00
Michael Jurka
9bd4d28163 If All Apps is reinstated, allowing removing items from Workspace 2013-09-05 19:25:11 +02:00
Michael Jurka
eadbfc564d Move wallpapers to external activity
Also renaming Launcher's ApplicationInfo to
AppInfo since ApplicationInfo is already a 
framework class

Change-Id: Ib3e91d2ba4ace458d790a26c0ce850870fd3f146
2013-09-04 16:21:20 +02:00
Michael Jurka
f3007589e3 Add logging for Folder drag issues
Drags out of Folders are getting lost, adding
debug code to see if the uninstall logic is
causing that

Also, fixing one potential cause of the issue

Change-Id: I0b6a91268571c2a9394e0d6f19fb9d324b427b51
2013-08-21 15:11:00 +02:00
Michael Jurka
24715c7515 Small code formatting changes 2013-07-29 18:29:03 +02:00
Michael Jurka
1e2f465f46 Implement ability to uninstall shortcuts from workspace
Change-Id: I14ca94ea719825c4de19ab85d67537155098d50c
2013-07-19 17:15:39 -04:00
Daniel Sandler
e4f9891f01 Lazily instantiate LauncherAppState.
The application context for LauncherAppState is supplied by
the application whenever it starts; don't ask for an
instance before that.

Change-Id: I1ca8ea04238a357a682f79250f08813ead7ae532
2013-06-27 15:17:11 -04:00
Adam Cohen
7c4c510829 HACK: Fixing major persistence regression associated with extra screen to the left
-> Also adding ability to delete shortcuts.

Change-Id: I263baf813eae9089f11288494d575a99f0e859c3
2013-06-14 17:43:44 -07:00
Daniel Sandler
cc8befac35 Move LauncherApplication's state and code to LauncherAppState.
This removes Launcher's static data and other state out of
the Application object. Now LauncherApplication (extends
Application) exists only to instantiate LauncherAppState.

Change-Id: I4e323bd78b77536b92054105536a55c0c2c19ba8
2013-06-11 22:01:47 -04:00
Adam Cohen
947dc54319 HACK: Getting rid of all apps button / all apps from AppsCustomizePagedView
Change-Id: I74e4a53e9486237ad246ebdfa9e97c6ed9475b58
2013-06-06 22:44:32 -07: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