Commit Graph

52 Commits

Author SHA1 Message Date
Sunny Goyal
2003c75ac4 Cancelling launcher reload on mcc change
Bug: 21022833
Change-Id: Iccd477e7b1638d162e1a500cdb7a52b8d359c657
2015-06-18 14:04:00 -07:00
Sunny Goyal
b1622cc30f Deleting empty folders based on DB state
> Previously folders were getting deleted based on in-memory
loader state. If for some reason, an item failed to load, we would
delete the folder from DB as well.

Bug: 21354058
Change-Id: I5318ee8a99afa9cafd93ed2b9ef0e155f502a41b
2015-06-12 12:38:16 -07:00
Sunny Goyal
091f0ffd92 Updating widget list when iconCache updates
> Fixing bug where items were not getting removed from the memcache
> Fixing bug where package entries were not getting removing because
of component mismatch.

Bug: 21612532
Change-Id: Ie56f3272f7fb7e1a37c5ff9bfa523d814edc1a02
2015-06-04 15:21:23 -07:00
Sunny Goyal
53d7ee4285 Fixing different bitmap sizes in different orientations
> Using a single bitmap icon size
> Picking up appropriate density for satisfy the required icon size
> Fixing some icon size assumptions during icon animations

Bug: 19514688
Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
2015-06-03 19:07:44 -07:00
Sunny Goyal
316490e636 Removing some synthetic method creation
> Make package-private and @Thunk all private methods and constructors accessed from inner classes.

Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
2015-06-02 10:04:59 -07:00
Winson Chung
0b06875971 Merge "Ensuring that each CacheEntry has a default title and content description." into ub-launcher3-burnaby 2015-05-28 22:48:50 +00:00
Winson Chung
cdefc631f8 Ensuring that each CacheEntry has a default title and content description.
- Also defer adding entry to cache until we know that it has correctly loaded

Bug: 21446070

Change-Id: Ia7aae65ecdc5d9d7741f75d3fb6e7b85daeafeff
2015-05-28 15:25:45 -07:00
Sunny Goyal
f0e1fd9938 Removing file IO used for checking configuration change
> This check was used for flushing the cache, but since the cache
is backed by a DB, this has no effect as same icons are loaded again

Change-Id: Ib7d8a8598c5d225d922e095c899dc11ad06f2b7a
2015-05-26 09:14:49 -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
324d78358c Merge "Breaking icon update task so that it doesn't block worker thread" into ub-launcher3-burnaby 2015-05-21 20:31:37 +00:00
Hyunyoung Song
2bd3d7d1cb Load PackageItemInfo in background thread to prevent ANR
- Decoupled widget model from widget view, and placed the
creation to LauncherModel.
- As a result packagemanager operation, iconcache retrieval is all done inside
LauncherModel on background thread
b/21311085
b/21325319

Change-Id: I294698527db58b89f3da558090a367530c058776
2015-05-21 13:04:53 -07:00
Sunny Goyal
75b0f552ae Breaking icon update task so that it doesn't block worker thread
Bug: 20945600
Change-Id: Iaf516577898b51ad6e8a813d7f018ecad969c100
2015-05-21 09:18:27 -07:00
Sunny Goyal
9ff980833d Avoiding blocking worker thread when adding icons to DB
Bug: 20945600
Change-Id: If12b21ac62c55c769838ce17d5421f147c396256
2015-05-19 12:19:38 -07:00
Sunny Goyal
0e08f166fa Using BubbleTextView for widget section headers
> Loading highres icons on the worker thread.

Change-Id: I5b68a86820aa4c132c156339e497354cf57f0fca
2015-05-12 11:40: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
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
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
ece6c8b20b Wrong icon getting set for an app on secondary user during updates
Bug: 20163841
Change-Id: Ief91db56f7831f89e34c4540981a9d2db96b8bed
2015-04-13 11:48:46 -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
d405693ca2 Merge "Adding support for loading package icon in iconCache" into ub-launcher3-burnaby 2015-04-06 21:07:47 +00:00
Sunny Goyal
d180cf7e16 Adding support for loading package icon in iconCache
> package icons need to be retrieved from IconCache for the new widget tray

