mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Merge "Do not add HOTSEAT_ICONS to visible elements for device type "phone" in ALL_APPS State" into tm-dev am: 002e1fcde5
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18084536 Change-Id: I36cf2448ea74deee624137fae9b8463bc1fb04b8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -30,7 +30,8 @@ import com.android.launcher3.util.Themes;
|
||||
*/
|
||||
public class AllAppsState extends LauncherState {
|
||||
|
||||
private static final int STATE_FLAGS = FLAG_WORKSPACE_INACCESSIBLE | FLAG_CLOSE_POPUPS;
|
||||
private static final int STATE_FLAGS =
|
||||
FLAG_WORKSPACE_INACCESSIBLE | FLAG_CLOSE_POPUPS | FLAG_HOTSEAT_INACCESSIBLE;
|
||||
|
||||
public AllAppsState(int id) {
|
||||
super(id, LAUNCHER_STATE_ALLAPPS, STATE_FLAGS);
|
||||
@@ -88,7 +89,9 @@ public class AllAppsState extends LauncherState {
|
||||
|
||||
@Override
|
||||
public int getVisibleElements(Launcher launcher) {
|
||||
return ALL_APPS_CONTENT | HOTSEAT_ICONS;
|
||||
// Don't add HOTSEAT_ICONS for phones in ALL_APPS state.
|
||||
return launcher.getDeviceProfile().isPhone ? ALL_APPS_CONTENT
|
||||
: ALL_APPS_CONTENT | HOTSEAT_ICONS;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -80,6 +80,9 @@ public abstract class LauncherState implements BaseState<LauncherState> {
|
||||
public static final int FLAG_CLOSE_POPUPS = BaseState.getFlag(6);
|
||||
public static final int FLAG_OVERVIEW_UI = BaseState.getFlag(7);
|
||||
|
||||
// Flag indicating that hotseat and its contents are not accessible.
|
||||
public static final int FLAG_HOTSEAT_INACCESSIBLE = BaseState.getFlag(8);
|
||||
|
||||
|
||||
public static final float NO_OFFSET = 0;
|
||||
public static final float NO_SCALE = 1;
|
||||
|
||||
@@ -25,6 +25,7 @@ import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_X;
|
||||
import static com.android.launcher3.LauncherAnimUtils.VIEW_TRANSLATE_Y;
|
||||
import static com.android.launcher3.LauncherAnimUtils.WORKSPACE_SCALE_PROPERTY_FACTORY;
|
||||
import static com.android.launcher3.LauncherState.FLAG_HAS_SYS_UI_SCRIM;
|
||||
import static com.android.launcher3.LauncherState.FLAG_HOTSEAT_INACCESSIBLE;
|
||||
import static com.android.launcher3.LauncherState.HINT_STATE;
|
||||
import static com.android.launcher3.LauncherState.HOTSEAT_ICONS;
|
||||
import static com.android.launcher3.LauncherState.NORMAL;
|
||||
@@ -151,6 +152,12 @@ public class WorkspaceStateTransitionAnimation {
|
||||
propertySetter.setViewAlpha(mLauncher.getWorkspace().getPageIndicator(),
|
||||
workspacePageIndicatorAlpha, fadeInterpolator);
|
||||
|
||||
// Update the accessibility flags for hotseat based on launcher state.
|
||||
hotseat.setImportantForAccessibility(
|
||||
state.hasFlag(FLAG_HOTSEAT_INACCESSIBLE)
|
||||
? View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS
|
||||
: View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
|
||||
|
||||
Interpolator translationInterpolator =
|
||||
config.getInterpolator(ANIM_WORKSPACE_TRANSLATE, ZOOM_OUT);
|
||||
propertySetter.setFloat(mWorkspace, VIEW_TRANSLATE_X,
|
||||
|
||||
Reference in New Issue
Block a user