Commit Graph

16 Commits

Author SHA1 Message Date
Holly Sun
20c30c9cdc [PS] Do not use AppInfo and use PrivateSpaceInstallAppButtonInfo instead.
BaseAllAppsAdapter.AdapterItem's itemInfo needs to be an AppInfo. Create PrivateSpaceInstallAppButtonInfo extending from AppInfo and use different itemType (AppInfo has default itemType ITEM_TYPE_APPLICATION). In this case, shortcuts is disabled in ShortcutUtil#supportsShortcuts because `isApp` is false (https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:packages/apps/Launcher3/src/com/android/launcher3/util/ShortcutUtil.java;l=30?q=shortcututil&sq=repo:googleplex-android%2Fplatform%2Fsuperproject%2Fmain%20b:main).

After the fix, long click on Install button quits Toast, which is the same with drag action on the button.

Since we have a specific itemType for PS install button now, the previous `FLAG_PRIVATE_SPACE_INSTALL_APP` is no longer needed. Remove it.

Bug: 324211283
Test: manual
Flag: aconfig com.google.android.apps.nexuslauncher.private_space_app_installer_button trunkfood
Change-Id: Ic5d4284afb93cef77f2ad8f0c1588523e0ed3ae3
2024-03-05 17:13:35 -08:00
Himanshu Gupta
b12ff142a8 Making Settings Cog open PS Settings page.
Settings Cog action should direct to PS Settings page
instead of PS entry point page in Privacy&Security Center

Bug: 322484516
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space TRUNKFOOD
Flag: ACONFIG com.google.android.apps.nexuslauncher.Flags.enable_inject_private_space_tile TRUNKFOOD
Test: Launcher3 test.
Change-Id: I2bc7a95d591ccedb343909c159c3cbda2814e6bf
2024-02-09 19:38:45 +00:00
Himanshu Gupta
3ec66fb333 Preventing DragAndDrop for PS apps.
This Cl restricts item dragging for PS apps from
all launcher surfaces such as AllApps, AppPredictionRow, etc.

Video: https://photos.app.goo.gl/PKGw8n23hJVJMyUk7

Flag: ACONFIG com.android.launcher3.Flags.private_space_restrict_item_drag DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I2c5dbaa325095ec63aedf39b6b2c269f745d58ca
2024-02-01 06:46:25 +00:00
Himanshu Gupta
eaeb666e43 Merge "Separating system and user-installed apps in PS container." into main 2024-01-26 14:22:19 +00:00
Himanshu Gupta
0cc11dbcac Separating system and user-installed apps in PS container.
We add a horizontal line separator in PS container which demarcates
user-installed vs system installed apps in private space.
User-installed are shown above the separator, system ones below.

UX Mock: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?node-id=11546%3A310574&mode=dev
Mock Image: https://photos.app.goo.gl/Wj8sJkS7P7bRbovg8
Demo video: https://photos.app.goo.gl/MBw6HpDnf6PJqUfs8

Bug: 308054233
Flag: ACONFIG com.android.launcher3.Flags.private_space_sys_apps_separation DEVELOPMENT
Test: AlphabeticalAppsListTest
Change-Id: Iad8e289c49a05ac7ef1978bd8e4ebe7aa0add0ca
2024-01-26 11:04:13 +05:30
Holly Sun
70d8ecbcfe [PS] Log event for private space add button click.
Bug: 320702146
Test: manual
Flag: ACONFIG com.android.launcher3.private_space_app_installer_button teamfood
Change-Id: I2ea6b215d4bce93e682c260242a6c3a7cb31922f
2024-01-17 16:09:08 -08:00
Himanshu Gupta
ce495f13e3 Adding suport for Private Space QsTile fulfillment.
Adding logic to unlock private space and
scroll to the container after unlock event
is received by Launcher.

This change also moves pieces of Private Space
Animation to different classes, in order to make
it more robust.

Bug: 289024009
Test: atest PrivateProfileManagerTest
Flag: ACONFIG com.google.android.apps.nexuslauncher.inject_private_space_tile TEAMFOOD
Change-Id: Ica2fbc00ff3516ed5aca7fbbfc0bd2aa036a4cee
2024-01-15 18:43:27 +05:30
Holly Sun
97b1bba413 Implement Install Apps button in Private Space.
UX mock: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?node-id=7246%3A83750&mode=dev
UX icon spec: https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=19979-224329&mode=design&t=50SDFdomAtonNU4V-0

