Commit Graph

172 Commits

Author SHA1 Message Date
Pun Butrach
2fcaf0a5ec Don't call setAccessibilityPaneTitle when device is not at least Android 9 (#5603)
* Update WidgetsTwoPaneSheet.java

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

* Update PopupContainerWithArrow.java

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

* Update SplitInstructionsView.java

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

* Update TaskbarView.java

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

---------

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2025-07-14 14:19:58 +08:00
MrSluffy
65c4fe9b32 fixed build 2024-11-03 18:45:48 +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
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
MrSluffy
32700b0100 Merge branch 'android14-release' into 14-dev 2023-12-13 18:47:55 +08:00
MrSluffy
19bf26dd5a Merge branch 'aosp-13' into 13-wip 2023-10-21 09:52:01 +08:00
Charlie Anderson
d4eed6ec90 Merge "Fixes tests and issues when toggling new app shortcut popup flag." into tm-qpr-dev 2023-03-17 00:15:54 +00:00
Charlie Anderson
3a2a69ab3d Fixes tests and issues when toggling new app shortcut popup flag.
Bug: 247880037
Test: manually tested app popup. Also ran Launcher tests locally with U flag on/off.
Change-Id: I93c04f9715d583376c36d823c23353619afd26b6
2023-03-16 12:37:14 -04:00
Charlie Anderson
63be5b53db polish for the app shortcut popup, fixing padding on several elements.
Bug: 269343928
Test: manually verify against spec
Change-Id: Ib8dd7ab2778644e2220622d43f9774c1de6357e9
2023-03-14 11:33:38 -04:00
Charlie Anderson
5cb9961c28 Prevents an extra Widget shortcut from showing when popup receives update.
Bug: 247880037
Test: Tested manually on phone
Change-Id: I8e9827ac0bfac6161f8b81629a697d053970195b
2023-03-10 11:26:01 -05:00
Charlie Anderson
e3b583277c Merge "Fix bug by allowing popup notifications to be dismissed via swipe" into tm-qpr-dev 2023-03-08 16:48:26 +00:00
Charlie Anderson
5023c2f65b Fix bug by allowing popup notifications to be dismissed via swipe
Bug: 271218648
Test: manually tested swiping notifications
Change-Id: I3b522639c59b599a14922e4f93deb0e96addb8f8
2023-03-08 13:58:34 +00:00
Charlie Anderson
52caf63404 Fixes several Visual issues with the app shortcut popup
- Fix system shortcut alignment and ordering.
- Replace horizontal split icon with correct size drawable.
- Remove popup shortcut reversing logic, and instead show same order of shortcuts regardless of orientation.

Test: tested manually on tablet and phone
Bug:269343928
Change-Id: I1700ad1ee04abf0820c87d89e1dc07d6880fd519
2023-03-06 16:40:51 -05:00
Charlie Anderson
8ad9144ca2 adding the new Material U App Shortcut Popup design
Bug: 247880037
Test: tested manually
Change-Id: I66c291df54dfc2a76fc974082a19091deb167f73
2023-02-14 16:03:15 -05:00
Sunny Goyal
bbe956ef5f Removing ENABLE_LOCAL_COLOR_POPUPS feature flag
The feature has been disabled for a while and is not working correctly.
Also there is no UX plan to revisit this currently

Bug: 206508141
Bug: 259733681
Test: Presubmit
Change-Id: If1279c22b9d074592ba181c7caa0cf38f9cb842e
2022-11-21 10:21:45 -08:00
Suphon Thanakornpakapong
4a3ce2b120 Merge tag 'android-12.1.0_r8' into 12.1-dev 2022-06-22 16:31:57 +07:00
Patryk Michalik
1f5597a908 Update dependencies 2022-06-17 18:39:24 +02:00
Sebastian Franco
be7f84d5a1 Adding a case when there is only 1 system shortcut on the Popup Container
When there is only 1 system shortcut the Popup Container looks weird
because it shows the icon without text and it has a lot of space.

We already have a view to show the sorcuts with text and icons so I
reused that view and show it only if there is 1 system shortcut.

