Commit Graph

69 Commits

Author SHA1 Message Date
Himanshu Gupta
9aab4d4603 Adding Prework for Private Space integration in Launcher
This Cl adds the following:
1. Fixes for Quite Mode check maintained by Launcher
2. Addition of new Quite Mode broadcasts
3. Fixes for determining work profile user correctly.

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I5f6158b213723339e70ff99e66c5f439f5879e12
2023-11-05 12:31:10 +00:00
fbaron
c0e687bad8 Add smartspace removal option as a toggle
Bug: 303471576
Test: try removing smartspace by going to home settings and turning it off
Flag: ENABLE_SMARTSPACE_REMOVAL
Change-Id: Idd95da1b302927885a8c469e38db6d3c5130f8c1
2023-10-05 17:26:03 +00:00
fbaron
e58aaf1802 Add smartspace as a widget to first page (implementation 2)
Flag: SMARTSPACE_AS_A_WIDGET
Test: verify that the smartspace gets replaced with a smartspace widget
Bug: 300140279
Change-Id: I42c170de5e2a9fd3d24d99bb8b09cf412c55e3a5
2023-09-29 18:16:09 +00:00
fbaron
5c835dafa1 Add extraItems to dump log for BgDataModel
The extraItems include suggested hotseat icons, which we want to have in the dump to help us debug future bugs regarding hotseat

Bug: 301369051
Test: n/a
Flag: no flag
Change-Id: I6a0f5e785441915ecfece95dfcba7d60ef5912d2
2023-09-22 10:27:33 -07:00
Sunny Goyal
7b9e28f152 Removing all usage of LauncherProvider
Also fixing a race condition in model when an item update/delete task
gets queued and executed after the model has reloaded (making the old
data obsolete)

Bug: 277345535
Bug: 263079498
Test: Presubmit
Flag: N/A
Change-Id: Ibd4bdbb3eece05b38b73a22a4be5f368df3754f0
2023-06-07 12:57:13 -07:00
Anushree Ganjam
87cb7ad06a Merge "Add UID in AppInfo." into udc-dev am: 9b4f62e681 am: eb9cd7e26e
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23331302

Change-Id: I2bfbbf5fd5ec777baca79d89c13204857e600f8d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 01:46:38 +00:00
Anushree Ganjam
97434eea53 Add UID in AppInfo.
Create a reverse hashmap of PackageUserKey to Uid in AllAppsStore for
faster lookup of uid based on packageName and userHandle.

Log Uid in Impression Logging.

Bug: 282849559
Test: Manual. See various usecases documented in http://shortn/_UcvAYOmLIP
Flag: NA

Change-Id: I416426214f6b6efc45f7d4c0433bbbfca9056adf
2023-06-01 22:45:19 +00:00
Sunny Goyal
e274d97fe5 Removing support for lagacy shortcuts
> Addition/removal of  shortcus is already removed. This just
  cleans up the unused code path

