Commit Graph

9843 Commits

Author SHA1 Message Date
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
nift4
3a8b541580 Launcher3: Disable live tile
Method as per Google commit 25399db1e7
("[DO NOT MERGE] Disable live tile in split mode for S").

Live tile has a LOT of bugs even in AOSP and Pixel stock ROMs:
* Alpha animation randomly not applying causing app to get stuck
* X/Y translation not applying causing app to get stuck
* Causes extreme jank (enable HWUI bars and swipe in recents...)
* Sidescroll tile minimization cuts off content instead of shrinking it.
* Screenshotting a sidescolled live tile causes it to become invisible.

Combined with our blur/transparency changes:
* The tile doesn't actually shrink because Google just draws background
  over the tile instead of shrinking it...
* The tile gets blurred which has to be fixed in very hacky ways,
  because it is on a very low layer, which is below the blur
...the end result is a total mess.
Kill this feature, and revisit fixing our issues once Google gets their
own shit together.

Change-Id: I33e6dab845b2147fd72fe0fb4c151e78035560ec
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-26 12:00:31 +08:00
nift4
9c3b7fe743 Launcher3: Ensure to update cached thumbnail if we take new one
This fixes a bug, which became obvious thanks to disabled live tile, but
has already existed before, where recents jumps to using last snapshot
instead of the correct/current one once you fling, because thumbnails
were cached but the cache had not been updated in this codepath.

Change-Id: Ie7afe56b6e0aecaae2510248c5887873800a0b51
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2024-01-26 12:00:14 +08:00
Pranav Vashi
30f77e5f43 Reland 'Launcher3: Fix blurry recents issue with live tile'
* Issue description: https://github.com/LawnchairLauncher/lawnchair/issues/2762

mnri: this reduces the occurences of the taskview getting stucked after swipe up gesture

Change-Id: I363f4ace8b2bde2bc4ed6e6f7f608b850e0359f8
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
Signed-off-by: Dmitrii <bankersenator@gmail.com>
2024-01-26 11:58:16 +08:00
nift4
0312589cf5 Launcher3: Fix overview scrolling scale animation
Adapt it for Live Tile support + fix landscape handling

Change-Id: I1cf5d79aa6373e836d33bc7ddb15c0c5258a63d7
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
2024-01-26 06:26:47 +08:00
LibXZR
6fc64ce9b7 Launcher3: Introduce overview scrolling scale animation
This vivid animation enables users to perceive more clearly
about the switching of the task cards.

Note that live tile feature is disabled because it is not
compatible with this animation. Also live tile is causing
notable performance regression, which is not worth relative
to its function.

Change-Id: Ie1350d6bda2d311f70f9be7cff47b0abe7e00cad
Signed-off-by: LibXZR <i@xzr.moe>

Fix discontinuous animation when dismissing taskcards on
 the right side

Cards should never be scale down in this animation.

Change-Id: I759492390eb8f1a2b9023c2d264f0e7191b17108
Signed-off-by: LibXZR <i@xzr.moe>

Recalculate scroll scale on layout

Edge case exist that when there's only one task,
onScrollChanged() won't be called so the last scale
from the recycled view is showed, leading to wrong
display size.

Change-Id: If8a189ba6b854ed486283d43b8a0ac3e4bb4e9f2
Signed-off-by: LibXZR <i@xzr.moe>

Change-Id: I5056c51f823788a45683c23fa710975d9ae7fe7e
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
2024-01-26 06:25:56 +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
32922a2e02 Fix conflicts 2024-01-08 16:03:01 +08:00
Tony Wickham
0c4e271bd8 Fix 3 button mode issues in AllSetActivity
- Set system bars appearance to light/dark depending on device
  theme to ensure visibility
- Also fix issue where taskbar icons would appear partially
  offscreen and prevent pressing nav buttons if you rotated

Fixes: 293438087
Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
  - Skip to the end (AllSetActivity), and ensure 3 buttons are visible
  - Rotate device and ensure 3 buttons are still visible and functional
  - Will also flash / wipe to the build once it's created
Flag: None
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:286fc215e632280fe0b401bfd713621104861288)
Merged-In: Ie2d9bf1e1d95a6ccbd1f9c592adb51390b21ad85
Change-Id: Ie2d9bf1e1d95a6ccbd1f9c592adb51390b21ad85

