Clean up work profile

This includes
- Dismiss work edu on launcher state change
- Remove work tab flash on first setup
- Make edu bottom sheet adopt theme color
- Fix Work toggle bottom inset


Bug: 149200572
Bug: 149197172
Bug: 149199058
Bug: 149215103
Bug: 149198955
Bug: 145595763
Bug:149481723

Test: Manual
Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
This commit is contained in:
Samuel Fufa
2020-02-10 09:26:20 -08:00
parent c7f39fc66d
commit ccebfbe273
18 changed files with 92 additions and 110 deletions

View File

@@ -103,6 +103,8 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
private final MultiValueAlpha mMultiValueAlpha;
Rect mInsets = new Rect();
public AllAppsContainerView(Context context) {
this(context, null);
}
@@ -320,6 +322,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
@Override
public void setInsets(Rect insets) {
mInsets.set(insets);
DeviceProfile grid = mLauncher.getDeviceProfile();
int leftRightPadding = grid.desiredWorkspaceLeftRightMarginPx
+ grid.cellLayoutPaddingLeftRightPx;
@@ -411,6 +414,7 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT));
this.addView(mWorkFooterContainer);
mWorkFooterContainer.setInsets(mInsets);
mWorkFooterContainer.post(() -> mAH[AdapterHolder.WORK].applyPadding());
}
@@ -548,17 +552,6 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
return mHeader != null && mHeader.getVisibility() == View.VISIBLE;
}
public void onScrollUpEnd() {
highlightWorkTabIfNecessary();
}
void highlightWorkTabIfNecessary() {
if (mUsingTabs) {
((PersonalWorkSlidingTabStrip) findViewById(R.id.tabs))
.highlightWorkTabIfNecessary();
}
}
/**
* Adds an update listener to {@param animator} that adds springs to the animation.
*/
@@ -643,9 +636,9 @@ public class AllAppsContainerView extends SpringRelativeLayout implements DragSo
R.layout.work_apps_paused, null);
recyclerView.post(() -> {
int width = recyclerView.getWidth();
int height = recyclerView.getHeight();
pausedOverlay.measure(makeMeasureSpec(width, EXACTLY),
makeMeasureSpec(height, EXACTLY));
int height = recyclerView.getHeight() - mWorkFooterContainer.getHeight();
pausedOverlay.measure(makeMeasureSpec(recyclerView.getWidth(), EXACTLY),
makeMeasureSpec(recyclerView.getHeight(), EXACTLY));
pausedOverlay.layout(0, 0, width, height);
applyPadding();
});