Merge "Fix "Pause work apps" button in strange location" into udc-dev am: 052045907c am: 225170c59b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23480191 Change-Id: I74502ce0b46bead253388281a18cf74ca0f03857 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.
|
// Animate to A-Z with 0 time to reset the animation with proper state management.
|
||||||
animateToSearchState(false, 0);
|
animateToSearchState(false, 0);
|
||||||
}
|
}
|
||||||
|
if (isSearching()) {
|
||||||
|
mWorkManager.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
|||||||
return super.onApplyWindowInsets(insets);
|
return super.onApplyWindowInsets(insets);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateTranslationY() {
|
void updateTranslationY() {
|
||||||
setTranslationY(-mImeInsets.bottom);
|
setTranslationY(-mImeInsets.bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,6 +180,10 @@ public class WorkModeSwitch extends LinearLayout implements Insettable,
|
|||||||
rect.set(insets.left, insets.top, insets.right, insets.bottom);
|
rect.set(insets.left, insets.top, insets.right, insets.bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Rect getImeInsets() {
|
||||||
|
return mImeInsets;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onTranslationStart() {
|
public void onTranslationStart() {
|
||||||
setFlag(FLAG_TRANSLATION_ONGOING);
|
setFlag(FLAG_TRANSLATION_ONGOING);
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ public class WorkProfileManager implements PersonalWorkSlidingTabStrip.OnActiveP
|
|||||||
public void reset() {
|
public void reset() {
|
||||||
boolean isEnabled = !mAllApps.getAppsStore().hasModelFlag(FLAG_QUIET_MODE_ENABLED);
|
boolean isEnabled = !mAllApps.getAppsStore().hasModelFlag(FLAG_QUIET_MODE_ENABLED);
|
||||||
updateCurrentState(isEnabled ? STATE_ENABLED : STATE_DISABLED);
|
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) {
|
private void updateCurrentState(@WorkProfileState int currentState) {
|
||||||
|
|||||||
Reference in New Issue
Block a user