Commit Graph

13685 Commits

Author SHA1 Message Date
Thales Lima 828875cd12 Fix hotseat width to span a number of columns
Bug: 227344807
Test: manual
Change-Id: Ice4e37929bcbb8c9cf3af340e67b6bec002578bd
2022-04-29 14:56:30 +00:00
Raj Garg 0191a02a02 Merge "Making the parseAndAddDeepShortcut api private." into tm-dev 2022-04-28 09:58:37 +00:00
My Name 9a6dbac68c Making the parseAndAddDeepShortcut api private.
There is no need to expose this api. Missed the comment https://googleplex-android-review.git.corp.google.com/c/platform/packages/apps/Launcher3/+/17956680/comments/1c9b7443_cc54296d

Test: Tested manually on device.
Change-Id: If71e203f32a59fa59c406303411a37cba7b6c62e
2022-04-28 05:17:40 +00:00
Anushree Ganjam fa693be19f Merge "Revert "Refactors Search results into separate RV for Toast."" into tm-dev 2022-04-28 04:52:01 +00:00
Raj Garg f3924d62b0 Merge "Adding support to parse deep-shortcuts." into tm-dev 2022-04-28 04:32:38 +00:00
Anushree Ganjam 5cc7ff0990 Revert "Refactors Search results into separate RV for Toast."
This reverts commit 6729f0b950.

Reason for revert: This change caused b/230648542.

Please see https://b.corp.google.com/issues/230648542#comment5 for the video after reverting this change.

Bug: 206905515
Bug: 230648542

Change-Id: I85f063c56cad137c05b810204244bba7e8f94ee7
2022-04-28 01:37:49 +00:00
Sebastián Franco 84051cd8bf Merge "Give the tests the ability to emulate other devices screens" into tm-dev 2022-04-27 17:25:55 +00:00
TreeHugger Robot 84bff57d8d Merge "Move spring loaded scale calculation to DeviceProfile." into tm-dev 2022-04-27 13:51:59 +00:00
András Klöczl 143b71203f Merge "Change home dragging logic for dead zones" into tm-dev 2022-04-27 12:44:34 +00:00
Alex Chau a80efcee9f Merge "Update overview actions alignment" into tm-dev 2022-04-27 12:24:24 +00:00
My Name 2f5a1b6756 Adding support to parse deep-shortcuts.
Actual problem space is to prebundle YouTube Shorts shortcut to the
JioPhone Next device. The parsers don't support parsing the deep shortcut. In this CL we have added support for parsing deep-shortcuts.

Test: Tested manually on device.
Bug: 227290255
Change-Id: I7ea240a29639b88254fa679733541ff98ddfaa48
2022-04-27 08:14:46 +00:00
Sunny Goyal 52f4c16a94 Revert^2 "Removing some unused code from All-Apps"
13ae6784b5

Change-Id: I06a4c9cc6beba4fc87b4a9375872c68e71e1c5f6
2022-04-27 03:22:58 +00:00
Tracy Zhou 7183e4b460 Merge "Add originalView of the menu to SystemShortcut" into tm-dev 2022-04-26 17:28:40 +00:00
Andras Kloczl 0056e95d8e Change home dragging logic for dead zones
- If a dragged item is not over a valid drop target
then we don't highlight anything and on drop we move
it back to its original position.
- Instead of checking if the dragged item is over the
hotseat view, now we check if the item is over the hotseat
shortcuts.
- Smartspace is a dead zone

Test: drag items from different workspaces, allapps, widget
  picker etc. to all parts of the screen and verify which
  view is targeted and where the item gets dropped.
  Check on phone/foldable/tablet.
Bug: 228201267
Change-Id: I18de576ea300d58ae645e511b238e0b946b5595a
2022-04-26 16:28:11 +01:00
Alex Chau a2fc764405 Update overview actions alignment
- Align overview actions to the top with a defined margin below task thumbnail, except for vertical bar layout
- In modal state, use task view's bottom as pivot, and expand using all the space about pivot
- Simplified overview actions margin calculation and moved some logic to DeviceProfile