This cherry-picks from fa65485109.
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
MrSluffy
5297d83ce4 Fixed No virtual method setRemoteTransition
Lawnchair (Debug) bug report Dec 19, 2023 23:11:30
version: 14 Dev (#199) (14)
commit: 53a1dd0
build.brand: OnePlus
build.device: OnePlus7
build.display: UQ1A.231205.014 release-keys
build.fingerprint: OnePlus/yaap_guacamoleb/OnePlus7:14/UQ1A.231205.014/eng.ido.20231218.155325:user/release-keys
build.hardware: qcom
build.id: UQ1A.231205.014
build.manufacturer: OnePlus
build.model: GM1903
build.security.level: 2023-12-05
build.product: yaap_guacamoleb
build.type: user
version.codename: REL
version.incremental: eng.ido.20231218.155325
version.release: 14
version.sdk_int: 34
display.density_dpi: 403
isRecentsEnabled: true

error: Uncaught exception

java.lang.NoSuchMethodError: No virtual method setRemoteTransition(Landroid/window/RemoteTransition;)V in class Landroid/app/ActivityOptions; or its super classes (declaration of 'android.app.ActivityOptions' appears in /system/framework/framework.jar)
	at com.android.launcher3.uioverrides.ApiWrapper.createFadeOutAnimOptions(ApiWrapper.java:70)
	at com.android.launcher3.dragndrop.AddItemActivity.onLongClick(AddItemActivity.java:262)
	at android.view.View.performLongClickInternal(View.java:7740)
	at android.view.View.performLongClick(View.java:7696)
	at android.view.View.performLongClick(View.java:7714)
	at android.view.View$CheckForLongPress.run(View.java:30126)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8195)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:554)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
