Fix bugs with A16/A15 devices

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Pun Butrach
2025-08-31 17:57:56 +07:00
parent b67168f737
commit bfb2be39eb
9 changed files with 49 additions and 29 deletions
@@ -37,6 +37,7 @@ import static com.android.launcher3.LauncherState.NO_OFFSET;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT;
import static com.android.launcher3.Utilities.ATLEAST_BAKLAVA;
import static com.android.launcher3.Utilities.ATLEAST_T;
import static com.android.launcher3.Utilities.isRtl;
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
@@ -1048,12 +1049,14 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer,
public void setResumed() {
DesktopVisibilityController desktopVisibilityController =
DesktopVisibilityController.INSTANCE.get(this);
if (!ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY.isTrue()
if (ATLEAST_BAKLAVA) {
if (!ENABLE_DESKTOP_WINDOWING_WALLPAPER_ACTIVITY.isTrue()
&& desktopVisibilityController.isInDesktopModeAndNotInOverview(getDisplayId())
&& !desktopVisibilityController.isRecentsGestureInProgress()) {
// Return early to skip setting activity to appear as resumed
// TODO: b/333533253 - Remove after flag rollout
return;
// Return early to skip setting activity to appear as resumed
// TODO: b/333533253 - Remove after flag rollout
return;
}
}
super.setResumed();
}
@@ -186,7 +186,7 @@ open class SystemApiWrapper @Inject constructor(@ApplicationContext context: Con
override fun supportsMultiInstance(lai: LauncherActivityInfo): Boolean {
return try {
super.supportsMultiInstance(lai) || lai.supportsMultiInstance()
} catch (e: Exception) {
} catch (t: Throwable) {
false
}
}
@@ -195,7 +195,7 @@ public final class OverviewComponentObserver {
if (!mIsHomeDisabled && (defaultHome == null || mIsDefaultHome)) {
// User default home is same as our home app. Use Overview integrated in Launcher.
if (enableLauncherOverviewInWindow.isTrue()) {
if (enableLauncherOverviewInWindow) {
mDefaultDisplayContainerInterface =
mRecentsDisplayModel.getFallbackWindowInterface(DEFAULT_DISPLAY);
} else {
@@ -209,7 +209,7 @@ public final class OverviewComponentObserver {
unregisterOtherHomeAppUpdateReceiver();
} else {
// The default home app is a different launcher. Use the fallback Overview instead.
if (enableFallbackOverviewInWindow.isTrue()) {
if (enableFallbackOverviewInWindow) {
mDefaultDisplayContainerInterface =
mRecentsDisplayModel.getFallbackWindowInterface(DEFAULT_DISPLAY);
} else {
@@ -302,7 +302,7 @@ public final class OverviewComponentObserver {
}
public boolean isHomeAndOverviewSameActivity() {
return isHomeAndOverviewSame() && !enableLauncherOverviewInWindow.isTrue();
return isHomeAndOverviewSame() && !enableLauncherOverviewInWindow;
}
/**