mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Fixing sysui visibility changing multiple times on startup
> During startup shelftop is updated after all-apps, causing all-apps to set the sysuiVisibility according to it's own UI Bug: 156422012 Change-Id: Idee06249ad45946ed0a9dc84702510ad90a305f4
This commit is contained in:
@@ -14,7 +14,6 @@ import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_FA
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_ALL_APPS_HEADER_FADE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
|
||||
import static com.android.launcher3.states.StateAnimationConfig.ANIM_VERTICAL_PROGRESS;
|
||||
import static com.android.launcher3.util.SystemUiController.UI_STATE_ALL_APPS;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
@@ -37,7 +36,6 @@ import com.android.launcher3.anim.PropertySetter;
|
||||
import com.android.launcher3.statemanager.StateManager.StateHandler;
|
||||
import com.android.launcher3.states.StateAnimationConfig;
|
||||
import com.android.launcher3.uioverrides.plugins.PluginManagerWrapper;
|
||||
import com.android.launcher3.util.Themes;
|
||||
import com.android.launcher3.views.ScrimView;
|
||||
import com.android.systemui.plugins.AllAppsSearchPlugin;
|
||||
import com.android.systemui.plugins.PluginListener;
|
||||
@@ -75,7 +73,6 @@ public class AllAppsTransitionController implements StateHandler<LauncherState>,
|
||||
private ScrimView mScrimView;
|
||||
|
||||
private final Launcher mLauncher;
|
||||
private final boolean mIsDarkTheme;
|
||||
private boolean mIsVerticalLayout;
|
||||
|
||||
// Animation in this class is controlled by a single variable {@link mProgress}.
|
||||
@@ -98,7 +95,6 @@ public class AllAppsTransitionController implements StateHandler<LauncherState>,
|
||||
mShiftRange = mLauncher.getDeviceProfile().heightPx;
|
||||
mProgress = 1f;
|
||||
|
||||
mIsDarkTheme = Themes.getAttrBoolean(mLauncher, R.attr.isMainColorDark);
|
||||
mIsVerticalLayout = mLauncher.getDeviceProfile().isVerticalBarLayout();
|
||||
mLauncher.addOnDeviceProfileChangeListener(this);
|
||||
}
|
||||
@@ -137,16 +133,6 @@ public class AllAppsTransitionController implements StateHandler<LauncherState>,
|
||||
if (mPlugin != null) {
|
||||
mPlugin.setProgress(progress);
|
||||
}
|
||||
|
||||
// Use a light system UI (dark icons) if all apps is behind at least half of the
|
||||
// status bar.
|
||||
boolean forceChange = Math.min(shiftCurrent, mScrimView.getVisualTop())
|
||||
<= mLauncher.getDeviceProfile().getInsets().top / 2f;
|
||||
if (forceChange) {
|
||||
mLauncher.getSystemUiController().updateUiState(UI_STATE_ALL_APPS, !mIsDarkTheme);
|
||||
} else {
|
||||
mLauncher.getSystemUiController().updateUiState(UI_STATE_ALL_APPS, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public float getProgress() {
|
||||
|
||||
Reference in New Issue
Block a user