Bug: 19897708
Change-Id: Iaafc5e16477aaa4e9a7c46b5abf8146cd1101ffd
2015-04-06 13:51:28 -07:00
Sunny Goyal
0c9a354c97 Adding a system status column in icon cache & invalidating items based on it
Bug: 20034430
Change-Id: Icd6c6426fc7ed26cd104bf22a9d2b0263cb0fa67
2015-04-01 16:05:34 -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
Sunny Goyal
8758ea050a Using MainThreadExecuter instead of View.post
Change-Id: Ie7ba88bd3bb412d998ecb51095cbaa74b3b39c10
2015-03-18 10:09:10 -07: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
b4cd42a1df Extracting out CacheKey to a separate class
Change-Id: Ifdd7cc79668b34298e3f788ee684080cecb86c3e
2015-03-16 14:54:50 -07: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
736f5af04c Fixing some IconCache methods not thread safe
Bug: 17981568
Change-Id: I0d49604c2e38bc9017cba527d87e24e8b086f1da
2014-10-16 14:08:47 -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
2fce90c38a Cleaning up icon resizing code
> For resizing icons, scaling them down instead of cropping them
> Removing duplicate methods and variables

Bug: 17663119
Change-Id: I0f270860c0edaaa939495e63e05da841a603f6e9
2014-10-07 12:04:39 -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
Sunny Goyal
876d11e31a Null check in flushInvalidIcons
> Icons in a CacheEntry can be null, for a restored app. No
need to flush such entries on DeviceProfileChange

Bug: 17489687
Change-Id: If6e76206ae5bd8201c9928257706224f2f34c232
2014-09-15 08:51:08 -07:00
Sunny Goyal
bbef77dbdf Disabling debug logs
issue: 17327468
Change-Id: If0cd46e1309f58eed52e773ef15e3259df10c905
2014-09-09 16:27:55 -07: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
ffe83f1331 Adding support for managed profiles in widget
issue: 16892811

Change-Id: If8c81f2a5a3bc846b02a5d225c5a8f27b1382dab
2014-08-20 17:09:18 -07:00
Sunny Goyal
0fc1be164e Updating the ui for widget restore flow
> Pending widget show a PreloadIconDrawable to indicate
installation progress
> Only the concerned widgets are reinflated on package
install and not the whole workspace.
> Adding support for storing default package icon in
IconCache

issue: 10779035
issue: 16737660

Change-Id: Id787ae4a5ef72d6e01aeb5a1bae5ab8840037679
2014-08-12 16:00:03 -07:00
Kenny Guy
d6fe52636d Change getBadgedLabelForUser to use CharSequence
Bug: 16401636
Change-Id: I7b72a6dd53fec1c0afe6ea33803af9e3c54e597e
2014-07-21 18:33:40 +01: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
01453e855f Add content description to bagded icons.
Enabled accesibility so that icons badged by the
managed profile have a content description
that is different to the non-bagdged version.

Bug: 15106236
Change-Id: Id483273173d9539916eebd59111d179087526be3
2014-06-23 16:42:37 +01:00
Chris Wren
efaf8a3dcd remove work around for bug 14891460.
Bug: 14895464

Change-Id: I1e923e4fca194cde19195d156e33e99fc9fe86b6
2014-05-14 10:03:07 -04:00
Chris Wren
075f9f5b66 work around bug in LauncherAppsCompat to find restored icons
Bug: 14895464
Change-Id: Iff4f1a9a2e8edf789231be7a1c20e277e18eb05c
2014-05-13 16:18:21 -04: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
aeff7ea434 update promise icon status
also fix a crash in LauncherModel.DEBUG_LOADERS

Bug: 10778992
Change-Id: Iafc28c1e0c2f2a1283783a7ce27e181634b62993
2014-03-11 13:41:05 -04:00
Chris Wren
6d0dde01f3 use restored icon for restored app shortcuts
Bug: 10778992
Change-Id: Ie430a6587d49dc0d78b87b81582c0cef7c281017
2014-02-14 11:49:30 -05:00
Winson Chung
6e1c0d34bb Initial changes to support smaller landscape layouts.
Change-Id: If0abe2b82eb08bae4f1ce65b805362d548acb876
2013-10-28 18:30:25 -07:00
Adam Cohen
b6d33df909 Fix concurrent modifcation exception (issue 11234805)
Change-Id: I21a7e968c249b0d8876fbffa68954ddc229b16df
2013-10-15 10:55:29 -07:00
Winson Chung
e5467dccdd Flushing icons of the wrong size. (Bug 11203738)
Change-Id: I9468d2e798fcf9890970270041d341e7653432f1
2013-10-14 17:03:04 -07: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