I also did a small refactor separating the sortcuts into
widgetShortcuts and nonWidgetShortcuts. The way I did it is not the
most efficient because it uses two passes, but I think it is easier to
read this way and we'll never have too many shortcuts.

Fix: 229356716
Test: Long press on the app icons in the workspace and in the
app drawer. Try different app some with one shortcut like the phone
app and some with multiple like.

Change-Id: Ie054af546758d0686914fc934772a76a3c690fe5
2022-06-02 11:59:17 -07:00
Yasan Ghaffarian
b2ea11ffb6 Lock homescreen when homescreen content is locked in prefs
Co-authored-by: Daria Hamrah Paytakht <info@dariarnd.ir>
2022-05-29 11:30:11 +04:30
Sunny Goyal
f0ff70a2a5 Adding support for easily extending Launcher DragAndDrop support
Bug: 232165524
Test: Verified locally
Change-Id: I3b4f37bc9914de55330662edd678e6fdd0eafece
2022-05-11 21:34:08 +00:00
Suphon Thanakornpakapong
e823ab05f6 Fix notification background 2022-05-10 15:58:01 +07:00
Suphon Thanakornpakapong
11e1a2fdc8 Merge remote-tracking branch 'aosp/android12L-release' into 12.1-dev 2022-05-08 20:29:17 +07:00
Tracy Zhou
c2538d748a Add originalView of the menu to SystemShortcut
Split from home animation needs to originate from the app icon instead of the menu item icon. This can be useful for other animations in the future.

Bug: 226395821
Test: N/A
Change-Id: If45d80e347ba275bd550b6acd6ad81b319e753a3
2022-04-11 17:13:35 -07:00
Sebastian Franco
dfa88d55f5 Make the widget option on the PopupContainer full width
The width of the PopupContainer grows if there are multiple
SystemShortcuts and we where not updating the width of all the
options.

Fix: 227538975
Test: Long press an app like Google Maps on the HomeScreen to see
the menu. All the options should have the same width.

Change-Id: I25310d74aa1af17be37b53c27d2334f86bef325a
2022-04-07 10:00:30 -07:00
Jon Miranda
10b5d68045 Avoid closing PopUpContainer immediately after view is clicked.
When an item is clicked, we start an app launch animation
from the icon in the container to the full app. The issue is that
we close the container too early, which causes a janky experience.

Tested that we already handle closing the container in all click
instances (ie. when launcher is in background).

Bug: 185510490
Test: click on all the different view types within PopupContainer
      ensure that the container does get closed via logs

Change-Id: I4fef24b911137d0abd24746fa49f466f5183176c
2022-03-29 11:12:48 -07:00
Brian Isganitis
221b2d7d5e [conflict] Merge changes from topic "presubmit-am-4c8411152aef49f099eee419e063b01e" into sc-v2-dev-plus-aosp am: 087e879b25
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16943984

Change-Id: I46336888da6b90649c6def8fbc10c8032f4f2821
2022-03-03 18:21:46 +00:00
Brian Isganitis
8aa4b05d22 Remove popup container drag listener on close complete.
Bug: 217162588
Test: Verified removal once drag is finished. Verified working on secondary display launcher.
Change-Id: I16515518c6d488b74450456306abbfff646ac11b
Merged-In: I16515518c6d488b74450456306abbfff646ac11b
2022-02-18 21:18:33 +00:00
Brian Isganitis
1f7afc7740 Remove popup container drag listener on close complete.
The drag listener is never removed causing a memory leak over time.

Bug: 217162588
Test: Verified removal once drag is finished and close complete is
called.

Change-Id: Iff7bac8724e76e5dec98edaffe2d8853516f6c87
2022-02-15 13:24:09 -08:00
Schneider Victor-tulias
a8dae26d39 Fix taskbar icon dragging issues
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in

