Commit Graph

53 Commits

Author SHA1 Message Date
Matt Casey
cc6caff02f Merge "Let launcher to provide its own OverscrollPlugin" into ub-launcher3-master 2020-03-05 22:18:05 +00:00
Matt Casey
0318a652c1 Let launcher to provide its own OverscrollPlugin
If the local OverscrollPlugin provided by the activity is non-null and
FORCE_LOCAL_OVERSCROLL_PLUGIN is true, the local plugin object overrides
the loaded actual plugin.

Test: Manual testing flipping the flag and observing which plugin is
activated.
Bug: 150245271

Change-Id: I0cd5184628c2cb572b5e1c56d6a008dcaa8807fb
2020-03-05 13:54:45 -05:00
vadimt
5a07aadf86 Feature flag for using hardware optimization for folder animations
Bug: 144338174
Change-Id: I92cc399da077c4c4da8264c20136302ede25ed01
2020-03-04 18:34:07 -08:00
TreeHugger Robot
63d44ad679 Merge "Default ENABLE_PREDICTION_DISMISS to true" into ub-launcher3-master 2020-03-05 00:19:04 +00:00
Samuel Fufa
73cb009470 Default ENABLE_PREDICTION_DISMISS to true
Bug: 142753423
Change-Id: I73bfb35fdd952a64233950254870afa393ed79ae
2020-03-04 15:43:15 -08:00
TreeHugger Robot
0f0a53a35f Merge "Enable support for same page hotseat migration" into ub-launcher3-master 2020-03-04 00:26:20 +00:00
Tracy Zhou
20d2683d92 Enable Grid Preview flag
Bug: 144052839
Test: grid preview with v1 algorithm
Change-Id: Ic788995b899bf25c5420120a95e71e4a565ba22a
2020-03-02 15:21:53 -08:00
Samuel Fufa
a421143dd7 Enable support for same page hotseat migration
Bug: 142753423
Test: Manual
Change-Id: Ib53a64629a595c412e30ca5ff46077efc73a3f3e
2020-02-27 13:47:03 -08:00
Zak Cohen
9a4df4dba1 Overview Actions - Enable by default.
Enable the Overview Actions feature flag by default.

Test: local
Bug: 145297320
Change-Id: I6f4a2b6e90704b78d1ff1f77bbfea2d8789169ff
2020-02-25 15:09:12 -08:00
Sunny Goyal
a173193afa Using LeastSquaresVelocityTrackerStrategy for calculating velocity
when detecting motion pause events. This is the same logic used by
the platform implementation VelocityTracker

