mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
Merge "Fix "Pause work apps" button in strange location" into udc-dev am: 052045907c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23480191 Change-Id: I16dbc131fc883f75c1c45acb562ddadb0a4eaca0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -444,6 +444,9 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
|
||||
// Animate to A-Z with 0 time to reset the animation with proper state management.
|
||||
animateToSearchState(false, 0);
|
||||
}
|
||||
if (isSearching()) {
|
||||
mWorkManager.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -166,7 +166,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
||||
return super.onApplyWindowInsets(insets);
|
||||
}
|
||||
|
||||
private void updateTranslationY() {
|
||||
void updateTranslationY() {
|
||||
setTranslationY(-mImeInsets.bottom);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,10 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
||||
rect.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||
}
|
||||
|
||||
public Rect getImeInsets() {
|
||||
return mImeInsets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTranslationStart() {
|
||||
setFlag(FLAG_TRANSLATION_ONGOING);
|
||||
|
||||
@@ -136,6 +136,11 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
|
||||
public void reset() {
|
||||
boolean isEnabled = !mAllApps.getAppsStore().hasModelFlag(FLAG_QUIET_MODE_ENABLED);
|
||||
updateCurrentState(isEnabled ? STATE_ENABLED : STATE_DISABLED);
|
||||
if (mWorkModeSwitch != null) {
|
||||
// reset the position of the button and clear IME insets.
|
||||
mWorkModeSwitch.getImeInsets().setEmpty();
|
||||
mWorkModeSwitch.updateTranslationY();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateCurrentState(@WorkProfileState int currentState) {
|
||||
|
||||
Reference in New Issue
Block a user