Bug: 209981696
Test: manual on various devices
Change-Id: I4c96cb02c6f3d6adf30633ddeb883bc4eec16f36
2022-04-25 19:20:21 +01:00
Pat Manning a2e1499a2f Move spring loaded scale calculation to DeviceProfile.
Fix: 229838395
Test: manual
Change-Id: I6dbbc850e88aaacceb1363e342404b06104f8c10
2022-04-25 18:58:09 +01:00
Sebastian Franco 00aff95ac0 Give the tests the ability to emulate other devices screens
This code contains utility clases that can change the display
of a device and make it look like another device.
The function DisplayEmulator#emulate receives a DeviceEmulationData
a certain grid to emulate and a callback, everyting that happens
inside of the callback will happen when the device is being emulated
and can be used by other tests.

Example test:
package com.android.launcher3.deviceemulator;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.filters.MediumTest;
import com.android.launcher3.deviceemulator.models.DeviceEmulationData;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.concurrent.TimeUnit;

@MediumTest
@RunWith(AndroidJUnit4.class)
public class TestTest extends AbstractLauncherUiTest {
    @Test
    public void testEmulation() throws Exception {
        String deviceCode = "pixel6pro";
        DeviceEmulationData deviceData = DeviceEmulationData.getDevice(deviceCode);
        String grid = "normal";
        DisplayEmulator displayEmulator = new DisplayEmulator(mTargetContext);

        displayEmulator.emulate(deviceData, grid, () ->{
            TimeUnit.SECONDS.sleep(10);
            return true;
        });
    }
}

Test: You could use the test above to make your device look like a
Pixel6 pro for 10 secons.
Fix: 229028257

Change-Id: Icd79be405a2e14dda0bc5f555b0e46149e16f912
2022-04-25 11:57:58 -05:00
Andy Wickham 6729f0b950 Refactors Search results into separate RV for Toast.
This will help enable transitions between A-Z apps lists and
search results because both can be seen simultaneously and
manipulated independently.

Some high level items of the refactor:
 - SearchRecyclerView is added; logic that populated the main
   (personal) tab with search results was simply redirected to
   this RV instead.
 - BaseAllAppsContainerView added isSearching() method. Returns
   false, and ActivityAllAppsContainerView overrides (as search
   is handled there).
 - Renamed BaseRecyclerView to FastScrollRecyclerView to better
   describe what it does. SearchRecyclerView extends this, but
   returns false for supportsFastScrolling().
 - AlphabeticalAppsList#mAllAppsStore is now optional, so the
   Search RV doesn't need to store/listen to apps. Note this
   doesn't affect the predicted app row which is still updated
   if one of the predicted apps is uninstalled (I tested this).

Future work:
 - Determine why dispatchRestoreInstanceState is not called for
   BaseAllAppsContainerView. Save is called, e.g. on rotation.
   Effect of restore not called: rotating while searching goes
   back to A-Z list.
 - Keep suggested apps in Header while searching. Currently they
   are rendered in the SearchRV above search results, as before.
 - Potentially extract Personal/Work tabs to move independently of
   header.
 - AlphabeticalAppsList is a misleading name because it can also
   contains search results. However, things are pretty intertwined
   between that and BaseAllAppsAdapter (effectively a circular
   dependency), so I figured cleaning all that up was out of the
   immediate scope of this refactor, which is mainly meant to
   unblock transition work.

Bug: 206905515
Test: Manually checked for regressions, ran tests.
Change-Id: I4d3757c8a8f9b774956ca6be541dd4fcdad1de13
2022-04-24 17:36:48 -07:00
Andy Wickham 833b0a0b5b Merge "Adds Search Onboarding count and renames existing edu pref." into tm-dev 2022-04-25 00:26:51 +00:00
Tony Wickham 357c622572 Merge "Address a couple small followups for TaskbarInsetsController" into tm-dev 2022-04-22 22:55:10 +00:00
Sunny Goyal 84151d2bca Merge "Removing fade in logic during load." into tm-dev 2022-04-22 20:29:34 +00:00
Sunny Goyal b1f6a3fe97 Merge "Revert "Removing some unused code from All-Apps"" into tm-dev 2022-04-22 19:55:42 +00:00
Sunny Goyal 13ae6784b5 Revert "Removing some unused code from All-Apps"
Revert submission 17866780-cancel-request