Bug: 139750033
Change-Id: I87aabd46e58a5caa1395be3a63fd38d0ee75e355
2020-02-21 15:28:06 -08: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
Tony Wickham
f6dde3966a Add some more data to TouchInteractionService dumps
- Dump OverviewComponentObserver (to check if we're using 3P launcher)
- Dump current enabled and disabled plugins
- Dump all debug FeatureFlags instead of a few handpicked ones

Bug: 146174627
Change-Id: Ic8df899433b0e42d0e05eb1c80c87f62d3b936b6
2020-02-13 11:40:25 -08:00
TreeHugger Robot
421946a8e1 Merge "Revert ENABLE_PREDICTION_DISMISS and ENABLE_HYBRID_HOTSEAT flags to use DeviceFlag" into ub-launcher3-master 2020-02-13 01:43:47 +00:00
Samuel Fufa
ea5f40c6af Revert ENABLE_PREDICTION_DISMISS and ENABLE_HYBRID_HOTSEAT flags to use DeviceFlag
Bug: 142753423
Change-Id: I72fee5caafb22700548e788476ba9e56e4da569f
2020-02-13 01:09:42 +00:00
Hyunyoung Song
439beff8c4 Enable folder name suggest feature
Change-Id: I9007a7e5b07dd832a63793de25227af6aaa9377c
2020-02-12 13:26:47 -08:00
Tracy Zhou
7df93d28d4 Setup infrastructure (multi-db support) for the new grid migration algorithm
We'll have a db for each grid option and a db for back up / restore.

TODO(pinyaoting): support back up / restore using the new infrastructure, particularly calls to GridBackupTable should use different DBs when the feature flag (NEW_GRID_MIGRATION_ALGORITHM) is on.

Bug: 144052802
Test: N/A

Change-Id: I644a3e70148bd78204a747a337446a3c038f616f
2020-02-05 19:55:05 -08:00
Tony Wickham
4fdba14cfb Two-zone model: swipe up from nav bar vs above it
When ENABLE_OVERVIEW_ACTIONS flag is enabled, swiping up from the nav
bar goes to overview if you hold, or the first home screen if you don't.

- Added NoButtonNavBarToOverviewTouchController, which extends
  FlingAndHoldTouchController but only works if you start from the nav
  bar. Otherwise it falls back to PortraitStatesTouchController to
  handle normal state transition to all apps.
- Added HintState. This is where the workspace/hotseat/qsb scale down
  when you swipe up from the nav bar, to hint that you're about to
  either go to overview or the first home screen.
  - Added getQsbScaleAndTranslation() to allow Overview and Hint states
    to treat it as part of the hotseat.
  - Since Overview needs to show above the QSB as it's animating, bring
    Overview to the front and update OverviewScrim to handle the case
    where there's no view above Overview to draw the scrim beneath.
- ENABLE_OVERVIEW_ACTIONS is always false in 2-button mode, since the
  shelf is crucial to that mode.

Bug: 143361609
Change-Id: I743481bb239dc77f7024dc98ba68a43534da2637
2020-01-28 18:31:10 -08:00
Hyunyoung Song
a85f3c2f2d Disable FOLDER_NAME_SUGGEST flag
Bug: 147913781

Change-Id: I12ec71e1fef735f41bb67b155df40335f88d95c9
2020-01-22 09:26:29 -08:00
Hyunyoung Song
dc2c128b20 Merge "Updating feature flags subclassing" into ub-launcher3-master 2020-01-22 07:16:54 +00:00
Sunny Goyal
94fa76fbeb Updating feature flags subclassing
> Preventing debug flags to get change listener on release device

Bug: 147913781
Change-Id: I2bd0456918c5d3224c714b153c4565b1ef41d7c0
2020-01-21 14:22:58 -08:00
Andy Wickham
ff13792b83 Adds Launcher flag to enable Universal Smartspace.
Test: Used the flag
Bug: 141701658
Change-Id: Id06016e313b05ae70b693c39e2e1cde2576cfbb1
2020-01-17 23:03:03 +00:00
Pinyao Ting
ad5f24072c hook database restore with restore session
1. Create feature flag for new backup & restore flow.
2. For each restore session (install reason is restore),
   if its creation time is newer than the one we have in
   SharedPreference, we update the entry and restores
   favorite table from backup.
3. The restore operation is debounced so that when
   multiple restore session is created within a small
   amount of time, only the last invocation will get
   executed.

Bug: 141472083
Change-Id: I7b5b63ec28741ba2b02ccfd13f591c961362ba36
Test:
1. apply on master, build & flash on physical device.
2. factory reset the device.
3. go through SuW, perform restore, exit without
   adding work profile.
4. settings -> account -> add work profile account.
5. finish work profile setup, verify work profiles
   is restored as well.
2020-01-16 16:01:54 -08:00
Jon Miranda
40f0eb2188 Enable working springs. Move unstable springs to a seperate feature flag.
Bug: 147302669
Change-Id: I7a1b9b0e68cc68ad943b5af2b8cf7f80b5680eaa
2020-01-07 11:25:22 -08:00
James O'Leary
027cb32a96 Merge "Compose overscroll gesture updates" into ub-launcher3-master 2019-12-26 17:27:24 +00:00
James O'Leary
a9156a05c4 Compose overscroll gesture updates
Two changes for the latest Compose prototype:
1. Pass the identity of the underlying app to the Overscroll plugin.
2. Enable the Compose gesture over an app when there's a Recents extra
card plugin active (otherwise the current app won't count as the
rightmost one).

Some changes to the gesture:
- Angle decreased from 35° to 25° to remove overlap with
Assistant gesture
- Distance increased from 8 to 110 dp. 110 dp is 2x the Assistant
gesture and roughly the same as scrubbing into an app from Home.
- Fling detection added; uses same distance threshold, 110 dp.
- If a touch was recognized as another gesture, the touch will not be
reinterpreted as a Compose gesture, no matter what touch movement occurs
- Fixes issue where Assistant + Compose could both be triggered
- Fixes issue where scrubbing apps to the left, then back to the right,
would bring in Compose. i.e. if a touch down + touch movement starts
bringing in Assistant UI elements, then, the user moves their touch
below the Assistant angle, the Compose gesture will not start
being recognized
- Gesture length required for fling lowered from 110 dp to 40 dp, per
tuning with PM.

Bug: b/146508473
Change-Id: I414573d1a92684d1d992837a5f1df522346ec211
2019-12-23 10:59:30 -05:00
Becky Qiu
28a287624f [Overview chips] Turn overview chips off.
Change-Id: Ic200fa5e570abae6c41a12eb22bb3b853d02d504
2019-12-20 13:31:09 -08:00
Zak Cohen
e895869f47 Overview actions - adds feature flag and base class for Overview Actions.
Adds ENABLE_OVERVIEW_ACTIONS feature flag and base factory. Requires an
implementation in overlay to show any actions.

Test: run locally with flag on and off.
Bug: 145628186

Change-Id: I1c36330464cc01e1e987ebfea1a9f451067598a5
2019-12-09 16:43:54 -08:00
Tracy Zhou
44fa2940cd Render user's actual workspace in ThemePicker preview (Part 1)
This change takes care of icon rendering. Further work still needs to be done for folders and widgets.

Test: Go to grid options, choose a different grid option, and see user's workspace rendered in the preview
Bug: 144052839
Change-Id: I696153dec1d1f08c5ac82d0c75be5740325c0fc4
2019-12-09 14:06:38 -08:00
Zak Cohen
f9e73a01a6 Update FeatureFlags documentation.
Test: comment change
Change-Id: I25f99150f467e4e65d4969ad20a91f18743eceb0
2019-12-03 12:00:44 -08:00
TreeHugger Robot
1ca9c89b01 Merge "[DO NOT MERGE] Folder name suggest Bug: 142498588" into ub-launcher3-master 2019-11-09 02:52:21 +00:00
Hyunyoung Song
4c74620d6a [DO NOT MERGE] Folder name suggest
Bug: 142498588

Change-Id: I735c842522f08db1fb9a11f731b63f8dba5a298f
Signed-off-by: Hyunyoung Song <hyunyoungs@google.com>
2019-11-08 15:07:48 -08:00
Pinyao Ting
c1a1ced33a Add IconCache support for deep shortcuts, loads deepshortcut on
background thread.  Added a feature flag to toggle on/off this
feature.

Bug: 140242324
Test:
  1. (Custom Shortcut) Long click on google maps -> widgets -> drag
     driving mode to workspace.

  2. Open chrome -> add to home screen -> add -> add automatically.

  3. InstallShortcutReceiver
     In Launcher.completeAddShortcut, commend out the code that
     calls PinRequestHelper.createWorkspaceItemFromPinItemRequest,
     then open chrome -> add to home screen -> add -> add
     automatically.

  4. ShortcutDragPreviewProvider
     qdb -> long press on suggested app that has deep shortcut
     -> drag to workspace.

Change-Id: If7babe4eddf5434909bf686b4e9bde15e444d9fd
2019-11-05 11:27:28 -08:00
Samuel Fufa
225ac27143 Predictive hotseat prototype
Supports filling hotseat with predicted apps, pinning of predicted apps
and manages replacing predicted apps with user drag.

Bug:142753423
Test:Manual
Change-Id: I224294f9353a64c46d28c22263a72332a79fddf4
2019-10-30 13:19:10 -07:00
Andy Wickham
d386d7da7c Forces OveriewInputConsumer to be used when Assistant is running on top of Launcher.
Previously it was using OtherActivityInputConsumer, which got things in a
pretty weird state (e.g. most recent app would appear in the center as if
it was the active app when you started Quick Switching, etc.).

By default (toggleable by a feature flag), OverviewWithoutFocusInputConsumer
is used because Assistant doesn't seem to respect the CLOSE_SYSTEM_DIALOGS
broadcast, at least in half-shelf mode. In this case, the Home intent is
sent on swipe up, or you can dismiss it with the back gesture or by tapping
above the half shelf.

The new feature flag ASSISTANT_GIVES_LAUNCHER_FOCUS routes touches through
OverviewInputConsumer. As opposed to OverviewWithoutFocusInputConsumer,
this allows Quick Step to work while Assistant is running. Additional logic
is added to dismiss the Assistant when appropriate. Note that the dismissal
happens atomically, so it's not completely fluid with the other animations.
As mentioned above, this is disabled by default because Assistant doesn't
currently respect CLOSE_SYSTEM_DIALOGS.

Demo with the flag enabled (and Assistant respecting CLOSE_SYSTEM_DIALOGS):
https://drive.google.com/open?id=1W5jGpn_TEC-KjrYwQtaBT3pzxG_5tC4W

Bug: 139661510
Change-Id: I261653118aff289b329ec2a7ca6e52f100f7835a
Tested: Manually used quick switch after invoking Assistant from home screen.
2019-10-29 14:25:29 -07:00
Jeff Pierce
e4607587ed Add feature flag + leftward swipe for Compose access.
Stole ag/9453040 from jspierce@ and added a feature flag.

ag/9453040: Exploratory prototype to test leftward swipe access to
Compose across home screen, launcher, and lock screen. Requires Compose
APK (installed separately).

Change-Id: I15a045976b1eb41392795d3a4f0743f365dec1d2
2019-10-08 14:00:53 -04:00
Sunny Goyal
cf845f0dbf Fixing some robolectric tests
Bug: 131115553
Bug: 141576665
Bug: 141577881
Change-Id: Idb7e9346f57fea1d0231391477fdd11ad6b96a5c
2019-09-26 18:06:28 +00:00
Hyunyoung Song
338e4ea7df resolve merge conflicts of 057059665e to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Bug: None
Change-Id: I8a92d1389acbefc5bf33ef9760373bfbf54d682b
2019-09-16 15:29:37 -07:00
Sunny Goyal
3e3d759db2 Removing flag overrides. All flags should be defined as togglable flags instead.
Change-Id: Ia7b9ff84413096cd5b0c4a9a81a232019f2522d2
2019-09-12 10:17:14 -07:00
Sunny Goyal
d83a67a6b4 Separating out configs and common manifest entries
This separation allows for easier modification of Launcher3
by derivative projects

Change-Id: Ib3469e9b5d2707daef572050698d792316534d45
2016-05-24 14:11:24 -07:00
Sunny Goyal
a26e2d3d93 Removing some obsolete flags
Change-Id: Id33e28ddd7341d2b494c4b2a294663091afdb157
2016-05-09 14:13:06 -07:00
Tony Wickham
9c43182ff1 Add FeatureFlags.LAUNCHER3_DISABLE_PINCH_TO_OVERVIEW
Bug: 27796974
Change-Id: Icda33fb62783cc3f7b510d627d1eeb9cf29bd2d3
2016-03-23 10:42:02 -07:00
Sunny Goyal
cd50a0fade Adding back LAUNCHER3_ICON_NORMALIZATION feature flag to fix dependency breakage
Change-Id: I65376fde1d6681c00cdf2226a94bd9872b00cc6f
2016-03-04 14:53:59 -08:00
Sunny Goyal
3169e9c331 Fixing mismatch comment in flags
Change-Id: Ie86e2ebd4f40653fb127a239b57361164ef31b07
2016-03-03 13:38:58 -08:00
Sunny Goyal
531cda693d Using a negative flag for icon notmalization
Change-Id: Iaa94aea730d2b5cc3f15f3578f240127ca0eef63
2016-03-03 13:30:57 -08:00
Adam Cohen
efca0279eb Switch all folder preview rendering to be programmatic (ie. no assets)
-> Refactored the preview background rendering to be much more self-contained.
   This cleans up a lot of code in the CellLayout, and keeps the logic in the
   right place.
-> We switch to software rendering for performance and compatibility reasons.
-> Removed all assets.
-> FolderIcon accept animation includes animation of the clipped region.
-> 1:1 hand-off of drawing of the FolderIcon background between the FolderIcon
   and the CellLayout. Unfortunately, CellLayout rendering is still required
   to work around clipping issues (due to use of software layer). We also
   need this to support folder creation feedback.

Change-Id: Ib8f7fa6359dfedff8145f38dd50ba03849ca0d51
2016-03-03 09:24:45 -08:00
Sunny Goyal
53d5c9ee5f Disabling system drag driver in NYC
Change-Id: Ia7374f04c2aeb9cf8eb5bcf330da56bbc3f47ef2
2016-02-26 09:52:21 -08:00
Hyunyoung Song
fbf19cccd2 <UserEventLogging> Log app launches
b/26494415

1) Current Logger can capture taps from
- homescreen
- folder inside homescreen
- apps prediction
- all apps a-z
- tap from hotseat
2) Deprecate LauncherCallback methods that is no longer needed

