Commit Graph

76 Commits

Author SHA1 Message Date
Sunny Goyal
42e28092b3 Removing some eclipse warnings
Change-Id: I160feaee81b262be02446885fae643c0be71b7af
2015-08-17 12:56:19 -07:00
Sunny Goyal
f85602b00e am 7ca3250a: Merge "Creating a cache of users to avoid multiple calls to UserManager" into ub-launcher3-burnaby
* commit '7ca3250a10d608c06a733a92cd61a2feadb9007f':
  Creating a cache of users to avoid multiple calls to UserManager
2015-08-07 18:00:50 +00:00
Sunny Goyal
823fd50902 Creating a cache of users to avoid multiple calls to UserManager
Bug: 22805101
Change-Id: I9cd270efd74fdd34a7eb738fc25797e6f1bf2487
2015-08-04 12:37:05 -07:00
Winson Chung
790b7ad28e am 153b02a5: Merge "Remove handler for searchables changed broadcast." into ub-launcher3-burnaby
* commit '153b02a5e69c99b1154eea107da6b2fba4c6f3a3':
  Remove handler for searchables changed broadcast.
2015-08-03 22:20:10 +00:00
Winson Chung
153b02a5e6 Merge "Remove handler for searchables changed broadcast." into ub-launcher3-burnaby 2015-08-03 22:14:53 +00:00
Winson Chung
88fa741e50 Remove handler for searchables changed broadcast.
Bug: 22515084
2015-08-03 14:25:28 -07:00
Sunny Goyal
c1729a4d15 resolved conflicts for merge of e5bb705f to ub-launcher3-master
Change-Id: Id7ec170a3c4b1415b18ad46a18d7ea69595a8992
2015-07-31 12:53:08 -07:00
Sunny Goyal
e5bb705fb7 Homescreen migration from a larger grid to a smaller grid.
Adding support for restoring from a larger device, if the grid size
difference is not more that 1.
During restore add all the items in the DB, and run a one-time migration
the next time launcher starts.

The migration strategy is defined in ShrinkWorkspaceTask.java which involves
resizing, moving and removing some items.

Change-Id: I6ee411f6db5bf0152b527e16146a88c56dec2d97
2015-07-31 12:03:33 -07:00
Sunny Goyal
6c56c68555 Changing the dogfood check to a static boolean to better handle proguard optimizations
Change-Id: I892b88ce1a007fafc23a73ad4193c5c4aa411d1b
2015-07-16 14:09:53 -07:00
Winson Chung
b1777447d9 Refactoring fast scroller.
- Fixing issue with fast scroller not fitting name width.
- Refactoring fast scrolling/scroll bar code out of base recycler view
- Adding animations to fast scroller to match design
- Smooth scrolling when jumping between app rows
- Fixing issue with fast scroller jumping when you first pick it up
- Fixing issue with wrong background paddings being used

Bug: 21874346
Bug: 22031923
Change-Id: I9f011b1f375751f437604b900e95a2942d3f4601
2015-06-23 14:24:15 -07:00
Sunny Goyal
2003c75ac4 Cancelling launcher reload on mcc change
Bug: 21022833
Change-Id: Iccd477e7b1638d162e1a500cdb7a52b8d359c657
2015-06-18 14:04:00 -07:00
Sunny Goyal
383c507c47 Removing ContentObserver in launcher
> Using callback insted of using a content observer
> Setting the listener in LauncherAppState to prevent resource leak

Change-Id: Id23a4d5c8812e86178997e536226e09ec3740f84
2015-06-16 10:31:43 -07:00
Sunny Goyal
7779d62308 Using content provider to update launcher settings
> Removing cross process preference file
> Removed broadcast listener management for settings changes
> Defining content provider method to get/set laucnehr preferences

Change-Id: Ida36eac0ab17c1d48fedc9404817a53a89b36c4f
2015-06-12 11:16:20 -07:00
Sunny Goyal
553a8f6f44 Merge "Fixing crash in restore" into ub-launcher3-burnaby 2015-06-10 18:36:07 +00:00
Sunny Goyal
9637364c44 Fixing crash in restore
> LauncherAppState cannot be initialized during restore, as it is not
called from a looper thread.

Bug: 21275736
Change-Id: Ifdb3f9913fa2ee63a7e1566d0c5cfc6f72b4f41e
2015-06-05 11:36:20 -07:00
Winson Chung
7501adf4b7 Ensure that we use the system long press duration when dragging from AllApps.
- Removing some old code out of LauncherAppState

Bug: 21559400
Change-Id: I3c586094efb7ad8a17d2169bc8aaccf6b0df40a2
2015-06-05 10:52:57 -07:00
Sunny Goyal
4f3e9383eb Code cleanup
> Removing obsolete logging
> Removing unused methods
> Removing resource leak warning due to non-static handler class in launcher

Change-Id: Ic38cc8aea82899b0b5ee3235f04e5964e49245fb
2015-06-05 00:34:06 -07:00
Sunny Goyal
c6205603ef Creating landscape and portrait device profiles at app initialization
Change-Id: Ide9d007adc36b348e19b05cdf49e87f8b02db60e
2015-05-22 08:46:41 -07:00
Adam Cohen
2e6da1539b Refactoring DeviceProfile
-> Pulling out the parts of device profile which can (and need to be)
   initialized and accessed without access to an Activity context,
   ie. the invariant bits.