Reason for revert: wrong icons

Reverted Changes:
Iedc98e5ef:Cancelling previous request and clearing UI when a...
I72394fb42:Removing some unused code from All-Apps

Change-Id: I2ecefcaf07e6105a10f86b8dc19f75089e45a3e0
2022-04-22 19:53:37 +00:00
Sunny Goyal a938cc27a2 Merge "Removing some unused code from All-Apps" into tm-dev 2022-04-22 19:40:06 +00:00
TreeHugger Robot 37fa1392ec Merge "Reset touch state when removing all tasks in RecentsView.applyLoadPlan" into tm-dev 2022-04-22 17:33:06 +00:00
Sunny Goyal 7b8d63fcf8 Removing fade in logic during load.
Launcher already blocks the draw during load, which ensures
that system draws the loading screen. Additional fade animation
is not visible since the Launcher window is already getting fade in

Bug: 199120420
Bug: 199120420
Test: Verified on device

Change-Id: I7089cea4c5f97f6ef92eabcba56451de407c98b8
2022-04-22 16:35:40 +00:00
Alex Chau e3b806366a Update pull back animation for tablet AllApps
- This is a follow-up of http://ag/17636490
- Introduced animation property specifically for pullback translation and alpha, which will invoke getRecyclerViewContainer directly on tablet, and invoke aggregate setter of appsView on phones
- Delay reset of pullback animation to after dismiss animation to avoid jump in value during state transition animation
- Introduced property factory for addictive properties similar to MultiScalePropertyFactory

Fix: 220345008
Test: manual on small and large screen
Change-Id: I7b5c0019c1d4d36c3c7ca4ec79e38e4eb09c32ca
2022-04-22 16:27:25 +01:00
Andy Wickham ef6f41a574 Adds Search Onboarding count and renames existing edu pref.
Note: I only updated the old variable name to not affect
exsiting values of the old preference.

Bug: 227627262
Test: Manually checked onboarding card only showed 3 times.
Change-Id: Ica6eca725be82ac7abf4681ba4ebcb33ee0178df
2022-04-21 23:33:14 -07:00
Tony Wickham f286f9cb98 Address a couple small followups for TaskbarInsetsController
- Added no-op onDestroy()
- Reformated some if conditions, also adding
  AbstractFloatingView.hasOpenView()

Test: TaplTestsTaskbar
Bug: 215411414
Change-Id: I89b39ca5fabd03f5ac0f25d6ef69170683cf060d
2022-04-21 16:16:02 +00:00
Shikha Malhotra 2e255ed0ac Merge "Refactor code to be used in LauncherLily features" into tm-dev 2022-04-21 07:50:32 +00:00
Pat Manning de5d9718ed Merge "Prevent edit state workspace scale from hiding next pages." into tm-dev 2022-04-20 17:21:31 +00:00
Brian Isganitis 6d780af405 Merge "Log taskbar all apps entrypoint, launches, and drags" into tm-dev 2022-04-20 17:13:52 +00:00
Sunny Goyal 3946ecd441 Removing some unused code from All-Apps
Bug: 229860311
Test: Verified on device
Change-Id: I72394fb421679688f87cdbf725859ec35529a59e
2022-04-20 09:54:48 -07:00
Pat Manning ea5c1d29fe Prevent edit state workspace scale from hiding next pages.
Fix: 228969651
Test: manual
Change-Id: I0cceb3bfab19e0721b21fb8c55fe1218b1f25af8
2022-04-20 14:41:46 +01:00
Shikha Malhotra e957b600d3 Refactor code to be used in LauncherLily features
Refactor add to workspace code to be used in Lily Launcher.
Also utilising code swap feature to swap out functionality of sorting
items on workspaces and finding next vacant space.

