Commit Graph

8 Commits

Author SHA1 Message Date
Brandon Dayauon
736527a127 Make PrivateSpaceSettingsButton instead of having just the imageView.
This way we can keep the click listener in this PrivateSpaceSettingsButton.java class.
- Moved itemInfo creation to PrivateSpaceSettingsButton and created a test class

bug: 341053089
Test: manually - presubmit video: https://drive.google.com/file/d/1_TCGrILvwmMpxbgIcbOcpB2AxeBJbyNf/view?usp=sharing
Flag: Aconfig com.android.launcher3.enable_private_space Nextfood
Change-Id: I79cd319274f4445dd00bc257be81728360d09684
2024-05-31 17:05:13 -07:00
Himanshu Gupta
42e3196011 Fix Accessbility bugs for PS.
This Cl contains:
1. Alt text for Lock/Unlock button as per state.
2. Alt text for Header when Locked.
3. Removing Header from accessibility target when unlocked.

Bug: 328024119
Test: Manual
Flag: NA
Change-Id: I791176afdae4fc6eb9387080aa036c1aed2a03a9
2024-04-25 11:57:53 +01:00
Himanshu Gupta
faafb3a19a Fix horizontal spacing in PS Header
1. Removes padding between settings cog and lock button,
as the insets already provide the required padding.
2. Reduces the lock button margin from left to accomodate
the inbuilt inset in the button.

Fix: 336510036
Test: Verified on device.
Flag: NA
Change-Id: I077097c7beb2cc8fe14f4367c66ca4e1ad4270d0
2024-04-23 15:28:01 +01:00
Brandon Dayauon
cf0ae01a51 Private space header to support RTL
bug:335658774
Test manually:
before: https://drive.google.com/file/d/1N8kFl28OhCJ7kTTo8VK74x-Mvaqi8GJ4/view?usp=sharing
after:https://drive.google.com/file/d/1N6AyVXcOSA48NveklIeqypueu7WLfP0V/view?usp=sharing
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD

Change-Id: I1c80e33f84251d42cd5821735457548de41db40d
2024-04-18 09:50:39 -07:00
Brandon Dayauon
136f9d6f8a Move adding views logic to privateProfileManager
- Have the animation happen according to the state of private space.
- Have the transition happen only once by setting the current transition to null at the end of transition and by ensuring
where the transitions are allowed.
- Removing controller class.

- The onClick controls the enablement of the profile. On reset (when getting the transition) is what controls the animation
during expand.

tldr- In the collapse case:  execute() is called -> animation happens  -> addPsHeader
tldr- Expand case: post() is called -> addPsHeader -> animation happens.

Collapse:
onClick() -> AACV.onAppsUpdated() that resets & apply/RUNS runnable because EXECUTE
-> AAList.onAppsUpdated() (which is called at the same time animating happens which we should cancel and do at end callback)
-> AAList.onAppsUpdated() gets called again

Expand:
onCLick() -> AACV.onAppsUpdated() that resets & apply runnable
-> AAList.onAppsUpdated() (no animation running)
-> AAList.onAppsUpdated() (no animation running)
-> addPrivateSpaceHeader
-> then unlockAction() runnable because its posted at this point

bug: 326206132
bug: 330444548
bug: 299294792
Test: manually locally and presubmit: https://screenshot.googleplex.com/9wavvwKQ8hY6oUw & https://screenshot.googleplex.com/BiqmidLFjPwS28j
video: https://drive.google.com/file/d/1XGhmTncdUFtJj188_l7alGyyNz_fhXNw/view?usp=sharing

Scrolling fix before: https://drive.google.com/file/d/1XykDm4UELoCvcwZdj8ZlJ6TszptB8W0W/view?usp=sharing
scrolling fix after when not a lot of apps: https://drive.google.com/file/d/1Y4VY1eX7WE8ShSLXRrT56ieBdAuJo_zn/view?usp=sharing
scrolling fix after with a lot of apps: https://drive.google.com/file/d/1Y58c-Z9xnU1GILp0Ih-oLORXYkMB-jWn/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation

Change-Id: I8d03ae60e2c9fe0ec145c4b0a2e9604b9e6e9017
2024-03-28 17:39:42 -07:00
Himanshu Gupta
07ebb705d6 Fixing Layout height for Private Space container
Screenshot at max Font, max Display Size:
Before:  https://screenshot.googleplex.com/BwtrU5xE5h63RKZ.png
After: https://photos.app.goo.gl/RXTvE6rM6PUx9wRK7

Bug: 311343337
Change-Id: I565c0c430b56e14f0fb1863b37c835c59c032730
Test: Manual
2024-03-03 21:14:16 +00:00
Brandon Dayauon
08b06523a5 Collapse private space container and animate header.
- Just opposite of how it will expand.
- RecyclerView.SmoothScroller is needed to scroll the container.

- Need to separate the lock button because this way I can use animateLayout changes and it itself was its own drawable. Separated into icon and textView in a viewGroup.
- Give the background the 10padding on the left and right so that when in animation, the icon can adjust the padding/margins there.
- Using propertySetter to set animation
- Animates the alpha of the settings alpha

- updated test to account for the nested child views the test needs to inspect

bug: 299294792
test: manual:
Expand + Collapse Video: https://drive.google.com/file/d/1Og66eqmXv3THn0wO4_x6Tfp2AbwFWUwZ/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation TEAMFOOD

Change-Id: I96f1d172a481522d23b4cee996ddec65961fce78
2024-02-16 21:23:51 -08: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