Commit Graph

17295 Commits

Author SHA1 Message Date
Zongle Wang a5b11e2c54 Make BaseActivity extends ComponentActivity (#4803)
We don't have to maintain ComponentActivity like behaviors in LawnchairLauncher anymore.
2024-09-14 09:26:57 +08:00
SlowNicoFish 7a5174d45f Made show scrollbar setting stick after opening search (#4724)
* Made show scrollbar setting stick after opening search

* Made show scrollbar setting stick after opening search
2024-08-26 22:04:48 +08:00
MrSluffy a96634f975 Fix resetting layout when changing grid
- Closes : #4506
2024-08-18 13:35:18 +08:00
MrSluffy fcef4a6d3e Add option folder background opacity
- Closes : #4522
2024-08-18 13:29:55 +08:00
MrSluffy a8055385bb Fixed null object treference on A10
- Closes : #4553
2024-08-18 12:26:49 +08:00
MrSluffy 93cb189b40 Align widget padding to icons 2024-08-17 09:12:50 +08:00
SuperDragonXD 376c279ed0 Fix horizontal drawer padding
This is a very temporary fix until we actually improve the behavior or responsive grid

Closes #4513
2024-08-06 21:15:32 +08:00
MrSluffy 90ecc23782 Initial implementation wallpaper blur 2024-07-28 18:46:37 +08:00
SuperDragonXD 5400863d16 Theme additional Launcher3 components 2024-06-26 20:42:59 +08:00
SuperDragonXD 8b5a81c5e7 Reorganize colorscheme files 2024-06-26 19:10:38 +08:00
SuperDragonXD 9aac523fc4 Reorganize and refactor strings.xml
This commit re-organizes `lawn/`'s `strings.xml` code files for clarity and also adds a simple naming scheme. The strings will probably be renamed soon, since I don't have the time to do all of that
2024-06-22 18:32:17 +08:00
MrSluffy 43a5cc7011 Fixed keyboard disappear on empty search
- Closes : #4095
2024-06-22 15:12:51 +08:00
John Andrew Camu 930d0e6cd7 Add Support for big screen (#4461)
* Initial Support for big screen

* Fixed regressions

* Don't recalculate when device isTablet
2024-06-22 12:58:43 +08:00
MrSluffy dfa7645f2c Add throwable error
- Closes : #4416
2024-06-08 09:02:13 +08:00
SuperDragonXD 9243b8ca56 Tweak search bar style to follow Launcher3 2024-04-29 16:42:04 +08:00
SuperDragonXD 7c34d0c160 Allow using twoline labels in allapps 2024-04-29 16:42:03 +08:00
SuperDragonXD 80cc919965 Theme additional widget components 2024-04-06 18:44:59 +08:00
Daniel Hauck 0390df7bfe Add options for unlimited and forced widget resize (#4170)
* Add option to make all widgets resizable.

* Split setting for unlimited size and forcing.

* Update labels and add description to settings.

* Fix build error.

---------

Co-authored-by: SuperDragonXD <70206496+SuperDragonXD@users.noreply.github.com>
2024-04-03 19:32:54 +08:00
SlowNicoFish 0ae0ce9ae1 Add an option to hide/show scrollbar in app drawer (#4090)
* Added option to hide/show scrollbar in app drawer (all apps)

* Update src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java

* Fix

* Requested changes from review
Removed description and moved prefs check

---------

Co-authored-by: Zongle Wang <wangzongler@gmail.com>
2024-02-23 15:52:21 +08:00
MrSluffy 84f47cd8f9 properly set position when toggle is off 2024-02-18 16:57:30 +08:00
MrSluffy 947a2a7128 fixed - overlap suggestion in all apps 2024-02-18 12:34:21 +08:00
MrSluffy eb472b2953 feat - Remember position
- Closes : #3958
2024-02-18 12:02:52 +08:00
MrSluffy b17a5b7fc4 fixed - hide drawer header placeholder when app search is disable
- Closes : #4011
2024-02-17 20:06:19 +08:00
SuperDragonXD f686b13f8b Re-theme Launcher3 components (#4068)
There were some themes that were remove during the 14 and 13 merge. This commit attempt to fix it.

---------

Co-authored-by: John Andrew Camu <werdna.jac@gmail.com>
2024-02-11 09:00:46 +08:00
Goooler 058e69c3ff Revert format changes in FeatureFlags 2024-02-09 09:46:41 +08:00
Goooler e20638aa2c Revert format changes 2024-02-09 09:08:40 +08:00
MrSluffy c0a7860045 Fix conflicts 2024-02-09 07:45:04 +08:00
Goooler aa2f7086ea Merge tag 'android-14.0.0_r28' into android-14.0.0_r28
Android 14.0.0 Release 28 (UP1A.231105.001.B2)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZcKIlAAKCRDorT+BmrEO
# eBpvAJ4nxs3kcAIk4V/imBoX2pQFBOJYCACfUgnHI+9dgPBM5yKFzN/Hm/DhrDs=
# =avdO
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Feb  7 03:29:24 2024 CST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Can't check signature: No public key

# Conflicts:
#	lawnchair/res/color/widgets_picker_scrim.xml
#	quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
#	quickstep/src/com/android/launcher3/taskbar/NavbarButtonsViewController.java
#	quickstep/src/com/android/launcher3/taskbar/TaskbarLauncherStateController.java
#	quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java
#	quickstep/src/com/android/quickstep/TaskAnimationManager.java
#	quickstep/src/com/android/quickstep/TaskViewUtils.java
#	quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
#	src/com/android/launcher3/config/FeatureFlags.java
#	src/com/android/launcher3/folder/LauncherDelegate.java
2024-02-08 22:44:10 +08:00
Pun Butrach 6e8cad97bb Add toggleable material u popup (#4034)
* Toggleable new bouncy consolidated popup (MATERIAL_U_POPUP)
* Fix typo in calling PreferenceManager2
* Import FeatureFlags
* Get ctx in SDL
* Get ctx instead of this
* Correct type for context
* Import Context
* insert commit message here!
* I forgot I can just apply this neatly trick after looking at the code for 5 secounds
* Move to appropriate category

Co-authored-by: MrSluffy <werdna.jac@gmail.com>
2024-01-31 08:51:54 +08:00
MrSluffy 385e4ad782 Make toggleable Dot pagination
- Closes #3814
2024-01-30 12:28:17 +08:00
MrSluffy 329147fb9f Bring back app notif dot color
- Closes #3816
2024-01-30 11:04:31 +08:00
MrSluffy 61055a6785 Fixed hotseat icon crop swiping app to home
- Closes : #3939
2024-01-29 19:16:54 +08:00
John Andrew Camu dec3850d2b Don't continue adding if appwidget provider does not met (#4013)
Lawnchair (Debug) bug report Jan 26, 2024 08:39:37
version: 14 Dev (#397) (14)
commit: 0312589
build.brand: samsung
build.device: a13
build.display: TP1A.220624.014.A135FXXS5CWJ1
build.fingerprint: samsung/a13nnxx/a13:13/TP1A.220624.014/A135FXXS5CWJ1:user/release-keys
build.hardware: exynos850
build.id: TP1A.220624.014
build.manufacturer: samsung
build.model: SM-A135F
build.security.level: 2023-10-01
build.product: a13nnxx
build.type: user
version.codename: REL
version.incremental: A135FXXS5CWJ1
version.release: 13
version.sdk_int: 33
display.density_dpi: 420
isRecentsEnabled: true

error: Uncaught exception

java.lang.NullPointerException: Attempt to read from field 'android.content.ComponentName android.appwidget.AppWidgetProviderInfo.provider' on a null object reference in method 'void com.android.launcher3.Launcher.completeAddAppWidget(int, com.android.launcher3.model.data.ItemInfo, android.appwidget.AppWidgetHostView, com.android.launcher3.widget.LauncherAppWidgetProviderInfo)'
	at com.android.launcher3.Launcher.completeAddAppWidget(Launcher.java:1540)
	at com.android.launcher3.Launcher.lambda$completeTwoStageWidgetDrop$4(Launcher.java:1076)
	at com.android.launcher3.Launcher.$r8$lambda$HrxqTqYL9MXyAX5QkHjDnruo6Sc(Unknown Source:0)
	at com.android.launcher3.Launcher$$ExternalSyntheticLambda9.run(Unknown Source:8)
	at com.android.launcher3.Workspace$5.run(Workspace.java:3199)
	at com.android.launcher3.anim.AnimatorListeners$1.onAnimationEnd(AnimatorListeners.java:54)
	at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:600)
	at android.animation.AnimatorSet.endAnimation(AnimatorSet.java:1301)
	at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1086)
	at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:307)
	at android.animation.AnimationHandler.-$$Nest$mdoAnimationFrame(Unknown Source:0)
	at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:86)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1299)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
	at android.view.Choreographer.doCallbacks(Choreographer.java:923)
	at android.view.Choreographer.doFrame(Choreographer.java:847)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:226)
	at android.os.Looper.loop(Looper.java:313)
	at android.app.ActivityThread.main(ActivityThread.java:8757)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
2024-01-29 09:07:11 +08:00
MrSluffy 77c2b5099e Fixed configuring widget in A10
Lawnchair (Debug) bug report Jan 28, 2024 4:43:00 PM
version: 14 Dev (b585d3f) (14)
commit: b585d3f
build.brand: Xiaomi
build.device: vince
build.display: QQ3A.200805.001
build.fingerprint: google/angler/angler:7.1.2/N2G47H/3783593:user/release-keys
build.hardware: qcom
build.id: QQ3A.200805.001
build.manufacturer: Xiaomi
build.model: Redmi 5 Plus
build.security.level: 2023-04-05
build.product: qassa_vince
build.type: user
version.codename: REL
version.incremental: 92d526381b
version.release: 10
version.sdk_int: 29
display.density_dpi: 440
isRecentsEnabled: true

error: Uncaught exception

java.lang.NoSuchMethodError: No virtual method setPendingIntentBackgroundActivityStartMode(I)Landroid/app/ActivityOptions; in class Landroid/app/ActivityOptions; or its super classes (declaration of 'android.app.ActivityOptions' appears in /system/framework/framework.jar)
	at com.android.launcher3.widget.LauncherWidgetHolder.getConfigurationActivityOptions(LauncherWidgetHolder.java:299)
	at com.android.launcher3.widget.LauncherWidgetHolder.startConfigActivity(LauncherWidgetHolder.java:261)
	at com.android.launcher3.AppWidgetResizeFrame.lambda$setupForWidget$1(AppWidgetResizeFrame.java:255)
	at com.android.launcher3.AppWidgetResizeFrame.$r8$lambda$Qz8LgkHxjFnttBxFiB7ge472N5c(Unknown Source:0)
	at com.android.launcher3.AppWidgetResizeFrame$$ExternalSyntheticLambda3.onClick(Unknown Source:2)
	at android.view.View.performClick(View.java:7266)
	at android.view.View.performClickInternal(View.java:7243)
	at android.view.View.access$3600(View.java:801)
	at android.view.View$PerformClick.run(View.java:27904)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7396)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2024-01-28 17:26:14 +08:00
Zongle Wang b555fcf237 Don't handle shortcuts dropping after home screen locked (#4026)
Fix crashing:
```
Process: ch.deletescape.lawnchair.plah, PID: 26755
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.launcher3.dragndrop.DragView.animateShift(int, int)' on a null object reference
    at com.android.launcher3.popup.PopupContainerWithArrow$LauncherPopupItemDragHandler.onLongClick(PopupContainerWithArrow.java:827)
    at android.view.View.performLongClickInternal(View.java:7586)
    at android.view.View.performLongClick(View.java:7544)
    at android.widget.TextView.performLongClick(TextView.java:12974)
    at android.view.View.performLongClick(View.java:7562)
    at android.view.View$CheckForLongPress.run(View.java:29292)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7872)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
```
2024-01-28 15:59:51 +08:00
Tommy Webb ecbad471be Skip glitchy search animation
* Entering and leaving search now takes effect right away.
* Should fix race in which tapping an app while search results are
  loading causes a tap on the previous app in the position, rather
  than on the search result.
* Helps prevent the scrollbar from appearing to be scrolled down
  somewhat when leaving search with floating header rows present;
  still happens sometimes, though (on stock OS launcher, too).

Change-Id: I67bc59456eb2e57e13b1b99509d3313ff0243b88
2024-01-28 15:52:29 +08:00
MrSluffy 05832f1323 Clean up 2024-01-28 15:38:35 +08:00
yingrenw b585d3fa64 Launcher3: Stability NullPointer issue
Description:
Compute a child location by recursion, it
may not have parent view.

When the child doesn't have parent, should
break the recursive.

Change-Id: I8707712b85c10bf1c1d3860c5b8323aefd455cf2
CRs-Fixed: 1104931
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Mohammad Hasan Keramat J <ikeramat@protonmail.com>
2024-01-28 09:47:45 +08:00
Tommy Webb 82d92410ac Fix launching widget configuration
Background activity launch (BAL) hardening in Android 14 prevents the
creation of widgets if background launching isn't explicitly allowed
for the widget configuration activity.

Issue: calyxos#1917
Change-Id: Ic8696154bab49de78d1554d61a64b634766ae469
2024-01-28 09:47:45 +08:00
Ido Ben-Hur 589193ba19 IconPalette: Don't crash when the app gives us an invalid color
For notification background. Telegram does it for example.
Just assume contrast is fine in this case.

Log:
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.android.launcher3, PID: 2885
E AndroidRuntime: java.lang.IllegalArgumentException: background can not be translucent: #0
E AndroidRuntime:        at androidx.core.graphics.ColorUtils.calculateContrast(ColorUtils.java:161)
E AndroidRuntime:        at com.android.launcher3.graphics.IconPalette.findContrastColor(IconPalette.java:126)
E AndroidRuntime:        at com.android.launcher3.graphics.IconPalette.ensureTextContrast(IconPalette.java:112)
E AndroidRuntime:        at com.android.launcher3.graphics.IconPalette.resolveContrastColor(IconPalette.java:71)
E AndroidRuntime:        at com.android.launcher3.notification.NotificationInfo.getIconForBackground(NotificationInfo.java:124)
E AndroidRuntime:        at com.android.launcher3.notification.NotificationMainView.applyNotificationInfo(NotificationMainView.java:207)
E AndroidRuntime:        at com.android.launcher3.notification.NotificationContainer.applyNotificationInfos(NotificationContainer.java:156)
E AndroidRuntime:        at com.android.launcher3.popup.PopupContainerWithArrow.applyNotificationInfos(PopupContainerWithArrow.java:353)
E AndroidRuntime:        at com.android.launcher3.popup.PopupPopulator.lambda$createUpdateRunnable$1(PopupPopulator.java:150)
E AndroidRuntime:        at com.android.launcher3.popup.PopupPopulator$$ExternalSyntheticLambda0.run(Unknown Source:4)
...

Signed-off-by: Omkar Chandorkar <gotenksIN@aosip.dev>
Change-Id: I15e61c0610d2676467b57e636454b36aa628007e
2024-01-28 09:40:09 +08:00
MrSluffy ee62c87746 Re-apply stretch effect in allapps 2024-01-28 07:24:26 +08:00
John Andrew Camu c31b41ae73 QuickSwitch Compat Q to U (#3948)
Initial support quickstep, Android versions from Q to U, ensuring a smooth and efficient user experience. Enjoy effortless navigation and swift app switching on your Android device with QuickSwitch's compatibility across the Q, R, S, T, and U.


Co-authored-by: Goooler <wangzongler@gmail.com>
Co-authored-by: 无言 <57122860+liu-wanshun@users.noreply.github.com>
2024-01-26 05:59:47 +08:00
MrSluffy f63aa1e315 Add Edit mode option 2024-01-25 13:44:53 +08:00
John Andrew Camu 57f25964d1 Re-Implement Top Shadow (#3952)
- Faulty merge A14
2024-01-10 09:42:43 +08:00
MrSluffy 32922a2e02 Fix conflicts 2024-01-08 16:03:01 +08:00
Anushree Ganjam 3269857e66 [DO NOT MERGE] Change the LPNH flag to read from server flag "ENABLE_LONG_PRESS_NAV_HANDLE_MPR".
Flag: ENABLE_LONG_PRESS_NAV_HANDLE_MPR
Test: Manual
Bug: 309689303
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:75183ceed565aca0174e4e9707d6cb59dea2fce5)
Merged-In: Ib695b3d6ac3f40ee53b6b64bb6b121e7b34d4b07
Change-Id: Ib695b3d6ac3f40ee53b6b64bb6b121e7b34d4b07

This cherry-picks e4de57a662.
2024-01-08 14:50:06 +08:00
Goooler 20c884d972 Merge tag 'android-14.0.0_r21' into 14-dev-merge-launcher3
https://android.googlesource.com/platform/packages/apps/Launcher3/+/refs/tags/android-14.0.0_r21

Android 14.0.0 release 21
2024-01-08 14:45:36 +08:00
John Andrew Camu 59ecfea78d Fixed weird NPE in some oem adding widget (#3931) 2024-01-02 10:29:05 +08:00
John Andrew Camu abfc4e18b1 Allow placing widget in hotseat (#3930) 2024-01-02 09:23:33 +08:00
MrSluffy f792ed7aae Update marginMultiplier calculation for better tablet responsiveness 2023-12-29 14:35:14 +08:00