2023-12-20 12:29:29 +08:00
Suphon Thanakornpakapong
e50e2e8231 Bring back status bar expansion for non-quickstep 2023-12-18 10:42:04 +07:00
MrSluffy
be01a70323 Fixed No method for some stock oem
Lawnchair (Debug) bug report 17-Dec-2023 1:28:22 pm
version: 14 Dev (#97) (13)
commit: c5fd2ac
build.brand: motorola
build.device: dubai
build.display: T1RD33.116-33-13
build.fingerprint: motorola/dubai_g/dubai:13/T1RD33.116-33-13/441420-2d5de8:user/release-keys
build.hardware: qcom
build.id: T1RD33.116-33-13
build.manufacturer: motorola
build.model: motorola edge 30
build.security.level: 2023-10-01
build.product: dubai_g
build.type: user
version.codename: REL
version.incremental: 441420-2d5de8
version.release: 13
version.sdk_int: 33
display.density_dpi: 400
isRecentsEnabled: false

error: Uncaught exception

java.lang.NoSuchMethodError: No virtual method getActivityOverrides()Ljava/util/Map; in class Landroid/content/pm/LauncherApps; or its super classes (declaration of 'android.content.pm.LauncherApps' appears in /system/framework/framework.jar)
	at com.android.launcher3.uioverrides.ApiWrapper.getActivityOverrides(ApiWrapper.java:55)
	at com.android.launcher3.AutoInstallsLayout.<init>(AutoInstallsLayout.java:208)
	at com.android.launcher3.AutoInstallsLayout.<init>(AutoInstallsLayout.java:187)
	at com.android.launcher3.AutoInstallsLayout.get(AutoInstallsLayout.java:122)
	at com.android.launcher3.model.ModelDbController.loadDefaultFavoritesIfNecessary(ModelDbController.java:381)
	at com.android.launcher3.model.LoaderTask.loadWorkspaceImpl(LoaderTask.java:376)
	at com.android.launcher3.model.LoaderTask.loadWorkspace(LoaderTask.java:348)
	at com.android.launcher3.model.LoaderTask.run(LoaderTask.java:211)
	at android.os.Handler.handleCallback(Handler.java:984)
	at android.os.Handler.dispatchMessage(Handler.java:104)
	at android.os.Looper.loopOnce(Looper.java:238)
	at android.os.Looper.loop(Looper.java:357)
	at android.os.HandlerThread.run(HandlerThread.java:85)
2023-12-18 07:17:34 +08:00
Rafael de Moura Dev
c6f9bc7be0 Fix Crash on A9 - LC14 (#3871)
* Fix Crash on A9 - LC14 (#1)

* Update VibratorWrapper.java

* Update VibratorWrapper.java

* Update RecentsAnimationDeviceState.java

* Update MotionEventsUtils.java

* Update NoButtonQuickSwitchTouchController.java

* Update MotionEventsUtils.java

* Update Workspace.java

* Update NoButtonQuickSwitchTouchController.java

Remove added check no longer needed

* Update MotionEventsUtils.java

* Update Workspace.java

remove extra check added just now

* Update ApiWrapper.java

fix this issue when when changing the number of lines and columns of home screen grid

```
error: Uncaught exception

java.lang.NoSuchMethodError: No virtual method getActivityOverrides()Ljava/util/Map; in class Landroid/content/pm/LauncherApps; or its super classes (declaration of 'android.content.pm.LauncherApps' appears in /system/framework/framework.jar)
	at com.android.launcher3.uioverrides.ApiWrapper.getActivityOverrides(ApiWrapper.java:55)
	at com.android.launcher3.AutoInstallsLayout.<init>(AutoInstallsLayout.java:208)
	at com.android.launcher3.AutoInstallsLayout.<init>(AutoInstallsLayout.java:187)
	at com.android.launcher3.DefaultLayoutParser.<init>(DefaultLayoutParser.java:57)
	at com.android.launcher3.model.ModelDbController.getDefaultLayoutParser(ModelDbController.java:494)
	at com.android.launcher3.model.ModelDbController.loadDefaultFavoritesIfNecessary(ModelDbController.java:396)
	at com.android.launcher3.model.LoaderTask.loadWorkspaceImpl(LoaderTask.java:376)
	at com.android.launcher3.model.LoaderTask.loadWorkspace(LoaderTask.java:348)
	at app.lawnchair.views.LauncherPreviewView$loadModelData$1.run(LauncherPreviewView.kt:101)
	at app.lawnchair.views.LauncherPreviewView.loadModelData(LauncherPreviewView.kt:111)
	at app.lawnchair.views.LauncherPreviewView.$r8$lambda$9n1GudRhfMpYAkR1-vecefjJG-A(Unknown Source:0)
	at app.lawnchair.views.LauncherPreviewView$$ExternalSyntheticLambda2.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:205)
	at android.os.HandlerThread.run(HandlerThread.java:65)

```
2023-12-18 05:17:35 +08:00
MrSluffy
4276067c6c Bring back OnBackPressedHandler
- Bring back OnBackPressedHandler so we can support lower version

TODO : Recreate OnBackAnimationCallback
2023-12-16 18:59:08 +08:00
MrSluffy
cc8f9828ab Merge branch 'heads/android-14.0.0_r18' into 14-dev 2023-12-16 17:18:13 +08:00
MrSluffy
32700b0100 Merge branch 'android14-release' into 14-dev 2023-12-13 18:47:55 +08:00
John Andrew Camu
5931c9afec Fix crash a9 (#3836)
* Fix crash on Android 9 (#3808)

- Initial support for A9


Co-authored-by: John Andrew Camu <werdna.jac@gmail.com>
Co-authored-by: Rafael de Moura Dev <93414086+Rafael2616@users.noreply.github.com>
2023-12-09 14:13:47 +08:00
John Andrew Camu
4402ef1bf3 another fixed oneui 11 (#3810)
android.view.InflateException: Binary XML file line #25 in app.lawnchair.debug:layout/task_desktop: Resource ID #0x106002f
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x106002f
	at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:255)
	at android.content.res.Resources.getColor(Resources.java:1169)
	at com.android.quickstep.views.DesktopTaskView.onFinishInflate(DesktopTaskView.java:124)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1134)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
	at com.android.launcher3.util.ViewPool.inflateNewView(ViewPool.java:106)
	at com.android.launcher3.util.ViewPool.lambda$initPool$1(ViewPool.java:69)
	at com.android.launcher3.util.ViewPool.$r8$lambda$wSRnQcMZiOmM7xwf4gm88rNehhg(Unknown Source:0)
	at com.android.launcher3.util.ViewPool$$ExternalSyntheticLambda1.run(Unknown Source:8)
	at java.lang.Thread.run(Thread.java:923)
2023-12-01 18:09:30 +08:00
Goooler
b7a32a0711 Add a switch to control suggested apps showing (#3803) 2023-12-01 14:49:17 +08:00
John Andrew Camu
ffacafc22c Revert back configs (#3802) 2023-12-01 06:33:12 +08:00
Goooler
2c8539c8f0 Catch RemoteAnimationTarget.rotationChange (#3776) 2023-11-27 10:42:32 +08:00
John Andrew Camu
e994660cb0 Patches for crashes in Android Q, R and S (#3728)
* Initial Patches for to support Q,R and S

- TODO create Widget Factory Holder

* Remove tracing

* Fixed Resources$NotFoundException

Lawnchair (Debug) bug report 15-Nov-2023 2:32:03 pm
version: 13 Dev (#2291) (13)
commit: c5bed50
build.brand: samsung
build.device: m30s
build.display: RP1A.200720.012.M307FXXS4CWC2
build.fingerprint: samsung/m30sdd/m30s:11/RP1A.200720.012/M307FXXS4CWC2:user/release-keys
build.hardware: exynos9611
build.id: RP1A.200720.012
build.manufacturer: samsung
build.model: SM-M307F
build.product: m30sdd
build.type: user
version.codename: REL
version.incremental: M307FXXS4CWC2
version.release: 11
version.sdk_int: 30
display.density_dpi: 420
isRecentsEnabled: false

error: Uncaught exception

android.view.InflateException: Binary XML file line #27 in app.lawnchair.debug:layout/task_desktop: Resource ID #0x106002f
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x106002f
	at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:255)
	at android.content.res.Resources.getColor(Resources.java:1169)
	at com.android.quickstep.views.DesktopTaskView.onFinishInflate(DesktopTaskView.java:124)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1134)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
	at com.android.launcher3.util.ViewPool.inflateNewView(ViewPool.java:106)
	at com.android.launcher3.util.ViewPool.lambda$initPool$1(ViewPool.java:69)
	at com.android.launcher3.util.ViewPool.$r8$lambda$wSRnQcMZiOmM7xwf4gm88rNehhg(ViewPool.java:0)
	at com.android.launcher3.util.ViewPool$$ExternalSyntheticLambda1.run(R8$$SyntheticClass:0)
	at java.lang.Thread.run(Thread.java:923)

* Fix java.lang.NoClassDefFoundError OnBackInvokedCallback$Stub

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/IOnBackInvokedCallback$Stub;
                                                                                                    	at com.android.launcher3.QuickstepTransitionManager.<init>(QuickstepTransitionManager.java:265)
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.buildAppTransitionManager(QuickstepLauncher.java:302)
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.setupViews(QuickstepLauncher.java:236)
                                                                                                    	at app.lawnchair.LawnchairLauncher.setupViews(LawnchairLauncher.kt:244)
                                                                                                    	at com.android.launcher3.Launcher.onCreate(Launcher.java:518)
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.onCreate(QuickstepLauncher.java:527)
                                                                                                    	at app.lawnchair.LawnchairLauncher.onCreate(LawnchairLauncher.kt:186)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8057)
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8037)
                                                                                                    	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341)
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688)
                                                                                                    	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864)
                                                                                                    	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7870)
                                                                                                    	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:1003)
                                                                                                    Caused by: java.lang.ClassNotFoundException: Didn't find class "android.window.IOnBackInvokedCallback$Stub" on path: DexPathList[[zip file "/data/app/~~xd_Rtvu8nzsZdmkjP4cE7A==/app.lawnchair.debug-LCjip_oNAIceiLCO_DoA3g==/base.apk"],nativeLibraryDirectories=[/data/app/~~xd_Rtvu8nzsZdmkjP4cE7A==/app.lawnchair.debug-LCjip_oNAIceiLCO_DoA3g==/lib/arm64, /data/app/~~xd_Rtvu8nzsZdmkjP4cE7A==/app.lawnchair.debug-LCjip_oNAIceiLCO_DoA3g==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64, /system/product/lib64]]
                                                                                                    	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:218)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                                                                                                    	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                                                                    	at com.android.launcher3.QuickstepTransitionManager.<init>(QuickstepTransitionManager.java:265) 
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.buildAppTransitionManager(QuickstepLauncher.java:302) 
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.setupViews(QuickstepLauncher.java:236) 
                                                                                                    	at app.lawnchair.LawnchairLauncher.setupViews(LawnchairLauncher.kt:244) 
                                                                                                    	at com.android.launcher3.Launcher.onCreate(Launcher.java:518) 
                                                                                                    	at com.android.launcher3.uioverrides.QuickstepLauncher.onCreate(QuickstepLauncher.java:527) 
                                                                                                    	at app.lawnchair.LawnchairLauncher.onCreate(LawnchairLauncher.kt:186) 
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8057) 
                                                                                                    	at android.app.Activity.performCreate(Activity.java:8037) 
                                                                                                    	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1341) 
                                                                                                    	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3688) 
                                                                                                    	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3864) 
                                                                                                    	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) 
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2253) 
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106) 
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201) 
                                                                                                    	at android.os.Looper.loop(Looper.java:288) 
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7870) 
                                                                                                    	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:1003)

