Commit Graph

188 Commits

Author SHA1 Message Date
Tony
d5a3df7b83 Don't close popup container if touch came from nav bar
Moved EDGE_NAV_BAR from quickstep package to launcher3

Bug: 127917144
Change-Id: Ic619ea49896ca8e49a9a539b7dc7d682291241b7
2019-03-15 17:08:51 -05:00
Jon Miranda
87beed6404 Handle other SystemShortcut view types.
Bug: 127807969
Change-Id: Ifcc24e9261ddc730bcddd5724a230910daafce17
2019-03-13 10:02:59 -07:00
TreeHugger Robot
111213b0f8 Merge "Fix app to folder icon animation." into ub-launcher3-master 2019-03-05 21:25:17 +00:00
Jon Miranda
69b35e0195 Fix app to folder icon animation.
- Needed to account for the preview bounds (similar to BubbleTextView icon
  bounds)
- Also needed to update the bitmap shift amount so that it is re-centered
- Moved ShiftedBitmapDrawable to its own class in graphics package

Bug: 123900446
Change-Id: Ifa9e3f688e55d017cf86a0285f5cdb1b014f01e6
2019-03-05 12:23:28 -08:00
Jon Miranda
3145839f65 Fix bug caused by trying to set background to AdaptiveIconDrawable.
Solution is to flatten the drawable when useDrawableAsIs is true.

Bug: 123900446
Change-Id: I3b86db201ef4fccf10ac42ec367c0538573b7ad8
2019-03-04 20:54:53 -08:00
Jon Miranda
1a49fb5733 Transform closing window to icon on workspace using adaptive icons.
With adaptive icons, we can have FloatingIconView match the shape
and size of the closing window, regardless of the icon shape.

FloatingIconView starts off as a rounded rect (same corners as task view)
and then morphs into the icon shape using FolderShape#createRevealAnimator
in reverse.

Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still
some issues with folders, badges, and a visible jump when swapping the
FloatingIconView with the original icon.

Bug: 123900446

Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46
2019-03-01 12:48:25 -08:00
Tony
573c3e1712 Make TouchInteractionService direct boot aware
- Add directBootAware="true" to TouchInteractionService manifest component
- Add DeviceLockedInputConsumer which just sends a home intent on touch down

Test:
- Reboot
- Swipe up anywhere to get to bouncer (pin/password/pattern)
- Click "Emergency" to launch dialer while still in direct boot
- Swipe up from the nav bar to exit/bring up bouncer

Test:
- Lock screen
- Double press power to launch camera
- Swipe up from nav bar to exit/bring up bouncer

Bug: 125364936
Change-Id: I7a4cd2dc3a635daf4bb9a643a1e5251ca4e91e33
2019-02-28 14:39:27 -08:00
Jon Miranda
0128d3f6e0 App to home animation zooms into the app icon.
- Created FloatingIconView which is now used by both the app close and
  app open animation.
- getItemLocation in DeviceProfile is used to get an item's final location
  since getLocationOnScreen may return a View's location mid-animation.
- Added getFirstMatchForAppClose which is optimized to return for best
  visual animation.
- Also fixes app open RTL bug.
- Next CL will use AdaptiveIcons and FolderShape reveal animator to match
  the app icon to the app window.

Bug: 123900446
Bug: 123541334
Change-Id: Ief75f63fc5141c1ee59d4773946d08794846cb31
2019-02-14 16:54:45 -08:00
Hyunyoung Song
29e5d44a63 Add a flag to turn on theme picker in wallpaper picker
Bug: 122524192
Change-Id: I79bd8bde359a56185c1dd0c10964695263d0f6d5
2019-02-07 14:16:32 -08:00
Sunny Goyal
aae6fbb903 Moving some utility methods around
Change-Id: I8abca49a0dbf656212b21e0552502036a1619164
2019-01-31 16:07:40 -08:00
Sunny Goyal
8c48d8bea6 Changing min sdk to 25
Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
2019-01-29 11:29:52 -08:00
Sunny Goyal
415f173331 Changing the format for device profile definition
Device profiles are defined such that the grid size is fixed
and only the icon and text sizes change. For every grid size option
there are multiple display configurations.

Bug: 118758696
Change-Id: I54aac9106c576324b02530913c447e849b4ae1da
2018-12-07 00:06:25 -08:00
Sunny Goyal
e62d2bb165 Removing some Launcher3 dependencies from BaseIconCache
Change-Id: Ic80ed4a5cd2fc414cd6c27096d798e7f0b8efc72
2018-11-06 14:51:55 -08:00
Sunny Goyal
efb7e84242 Converting long item IDs to int
> Items ids were already being typecasted to int when being bound on the UI
> Using a consistent type allow better use of platform data-structures
> Adding IntArray and IntSet as a replacement for various Collection classes

Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
2018-10-08 14:52:39 -07:00
Vadim Tryshev
c295098e18 Enabling "in test harness" flag with a direct call
This allows running in-proc tests without enabling test harness on
Android and restarting Launcher.