Fixes: 215418478
Fixes: 214025075
Fixes: 210460544
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
(cherry picked from commit 312b68fde4)
Merged-In: I848138af28802f7d806708c77c25b8de307c70d8
2022-02-01 18:27:59 +00:00
Schneider Victor-tulias
312b68fde4 Fix taskbar icon dragging issues
- Fixed icons disappearing when initiating dragging
- Fixed incorrect icon location when initiating dragging after rotating the screen to an orientation other than what launcher started in

Fixes: 215418478
Fixes: 214025075
Test: dragged icons from the workspace and taskbar
Change-Id: I848138af28802f7d806708c77c25b8de307c70d8
2022-01-20 14:56:01 -08:00
Schneider Victor-tulias
5e91cbe069 Add shortcut drag/drop support to the taskbar.
- Added support for shortcut drag/drop
- Added support for popup menu shortcut drag/drop

Test: long pressed taskbar and launcher icons. long pressed taskbar and launcher shortcuts and popup menu shortcuts.
Fixes: 204453506
Bug: 198438631
Change-Id: I09cab335dcbb3a2bfa3020b21f4bcffff9c53e61
2021-11-30 13:52:55 -08:00
Schneider Victor-tulias
5173fd8090 Add notification dots and popup menu notification support to the taskbar.
- Added support for notification dots
- Added support for notifications in popup menu
- Added support for dismissing notifications from the popup menu

Bug: 198438631
Test: long pressed launcher and taskbar icons, clicked notifications, clicked shortcuts
Change-Id: I7c981e60a82b4d6ce28332d804bbbfb5eb89c6a8
2021-11-15 14:47:36 -08:00
Rajeev Kumar
5cc195f449 Merge "P2P App Sharing: Gray out disabled SystemShortcut" 2021-10-29 22:32:44 +00:00
Jon Spivack
688621498a P2P App Sharing: Gray out disabled SystemShortcut
The Share App system shortcut is disabled for apps that are deemed unshareable. This updates the UX to gray out the shortcut instead of hiding it. When the user clicks on the grayed out shortcut, a Toast message is displayed. This update also enables the shareability check.

In order to properly gray out the shortcut, this also fixes a bug with BubbleTextView in which ColorStateLists weren't applied correctly.

Bug: 202556634
Bug: 204495363
Test: Manual (observed UX on Wembley device in regular and dark themes)
Test: m -j RunLauncherGoGoogleRoboTests
Change-Id: Ieb04baf8c9cb9d325119cb97fceb96f2fc5a62ff
2021-10-28 19:30:31 -07:00
Schneider Victor-tulias
c1a99b8712 Merge "Generalize the icon popup menu types." into sc-v2-dev am: e9bd364390 am: e650a048fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16065857

Change-Id: Ibef5acdb235ff1b0f30dd18e90330584ec037fa1
2021-10-20 19:23:18 +00:00
Schneider Victor-tulias
16e04e29d2 Generalize the icon popup menu types.
Generalized popup menu types and logic to allow wider uses outside of launcher.

Bug: 198438631
Test: long pressed launcher icons and pressed menu options
Change-Id: Iadcbb1796496c0061dcee362784e426ff55dc94a
2021-10-19 16:06:16 -07:00
Suphon Thanakornpakapong
b63997c61d Also apply colors to shortcut ripples 2021-10-15 00:18:03 +07:00
Suphon Thanakornpakapong
47a10063f0 Theme ui elements using accent color palette 2021-10-14 23:57:17 +07:00
Brian Isganitis
c417a952db Merge "Have PopContainerWithArrow require BaseDraggingActivity." into sc-v2-dev am: e3b26d0102 am: f5b5785a35
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15984295

Change-Id: I7b251e9f122e1638ca516aaef58daf5068fcdee4
2021-10-07 19:44:06 +00:00
Brian Isganitis
6a1b0a5824 Have PopContainerWithArrow require BaseDraggingActivity.
Fix: 201978182
Test: No
Change-Id: I3ed46c07cce88b939d1a085ab62d5413ca217e5a
2021-10-05 14:38:14 -04:00
Brian Isganitis
285a1a7c9a Merge "Update arrow color after all notifications dismissed." into sc-v2-dev am: 3a91a6241f am: 52b9feb353
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15936544