Bug: b/218186705
Test: Manually tested Launcher3 works.
Change-Id: I42a44eabeb307e1d23ef333e0a169437f9062bb6
2022-04-20 07:22:20 +00:00
Sihua Ma 34ba5a9534 Merge "Attach work badge to Weather and Battery widgets" into tm-dev 2022-04-20 02:01:11 +00:00
Sihua Ma 4c5bd537bb Attach work badge to Weather and Battery widgets
Moving the part where widget icon is generated from WidgetsListHeader (UI thread) to IconCache (backend)

Test: Open widget picker -> switch to work widget picker -> verify that Battery and Weather are badged
Fix: 226132413, 209995894
Change-Id: I3d649f2b26d7d8e7b756129b5bae4433ea344d43
2022-04-19 15:41:56 -07:00
Brian Isganitis 65df4506bf Merge "Prevent arrow popup from going off screen bottom when below icon." into tm-dev 2022-04-19 21:56:48 +00:00
TreeHugger Robot 1a93004398 Merge "Putting back generics for Workspace" into tm-dev 2022-04-19 20:25:37 +00:00
Brian Isganitis 79c938e8be Prevent arrow popup from going off screen bottom when below icon.
The current approach sometimes causes popups to go off the bottom of the screen, because we are not account for top insets and we are double counting extraVerticalSpace.

Test: Manual
Fix: 228326181
Change-Id: I148f9ff579e4406a0834195977e1cb7abf3707e5
2022-04-19 18:08:04 +00:00
Thales Lima ee80d6919e Merge "Make hotseat RTL aware" into tm-dev 2022-04-19 16:47:52 +00:00
Sunny Goyal cd2ac0f3e9 Updating target SDK for Launcher
Bug: 229173942
Bug: 226461147
Test: Presubmit
Change-Id: Id9e303f113cba87adf26442f1417ed2814555c54
2022-04-18 13:55:01 -07:00
Brandon Dayauon 32f1e89193 Merge "Fixed overlap issue where toggle button gets overlapped by 3 button nav bar..now button shifts up so it's not totally obscured" into tm-dev 2022-04-16 19:36:27 +00:00
Brandon Dayauon 241293aaee Fixed overlap issue where toggle button gets overlapped by 3 button nav bar..now button shifts up so it's not totally obscured
Test: Manual - On Raven
Before: https://screenshot.googleplex.com/sYq2i7YGjqmMjXe
After: https://screenshot.googleplex.com/9WRtgisGChisbFj
Bug: 223996104
Change-Id: Ic302e26b2fb6db9a9e06b335c753266e92b6c671
2022-04-15 16:29:35 -07:00
Sunny Goyal bee13b6305 Catch SecurityException from NoMan to workaround possible race condition
Bug: 63636581
Bug: 227445069
Test: n/a issue not reproducible
Change-Id: Ib3dcf013ba9220d3d2d59032163191f0aef5d062
2022-04-15 10:20:19 -07:00
TreeHugger Robot cdcbebb752 Merge "Revert "fix broken build on erorrprone"" into tm-dev 2022-04-15 04:09:57 +00:00
Sunny Goyal 645af0a6b3 Revert "fix broken build on erorrprone"
Revert submission 17730702-fixErrorProneBuild

Reason for revert: Breaks Launcher3 unbundled build by using hidden library in main Launcher code
Reverted Changes:
Id0ce4d308:Change version checks to use SdkLevel.isAtLeast*
I8fc801b00:fix broken build on erorrprone

Change-Id: Ib1cd50a746bad3b6fb9fbd455a7cdce30f341d8b
2022-04-14 16:54:07 -07:00
Sunny Goyal 2248d74666 Merge "Improving folder icon drawable" into tm-dev 2022-04-14 23:35:05 +00:00
Sihua Ma af91920955 Merge "Showing alert dialog when shortcut version higher than the App" into tm-dev 2022-04-14 18:26:10 +00:00
Jonathan Scott ad90ded7bc Merge "fix broken build on erorrprone" into tm-dev 2022-04-14 18:00:10 +00:00