Loading packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener synchronized (mHeaderBarLock) { if (mHeaderBar.getMeasuredWidth() != taskViewWidth || mHeaderBar.getMeasuredHeight() != mTaskBarHeight) { if (mDummyStackView.useGridLayout()) { mHeaderBar.setShouldDarkenBackgroundColor(true); mHeaderBar.setNoUserInteractionState(); } mHeaderBar.forceLayout(); mHeaderBar.measure( MeasureSpec.makeMeasureSpec(taskViewWidth, MeasureSpec.EXACTLY), Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks @ViewDebug.ExportedProperty(deepExport=true, prefix="thumbnail_") protected TaskViewThumbnail mThumbnailView; @ViewDebug.ExportedProperty(deepExport=true, prefix="header_") TaskViewHeader mHeaderView; protected TaskViewHeader mHeaderView; private View mActionButtonView; private View mIncompatibleAppToastView; private TaskViewCallbacks mCb; Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java +15 −1 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ public class TaskViewHeader extends FrameLayout if (mColor != color || Float.compare(mDimAlpha, dimAlpha) != 0) { mColor = color; mDimAlpha = dimAlpha; if (mShouldDarkenBackgroundColor) { color = getSecondaryColor(color, false /* useLightOverlayColor */); } mBackgroundPaint.setColor(color); ColorUtils.colorToHSL(color, mTmpHSL); Loading Loading @@ -179,6 +182,10 @@ public class TaskViewHeader extends FrameLayout // Header dim, which is only used when task view hardware layers are not used private Paint mDimLayerPaint = new Paint(); // Whether the background color should be darkened to differentiate from the primary color. // Used in grid layout. private boolean mShouldDarkenBackgroundColor = false; private CountDownTimer mFocusTimerCountDown; public TaskViewHeader(Context context) { Loading Loading @@ -442,6 +449,13 @@ public class TaskViewHeader extends FrameLayout } } /** * Sets whether the background color should be darkened to differentiate from the primary color. */ public void setShouldDarkenBackgroundColor(boolean flag) { mShouldDarkenBackgroundColor = flag; } /** * Binds the bar view to the task. */ Loading Loading @@ -557,7 +571,7 @@ public class TaskViewHeader extends FrameLayout * Mark this task view that the user does has not interacted with the stack after a certain * time. */ void setNoUserInteractionState() { public void setNoUserInteractionState() { mDismissButton.setVisibility(View.VISIBLE); mDismissButton.animate().cancel(); mDismissButton.setAlpha(1f); Loading packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class GridTaskView extends TaskView { mThumbnailView.setOverlayHeaderOnThumbnailActionBar(false); mThumbnailView.updateThumbnailMatrix(); mThumbnailView.setTranslationY(mHeaderHeight); mHeaderView.setShouldDarkenBackgroundColor(true); } @Override Loading Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +4 −0 Original line number Diff line number Diff line Loading @@ -656,6 +656,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener synchronized (mHeaderBarLock) { if (mHeaderBar.getMeasuredWidth() != taskViewWidth || mHeaderBar.getMeasuredHeight() != mTaskBarHeight) { if (mDummyStackView.useGridLayout()) { mHeaderBar.setShouldDarkenBackgroundColor(true); mHeaderBar.setNoUserInteractionState(); } mHeaderBar.forceLayout(); mHeaderBar.measure( MeasureSpec.makeMeasureSpec(taskViewWidth, MeasureSpec.EXACTLY), Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java +1 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks @ViewDebug.ExportedProperty(deepExport=true, prefix="thumbnail_") protected TaskViewThumbnail mThumbnailView; @ViewDebug.ExportedProperty(deepExport=true, prefix="header_") TaskViewHeader mHeaderView; protected TaskViewHeader mHeaderView; private View mActionButtonView; private View mIncompatibleAppToastView; private TaskViewCallbacks mCb; Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java +15 −1 Original line number Diff line number Diff line Loading @@ -91,6 +91,9 @@ public class TaskViewHeader extends FrameLayout if (mColor != color || Float.compare(mDimAlpha, dimAlpha) != 0) { mColor = color; mDimAlpha = dimAlpha; if (mShouldDarkenBackgroundColor) { color = getSecondaryColor(color, false /* useLightOverlayColor */); } mBackgroundPaint.setColor(color); ColorUtils.colorToHSL(color, mTmpHSL); Loading Loading @@ -179,6 +182,10 @@ public class TaskViewHeader extends FrameLayout // Header dim, which is only used when task view hardware layers are not used private Paint mDimLayerPaint = new Paint(); // Whether the background color should be darkened to differentiate from the primary color. // Used in grid layout. private boolean mShouldDarkenBackgroundColor = false; private CountDownTimer mFocusTimerCountDown; public TaskViewHeader(Context context) { Loading Loading @@ -442,6 +449,13 @@ public class TaskViewHeader extends FrameLayout } } /** * Sets whether the background color should be darkened to differentiate from the primary color. */ public void setShouldDarkenBackgroundColor(boolean flag) { mShouldDarkenBackgroundColor = flag; } /** * Binds the bar view to the task. */ Loading Loading @@ -557,7 +571,7 @@ public class TaskViewHeader extends FrameLayout * Mark this task view that the user does has not interacted with the stack after a certain * time. */ void setNoUserInteractionState() { public void setNoUserInteractionState() { mDismissButton.setVisibility(View.VISIBLE); mDismissButton.animate().cancel(); mDismissButton.setAlpha(1f); Loading
packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java +1 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,7 @@ public class GridTaskView extends TaskView { mThumbnailView.setOverlayHeaderOnThumbnailActionBar(false); mThumbnailView.updateThumbnailMatrix(); mThumbnailView.setTranslationY(mHeaderHeight); mHeaderView.setShouldDarkenBackgroundColor(true); } @Override Loading