Commit Graph

118 Commits

Author SHA1 Message Date
Sunny Goyal
0ab09fcf7b Deleting sample code demonstrating how to extend Launcher3
Launcher already includes Launcher3Go build flavour and we will
be adding another build flavour for RecentsUI. There is no need
to maintain another build which is not used anywhere.

Change-Id: I9287f62691d57750460ccc9d6859c7fa11c99956
2017-10-30 09:28:03 -07:00
TreeHugger Robot
8838b8e0e5 Merge "Removing extraction service and palette api dependency" into ub-launcher3-master 2017-10-03 20:56:02 +00:00
Sunny Goyal
fca6bc9dce Adding a utility method to simplify method tracing
Change-Id: I79ef0aa5d65b933f4b7f0520fc8bac26e366da2d
2017-10-02 13:47:42 -07:00
Sunny Goyal
f2dd4216c1 Removing extraction service and palette api dependency
Change-Id: I30ad1a1462a97b6bc03f8e386ae3058c7fe022e5
2017-09-29 10:40:08 -07:00
Tony
d48710c283 Unbind notification listener when badging is disabled
- Added SettingsObserver as wrapper around ContentObserver
  to observe Secure or System setting changes.
- NotificationListener and LauncherAppState observe changes
  to the notification dots setting and unbind and rebind
  the NotificationListener service, respectively.

Bug: 36815147
Change-Id: I2cc04ac816a8974969ad0ec759c5402e181fde24
2017-08-03 18:06:14 -07:00
Sunny Goyal
c6e97692e4 Moving LoaderTask static
Will move it to a separate file in a followup cl.
This simplifies dependencies between LauncherModel and LoaderTask which
and making it easier to start the loader before Launcher activity is
created (as the Callbacks in LauncherModel can change while loader is running).

Bug: 34112546
Bug: 37616877
Change-Id: Ie9619c6b0de0e3eb60657c04ae1b58d946c829e9
2017-06-02 14:27:29 -07:00
Sunny Goyal
66d91e51d4 resolve merge conflicts of 40dfa3bf6 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Iee500631827ebc48c63c203fdcd0de888adcb135
2017-03-27 10:40:52 -07:00
Sunny Goyal
4610324261 Revert "Adding some logging around launcher grid when device profile changes"
Bug: 35425060
This reverts commit c29de85780.

Change-Id: I4320be3473f914289f88c8cbb376a68af006d7de
2017-03-20 16:08:17 -07:00
Sunny Goyal
3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
Sunny Goyal
dd96a5e4fd Simplifying Model data load state management
Instead of maintaining 3 different states, each tied to a subset of data,
maintaing a single state that represents all the data. Individual subset
data is invalidated in rare cases and these invalidates are tightly tied
to the UI. This also allows us to add new data to the model, without worring
about classifying the data into a subset.

Bug: 34112546
Change-Id: Id9cb273de35b79e84a2ef8d6556fcf1e72fb4b75
2017-02-22 15:45:14 -08:00
Sunny Goyal
c29de85780 Adding some logging around launcher grid when device profile changes
Bug: 35349518
Change-Id: Ia71504cd37749f8eaa5e038ac2867bcd9749a4bb
2017-02-15 14:40:30 -08:00
Sunny Goyal
fdbef27759 Initializing LauncherAppState only on the main thread
Bug: 33032833
Change-Id: I7992a5358142dde80aeaf8c6b7a6c7bfef2c8a00
2017-02-13 17:36:18 -08:00
Sunny Goyal
87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -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
ab121c1715 Adding a generic method to initiate overridable objects
Change-Id: Ia433427c65ad38804f2eed9c6bc209df232758c0
2016-12-12 17:01:11 +00:00
Sunny Goyal
dde4fd971e Changing DeepShortcutManager to have a singleton contructor instead
of getting it from LauncherAppState

This follows the design of other managers and makes it easier to access it
from other processes and non-ui thread.

Bug: 33032833
Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
2016-11-21 22:28:23 +05:30
Sunny Goyal
f5e3744637 Updating version check method names
Change-Id: If98851677545a9bbb9de308c23ff5c155a61a8bf
2016-11-02 10:31:41 -07:00
Hyunyoung Song
0de011705b Code sanitization
- Removed bad method/class name typos

Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
2016-10-06 10:57:29 -07:00
Sunny Goyal
d3b87ef196 Adding quiet mode support for shortcuts
> LauncherApps returns empty list when the user is locked. Not relying on
LauncherApps in this case
> When the user is locked, removing all dynamic shortcuts
> Loading shortcuts from DB when the user is locked
> Verifying the shortcuts again when the user is available

Bug: 30411561
Change-Id: Ib6eb372c5b009cadb86a8f6e781f3f3cbf787ceb
2016-07-29 16:10:31 -07:00
Tony Wickham
ec1b1c542c Merge "Add support for launcher shortcuts." into ub-launcher3-calgary 2016-06-22 20:35:31 +00:00
Tony Wickham
bfbf7f9f4a Add support for launcher shortcuts.
- This CL has no UI but provides the necessary backing for one.
- Adds new item type: ITEM_TYPE_DEEP_SHORTCUT, to distinguish from
  ITEM_TYPE_SHORTCUT. We can reconsider these names.
- Adds ShortcutCache, using LruCache for up to 30 dynamic shortcuts
  (pinned shortcuts are always cached in a HashMap).
- DeepShortcutManager queries for shortcuts and other things like
  pin them. In a future CL it will use the cache, but for now it
  simply makes an RPC for all queries.
- LauncherModel maintains counts for pinned shortcuts, pinning and
  unpinning when counts reach 1 or 0, respectively.
- LauncherModel maintains a map of components to lists of shortcut ids,
  which Launcher gets a copy of after it is changed in the background.
  This will allow us to know how many shortcuts an app has immediately,
  and query for details as the UI is animating.

Change-Id: Ic526f374dd10d72a261bae67f07f098fca8d8bca
2016-06-21 15:49:16 -07:00
Sunny Goyal
e26d1008eb Adding some tracing sections around launcher startup
Bug: 29007436
Change-Id: I53afd9130a2dc70a2223f1623e862faf44370f26
2016-06-20 15:56:22 -07:00
Sunny Goyal
ae50284e0a Moving LauncherAccessibilityDelegate to Launcher to associate it with
activity lifecycle.

Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
2016-06-17 08:44:51 -07:00
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