Commit Graph

10334 Commits

Author SHA1 Message Date
TreeHugger Robot 3a030ef994 Merge "Removing various reflection based animations, to allow for better proguarding" into ub-launcher3-master 2018-09-21 18:34:01 +00:00
Sunny Goyal 55bdeed7bb Removing various reflection based animations, to allow for better proguarding
Change-Id: If9df24ea4170e8a3d336057d1c3dc800934fc1ac
2018-09-21 18:21:04 +00:00
Sunny Goyal 6687ba0cc9 Merge "Skip starting new fragment, if the manager is in paused state" into ub-launcher3-master 2018-09-21 17:18:39 +00:00
Hyunyoung Song f58cf5e337 Disable scrolling noti shade on abstract floating view with swipe down
interactions already doing something else.

Bug: 116143342

Change-Id: If3716de0eb1f7b508c3b74dbe2593ba62fffcf74
2018-09-19 17:05:09 -07:00
Sunny Goyal 5077aefc30 Skip starting new fragment, if the manager is in paused state
Bug: 111684268
Change-Id: Ice529356733d98181371e37beed7a34922313cc4
2018-09-19 22:19:08 +00:00
Sunny Goyal 1642f7173f Removing ViewScrim and cutom drawing code
Bug: 109828640
Change-Id: I2cab0215a32c2ca6bc331d48083fcc00ada05c3b
2018-09-18 11:41:02 -07:00
Hyunyoung Song 24b209c65a Swipe down on status bar
Bug: 111839343

Change-Id: I5332dc098af980b4d4ef45b095586d68975ad98c
2018-09-18 11:11:04 -07:00
Sunny Goyal 194f58525a Adding a provider class for various popup actions
so that it can be customized easily.

Change-Id: I633846631ac3d4c70ebb3ea35a3edc2feee8339e
2018-09-17 17:05:32 -07:00
Sunny Goyal 4d8ec15fb5 Using velocity tracker for computing the velocity of motion events
Change-Id: I14f2f970825a2936f4bb285834405d67daf8667c
2018-09-13 09:50:47 -07:00
Tony Wickham 05b351dd42 Merge "Update undo snackbar visuals" into ub-launcher3-master 2018-09-12 00:28:06 +00:00
TreeHugger Robot 297ee90d60 Merge "Ignore any error when killing our process" into ub-launcher3-master 2018-09-11 22:47:06 +00:00
Tony Wickham 08c7cd5625 Update undo snackbar visuals
- Use accent color for action
- Update font-family to use TextTitle style
- Reduce elevation to 3dp
- Inset snackbar left/right margins more, unless we need to increase the
  width to fit the text
- For largest display/font size, fallback to 2 lines and smaller font if
  necessary to not cut off the label
- Remove top/bottom padding on action (b/114084048)
- Allow up to 20 char for the action (b/114317987)

Change-Id: I833c102aaac3ba3db2283997c142926c3830336d
2018-09-11 15:35:47 -07:00
Tobias Dubois a4c1002bac Fix auto install add of installed activity
Reset the restore status for auto install icons where the activity is
installed and enabled so the item is not stuck in the auto install
state.

Bug: 112664405
Test: manual - See issue
Change-Id: I37116b6e6ecbe4215d96627f9b1ea6909d12a6c0
2018-09-07 13:59:04 -07:00
Sunny Goyal e3fec0f177 Ignore any error when killing our process
Bug: 113929153
Change-Id: Ie9a8b59fda1f813748404ed529269cccb1e28c61
2018-09-06 16:26:52 -07:00
Tony Wickham 77a1efed36 Merge "Gracefully fallback to new ComponentName if one is renamed/removed" into ub-launcher3-master 2018-09-06 19:21:35 +00:00
Tony Wickham f9d9df7d3a Gracefully fallback to new ComponentName if one is renamed/removed
Previously, if a developer renamed their launcher activity, we removed
all instances of their icon from the home screen, since technically the
activity they pointed to no longer exists. However, in the vast majority
of cases, the developer simply renamed their activity and nothing should
change from a user's perspective. So instead of removing icons that no
longer point to a valid activity, we now redirect them to point to the
first activity in the manifest (or remove them if there is none).

Test:
- Install app with Activity A and place on home screen
- Rename A to B and reinstall - verify home screen icon remains
- Add new launcher activity C - verify icons still go to B
- Force stop launcher and rename B to A - verify icons go to A (same activity)
- Remove activity A - verify icons go to C
- Remove activity C - verify icons are removed

Bug: 28907647
Change-Id: If9da251bd588908c4c425e7dd32e38fcbe54bab2
2018-09-05 18:23:54 -07:00
Sunny Goyal cf300fc980 Creating a separate state for launcehr as background app
This makes is simpler to control the swipe to overview UI, and ties the
transition with the state machine

