Loading Android.mk +0 −12 Original line number Diff line number Diff line Loading @@ -91,9 +91,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) # Loading Loading @@ -127,9 +124,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := go/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) # Loading Loading @@ -206,9 +200,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) Loading Loading @@ -259,9 +250,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) Loading quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -147,10 +147,10 @@ public class TaskOverlayFactory implements ResourceBasedOverride { public void initOverlay(Task task, ThumbnailData thumbnail, Matrix matrix, boolean rotated) { getActionsView().updateDisabledFlags(DISABLED_NO_THUMBNAIL, thumbnail == null); final boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot(); if (thumbnail != null) { getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated); final boolean isAllowedByPolicy = thumbnail.isRealSnapshot; getActionsView().setCallbacks(new OverlayUICallbacks() { @Override Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import android.text.StaticLayout; import android.text.TextPaint; import android.util.AttributeSet; import android.util.FloatProperty; import android.util.Property; import android.util.SparseBooleanArray; import android.view.HapticFeedbackConstants; import android.view.KeyEvent; Loading Loading @@ -1488,7 +1487,9 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } int scrollDiff = newScroll[i] - oldScroll[i] + offset; if (scrollDiff != 0) { Property translationProperty = mOrientationHandler.getPrimaryViewTranslate(); FloatProperty translationProperty = child instanceof TaskView ? ((TaskView) child).getPrimaryFillDismissGapTranslationProperty() : mOrientationHandler.getPrimaryViewTranslate(); ResourceProvider rp = DynamicResource.provider(mActivity); SpringProperty sp = new SpringProperty(SpringProperty.FLAG_CAN_SPRING_ON_END) Loading Loading @@ -1883,7 +1884,11 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView ? modalLeftOffsetSize : modalRightOffsetSize; float totalTranslation = translation + modalTranslation; mOrientationHandler.getPrimaryViewTranslate().set(getChildAt(i), View child = getChildAt(i); FloatProperty translationProperty = child instanceof TaskView ? ((TaskView) child).getPrimaryTaskOffsetTranslationProperty() : mOrientationHandler.getPrimaryViewTranslate(); translationProperty.set(child, totalTranslation * mOrientationHandler.getPrimaryTranslationDirectionFactor()); } updateCurveProperties(); Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +3 −2 Original line number Diff line number Diff line Loading @@ -447,13 +447,14 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc } /** * Returns whether the snapshot is real. * Returns whether the snapshot is real. If the device is locked for the user of the task, * the snapshot used will be an app-theme generated snapshot instead of a real snapshot. */ public boolean isRealSnapshot() { if (mThumbnailData == null) { return false; } return mThumbnailData.isRealSnapshot; return mThumbnailData.isRealSnapshot && !mTask.isLocked; } /** Loading quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +99 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,58 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } }; private static final FloatProperty<TaskView> FILL_DISMISS_GAP_TRANSLATION_X = new FloatProperty<TaskView>("fillDismissGapTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setFillDismissGapTranslationX(v); } @Override public Float get(TaskView taskView) { return taskView.mFillDismissGapTranslationX; } }; private static final FloatProperty<TaskView> FILL_DISMISS_GAP_TRANSLATION_Y = new FloatProperty<TaskView>("fillDismissGapTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setFillDismissGapTranslationY(v); } @Override public Float get(TaskView taskView) { return taskView.mFillDismissGapTranslationY; } }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_X = new FloatProperty<TaskView>("taskOffsetTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationX(v); } @Override public Float get(TaskView taskView) { return taskView.mTaskOffsetTranslationX; } }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_Y = new FloatProperty<TaskView>("taskOffsetTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationY(v); } @Override public Float get(TaskView taskView) { return taskView.mTaskOffsetTranslationY; } }; private final OnAttachStateChangeListener mTaskMenuStateListener = new OnAttachStateChangeListener() { @Override Loading Loading @@ -180,6 +232,13 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private final FullscreenDrawParams mCurrentFullscreenParams; private final BaseDraggingActivity mActivity; // Various causes of changing primary translation, which we aggregate to setTranslationX/Y(). // TODO: We should do this for secondary translation properties as well. private float mFillDismissGapTranslationX; private float mFillDismissGapTranslationY; private float mTaskOffsetTranslationX; private float mTaskOffsetTranslationY; private ObjectAnimator mIconAndDimAnimator; private float mIconScaleAnimStartProgress = 0; private float mFocusTransitionProgress = 1; Loading Loading @@ -619,6 +678,8 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { protected void resetViewTransforms() { setCurveScale(1); mFillDismissGapTranslationX = mTaskOffsetTranslationX = 0f; mFillDismissGapTranslationY = mTaskOffsetTranslationY = 0f; setTranslationX(0f); setTranslationY(0f); setTranslationZ(0); Loading Loading @@ -835,6 +896,44 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { return mCurveScale; } private void setFillDismissGapTranslationX(float x) { mFillDismissGapTranslationX = x; applyTranslationX(); } private void setFillDismissGapTranslationY(float y) { mFillDismissGapTranslationY = y; applyTranslationY(); } private void setTaskOffsetTranslationX(float x) { mTaskOffsetTranslationX = x; applyTranslationX(); } private void setTaskOffsetTranslationY(float y) { mTaskOffsetTranslationY = y; applyTranslationY(); } private void applyTranslationX() { setTranslationX(mFillDismissGapTranslationX + mTaskOffsetTranslationX); } private void applyTranslationY() { setTranslationY(mFillDismissGapTranslationY + mTaskOffsetTranslationY); } public FloatProperty<TaskView> getPrimaryFillDismissGapTranslationProperty() { return getPagedOrientationHandler().getPrimaryValue( FILL_DISMISS_GAP_TRANSLATION_X, FILL_DISMISS_GAP_TRANSLATION_Y); } public FloatProperty<TaskView> getPrimaryTaskOffsetTranslationProperty() { return getPagedOrientationHandler().getPrimaryValue( TASK_OFFSET_TRANSLATION_X, TASK_OFFSET_TRANSLATION_Y); } @Override public boolean hasOverlappingRendering() { // TODO: Clip-out the icon region from the thumbnail, since they are overlapping. Loading Loading
Android.mk +0 −12 Original line number Diff line number Diff line Loading @@ -91,9 +91,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := $(LOCAL_PATH)/AndroidManifest-common.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) # Loading Loading @@ -127,9 +124,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := go/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) # Loading Loading @@ -206,9 +200,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) Loading Loading @@ -259,9 +250,6 @@ LOCAL_FULL_LIBS_MANIFEST_FILES := \ LOCAL_MANIFEST_FILE := quickstep/AndroidManifest.xml LOCAL_JACK_COVERAGE_INCLUDE_FILTER := com.android.launcher3.* LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 LOCAL_LICENSE_CONDITIONS := notice LOCAL_NOTICE_FILE := $(LOCAL_PATH)/NOTICE include $(BUILD_PACKAGE) Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -147,10 +147,10 @@ public class TaskOverlayFactory implements ResourceBasedOverride { public void initOverlay(Task task, ThumbnailData thumbnail, Matrix matrix, boolean rotated) { getActionsView().updateDisabledFlags(DISABLED_NO_THUMBNAIL, thumbnail == null); final boolean isAllowedByPolicy = mThumbnailView.isRealSnapshot(); if (thumbnail != null) { getActionsView().updateDisabledFlags(DISABLED_ROTATED, rotated); final boolean isAllowedByPolicy = thumbnail.isRealSnapshot; getActionsView().setCallbacks(new OverlayUICallbacks() { @Override Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/RecentsView.java +8 −3 Original line number Diff line number Diff line Loading @@ -73,7 +73,6 @@ import android.text.StaticLayout; import android.text.TextPaint; import android.util.AttributeSet; import android.util.FloatProperty; import android.util.Property; import android.util.SparseBooleanArray; import android.view.HapticFeedbackConstants; import android.view.KeyEvent; Loading Loading @@ -1488,7 +1487,9 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView } int scrollDiff = newScroll[i] - oldScroll[i] + offset; if (scrollDiff != 0) { Property translationProperty = mOrientationHandler.getPrimaryViewTranslate(); FloatProperty translationProperty = child instanceof TaskView ? ((TaskView) child).getPrimaryFillDismissGapTranslationProperty() : mOrientationHandler.getPrimaryViewTranslate(); ResourceProvider rp = DynamicResource.provider(mActivity); SpringProperty sp = new SpringProperty(SpringProperty.FLAG_CAN_SPRING_ON_END) Loading Loading @@ -1883,7 +1884,11 @@ public abstract class RecentsView<T extends StatefulActivity> extends PagedView ? modalLeftOffsetSize : modalRightOffsetSize; float totalTranslation = translation + modalTranslation; mOrientationHandler.getPrimaryViewTranslate().set(getChildAt(i), View child = getChildAt(i); FloatProperty translationProperty = child instanceof TaskView ? ((TaskView) child).getPrimaryTaskOffsetTranslationProperty() : mOrientationHandler.getPrimaryViewTranslate(); translationProperty.set(child, totalTranslation * mOrientationHandler.getPrimaryTranslationDirectionFactor()); } updateCurveProperties(); Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskThumbnailView.java +3 −2 Original line number Diff line number Diff line Loading @@ -447,13 +447,14 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc } /** * Returns whether the snapshot is real. * Returns whether the snapshot is real. If the device is locked for the user of the task, * the snapshot used will be an app-theme generated snapshot instead of a real snapshot. */ public boolean isRealSnapshot() { if (mThumbnailData == null) { return false; } return mThumbnailData.isRealSnapshot; return mThumbnailData.isRealSnapshot && !mTask.isLocked; } /** Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/views/TaskView.java +99 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,58 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { } }; private static final FloatProperty<TaskView> FILL_DISMISS_GAP_TRANSLATION_X = new FloatProperty<TaskView>("fillDismissGapTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setFillDismissGapTranslationX(v); } @Override public Float get(TaskView taskView) { return taskView.mFillDismissGapTranslationX; } }; private static final FloatProperty<TaskView> FILL_DISMISS_GAP_TRANSLATION_Y = new FloatProperty<TaskView>("fillDismissGapTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setFillDismissGapTranslationY(v); } @Override public Float get(TaskView taskView) { return taskView.mFillDismissGapTranslationY; } }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_X = new FloatProperty<TaskView>("taskOffsetTranslationX") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationX(v); } @Override public Float get(TaskView taskView) { return taskView.mTaskOffsetTranslationX; } }; private static final FloatProperty<TaskView> TASK_OFFSET_TRANSLATION_Y = new FloatProperty<TaskView>("taskOffsetTranslationY") { @Override public void setValue(TaskView taskView, float v) { taskView.setTaskOffsetTranslationY(v); } @Override public Float get(TaskView taskView) { return taskView.mTaskOffsetTranslationY; } }; private final OnAttachStateChangeListener mTaskMenuStateListener = new OnAttachStateChangeListener() { @Override Loading Loading @@ -180,6 +232,13 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { private final FullscreenDrawParams mCurrentFullscreenParams; private final BaseDraggingActivity mActivity; // Various causes of changing primary translation, which we aggregate to setTranslationX/Y(). // TODO: We should do this for secondary translation properties as well. private float mFillDismissGapTranslationX; private float mFillDismissGapTranslationY; private float mTaskOffsetTranslationX; private float mTaskOffsetTranslationY; private ObjectAnimator mIconAndDimAnimator; private float mIconScaleAnimStartProgress = 0; private float mFocusTransitionProgress = 1; Loading Loading @@ -619,6 +678,8 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { protected void resetViewTransforms() { setCurveScale(1); mFillDismissGapTranslationX = mTaskOffsetTranslationX = 0f; mFillDismissGapTranslationY = mTaskOffsetTranslationY = 0f; setTranslationX(0f); setTranslationY(0f); setTranslationZ(0); Loading Loading @@ -835,6 +896,44 @@ public class TaskView extends FrameLayout implements PageCallbacks, Reusable { return mCurveScale; } private void setFillDismissGapTranslationX(float x) { mFillDismissGapTranslationX = x; applyTranslationX(); } private void setFillDismissGapTranslationY(float y) { mFillDismissGapTranslationY = y; applyTranslationY(); } private void setTaskOffsetTranslationX(float x) { mTaskOffsetTranslationX = x; applyTranslationX(); } private void setTaskOffsetTranslationY(float y) { mTaskOffsetTranslationY = y; applyTranslationY(); } private void applyTranslationX() { setTranslationX(mFillDismissGapTranslationX + mTaskOffsetTranslationX); } private void applyTranslationY() { setTranslationY(mFillDismissGapTranslationY + mTaskOffsetTranslationY); } public FloatProperty<TaskView> getPrimaryFillDismissGapTranslationProperty() { return getPagedOrientationHandler().getPrimaryValue( FILL_DISMISS_GAP_TRANSLATION_X, FILL_DISMISS_GAP_TRANSLATION_Y); } public FloatProperty<TaskView> getPrimaryTaskOffsetTranslationProperty() { return getPagedOrientationHandler().getPrimaryValue( TASK_OFFSET_TRANSLATION_X, TASK_OFFSET_TRANSLATION_Y); } @Override public boolean hasOverlappingRendering() { // TODO: Clip-out the icon region from the thumbnail, since they are overlapping. Loading