Commit Graph

23 Commits

Author SHA1 Message Date
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
Vinit Nayak
2c353f29a2 Add logs to see if launcher model isn't loaded when work profile app is added
* Add helper method to avoid checking sDebugTracing when
logging for tests

Bug: 243688989
Flag: None
Change-Id: Id6cc3b286171eb598e593c5a8aaea6f2466aad60
2023-05-26 15:45:42 -07:00
Vinit Nayak
6106ae9ac7 Add logs for PackageUpdatedTask
* That's the bit that updates new packages for work profile,
at least from command line.
* There is variability in how long it could take work profile
apps to show up, from 2-8 seconds.

Bug: 243688989
Change-Id: I710befc5f17b4a16bff523eb03f1e88975cafd43
2023-04-26 13:21:57 -07:00
Vinit Nayak
f89438718f Add logs for work tab missing
* Start tracing where launcher goes after
it gets the broadcast for new work profile user
unlocked

Bug: 243688989
Flag: None
Change-Id: I53ccab743ac5dd2aee6b7ff6e440bcf731387119
2023-04-18 13:57:33 -07:00
Sunny Goyal
669b71f5b3 Introducing CellPosMapper which allows mapping between UI position
and model position

Test: atest CellPosMapperTest
Bug: 188081026
Change-Id: If5c6b3df5ad240317bb535c675f6ead94084238e
2023-01-30 12:17:09 -08: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
Pinyao Ting
777c13eb00 Explicit Nullbility in Launcher (Part 5)
This CL addresses the nullbility in LauncherModel and update tasks.

Bug: 242895652
Test: manual
Change-Id: Ied635c944c3656f0d493b295f772aa0329b354b9
2022-09-16 17:17:16 -07:00
Pinyao Ting
6a41d56b50 Log the reason why a WorkspaceItemInfo was removed
In the past we've seen a WorkspaceItem disappeared from the workspace
but wasn't able to determine why it was removed. This CL includes the
reason why it was removed in the error log, which hopefully would help
us debugging similar issues in the future.

Bug: 231239260
Test: make
Change-Id: Iba3d57568c9b3e011a6b65b26f0d4170d42fe1a5
2022-05-16 20:17:47 +00: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
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
Steven Ng
3a8353256a Widgets recommendation backend
Add a widgets recommendation mechanism based on AiAI app predication
ranking with the following changes:

1. Only one widget is picked from one app.
2. Widgets that are already added to the workspace are excluded from
   the recommendation.

Test: run PredicationUpdateTaskTest

Bug: 179797520
Change-Id: Ia697bc6df0bae75969e68b7b3de32d57901f7461
2021-03-08 23:37:51 +00: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
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
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
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07: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
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
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
Zak Cohen
658c67a609 Deepshortcuts - only keep the per package shortcut count in memory.
Change to only keep the per Activity shortcut count in memory, not
the list of ids.
The full shortcuts are loaded at long press time so saves memory.

Bug:117239104
Test:Manual and ran instrumentation tests
Change-Id: Iee974ecba2c977216be4f078396ceed22b931f5d
2018-10-22 11:38:09 -07:00
Sunny Goyal
605bcf3367 Fixing bug when model was not reflected properly on the UI.
If launcher submits a job, and then reloads before the job is executed, the correct model
is not reflected on the Launcher. In that case, we simply rebind the launcher

Change-Id: I380242a4de13e7b2bc326d1a076f0a974435999c
2018-03-05 17:38:47 -08:00
Sunny Goyal
f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
Sunny Goyal
6e13dd3aa8 Simplifying some package matching code by using common itemInfo mathcher
Change-Id: Ib98d528391e19c0de3fe11304330dfa37710548c
2017-08-17 11:15:12 -07:00
Sunny Goyal
e86f11fa38 Adding support for loading workspace in the absence of Launcher.
> LoadWorkspace can be called with a LoaderResult which does not bind anything.
> Synchronous bind does not look for a valid page id, and will fallback to the
  current pageId similar to full load flow

Bug: 37616877
Change-Id: If14491dc79c5b85ae1019cc93e4e08759df3387d
2017-06-08 09:39:34 -07:00