Commit Graph
87505 Commits
Author SHA1 Message Date
Anushree Ganjam eb5cb75753 Fix the Int value to reflect shared preferences value in TouchInteractionService.
This cl fixes following things

- When featureFlag is present, always read the value from FeatureFlag.get() instead of preferences.

- Add new function getIntFlagBackedUpByLauncherPrefs to read from sharedPreferences

- Make FlagTogglerPrefUi.java updateMenu() public

- When intFlag is modified in Developer Options, Apply button will show up. So launcher can restart and values get applied.

- Omnient Int flags will read from Featureflag.get() instead of shared preferences directly.

Bug: 320696242
Test: Manual
Flag: NA. Developer Options related

Change-Id: Id916b25d0397505d240ea8444d896c8ace826e57
2024-01-29 14:02:32 -08:00
Sunny Goyal ac1c83e657 Merge "Cleaning up release flag: ENABLE_ICON_LABEL_AUTO_SCALING" into main 2024-01-29 21:06:54 +00:00
Shamali Patwa fcb26c5ddf Merge "Fix crash in two pane paged view when work profile is used" into main 2024-01-29 20:59:05 +00:00
Shamali Patwa 279544e718 Merge "Add the testDragCustomShortcut back for phones." into main 2024-01-29 20:52:49 +00:00
Charlie Anderson 9147575693 Merge "Add unit tests to WorkspaceItemProcessor for processing apps" into main 2024-01-29 20:27:13 +00:00
MrSluffy e620e0a3fe Disable Device search by default 2024-01-30 03:50:48 +08:00
Shamali P 1f5a8e6ee1 Fix crash in two pane paged view when work profile is used
Looks like ag/25865281 updated widgets_two_pane_sheet_recyclerview.xml
but not widgets_two_pane_sheet_paged_view So, with work profile where
 widgets_two_pane_sheet_paged_view is used, it's crashing.

See https://b.corp.google.com/issues/322681099#comment9 for recording

Fix: 322681099
Test: Verify picker loads & scrolls with / without work profile.
Flag: NONE
Change-Id: If7969a70e1079ffff58ffbd0a90cbec34c6da2de
2024-01-29 19:43:39 +00:00
Ats Jenk d22d73a08c Send bubble bar bounds in display coordinates to wmshell
Bubble bar can be positioned to the left or right side of the screen.
Instead of sending offsets to wmshell, send the bounds of the bar, in
screen coordinates. WMShell can choose how to use that information.

Flag: LEGACY persist.wm.debug.bubble_bar DEVELOPMENT
Bug: 273310265
Test: repeat with LTR and RTL system languages:
  - have some bubbles, open an app, expand the bubbles by swiping up
    from bubble bar handle
  - have some bubbles, open an app, expand bubble bar by swiping up on
    navbar handle, tap on bubble bar to expand bubbles
  - have some bubbles, be on home screen, tap on bubble bar to expand a
    bubble

Change-Id: Id2d24831e567171b442ae7f34f055b7195a3e060
2024-01-29 11:32:20 -08:00
Federico Baron 8960937d47 Merge "Fix testDragToFolder test" into main 2024-01-29 19:27:24 +00:00
Sunny Goyal 7891425109 Cleaning up release flag: ENABLE_ICON_LABEL_AUTO_SCALING
Bug: 270393294
Flag: N/A
Test: N/A
Change-Id: Ied7e21150e8176f044615959d20e75bb1cad7dfa
2024-01-29 11:18:29 -08:00
Shamali P 458825a3fc Add the testDragCustomShortcut back for phones.
testDragCustomShortcut was ignored, but as discussed, enabling it for
phones - where the layout of picker is unchanged.