* Clean up and add our own window manager proxy

- Add our own LawnchairWindowManagerProxy based on SystemWindowManagerProxy to reduce conflict when merging aosp

* Keep androidx.core.app.CoreComponentFactory

java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[],nativeLibraryDirectories=[/data/app/app.lawnchair.debug-

* Fix crash on LauncherPreviewRenderer on A10

FATAL EXCEPTION: main
                                                                                                    Process: app.lawnchair.debug, PID: 8873
                                                                                                    java.lang.NoSuchMethodError: No interface method getCurrentWindowMetrics()Landroid/view/WindowMetrics; in class Landroid/view/WindowManager; or its super classes (declaration of 'android.view.WindowManager' appears in /system/framework/framework.jar!classes3.dex)
                                                                                                    	at com.android.launcher3.graphics.LauncherPreviewRenderer.<init>(LauncherPreviewRenderer.java:246)
                                                                                                    	at app.lawnchair.views.LauncherPreviewView.renderView(LauncherPreviewView.kt:138)
                                                                                                    	at app.lawnchair.views.LauncherPreviewView.loadModelData$lambda$3$lambda$2(LauncherPreviewView.kt:109)
                                                                                                    	at app.lawnchair.views.LauncherPreviewView.$r8$lambda$cYc0chie-2LAfMVJGiDN9mdIeDA(Unknown Source:0)
                                                                                                    	at app.lawnchair.views.LauncherPreviewView$$ExternalSyntheticLambda1.run(Unknown Source:6)
                                                                                                    	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:7356)
                                                                                                    	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:940)