Change-Id: Ie93b7aa71dbcd9545d2fc617101ed4a36db54742
2021-09-29 17:09:43 +00:00
Brian Isganitis
1e34f65395 Update arrow color after all notifications dismissed.
assignMarginsAndBackgrounds updates determines the new arrow color, but
it doesn't actually update it. That is normally done in
updateArrowColor.

Test: Icon menu arrow color changes to content above it after notification
dots dismissed.
Fix: 201458705

Change-Id: I5ee40b420b03c29c197983af5968d4f2902bc59b
2021-09-29 16:29:16 +00:00
Brian Isganitis
bea022197c Merge "Refactor arrow popups to allow easier code overriding and sharing." into sc-v2-dev am: 03be53443d am: 55626aedb4
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15897839

Change-Id: Ic51602d41a025986dfdf5b502609d5d23bd31bea
2021-09-27 19:06:42 +00:00
Brian Isganitis
a85ae69c72 Refactor arrow popups to allow easier code overriding and sharing.
Test: Existing menus work as intended.
Bug: 188222480
Change-Id: I7d19b06ce8bb7d765624c64c0042c4efd6faf348
2021-09-24 20:32:14 -04:00
Jon Spivack
b49500a09a Merge "P2P App Sharing: Add Shareability Cache" 2021-09-21 22:31:11 +00:00
Jon Spivack
89c21c77f5 P2P App Sharing: Add Shareability Cache
This update allows Launcher to check with an external API to determine whether apps
are shareable before displaying the Share App button. To prevent
extraneous calls to the API, the retrieved shareability data
are cached. A job is scheduled to update this cache once a week.

This feature can be toggled with the ENABLE_SHAREABILITY_CHECK flag in
AppSharing.java. It is currently disabled, as the Play API has only been
partially rolled out.

More details on the design are available at go/app-shareability-cache-design

Bug: 168831749
Test: manual (local Wembley device)
Test: m -j RunLauncherGoGoogleRoboTests ROBOTEST_FILTER="AppShareabilityManagerTest|AppSharingTest"
Change-Id: I971a3776e09b6842dedf315ec592317050dd6790
2021-09-20 17:11:04 -07:00
sfufa@google.com
78e7b24eb7 Restore hidden text on Popup close
When handleClose is called with no animation, overridden closeComplete gets fired before mOpen is set to false inside the super class. This results in getOpenView(launcher, TYPE_ACTION_POPUP) returning self and breaking text visibility restore.

Bug: 183713889
Test: Long press on allapps/workspace item to show PopUp under it; on popup open, capture screenshot, start a sharing activity, return to launcher and verify popup dismissed and text restored.
Change-Id: Iae8d2c73e4b7f57708468bf47bb0983a30ebbddc
2021-09-20 06:21:59 +00:00
Jon Miranda
f3bbd98bf8 Allow users to dismiss notifications in popup view.
Bug: 193014051
Test: - dismiss notifications (left/right)
      - open popup, dismiss notification from shade
        and ensure popup gets updates
      - open popup, trigger new notification
        and ensure popup gets updated

Change-Id: Iea4d458218cbf5cb22f5f89aa0a4cc1bee18cc73
2021-08-30 20:38:16 +00:00
Jon Miranda
313b2c2d28 Update notification popup UI.
- Update UI to match specs.
- Only shows one notification (removed footer, animation code)

Bug: 175329686
Bug: 190402054
Test: open popup, dismiss notification from shade,
      open popup, click on notification
      checked RTL

Change-Id: I92672f94233d986ae5b5c54979980967308cb156
2021-06-18 22:42:44 +00:00
Jon Miranda
229c4c3235 App Shortcut menu bug fixes and polish.
- Widget is its own item.
- Change order of icon order.
- Update grab handle colors

Bug: 188095695
Test: long press on apps with/without widgets, long press apps on workspace/
      all apps/search

Change-Id: Iabb9b4b3f3a928103b9d62601f22e74ef2325d7c
2021-06-15 18:59:51 -07:00