Bug: 275875209
Test: Updated tests
Flag: N/A
Change-Id: I8ab7f57b693f996920e50e8beecafcffab5167e9
2023-05-17 09:20:45 -07:00
Fengjiang Li
5a36c17a32 [1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency
More details at "Log Startup Latency" section in go/launcher-startup-latency

Test: tested on phone, foldable and tablet, print latency logs in logcat
Bug: 278092752
Change-Id: Ibf269b0ecd6007d29b95e36f65ab6f02c45deb3a
2023-05-02 17:08:05 -07:00
Jeremy Sim
7cf0dd9e03 App Pairs (behind flag): Add new ItemInfo types and DB save functionality
This is the second of several patches implementing the App Pairs feature behind a flag.

This patch includes:
- AppPairsController, a new controller that will handle creation, launching, and deletion of app pairs
- ITEM_TYPE_APP_PAIR is a new type of FolderInfo (FolderInfo now can be either a folder or an app pair, and should probably be renamed to CollectionInfo or something more generic in future)
- Necessary plumbing for these new types
- Database code that handles saving a new app pair to the database with the correct schema

Flag: ENABLE_APP_PAIRS (set to false)
Bug: 274189428
Test: Not included in this CL, but will follow
Change-Id: Ie3aefd4eb9171f471789f54876de742849d3013b
2023-04-21 14:23:54 -07:00
Stefan Andonian
a04de842d1 Fix ConcurrentModificationExceptions during binding.
The same lists of extra items stored in BgModelData are also stored in
UI components. This is causing ConcurrentModificationExceptions. The
solution is to clone these lists or mark them as immutable before storing
them in their respective components.

Bug: 206918543
Test: Verified that crash no longer occurs after fix.
Change-Id: I571a2c451af58137aa7513b372b6a8ecf9bd3ff6
2022-11-17 20:46:51 +00:00
Raj Garg
4b90dbe967 Revert "Introducing new variable to enable/disable shortcuts."
Revert "Introducing new variable to enable/disable shortcuts."

Revert submission 19632697-cherrypick-GO-DISABLE-SHORTCUTS-tyyzrpy9oe

Reason for revert: Reverting changes for the recent feature built by me. This CL was a part of the feature. Please take a call if we should revert it or not.
Reverted Changes:
Ib373b042f:Introducing new variable to enable/disable shortcu...
I4274cb468:Introducing new variable to enable/disable shortcu...

Change-Id: I81f338be71185cb008e81b020c5b3a7b01b64c58
2022-09-23 17:04:29 +00:00
Raj Garg
63ee5d0908 Introducing new variable to enable/disable shortcuts.
Widgets and shortcuts are two different entities but they are controlled
by same variable GO_DISABLE_WIDGETS. In this CL I have introduced a new
variable GO_DISABLE_SHORTCUTS to enable/disable widgets.

Test: Tested manually on device.
Bug: 236268654
Change-Id: Ib373b042fbfd0493e6345ef10e5631dbfd96b8c3
2022-08-16 09:18:23 +00:00
Sunny Goyal
3c354421c8 Extra checks to find the source of flaky tests
Bug: 200572078
Test: Presubmit
Change-Id: Ie927f476e3a2c1b5aee84e33bf510bb635e59071
2022-05-13 09:02:02 -07:00
Sunny Goyal
32084d49d3 Replacing ItemInfoMatcher with predicate
This removed unnecessary componentName lookups when it
is not required. Many checks just rely on IDs and
userHandle

Bug: 231153610
Test: Presubmit
Change-Id: Ief93954abc5861062a9f55dc2ef181d3de106c62
2022-05-03 10:07:22 -07:00
kholoud mohamed
c76b2035aa Allow overriding enterprise related strings in Launcher
Test: manual
Bug: 188414133
Bug: 211422509
Bug: 188410712
Change-Id: I75858cdcf2057e7c270da5893cd9a90c6753f182
2022-01-28 16:33:03 +00:00
Schneider Victor-tulias
c817dac4cd Merge ag/16307859 into master without bug fix.
- Copied ag/16307859, with a modification to QuickstepModelDelegate#getContainer. This allows the crash from b/173838775 to continue occuring with additional debuging logs.

Bug: 173838775
Test: manual
Change-Id: Ic96a25665457c80f5c9ab45a896fada34a3a68ff
2021-11-30 12:08:23 -08:00
Schneider Victor-tulias
8664cb1261 Revert "Fix ClassCastException in QuickstepModelDelegate"
This reverts commit 380f8fd890.

Reason for revert: remove bug fix on master

Bug: 173838775
Change-Id: I3cbb3e383c52095a10b3e22ea4c586c0c3c8d7a9
2021-11-29 22:34:04 +00:00
Schneider Victor-tulias
380f8fd890 Fix ClassCastException in QuickstepModelDelegate
- Added a casting check as an immediate fix to b/173838775
- Added logging to help debug the corrupt state where an item of type other than FolderInfo is used as an other item's container.
- Added LoaderMemoryLogger for adding large logs that are only conditionally printed.

Bug: 173838775
Test: manually checked logs
Change-Id: I9491cb421b9fb807d5fb110b04ad069481de768f
2021-11-24 14:26:45 -08:00
Sunny Goyal
12e3f1f2f7 Removing UI dependency from LauncherModel in case of 2-panel layout
Bug: 175939730
Bug: 192431856
Bug: 185515153
Test: Manual
Change-Id: I8baa1cf9e5a8a04d5b8bc38c1f4b0755265cd8a9
2021-07-22 10:34:25 -07:00
Sunny Goyal
711c596c86 Binding Taskbar directly from Launcher model
This allows taskbar to be loaded even in case of 3P Launchers
and removes dependency on LauncherActivity lifecycle

Bug: 187353581
Bug: 188788621
Test: Manual
Change-Id: I5a0988e0697b41677d4c58f0213aef14ec0c0972
2021-07-15 12:43:11 -07:00
Sunny Goyal
4a48a988c8 Simplifying Launcher binding callbacks
> Making all methods as default
> Removing obsolete logic around synchronous binding
> Removing some UI dependencies from bind callbacks

Bug: 187353581
Test: Manual
Change-Id: I0d2bbb060af2cab7c64541d7695055629dfaf0b8
2021-06-17 15:21:01 -07:00
Andras Kloczl
dbf577af46 Add left widget panel to Launcher home when unfolded
Test: manual
Bug: 175939730
Change-Id: I9831e7fa95084db12953ec7cb2eb725e7549e01d
2021-06-14 12:22:05 +02:00
Andras Kloczl
55edfe55f7 Add two panel home support for page binding logic
There's a logic which prioritizes the binding for the
current page and defers the other pages' binding.
If two panel home is enabled, we want to bind both pages
together. LauncherPageRestoreHelper has been created to
contain the logic for persisting restoring and calculating
which pages to load immediately.

Test: manual + run LauncherPageRestoreHelperTest robo test
Bug: 174464691
Change-Id: I57ac3f7150303b95b272e922f44bda26f9d5ce2a
2021-05-24 23:22:06 +02:00
Steven Ng
2f5648a911 Refactoring before adding a new view type in the WidgetsListAdapter
Changes made:
1. Model: added an abstract class for storing common information for
   entries shown in the full page widgets picker.
2. Introduced a ViewHolderBinder interface to split the logic of binding
   data to ViewHolder into separate classes.
3. Move the view holder binding of WidgetsListRow from WidgetListAdapter
   to its new class.
4. Move some widgets picker classes into a new picker package.

Test: Auto: Run WidgetsListAdapterTest, WidgetsListRowEntryTest and
      WidgetsListRowViewHolderBinderTest.
      Manual: open the all apps widgets tray and navigate the list.

Bug: 179797520
Change-Id: Iab29557842bb79156cad84d00a4c5d0db0c5aa06
2021-02-10 21:23:40 +00:00
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Sunny Goyal
cfcefb0c47 Synchronizing model data access
Test: Presubmit
Bug: 173328873
Change-Id: Ifc1724e17ebfa2ee5f21bb3f272986b8a14fdbc1
2020-12-10 16:24:19 -08:00
TreeHugger Robot
3cc22175e9 Merge "Moving hotseat predictions to ModelDelegate" into ub-launcher3-master 2020-08-24 18:42:01 +00:00
Sunny Goyal
104c9d1206 Using persisted item storage for install queue.
Shared prefs are loaded during startup and should avoid large objects

Change-Id: Ibb5c8307dbccb9414b42454825e6c3c2a972efa6
2020-08-19 17:38:58 -07:00
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Sunny Goyal
60e68c91e9 Removing static state management from the install shortcut queue
Change-Id: I0b74a843b2081ee314e0840d5ea8ab8ddabde32b
2020-08-12 14:37:15 -07:00
Sunny Goyal
762d06136c Caching last predictions and loading it with model
Adding support for persisting itemInfos on disk. This uses
a separate xml file. Unlike prefs, it does not keep the items
in memory and is just a wraper over reading/writing a file.

Bug: 160748731
Change-Id: Iaccab9928ab8f30127fb3c2d630ca8ca83f0bd05
2020-08-11 13:23:29 -07:00
Sunny Goyal
cded4dd923 Create a copy of the original list instead of a new view
unmodifiableList is backed up by the original list and is not suitable
to passing to different thead.

Bug: 162518472
Change-Id: I71774ced89d64acc7176269e107cfcf47627f7c4
2020-07-30 12:27:21 -07:00
Sunny Goyal
8b74cc761b Moving all-apps predictions to Launcher model
Predictions are loaded and managed by Launcher model and follow
the model lifecycle. They are then bound to the callback which
handles the UI

Bug: 160748731
Change-Id: I4a3ea0698d80fafe94afb4ce66ffa7f4a6a91c68
2020-07-29 13:07:52 -07:00
Sunny Goyal
28f5075eb0 Adding support for storing container based item list in the model
These items get updated automatically during various model tasks.
Also simplifying the pinned shortcut state, by calculating the
list of ppined shortcut on demand, instead of storing a refCount.

Bug: 160748731
Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
2020-07-23 15:27:50 -07:00
Sunny Goyal
ea600c70fd Creating a common method to iterate over all model items.
This would allow adding different source for model items without
modifying every model task

Bug: 160748731
Change-Id: I5a14dd761e2b8696c58dc8fec7b14077da0aced3
2020-07-10 09:56:15 -07:00
Sunny Goyal
28daf4a76f Removing multiple system RPCs to packageMAnager and userManager from UI thread
Bug: 158427348
Change-Id: Ibb1837fe932000b69cf5683bb01727fc32abca91
2020-06-08 17:56:36 -07:00
Samuel Fufa
385e93249e Improve Hybird hotseat cache support
Loads list of cached apps and shows predicted app icons with the rest of workspace items.

-> Extracted prediction caching logic into a model layer

Bug: 155029837
Test: Manual

Change-Id: I6981594a910f5fe4e8e8cf8fe39db0cb856e7acd
2020-05-06 14:14:08 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
TreeHugger Robot
103dfd8816 Merge "Remove workspace layout logging that used dumpsys" into ub-launcher3-master 2020-03-30 15:33:19 +00:00
Hyunyoung Song
d1efd4ed21 Remove workspace layout logging that used dumpsys
Bug: 144953948
More context: in next CL, migration will happen to StatsLog

Change-Id: If8ace91ceff6daf1a0af5963b538d7e14401e497
2020-03-29 21:03:38 -07:00
Pinyao Ting
d25023b05e Parse share-targets defined by non-main activities
Some system apps do not have any launcher icons but want to publish
sharing shortcuts. As a fix, all activities are parsed for their XML
resource, which implies some of these shortcut may not hold an
activity. This CL removes that assumption from launcher side.

Bug: 136353429
Test: Manual test
Change-Id: I2994da17fe078b2fab61a614c1326fddd5fd8571
2020-03-23 17:49:34 +00:00
Zak Cohen
3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Sunny Goyal
a7a5bf3101 Adding support for multiple Model clients
Bug: 137568159
Change-Id: Ia4db800b19cc80c695fcb9ea28e07709dfd08c6a
2020-01-10 12:23:27 -08:00
Sunny Goyal
fa39536570 Removing static reference of deep shortcut manager
Bug: 141376165
Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
2020-01-02 20:13:12 +00:00
Sunny Goyal
87dcde6d6c Separating apps list callback from model callback and simplifying various events
Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-25 11:29:16 -07:00
Sunny Goyal
6bbf6004f8 Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
2019-04-22 15:39:40 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00