* Add our own LawnchairWidgetHolder

* Reformat

* improved readability

* Pass spotless

* Fix Resources$NotFoundException

Lawnchair (Debug) bug report 19 Nov 2023 12:06:33 pm
version: 13 Dev (#2327) (13)
commit: 9683178
build.brand: Teclast
build.device: T40Pro_2022_EEA
build.display: V1.02_20230826
build.fingerprint: Teclast/T40Pro_2022_EEA/T40Pro_2022_EEA:12/SP1A.210812.016/221010:user/release-keys
build.hardware: ums9230_1h10
build.id: SP1A.210812.016
build.manufacturer: Teclast
build.model: T40 Pro_EEA
build.product: T40Pro_2022_EEA
build.type: user
version.codename: REL
version.incremental: 221010
version.release: 12
version.sdk_int: 31
display.density_dpi: 280
isRecentsEnabled: false

error: Uncaught exception

java.lang.RuntimeException: Unable to start activity ComponentInfo{app.lawnchair.debug/app.lawnchair.LawnchairLauncher}: android.content.res.Resources$NotFoundException: Resource ID #0x7f0700b8 type #0x5 is not valid
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3683)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3840)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:105)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:136)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2252)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7941)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:553)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f0700b8 type #0x5 is not valid
at android.content.res.Resources.getFloat(Resources.java:1224)
at com.android.launcher3.DeviceProfile.(DeviceProfile.java:397)
at com.android.launcher3.DeviceProfile$Builder.build(DeviceProfile.java:1938)
at com.android.launcher3.InvariantDeviceProfile.initGrid(InvariantDeviceProfile.java:441)
at com.android.launcher3.InvariantDeviceProfile.initGrid(InvariantDeviceProfile.java:339)
at com.android.launcher3.InvariantDeviceProfile.initGrid(InvariantDeviceProfile.java:353)
at com.android.launcher3.InvariantDeviceProfile.(InvariantDeviceProfile.java:213)
at com.android.launcher3.InvariantDeviceProfile.$r8$lambda$DNcXzmawjoq65q3wgQi9M48DryY(Unknown Source:2)
at com.android.launcher3.InvariantDeviceProfile$$ExternalSyntheticLambda4.get(Unknown Source:0)
at com.android.launcher3.util.MainThreadInitializedObject.lambda$get$0(MainThreadInitializedObject.java:60)
at com.android.launcher3.util.MainThreadInitializedObject.$r8$lambda$xtvr3aByNYHC2nsBQ97HC1SKg4A(Unknown Source:0)
at com.android.launcher3.util.MainThreadInitializedObject$$ExternalSyntheticLambda0.get(Unknown Source:4)
at com.android.launcher3.util.TraceHelper.allowIpcs(TraceHelper.java:84)
at com.android.launcher3.util.MainThreadInitializedObject.get(MainThreadInitializedObject.java:59)
at com.android.launcher3.LauncherAppState.(LauncherAppState.java:166)
at com.android.launcher3.LauncherAppState.(LauncherAppState.java:109)
at com.android.launcher3.LauncherAppState$$ExternalSyntheticLambda12.get(Unknown Source:2)
at com.android.launcher3.util.MainThreadInitializedObject.lambda$get$0(MainThreadInitializedObject.java:60)
at com.android.launcher3.util.MainThreadInitializedObject.$r8$lambda$xtvr3aByNYHC2nsBQ97HC1SKg4A(Unknown Source:0)
at com.android.launcher3.util.MainThreadInitializedObject$$ExternalSyntheticLambda0.get(Unknown Source:4)
at com.android.launcher3.util.TraceHelper.allowIpcs(TraceHelper.java:84)
at com.android.launcher3.util.MainThreadInitializedObject.get(MainThreadInitializedObject.java:59)
at com.android.launcher3.LauncherAppState.getInstance(LauncherAppState.java:97)
at com.android.launcher3.Launcher.onCreate(Launcher.java:492)
at com.android.launcher3.uioverrides.QuickstepLauncher.onCreate(QuickstepLauncher.java:527)
at app.lawnchair.LawnchairLauncher.onCreate(LawnchairLauncher.kt:205)
at android.app.Activity.performCreate(Activity.java:8060)
at android.app.Activity.performCreate(Activity.java:8040)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3653)
... 12 more