Bug: 110103162
Test: TaplTests
Change-Id: Ife44eff4760eb1349a10847efe2c1f27643bf146
2018-10-04 16:33:45 -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
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
Vadim Tryshev
ff3fa34a7a Fixing scrolling up in App Apps.
Done by scrolling only when scroll position is not zero. This way, the
scroll gesture can't close All Apps.

Bug: 110103162
Test: TaplTests suite
Change-Id: Icfe47d2bcc0210ae221df169d6c35cd1be10ff86
2018-08-02 14:15:05 -07:00
Vadim Tryshev
2ce6a13f60 Tapl library
The public API of the library has finalized; flakiness has been removed;
code polished.

Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
2018-07-20 14:43:05 -07:00
Sunny Goyal
7f920b8d5e Cleaning up build rules to simplify customizing derivative projects
> Using {packageName} instead of hardcoding com.android.launcher3 in AndroidManifest.xml
  for strings which are dependent on packageName
> Adding proguard rule to prevent obfuscating any overridable class
> Making it easier to extend SettingsActivity by overriding the fragment class

Change-Id: I5668c3f33b4cf20ad01d7f54b3d79cc0d268d391
2018-07-02 11:16:04 -07:00
Sunny Goyal
0f3af75eb0 Making the self always follow the vertical progress without any min height limit.
After a certain height, the self fades out, but keeps following the vertical progress.

Eventually the fade-out can be decoupled from vertical progress and tied to the state

Bug: 109829614
Change-Id: I9808ed3fa1730b938196bc6d3518a6d096a13f4c
2018-06-11 09:51:42 -07:00
Tony Wickham
b45444b250 Overshoot when flinging up from an app
- Use OvershootInterpolator based on velocity (consistent with swiping up
  from home)
- Scale down recents as well, to be consistent with adjacent pages scaling
  up when you launch a task

Bug: 109709720
Change-Id: Ie47309058ccf673a4b86c40c843c415beb2d8dc7
2018-06-06 23:20:58 +00:00
Tony Wickham
8155fa2aa5 Don't prevent animations in power save mode
Now that batter saver mode doesn't get rid of animations in P, we
shouldn't use custom logic to prevent them either.

Also updated ATLEAST_P to use version code.

Bug: 79990054
Change-Id: If17cf369035c976f3d9d81f35432a045f1956ce5
2018-05-18 17:18:49 -07:00
Jon Miranda
83337f9e8e Call close for AbstractFloatingViews that were removed while still open.
I'm not sure how/when this case occurs (perhaps during some transition/state
change), but manually removing the floating view matches the symptoms in the
bug.

Bug: 72996404
Change-Id: I1e7c1a338fcd16c8e07b3c49fb9c9b2097eb2708
2018-04-25 11:25:40 -07:00
Sunny Goyal
3483c52e6b Waiting until onResume before creating the wallpaper-open animation.
Bug: 77853906
Change-Id: I5126855492da59c9dbfef0ce2a97f94662a6522b
2018-04-16 13:01:57 -07:00
Matthew Ng
f0f00b30b8 Check for eng build as a debug build
Test: compile with eng lunch and see if you get debug settings
Change-Id: If94c4d49b5fb12cd46d51197e0a60ea6d0b0a01e
2018-04-09 16:20:42 -07:00
Sunny Goyal
623eddd7e8 Updating Launcher rotation logic
When auto-rotate is on, launcher allways allows rotation. This allows uses to use
locked rotation feature is available on the device
When auto-rotate is off, workspace does not allow rotation, but overview in quickstep
will allow rotation

Bug: 73872056
Change-Id: Ie12365c268fd5e4958634ed97b5a33dcadc691e2
2018-03-03 00:41:09 -08:00
Sunny Goyal
b1e2e2956e Fixing window transform not changing monotonically with shift
Change-Id: I40f095e73ca1cdb994d34aecc2c6be90f3e0f25b
2018-02-21 14:56:17 -08:00
Winson Chung
3e803c7a4b Animate the visible task view if launching an app that resolves to the task
Test: Manual, launch app for associated visible task
Change-Id: I7a56553197ad23e1269eb50523eca0ea88898f47
2018-02-09 12:40:10 -08:00
TreeHugger Robot
01629fea69 Merge "Consume work mode API" into ub-launcher3-master 2018-01-04 19:14:17 +00:00
Tony Mak
6eeb040d86 Consume work mode API
Fix: 69905244

