Fix bugs with A16/A15 devices

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Pun Butrach committed 2026-01-10 20:46:47 +07:00
1 parent b67168f737
commit bfb2be39eb
9 files changed
+49 -29

No files matched your search

@@ -333,7 +333,10 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
0 // Bottom left
};
if (Flags.allAppsBlur()) {
int resId = ColorTokens.ExpressiveAllApps.resolveColor(getContext());
// Lawnchair-TODO-Colour: ExpressiveAllApps
// int resId = ColorTokens.ExpressiveAllApps.resolveColor(getContext());
int resId = Utilities.isDarkTheme(getContext())
? android.R.color.system_accent1_800 : android.R.color.system_accent1_100;
int layerAbove = ColorUtils.setAlphaComponent(getResources().getColor(resId, null),
(int) (0.4f * 255));
int layerBelow = ColorUtils.setAlphaComponent(Color.WHITE, (int) (0.1f * 255));
@@ -19,6 +19,7 @@ package com.android.launcher3.popup;
import static android.multiuser.Flags.enableMovingContentIntoPrivateSpace;
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_SHORTCUTS;
import static com.android.launcher3.Utilities.ATLEAST_BAKLAVA;
import static com.android.launcher3.Utilities.squaredHypot;
import static com.android.launcher3.Utilities.squaredTouchSlop;
import static com.android.launcher3.allapps.AlphabeticalAppsList.PRIVATE_SPACE_PACKAGE;
@@ -215,8 +216,15 @@ public class PopupContainerWithArrow<T extends Context & ActivityContext>
container = (PopupContainerWithArrow) launcher.getLayoutInflater().inflate(
R.layout.popup_container, launcher.getDragLayer(), false);
container.configureForLauncher(launcher, item);
boolean shouldHideSystemShortcuts = enableMovingContentIntoPrivateSpace()
boolean shouldHideSystemShortcuts;
if (ATLEAST_BAKLAVA) {
shouldHideSystemShortcuts = enableMovingContentIntoPrivateSpace()
&& Objects.equals(item.getTargetPackage(), PRIVATE_SPACE_PACKAGE);
} else {
shouldHideSystemShortcuts = false;
}
container.populateAndShowRows(icon, deepShortcutCount,
shouldHideSystemShortcuts ? Collections.emptyList() : systemShortcuts);
launcher.refreshAndBindWidgetsForPackageUser(PackageUserKey.fromItemInfo(item));
@@ -18,6 +18,7 @@ package com.android.launcher3.workprofile;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.drawable.RippleDrawable;
import android.graphics.drawable.StateListDrawable;
import android.util.AttributeSet;
import android.widget.Button;
import android.widget.LinearLayout;
@@ -63,8 +64,9 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd
for (int i = 0; i < getChildCount(); i++) {
Button tab = (Button) getChildAt(i);
tab.setAllCaps(false);
RippleDrawable background = (RippleDrawable) tab.getBackground();
background.setDrawableByLayerId(android.R.id.mask, DrawableTokens.AllAppsTabsMaskDrawable.resolve(getContext()));
// Lawnchair-TODO: StateListDrawable
// RippleDrawable background = (RippleDrawable) tab.getBackground();
// background.setDrawableByLayerId(android.R.id.mask, DrawableTokens.AllAppsTabsMaskDrawable.resolve(getContext()));
tab.setBackground(DrawableTokens.AllAppsTabsBackground.resolve(getContext()));
tab.setTextColor(ColorStateListTokens.AllAppsTabText.resolve(getContext()));
fontManager.setCustomFont(tab, R.id.font_body_medium);