Video: https://drive.google.com/file/d/1VtTzxR46dLiaozOo6sOHADv1qTcBOwDP/view?usp=sharing
Screenshot:
https://screenshot.googleplex.com/3ShcUozVrkGMHbc
https://screenshot.googleplex.com/3F4c3yzJ7RUpma7

Reason to use PrivateSpaceInstallAppButtonInfo: reuse `VIEW_TYPE_ICON`, which needs an AppInfo.

Bug: 308064949
Test: manual
Flag: ACONFIG com.android.launcher3.private_space_app_installer_button development
Change-Id: I3fb27fae8324d4b276816b17f9b0a2d9b6f33ed2
2024-01-10 14:28:33 -08:00
Brandon Dayauon
553a2c8775 Merge "Apply the expand animation on Private Space" into main 2023-12-13 00:02:56 +00:00
Brandon Dayauon
98bf9f7532 Apply the expand animation on Private Space
- Using the refactoring that took place in ag/25414154

Bug: 299294792
Test: Verified SearchTransitionController didn't regress by turning off BACKGROUND_DRAWABLES flag.
- Verified QL highlight still works
- video: https://drive.google.com/file/d/15yjBWofebn6m7VgEnLK6kEYqhC_adJQ3/view?usp=sharing

Flag: ACONFIG com.android.launcher3.Flags.private_space_animation DEVELOPMENT

Change-Id: Ib6229b404b48616966f3e6ab6884099b6e4b4023
2023-12-11 11:27:31 -08:00
Anna Zhuravleva
63d9cee7b8 Merge "Log taps on PS container buttons" into main 2023-12-07 09:56:10 +00:00
Anna Zhuravleva
2ef6704e61 Log taps on PS container buttons
Log taps on space locked/unlocked, settings
buttons

PDD: https://eldar.corp.google.com/assessments/873128385/revisions/1

Test: logcat StatsLog, output
https://paste.googleplex.com/6250774946906112
Bug: 314933661
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space TEAMFOOD
Change-Id: I528443ba56a0db144ce613ea8d41426b6ede434d
2023-12-05 13:40:00 +00:00
Himanshu Gupta
b6ebbb019c Fixing dangling PS container on profile addition.
When Work profile state is changed, the all apps container is redrawn
Eventually `PrivateProfileManager.reset()` is also called but PS decorator
is not added as there is no change in PS state.
https://photos.app.goo.gl/V2bmZWfzBzcRP97C8
To fix this, we allow decorator addition on reset, but only
apply the same when its not already present in the recycler view.

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 313498792
Test: PrivateProfileManagerTest
Change-Id: I4c9a89d84e670ed45bf53a2d2e2c4922b165463e
2023-12-03 23:34:19 +00:00
Himanshu Gupta
2b5620b295 Fixing Launcher crases due to methods being called on Ui Threads.
This CL fixes the following two issues:
1. Launcher crashing while calling `addPrivateSpaceSettingsButton` from
   BaseAllAppsAdapter as the thread is UI
2. Decorator is not removed from Private Space Header during reset to
   paused state. https://screenshot.googleplex.com/BZdLqaZQwdDApfV

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 311337961, 311342946
Test: Ran Launcher3 tests
Change-Id: I2763338ebf0f5468ad38f61a781e8a8334194c5c
2023-11-20 18:59:13 +00:00
Himanshu Gupta
739b3c9f22 Enabling Private Space Container in Launcher.
This CL adds the following:
1. Adds filtering and addition of Private Profile apps in main user
all apps recycler view
2. Enables decoration of Private Profile apps
3. Enables hiding Private Space container based upon a settings entry.

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I33dc55a3a39e75d3fc336ca6a488b282e2dd322c
2023-11-15 15:08:59 +00:00
Himanshu Gupta
08badb3f6f Adding Private Space views to Launcher.
This CL adds the following:
* Static View Elements to be added to AllApps recycler View
* View Controller to load the above elements dynamically
* Private Space Section Decorator
* PrivateProfile Manager containing the logic related to Private Space
* Abstract UserProfileManager as the super class of Work/Private
ProfileManager

Private Space Views Figma
[link](https://www.figma.com/file/K6bIIcG882EiJNjxvSWsFT/V%E2%80%A2-Private-Space?type=design&node-id=14535-111985&mode=design&t=JLz9W0O551TpzQYH-0)

Flag: ACONFIG com.android.launcher3.Flags.enable_private_space DEVELOPMENT
Bug: 289223923
Test: Ran Launcher3 tests
Change-Id: I8aa4247c78064a551e5e0d0b46d3fc033873f99d
2023-11-14 11:58:16 +00:00