Future CL.
3) Stats and Logger will be merged. Bundle used for Stats can be
replaced with LauncherLogProto
4) Logging anything else other than app launches

Change-Id: Id52eb615f66142017b5c490a220ce6654d325681
2016-02-19 12:55:53 -08:00
Adam Cohen
119e8982ab First pass at new FolderIcon visual treatment
-> Modeled as a set of items around a circle
-> Modulate the radius and icon size as number of items grow
-> Clip the icons by a circular clip aligned to the background drawable

Remaining issues
-> Probably want to move to a programmaticly drawn circle + shadow
-> Anti-aliasing of the clipped region will need more attention
-> Need to animate all items in the preview as it changes (this
   wasn't required before)

Change-Id: I678ec605f6c8a34e9d7e4aec4e9583e36a9ef394
2016-02-17 10:41:46 -08:00
Tony Wickham
e0c3323656 Tweak spring-loaded workspace.
- No page indicators in spring-loaded mode
- Don’t move workspace up as high
- Scale workspace at 90% instead of 80% on phones
- Increase speed of workspace -> spring-loaded -> workspace
- Widgets were being scaled down twice when dragging from widget picker
- Don't scale up icons when dragging (scaling other stuff down is enough)
- Make scrim less dark and panels more transparent
- Thin white border around page instead of highlight when hovering

Change-Id: I963e91c20d4c0340480d165e0f3b8064783c0cb2
2016-02-08 11:37:19 -08:00
Sunny Goyal
c7a49f0574 Removign 'final' modifiers from FeatureFlags so that then can be overridden
Change-Id: I07265eaeed883301787eb0ffd838f516d7c63d26
2016-01-19 10:36:23 -08:00