* Keep InputMethodService.canImeRenderGesturalNavButtons

---------

Co-authored-by: Goooler <wangzongler@gmail.com>
2023-11-20 14:46:36 +08:00
Tony Wickham
fa65485109 Fix 3 button mode issues in AllSetActivity
- Set system bars appearance to light/dark depending on device
  theme to ensure visibility
- Also fix issue where taskbar icons would appear partially
  offscreen and prevent pressing nav buttons if you rotated

Fixes: 293438087
Test: adb shell am start -a android.intent.action.MAIN -n com.google.android.setupwizard/.SetupWizardTestActivity
  - Skip to the end (AllSetActivity), and ensure 3 buttons are visible
  - Rotate device and ensure 3 buttons are still visible and functional
  - Will also flash / wipe to the build once it's created
Flag: None
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:286fc215e632280fe0b401bfd713621104861288)
Merged-In: Ie2d9bf1e1d95a6ccbd1f9c592adb51390b21ad85
Change-Id: Ie2d9bf1e1d95a6ccbd1f9c592adb51390b21ad85
2023-11-16 18:45:22 +00:00
MrSluffy
ef07d0849d Revert back onehanded config 2023-11-04 21:34:47 +08:00
MrSluffy
b199bfe8ba Hopefully fix for some user getting error java.lang.NoClassDefFoundError: Failed resolution of: Landroid/window/BackProgressAnimator;
https://elmah.io/tools/stack-trace-formatter/b75519c5efc346329464255de1c7bfde/
2023-11-04 09:56:33 +08:00
MrSluffy
22f0cda4c9 Fixed disabled action button app to overview 2023-11-03 21:31:02 +08:00
MrSluffy
90b2f9f2e8 Catch error 2023-11-01 14:51:38 +08:00
MrSluffy
7a23ea7d17 Remove duplicate unseal 2023-11-01 14:51:38 +08:00
MrSluffy
19bf26dd5a Merge branch 'aosp-13' into 13-wip 2023-10-21 09:52:01 +08:00
Alex Chau
fb2f4b1a6f Avoid drawing live tile behind recents when launching on grid overview
Fix: 304911154
Flag: none
Test: Swipe up in tablet, scroll to side, launch focused task
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1f5de2483bc9eb36128a7f700ca4539591afd186)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c44b3cdda9b8d51ec2142e65674617d34d9a5c9d)
Merged-In: I91dd8b4088f02af9dc5e603853d8e26606acc38f
Change-Id: I91dd8b4088f02af9dc5e603853d8e26606acc38f
2023-10-18 01:55:44 +00:00
Jon @
5838767cc2 Merge "Fix bug where All Apps button loads in late in taskbar." into udc-qpr-dev 2023-10-13 18:37:04 +00:00
Jon Miranda
1e931890d1 Fix bug where All Apps button loads in late in taskbar.
We need to re-create the icon alignment controller if the
stash status changes, otherwise it will use an old value.