Change-Id: I5958b3a2ebba2fa0e0f69448d5526dc72ed6a97b
2018-01-04 19:06:01 +00:00
Sunny Goyal
179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Sunny Goyal
d0030b05f5 Adding placeholder method for compat implementations for Accessibility manager
> Moving some utility methods to the compat class

Bug: 69611105
Change-Id: Ide0cab0b926d7bc03617fc568d2a2b429ee00cd9
2017-12-08 16:09:45 -08:00
Sunny Goyal
c99cb174c3 Moving some state specific logic to subclass of LauncherState
Bug: 67678570
Change-Id: I1316f91c9f19bd572e4a0da67a22fa8921e1dcf9
2017-10-20 13:56:47 -07:00
Sunny Goyal
9b8e36b95d Avoiding duplicate calls to Bitmap.getPixel(x, y)
Change-Id: I24414b41e9b0e9833cd4e962187a08672bc86c46
2017-09-28 19:21:35 -07:00
Hyunyoung Song
e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Mario Bertschler
a0465afe8d Merging ScrimView into GradientView
Less banding, less drawing for All Apps Transition.

Bug: 63873246

Change-Id: I6c7c856e2939a10db7e44b266c1d6d51334fd152
2017-07-26 13:23:34 -07:00
Sunny Goyal
de57cafbb2 Removing some support lib dependencies
Change-Id: I028ed591cc9cf0af94fe6e09fadcd255f07cdee5
2017-06-09 08:42:49 -07:00
Sunny Goyal
8231596619 Updating the WallpaperManagerCompatVL to use JobSchedular instead of intent service
Bug: 62065291
Change-Id: I5872cea1b110268e9593eeb6397e94ecea1bc03d
2017-06-08 15:39:38 -07:00
Sunny Goyal
9d887a2c45 Adding a utility method for getting device prefs
Change-Id: I1e3c7df0a3f4e847b40d722d44890e441cc73509
2017-06-08 14:00:54 -07:00
Tony
f514f207c2 resolve merge conflicts of 629a67c5a to ub-launcher3-dorval-polish
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I5aed3f0c978976c499b532c816d81196cb11e3a1
2017-06-02 19:33:49 -07:00
Tony
629a67c5ac Migrate ColorExtractionService to JobService
IntentService cannot be run in the background, so moving to
JobService prevents us from crashing if the wallpaper is
changed while we aren't running.

Bug: 62065291
Change-Id: Ie0c887e36d0ced43a0b9ab8136bf55eb37697489
2017-06-02 18:21:05 -07:00
Sunny Goyal
368ae77201 Defining a dark theme for launcher
> Removing the code for LIGHT_STATUS_BAR as that will be controlled by the theme
> Updating icon cache to always use transparent background for low-res, as the
theme can change the bg color

Change-Id: Iab64ec29cab629ee515af22ec15b95d3f40a9df5
2017-05-24 14:34:04 -07:00
Sunny Goyal
0e947fbdbb Making some methods accessible
Bug: 37616877
Change-Id: I22ed43d9a39d321757d7c2fde7754b95a44780e2
2017-05-19 12:22:31 -07:00
Mario Bertschler
48198d004a All Apps transition with gradient and scrim.
The transition is behind a feature flag and
turned off by default.

Change-Id: I155840ba82b5a573d874376797db5f739a52d706
2017-05-03 10:32:57 -07:00
Mario Bertschler
c06af333cb Minor Refactoring only: no functional change
- organizing imports
- remove redundant modifiers on LauncherCallback interface
- fix typos

Change-Id: I61eb985cac7c1379b6b804a67d4f234386d3d1b4
2017-03-28 12:23:22 -07:00
Sunny Goyal
d23f37794f Merge "Removing the profile extra from intent and using the profile id from the profile column" into ub-launcher3-dorval
am: 77ff9a4343

Change-Id: Ib0cd8cb8f963b78a9cd53ed896aeb6e4f6163683
2017-03-21 23:21:26 +00:00
Sunny Goyal
24bb66a1c5 Removing the profile extra from intent and using the profile id from the profile column
The intent extra is not always correct as the profile id can change during backup restore.
This allows us to use a consistant behavior everywhere.

Change-Id: I004bd244204ca91758b1d42488e1fc13b0ccb998
2017-03-21 15:14:43 -07:00
Sunny Goyal
3d706ad703 Separating the config and flags in different directories so that
it is easier to override one or the other

Bug: 36001650
Change-Id: I713f4f5dbcf902614ce9f6c7a73bdace7bdf1ea0
2017-03-07 09:30:51 -08:00
Sunny Goyal
1f3f07d47c Simplifying some launcher themes
> Replacing some colors with theme attributes
> Simplifying styles definition by removing unnecessary inheritance and inlining some definitions

Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
2017-02-16 15:24:37 -08:00