mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Merge "Fixing wrong flags used by AllAppsController in SystemUiController" into tm-qpr-dev
This commit is contained in:
@@ -52,6 +52,7 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.util.MainThreadInitializedObject;
|
||||
import com.android.launcher3.util.SystemUiController;
|
||||
import com.android.launcher3.util.SystemUiController.SystemUiControllerFlags;
|
||||
import com.android.quickstep.TaskOverlayFactory.TaskOverlay;
|
||||
import com.android.quickstep.views.TaskView.FullscreenDrawParams;
|
||||
import com.android.systemui.shared.recents.model.Task;
|
||||
@@ -247,6 +248,7 @@ public class TaskThumbnailView extends View {
|
||||
}
|
||||
|
||||
|
||||
@SystemUiControllerFlags
|
||||
public int getSysUiStatusNavFlags() {
|
||||
if (mThumbnailData != null) {
|
||||
int flags = 0;
|
||||
|
||||
@@ -23,7 +23,6 @@ import static com.android.launcher3.anim.Interpolators.LINEAR;
|
||||
import static com.android.launcher3.anim.PropertySetter.NO_ANIM_PROPERTY_SETTER;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS;
|
||||
import static com.android.launcher3.util.SystemUiController.UI_STATE_ALLAPPS;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.Animator.AnimatorListener;
|
||||
@@ -37,7 +36,6 @@ import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.anim.AnimatorListeners;
|
||||
import com.android.launcher3.anim.PendingAnimation;
|
||||
import com.android.launcher3.anim.PropertySetter;
|
||||
@@ -293,11 +291,6 @@ public class AllAppsTransitionController
|
||||
public void setupViews(ScrimView scrimView, ActivityAllAppsContainerView<Launcher> appsView) {
|
||||
mScrimView = scrimView;
|
||||
mAppsView = appsView;
|
||||
if (FeatureFlags.ENABLE_DEVICE_SEARCH.get() && Utilities.ATLEAST_R) {
|
||||
mLauncher.getSystemUiController().updateUiState(UI_STATE_ALLAPPS,
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
|
||||
}
|
||||
mAppsView.setScrimView(scrimView);
|
||||
mAppsViewAlpha = new MultiValueAlpha(mAppsView, APPS_VIEW_INDEX_COUNT);
|
||||
mAppsViewAlpha.setUpdateVisibility(true);
|
||||
|
||||
@@ -19,6 +19,10 @@ package com.android.launcher3.util;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
@@ -31,15 +35,26 @@ public class SystemUiController {
|
||||
public static final int UI_STATE_SCRIM_VIEW = 1;
|
||||
public static final int UI_STATE_WIDGET_BOTTOM_SHEET = 2;
|
||||
public static final int UI_STATE_FULLSCREEN_TASK = 3;
|
||||
public static final int UI_STATE_ALLAPPS = 4;
|
||||
|
||||
public static final int FLAG_LIGHT_NAV = 1 << 0;
|
||||
public static final int FLAG_DARK_NAV = 1 << 1;
|
||||
public static final int FLAG_LIGHT_STATUS = 1 << 2;
|
||||
public static final int FLAG_DARK_STATUS = 1 << 3;
|
||||
|
||||
/**
|
||||
* Security type based on WifiConfiguration.KeyMgmt
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef(flag = true, value = {
|
||||
FLAG_LIGHT_NAV,
|
||||
FLAG_DARK_NAV,
|
||||
FLAG_LIGHT_STATUS,
|
||||
FLAG_DARK_STATUS,
|
||||
})
|
||||
public @interface SystemUiControllerFlags {}
|
||||
|
||||
private final Window mWindow;
|
||||
private final int[] mStates = new int[5];
|
||||
private final int[] mStates = new int[4];
|
||||
|
||||
public SystemUiController(Window window) {
|
||||
mWindow = window;
|
||||
@@ -50,7 +65,7 @@ public class SystemUiController {
|
||||
? (FLAG_LIGHT_NAV | FLAG_LIGHT_STATUS) : (FLAG_DARK_NAV | FLAG_DARK_STATUS));
|
||||
}
|
||||
|
||||
public void updateUiState(int uiState, int flags) {
|
||||
public void updateUiState(int uiState, @SystemUiControllerFlags int flags) {
|
||||
if (mStates[uiState] == flags) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user