Bug: 113287120
Bug: 79755195
Bug: 112203163
Change-Id: I3041dbb659b46ccea6284855addc91e370815be6
2018-09-05 17:32:50 -07:00
Tony Wickham 6a71a5bd77 Add undo snackbar for deleting items
- Add methods to ModelWriter to prepareForUndoDelete, then
  enqueueDeleteRunnable, followed by commitDelete or abortDelete.
- Add Snackbar floating view
- Show Undo snackbar when dropping or flinging to delete target; if the
  undo action is clicked, we abort the delete, otherwise we commit it.

Bug: 24238108
Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
2018-08-30 16:22:25 -07:00
TreeHugger Robot 1654c9e1c0 Merge "Reading window_animation_scale from Settings.Global" into ub-launcher3-master 2018-08-28 18:07:17 +00:00
Tony Wickham cb3f870054 Reading window_animation_scale from Settings.Global
It moved from Settings.System, so there were constant warnings in the
logs. This only affects dogfood builds.

Change-Id: Ic3c179837f78a8040579fcc6ad485f6fabe1c2a1
2018-08-27 17:36:03 -07:00
TreeHugger Robot a42505c385 Merge "Using a placeholder icon shape instead of low-res/blurry icon" into ub-launcher3-master 2018-08-27 18:44:24 +00:00
Sunny Goyal 2b787e5bd6 Using a placeholder icon shape instead of low-res/blurry icon
Bug: 111142970
Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
2018-08-27 10:43:46 -07:00
TreeHugger Robot 25cb600f50 Merge "Lint fix: IS_DEBUG_DEVICE: Implied default locale" into ub-launcher3-master 2018-08-23 20:51:01 +00:00
Tobias Dubois 53da286c05 Use View.getHeight() instead of Canvas.getHeight() for PageIndicatorDots
Use View.getHeight() instead of Canvas.getHeight() to get the same height
regardless of using hardware or software accelerated drawing.

Test: manual
Change-Id: I475afef017102d7968f28a7aab8116238af3d90d
2018-08-23 10:37:58 -07:00
Tobias Dubois 9c0ad56d11 Lint fix: IS_DEBUG_DEVICE: Implied default locale
Use the ROOT locale to make sure toLowerCase has consistent behavior
regardless of the currently set language.

Test: Manual
Change-Id: Ie43f76cbc15eee0d96314e92d2acd5abb22f7077
2018-08-23 10:32:59 -07:00
Android Build Merger (Role) 840bd3762c [automerger] Preventing padding from getting reset when the widget updates am: 4cbbaedb2c
Change-Id: I851c06714e0809a9afb108b8c66a0d01384e3c41
2018-08-22 21:34:10 +00:00
Sunny Goyal 4cbbaedb2c Preventing padding from getting reset when the widget updates
Bug: 112854572
Change-Id: Ia2963310997ca13f2e1f18f7268b0b9b54a53590
2018-08-22 14:34:03 -07:00
Android Build Merger (Role) dcd6be2fa2 [automerger] Kill launcher when display size changes am: f2b97f8cd8
Change-Id: I7fef11b9369f0ac54c21afeac84fd9e756658a2e
2018-08-21 20:37:42 +00:00
Sunny Goyal f2b97f8cd8 Kill launcher when display size changes
Bug: 112876936
Test: Verified by changing display cutout overlay
Change-Id: I3ca13c7be873509334457e3484ac5604731adeae
2018-08-21 13:37:38 -07:00
arangelov e6627ebfed Don't call BottomUserEducationView#close() while running animation.
If while the work profile info card opening animation was
playing you pressed the Work tab repeatedly, close() was
called. That caused the animation to never complete
properly (onAnimationEnd() was never called). This CL
makes sure to not call close() if the animation is
still running.

Bug: 112471462
Bug: 112188042
Test: Manual
Change-Id: I2e62e0c5c6f1d6132ea359a85cb6aadf57639c30
2018-08-20 17:23:15 +01:00
Tony Wickham 2bcc9ba5ef Merge "Cancel badge scale anim when setting new badge scale" into ub-launcher3-master 2018-08-17 21:24:10 +00:00
Tony 4043b05cde Cancel badge scale anim when setting new badge scale
Otherwise it's possible the badge scale animation will override the
non-animated set value, which could mean a badge continues to show
even though it shouldn't:
- Animate badge scale to 1
- Before animation finishes, set badge scale to 0
- Badge scale ends at 1, since animation wasn't cancelled, so we
  continue to show it indefinitely

Also exported some properties in case a similar issue arises.