Bug: 296414290
Test: home to app then quickly unstash
Change-Id: I35f23842f289fce95d102a9a93dc94cd033fa8cc
2023-10-11 13:28:08 -07:00
Andreas Agvard
928e0521b2 DO NOT MERGE Temporary fix for race condition.
Bug: 303078360
Test: Manual

Change-Id: I7355e3b64424492b6fab4f416014d2a9a797973d
2023-10-07 22:55:17 +00:00
Tony Wickham
cf596d4178 Merge "Fix gestures for exclude-from-recents + translucent tasks" into udc-qpr-dev 2023-10-05 18:16:40 +00:00
Anushree Ganjam
13517070d8 Developer options should reflect the correct DeviceConfig value for ReleaseFlag.
Before this change : When a ReleaseFlag is turned on from server side or
set in DeviceConfig, developer options shows the flag is off.

After this change : When a ReleaseFlag is turned on from server side or
set in DeviceConfig, developer options shows the flag is on.

This change doesn't reflect the DeviceConfig value changes done using
`adb shell device_config put` unless launcher is restarted.

Bug: 297202824
Test: Manual
Flag: NA

Change-Id: I5d83207cf454c60278fd02e59199207e855d51a8
Merged-In: I5d83207cf454c60278fd02e59199207e855d51a8
(cherry picked from commit 9eb68bb7cf)
2023-10-05 01:45:32 +00:00
Tony Wickham
94a0a58b37 Fix gestures for exclude-from-recents + translucent tasks
- If task is translucent and excluded, fade out as swipe up
  - Fade back in when re-launching live tile
- Ignore excluded tasks if there is another visible task,
  and use that underlying task during gesture instead.

Fixes: 299351175
Fixes: 300297333
Fixes: 302672319

Test: Invoke translucent + excluded app (e.g. expanded Volume
dialog) over another app, swipe to overview, quick switch, home

Change-Id: I5740afc4bf561d1a264bd132863ffc15f27d2b20
2023-10-04 20:23:07 +00:00
Luca Zuccarini
ba44979d79 [Toast] Fix ANR when tapping on rich card chip.
This method recursively looks up the view hierarchy for a suitable view
to animate. The wrong variable was causing an infinite loop by never
updating the object being checked for the end condition.

With the fix, the animation behaves as expected.

Fix: 302568434
Flag: ENABLE_SEARCH_RESULT_LAUNCH_ANIMATION
Test: see video in the bug.
Change-Id: I123e50f1618a1e48256c0c976eeb46c93e8391b2
Merged-In: I123e50f1618a1e48256c0c976eeb46c93e8391b2
2023-09-29 11:41:55 +00:00
Jagrut Desai
f2412770e2 Merge "Add more debugs logs to TaskbarManager" into udc-qpr-dev 2023-09-29 02:39:18 +00:00
Jagrut Desai
c1bd53c3f0 Add more debugs logs to TaskbarManager
- adding more logs to TaskbarManager to investigate taskbar being present in folded state of the device.