Bug: 322820039
Test: Un-ignoring the test
Flag: N/A
Change-Id: I3607812befc58c8a46b49a2587dfa6a1b572cd5b
2024-01-29 19:07:03 +00:00
Jagrut Desai ad37e4620c Merge "Fixing NullPointerException in TaskbarUIController" into main 2024-01-29 19:05:12 +00:00
Vadim Tryshev 9a94452dbc Verifying that keyguard is invisible before pressing Home in PortraitLandscapeRunner
Bug: 285935417
Test: presubmit
Flag: N/A
Change-Id: I8c525b99e7dc434f0b68aad59a18908f4253b29b
2024-01-29 11:00:55 -08:00
Shamali P c48c660bb5 Add a feature flag for displaying categorized widget recommendations.
Bug: 318410881
Test: NONE
Flag: ACONFIG com.android.launcher3.enable_categorized_widget_suggestions DEVELOPMENT
Change-Id: I6f8a0cc8f74823f1a29cef1b5f8ac0a3e9411609
2024-01-29 18:40:22 +00:00
Fengjiang Li fb147e122a Merge "Fix NPE of touch handling in StatusBarTouchController#onControllerInterceptTouchEvent" into main 2024-01-29 17:21:43 +00:00
Jagrut Desai 2fee4eb040 Fixing NullPointerException in TaskbarUIController
Test: Presubmit
Bug: 322617093
Flag: NONE
Change-Id: I648ff17bbc666f30bd43fdab3320d058ac9e1f9f
2024-01-29 08:52:16 -08:00
Alex Chau 40804529f8 Merge "Remove extra grid interpolator in TaskView" into main 2024-01-29 14:25:55 +00:00
Helen Cheuk 8ede3c7db6 Merge "Draw outline inside the view so it would not be cut off" into main 2024-01-29 14:00:28 +00:00
helencheuk 3d6c2d9bc0 Draw outline inside the view so it would not be cut off
Before: https://screenshot.googleplex.com/C2iwZxYV3KocTQq
After: https://screenshot.googleplex.com/BC9YYtm8GngssNF

Bug: 310953377
Test: Manual, navigate to the folder icon by keyboard, press enter to open and go to the bottom row app icon
Flag: ACONFIG com.android.launcher3.enable_focus_outline Staging
Change-Id: Iad5a081ef3838d2728f8845c4fa2ef726b2c781b
2024-01-29 12:15:22 +00:00
MrSluffy 61055a6785 Fixed hotseat icon crop swiping app to home
- Closes : #3939
2024-01-29 19:16:54 +08:00
Ivan Tkachenko b6fb50b676 Fix RemoteTargetGluer crash
- Updated DesktopVisibilityController to track the numer of visible
  freeform windows, and use it to initialize RemoteTargetGluer.
- Updated IDesktopTaskListener to observe visible freeform windows count
- Added resize remoteTargetHandles logic in RemoteTargetGLuer to update
  handles size with targets.apps.size on assign.
- This is a workaround and should be removed when RemoteTargetGLuer
  intialisation logic is refactored.

Bug: 288121021
Flag: None
Test: Manual
Change-Id: I0297616b4a140fac810c9736bddf6f817d0a98ed
2024-01-29 11:16:39 +00:00
MrSluffy 38ace537d4 Revert "Bring back widget open/closing transition"
This reverts commit 8b3be3640d.

