Commit Graph

95 Commits

Author SHA1 Message Date
Sunny Goyal
da4fe1a624 Moving the QSB to the workspace grid.
The QSB will only be resent on the first screen of the workspace
covering the full width of the first row. If will not be movable.
The first screen of the workspace will not be movable.
The searchDropTargetBar no longer contains the QSB (it can be
renamed in aseparate cl).

Refactoring all QSB related logic by moving it to a custom view
inflated only using xml.
Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
2016-05-27 18:23:29 -07:00
Sunny Goyal
a26e2d3d93 Removing some obsolete flags
Change-Id: Id33e28ddd7341d2b494c4b2a294663091afdb157
2016-05-09 14:13:06 -07:00
Sunny Goyal
713edfce26 Adding a utility class for persistant logging.
The logs are kept for at max 48 hours. It uses two log files and switches
between the two based on the day of the year.

Change-Id: I9a99499b3445a62f29f62a5cd13db20b1783bcd3
2016-05-09 12:47:42 -07:00
Rubin Xu
ac6e5d7956 Listen on new broadcasts for profile changes.
The change is due to API review comments on the platform side.

Bug: 27532254
Change-Id: I44133fbb5c3ee13d0523a72b25d2e1c5d1eba6a0
2016-04-04 16:13:35 +01:00
Tony Wickham
827cef203f Added ColorExtractionService and ExtractedColors.
- Launcher has an instance of ExtractedColors, which is loaded from
  LauncherProvider in onCreate() and whenever the wallpaper changes.
  - When the wallpaper changes, the ColorExtractionService is started
    in the :wallpaper-chooser process.
  - ColorExtractionService builds an ExtractedColors instance and saves
    it as a String in LauncherProvider.
  - When the results are saved, Launcher gets a callback through
    LauncherProviderChangeListener and reloads the ExtractedColors.
- Whenever Launcher loads Extractecolors, it also re-colors items
  (currently a no-op).

Change-Id: I319e2cfe0a86abcbc6bb39ef6b9fbbcad54ad743
2016-04-01 15:40:57 -07:00
Kenny Guy
ff05f4375d Respond to managed profile availabilty Intents.
Grey out applications when managed profile is
not available.

Change-Id: I9bb9442cd0b3d0d207062716bfd6b179e3ba8489
2016-01-25 21:23:59 +00:00
Sunny Goyal
5743d870bd resolve merge conflicts of b56090af35 to ub-launcher3-master.
Change-Id: I2ef9a25b70815efe37109004517a7c3077ffa22e
2016-01-19 13:01:20 -08:00
Sunny Goyal
2080603ca7 Removing some obsolete files
Change-Id: I45cc23afcecb67163da99a9b81ace0021f723c9b
2016-01-19 10:38:49 -08:00
Sunny Goyal
38e7f28d3f resolve merge conflicts of a50a419b82 to ub-launcher3-master.
Change-Id: Ie0e233e22284b8ddd2dbb86204e042651b6dfae2
2015-12-11 14:18:16 -08:00
Sunny Goyal
a50a419b82 Restarting launcher when on font scale change
Chaning the font scale affects the static device profile and may
affect various background threads and static constants. Killing
the process ensures that these states get invalidated properly.

Bug: 26131935
Change-Id: Idc262ee5d158019e7a2505f8fb9a6413c06bfdeb
2015-12-11 10:55:20 -08:00
Sunny Goyal
d3849d191b Moving DB creation to background thread
Change-Id: I5404edd8df7160108c230d245f34bf8e24173619
2015-12-08 13:38:28 -08:00
Sunny Goyal
d249748abf Making all provider calls using content resolver.
This will allow us to easily move db creation out of onCreate

Change-Id: Idd949624b0a9c95e4451e48db7764b7b7922c40a
2015-10-20 11:04:44 -07:00
Sunny Goyal
f912beb2ee resolve merge conflicts of fe3db428ab to ub-launcher3-master.
Change-Id: Icc60a61f621fefe9db67b178921e62f7d72d7e5a
2015-10-20 10:37:15 -07:00
Sunny Goyal
f725824fa2 Refactoring getPreferenceKey method
This method was returnning a constant and getting inlined by proguard.

Change-Id: I87348e25b21483adc1b27d16f99dec4b73205701
2015-10-20 09:41:04 -07:00
Sunny Goyal
d306055f2d Moving a few testing classes to a separate package
Change-Id: Ied1c063de3e938695493e4937f554686e0719dad
2015-10-07 11:12:38 -07:00
Sunny Goyal
322d556220 Moving a few testing classes to a separate package
Change-Id: Ied1c063de3e938695493e4937f554686e0719dad
2015-08-19 13:47:11 -07:00
Sunny Goyal
4b17147c28 Updating logic for setting wallpaper desired size
> Only setting desired size on wallpaper change for pre kitkat
  > Removing wallpaper change receiver from manifest
  > Removing multi-process wallpaper shared prefs for kitkat+

Bug: 23353784
Change-Id: Iba72d32871ee50b75807e2284a73a691bcddc472
2015-08-19 12:59:29 -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
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