-> The invariant bits are stored in InvariantDeviceProfile which is
   initialized statically from LauncherAppState.
-> The DeviceProfile contains the Activity context-dependent bits,
   and we will create one of these for each Activity instance, and
   this instance is accessed through the Launcher activity.
-> It's possible that we can continue to refactor this such that
   all appropriate dimensions can be computed without an Activity
   context (by only specifying orientation). This would be an
   extension of this CL and allow us to know exactly how launcher
   will look in both orientations from any context.

Sets the stage for some improvements around b/19514688

Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
2015-05-21 16:16:40 -07:00
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
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
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
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
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
Sunny Goyal
71c3baf5eb Merge "Removing unnecessary intent-filter construction" into ub-launcher3-burnaby 2015-03-20 19:29:12 +00: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
27595796b3 Removing unnecessary intent-filter construction
Change-Id: I1f831ef48ed69381ad260f7d541f39a049c498a5
2015-03-19 13:19:21 -07: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
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
Chris Wren
b02e611d15 Don't try to create an app state instance during restore.
Added a static utility function to get the DeviceProfile instead.

Bug: 18504164
Change-Id: Ia510a84f1c195e58acf3bf4d1f6a42c739fdd413
2014-11-24 16:57:54 -05:00
Sunny Goyal
e0f58d7364 Adding shortcuts corresponding to ManagedUsers automatically.
Bug: 16188104
Change-Id: Ic07578dd187263f59f3c431cbb78dea90d0c24f4
2014-11-12 12:23:35 -08:00
Sunny Goyal
4bbf419bf9 Removing some duplicate methods
Change-Id: I8a1295ab74890984e8d8508aaa18fd79ac2a032d
2014-11-11 12:24:13 -08:00
Sunny Goyal
33d4438976 Updating backup restore logic
> Adding DeviceProfile information in the backup
> Removing SharedPreference backup
> Adding helper methods to abort backup in the middle
> Comparing keys against the backup journal during restore
to avoid restoring corrupt/lost entries
> Old backups are still compatible, but lost keys verification
will be ignored in that case.

Bug: 17937935
Bug: 17951775
Bug: 17260941
Change-Id: Iad48646cfdd69abaff5c163b2055f3b8a9b39b19
2014-10-28 09:27:10 -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
Helena Josol
28db280b7a Add more Launcher files to delete on Clear Launcher Data
Bug: 12753154
Change-Id: I00679bdc6eff70a1398122aaa955c08eabd556b1
2014-10-16 17:35:50 +01: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
a22666f681 Updating promise icon's bitmap and label when onBadgingChanged is received
Bug: 17583799
Change-Id: I68b4f9d4086c43bd949ad8b46b574ec78edb32db
2014-09-19 12:16:52 -07:00
Chris Wren
ee52336a9e Turn off debugging for launch.
Bug: 17483474
Change-Id: I8dd24ba08ffe0773f4d68739b30b829021d69902
2014-09-12 14:10:14 +00:00
Sunny Goyal
349426234e Handling label and icon from SessionInfo.
> The ShortcutInfo stores state as bit flags and not as ints
> Intents of auto-install shortcut are automatically updated
upon installation
> Icons/titles for active sessions are cached in IconCache

Change-Id: I2047849f67d4a8aaf2bc346b58110325bb4807d4
2014-09-04 08:18:33 -07:00
Sunny Goyal
e755d469d4 Implementing a package install progress listener for L
issue: 15835307

Change-Id: I71aaea087963f2e0e1206447190cbe23c174057d
2014-08-01 14:45:39 -07:00
Kenny Guy
c2bd8101b8 Revert "Revert Cls stopping now-master running on googlefood"
This reverts commit 7bc272a11b.

Conflicts:
	src/com/android/launcher3/BubbleTextView.java

Change-Id: Id1fb2e1249e72658ce5477165c9bcacba9de2b04
2014-06-30 12:30:31 +01:00
Kenny Guy
7bc272a11b Revert Cls stopping now-master running on googlefood
This reverts commits 01453e855f.
and 242bbe1b72.
"Add content description to bagded icons."
"Remove reflection now we are building against L"

Bug: 15833449
Change-Id: I81a5316f5619a9cd3b6ab9fd03b2ba96657b7f68
2014-06-24 11:43:19 +01:00
Kenny Guy
242bbe1b72 Remove reflection now we are building against L
Remove reflection and update changed renamed L APIs
now that branch has L sdk.

Change-Id: I223c6528487110eb328e2e229bbcbefb701e0c20
2014-06-23 13:56:05 +01:00
Kenny Guy
1317e2dd4a Fix bug with user of shortcut not being remembered over restart.
Intent extra was being set as int rather than long so being
missed.
Also use LauncherApps if neccessary in case where launching
without launch animation.
Unregister for package notifications when terminating.

Bug: 14636181
Change-Id: I1575f6eed806446782092dffe8c01afe7b6507fe
2014-05-08 19:01:16 +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
Chris Wren
b358f813c9 additional debug logs to track welcome back behavior.
Bug: 13568891
Change-Id: I359202ce59b3444e46331485ea22f542ae908e36
2014-04-16 13:37:00 -04:00