Bug: 111791593
Change-Id: Ia1a417239b909886adf9351e9bdc06a3b22d8b73
2018-08-17 13:47:39 -07:00
arangelov ad78305862 Highlight work tab when user already in All Apps after creating WP.
When a user created a work profile and was already in the All Apps
view, the work tab was not highlighted, because the logic for that
was only in AllAppsContainerView#onScrollUpEnd(). This CL
highlights the tab when the user has resumed and the All Apps view
is expanded.

Bug: 79242814
Test: Manual
Change-Id: I40af0d513c95f8084e21f4e276e9f56bcb06555e
2018-08-17 20:28:52 +01:00
Tony 977690e931 Make arrow feel more connected to popup
- Clip the arrow that is overlapped by the popup, so that it doesn't
  show when that part of the popup is highlighted
- Animate the arrow first instead of last. Now the animation feels
  like one continuous motion as the arrow grows into the popup.

Bug: 111159923
Bug: 111006276
Change-Id: I22fb3037d950d55fe6c8ed4dc5345279874f0a3a
2018-08-15 15:22:28 -07:00
TreeHugger Robot 9e26e26f00 Merge "Prevent the work mode switch thumb from being dragged." into ub-launcher3-master 2018-08-15 17:39:24 +00:00
arangelov 1502c673d0 Prevent the work mode switch thumb from being dragged.
When we normally press the work mode switch, it waits for the profile to
receive the ACTION_MANAGED_PROFILE_AVAILABLE broadcast before the button
UI actually toggles. The user never interacts directly with that switch.
However, dragging the switch thumb used to bypass that logic. This CL
makes sure dragging the switch thumb cannot happen in the first place.

Change-Id: Ib3b4ae7591136c35e6d02783387d752e246cfb5b
Fixes: 111211805
Test: Manual
2018-08-15 16:46:13 +01:00
Vadim Tryshev b6398a1eb8 Sharing protocol constants between Launcher and TAPL
Bug: 110103162
Test: TaplTests
Change-Id: I5b2a2b8576a7a6ea4a156f00858711496d6b5bba
2018-08-14 19:53:43 -07:00
TreeHugger Robot e1c4a90635 Merge "Migrating to android-x" into ub-launcher3-master 2018-08-14 22:53:40 +00:00
TreeHugger Robot d7f266fee1 Merge "Removing static launcher activity dependency from FirstFrameAnimationHelper" into ub-launcher3-master 2018-08-14 22:30:00 +00:00
Sunny Goyal d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
TreeHugger Robot a950d40d09 Merge "Started converting Launcher to be gesture-stable" into ub-launcher3-master 2018-08-14 19:18:46 +00:00
Lucas Dupin f3c4f77809 Merge "Respect night mode flag on Q and beyond" into ub-launcher3-master 2018-08-14 18:32:34 +00:00
Lucas Dupin eca08a10bd Respect night mode flag on Q and beyond
Test: manual
Change-Id: I01c51d02e787557717c12567adc8276943dbd1bc
Fixes: 110758454
2018-08-14 11:18:42 -07:00
Winson Chung 7debc53f93 Skip logic to find the dominant color when loading recent task icons
- Also move some allocations in ColorExtractor into thread locals to reduce
  allocations

Bug: 78777731
Change-Id: I8819106d476a9af02e864135a2f44b55fe9219cd
2018-08-14 10:30:33 -07:00
Vadim Tryshev dc755e718d Started converting Launcher to be gesture-stable
All tests keep passing.

WorkTabTest.workTabExists was made gesture-stable. There is no need to
use TAPL, as the point is not to check answering to gestures, but to
check presence of tabs, which is better to do using launcher internal
state. (It still fails if run as a part of all tests, presumably,
because after Launcher's start, changes in user configuration are not
recognized, so I've commented the failing part)

Bug: 110103162
Test: Run all tests
Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
2018-08-14 10:29:57 -07:00
Sunny Goyal f0b6db7fa8 Removing static launcher activity dependency from FirstFrameAnimationHelper
Static dependency does not work in the presence of multiple activities and
when the main activity is not Launcher (eg in fallback recents). Instead
creating FirstFrameAnimatorHelper on demand for individual animations.

Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
2018-08-13 16:10:18 -07:00
TreeHugger Robot b6ecb17356 Merge "Removing Launcher activity dependency on various animations" into ub-launcher3-master 2018-08-13 20:03:33 +00:00
TreeHugger Robot d6ba50412b Merge "Adding overscroll in recents view" into ub-launcher3-master 2018-08-10 22:53:49 +00:00
Sunny Goyal b7b0135c93 Adding overscroll in recents view
Bug: 109828536
Change-Id: I4fe94bd157c2b65f80604751e6f0f7d5d81d058d
2018-08-10 22:41:20 +00:00
Sunny Goyal 849c6a2b18 Removing Launcher activity dependency on various animations
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)

Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.

Instead associating a target with various animations which automatically
cancels the animations when that target goes away.

Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
2018-08-10 13:31:46 -07:00