reason : causing issue below U
2024-01-29 15:07:39 +08:00
MrSluffy efdebfc6b4 Fixed broken WallpaperDepth option
- Closes : #3932
2024-01-29 11:54:48 +08:00
MrSluffy 8b3be3640d Bring back widget open/closing transion 2024-01-29 11:17:12 +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
Bill Yi 0fb36489a9 [automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: ae233ec7f5 -s ours
am skip reason: contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/26006129

Change-Id: Ice25e4efbdae1072d05630454f97de551e0290bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-28 22:24:54 +00:00
Bill Yi 2ee336096c Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-01-28 20:57:58 +00:00
Bill Yi 9b8fb099a8 Merge "Import translations. DO NOT MERGE ANYWHERE" into main 2024-01-28 20:57:58 +00: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
Zongle Wang e6d7a43eeb Don't trim spaces in AOSP code 2024-01-28 15:36:46 +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
Anle Pan 97c45a0a26 Launcher3: Fix monkey crash in RecentsLaunchAnimator
It will appear a null object crash in quickstep launch
when monkey test. Althoough the 'View v' is declared as NonNull,
but there is a probability that it will return a null object
after the 'isTaskViewVisible' judgement in 'findTaskViewToLaunch',
Make a judgement before use to avoid crash.

Change-Id: I4606853325641feaf26a79791cce2514cee80d4c
Signed-off-by: Anle Pan <anle.pan@nxp.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-28 09:47:45 +08:00
ot_vishavjot.kaur 0681d1149d Launcher3: Fix launcher ui interface overlap and frozen problem
Press recent key and quickly click recent screen background, then
Recent List task doesn't disappear and overlaps on Homescreen.

When there is no time for Background State to change to Overview State, and gotoState(Normal) API is called, then let Background State transition to Normal state, and force Normal state to not transition to Overview state.

Bug: 287897684
Test: manually
1. Launch any app
2. Press Recent key
3. Click on same app task on recent list
4. Press Recent key
5. As soon as recent list appears, quickly click on background of Recent screen

Change-Id: I21f71a49cafe83bb8c916eb240d8db9246a13487
Signed-off-by: Dmitrii <bankersenator@gmail.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
nift4 d2bee69a0a Launcher3: disable live tile - fix blur flicker
As per minaripenguin's now reverted commits

Change-Id: I4fc0918e5b39d225e09841fb2dc53ff52df87932
2024-01-28 09:08:26 +08:00
Lawnchair BotandCrowdin Bot 0d0460d552 New Crowdin translations by GitHub Action (#4023)
Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2024-01-28 03:48:24 +03:30
MrSluffy ee62c87746 Re-apply stretch effect in allapps 2024-01-28 07:24:26 +08:00
Android Build Coastguard Worker 9047d3914b Snap for 11368906 from ea9522eee5 to 24Q2-release
Change-Id: I501e3ce49969f53ad23b124fc273eb3ef62c0579
2024-01-27 22:20:32 +00:00
Himanshu Gupta ea9522eee5 Merge "Adding Test Parameters to Asserts." into main 2024-01-27 04:39:08 +00:00
Goooler 7b3bb5bf3b Use gradle/actions/setup-gradle v3
https://github.com/gradle/gradle-build-action/releases/tag/v3.0.0-rc.1
2024-01-27 12:26:54 +08:00
Tracy Zhou b8bf90cd1f Merge "Init with mIsLumaSamplingEnabled = true" into main 2024-01-27 03:45:54 +00:00
Andy Wickham e608533c60 Merge "Account for tasks over splitscreen in RemoteTargetGluer" into main 2024-01-27 02:43:00 +00:00
Android Build Coastguard Worker 6a7eca72a0 Snap for 11367679 from 64af5ca348 to 24Q2-release
Change-Id: I90788a85fcb4b72a09ed2506e096ad44d3addb99
2024-01-27 02:20:34 +00:00
Fengjiang Li 87536679ce Fix NPE of touch handling in StatusBarTouchController#onControllerInterceptTouchEvent
Postsubmit passes: https://android-build.corp.google.com/builds/abtd/run/L20300030001590062

Test: presubmit
Flag: NONE
Fix: 282945183
Change-Id: Idcf87f8cd45350c4876ea8b1ae2dffa5127bf27f
2024-01-26 16:50:01 -08:00
Vinit Nayak e16edc943f Account for tasks over splitscreen in RemoteTargetGluer
* Previously we defaulted to 2 handles, but we didn't take into
account the posibility of having assistant showing a translucent
task on top of 2 apps. Or other tasks such as Home controls.
* We can scale down the number of handles we have from
initialization (as done in assignTargetsForSplitscreen), but it's
a bit harder to scale up. This is a separate, larger problem in
that the handles are created and needed before onAnimationStart(),
so Launcher doesn't know exactly how many handles are needed to be
created for the recents animation, that's determined by the actual
onAnimationStart() call itself.
* There's a small known bug only in the split case where one of
the tasks shows up over the assistant task, but can live with that
to minimize changes. (peanutbutter@ to clarify?)

Demo: https://drive.google.com/file/d/1hqipfdym_rRXFsAW932es7UdxTx66Zu4/view?usp=drive_link&resourcekey=0-Ri_Kl0xCNN3E81StTh4vxw

As you can see, Assistant translucent overlay seems to work well,
but there are still some glitches with Home controls. Specifically,
there is a flicker, sometimes followed by a black screen, when
returning to the split tasks with Home controls open on top. The
flicker also happens with Assistant, but I haven't seen the black
screen for that case yet. In any case, the crash is avoided, so...
progress? (Also these flickers/black screen happen for Home controls
even without splitscreen).

Original change by peanutbutter@: ag/24830632

Test: Tested assistant result tasks with fullscreen and splitscreen,
and by itself. Seems to animate fine. Also tested with Home controls,
which animates fine and avoids the crash, but still has some issues
when re-opening the tasks as described above.
Flag: NA
Bug: 321328009

Change-Id: I0aa04a6a14cf723b34431855483662039c96e553
2024-01-26 15:20:03 -08:00
Charlie Anderson ca6f66cd88 Add unit tests to WorkspaceItemProcessor for processing apps
- also slightly improve some log messages and simplify some code

Test: presubmit / unit tests
Flag: None
Bug: 294386159
Change-Id: I6f75c0d34bf475d4e20d6250f67a56d5394b9c4e
2024-01-26 15:42:51 -06:00