Test: Presubmit
Bug: 254119092
Flag: not needed
Change-Id: I81c475f1c6bbc8d5b7874ddc45e8778861b61cd0
2023-09-28 15:46:22 -07:00
Holly Jiuyu Sun
6c3cd3c092 Merge "Log toggle status for LPNH and LPH in Settings." into udc-qpr-dev 2023-09-27 16:05:41 +00:00
Holly Sun
e292642489 Log toggle status for LPNH and LPH in Settings.
Bug: 295039461
Test: manual
Flag: PRESS_HOLD_NAV_HANDLE_TO_SEARCH. LONG_PRESS_HOME_BUTTON_TO_SEARCH
Change-Id: I380dd6f62378098edf063f29d10305b8c404f38d
2023-09-26 00:36:44 +00:00
Andy Wickham
66072ca559 Merge "Add some gesture logs" into udc-qpr-dev 2023-09-25 23:54:20 +00:00
Becky Qiu
86b6a887d1 [Omnient] Creates an AOSP AssistStateManager to dump in TouchInteractionService in AOSP.
Bug: 300101221
Test: manually tested dump, see the NL change for samples.
Flag: INVOKE_OMNI_LPH, DISABLED; ENABLE_LONG_PRESS_NAV_HANDLE, TEAMFOOD.
Change-Id: I1fb03779775cd0c9353abd4f796e9cc7c42f0f96
2023-09-23 02:29:54 +00:00
Felix Stern
795dc83c72 Merge "Use stashedTaskbarHeight for IME insets override" into udc-qpr-dev 2023-09-22 17:04:19 +00:00
Brandon Dayauon
28ae77df37 Merge "Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW" into udc-qpr-dev 2023-09-22 14:36:45 +00:00
Cosmin Băieș
df2ceac06c Use stashedTaskbarHeight for IME insets override
Previously [1] we removed the explicit insetsSizeOverride from the
Taskbar for the IME window, as we now [2] enable hiding the IME nav bar.
This would now send the normal insets the taskbar reports. When running
on pre/postsubmit, with test harness setup, the non-transient taskbar
would show, which is bigger than the IME's navigation bar height.

Due to the current logic in InsetsSource#calculateInsets, this leads to
the IME window receiving top navigation bar insets instead of bottom.
As the IME nav bar is now treated as a (fixed on bottom) caption bar,
the two would no longer overlap, and thus lead to a double insets
dispatch, and also a (temporarily) bigger IME window, for IMEs that set
their decorView height to WRAP_CONTENT (e.g. MockIME used in testing).

This instead keeps the previous insetsSizeOverride for IME, and uses the
stashedTasbarHeight when in gesture nav, which should account for both
transient and normal taskbars.

 [1]: I86079cb6670a2ae3b6fa883694f8af81df212408
 [2]: I8793db69fb846046300d5a56b3b0060138ef4cd5

Bug: 297000797
Test: atest WindowInsetsControllerTests#testDispatchApplyWindowInsetsCount_ime
Change-Id: I102a8bc1f8869ebbce9f8f1fefa651d49a9538ec
2023-09-22 14:16:03 +00:00
randypfohl
03d29305ca Setting recentsView orientation to match recents activity orientation
Test: can no longer repro incorrect orientation when launching apps from all apps
      added logs to verify recents activity -> view were the same while rotating
      turned off auto rotate and verified state matched

Bug: 288984663
Bug: 301024104

Change-Id: I7fc3b47bff0a99756aaf877bf634e2d162838d6f
2023-09-20 15:04:55 -07:00
Brandon Dayauon
47000ae6e6 Fix big icon when dragging Toast by isolating the previous QL fix display to SEARCH_RESULT_APP_ROW
- Create another icon, "all_apps_predicted_row_icon" that will be the mDisplay for the predicted app row
in AllAppsList

Bug:299171695
Test: video
Before: https://drive.google.com/file/d/1HxNW0015nQHCc7eQiySf-gwsHrLs_JjR/view?usp=sharing
after: https://drive.google.com/file/d/1HyEwKI-yumILTCjglKcqovhTlRVjNGxg/view?usp=sharing - making sure that QL is fine and dragging regular Toast results are normal
Flag: N/a
Change-Id: Ie002cacb168396dbea39f79679bd6a04b80e374b
2023-09-20 14:21:10 -07:00
Sunny Goyal
5b86162853 Overriding the default TextClock and AnalogClock behavior to avoid RPCs on main thread
during onAttachToWindow

Bug: 294352799
Test: Verified on device
Flag: N/A
Change-Id: I3cce6900cd62a6e9a57c155b74c15c2340c6011b
2023-09-18 23:04:33 +00:00