Using the first frame delay based on the display refresh rate instead of
hardcoding it to 16ms > Creating a utility class for caching display property changes Bug: 128940249 Change-Id: I6f9a214548de65bd1c8530508d665ee88312da4a
This commit is contained in:
1 parent
b6841ac630
commit
4e6c45bcd3
14 files changed
+212
-42
No files matched your search
@@ -20,7 +20,7 @@ import static android.view.MotionEvent.ACTION_CANCEL;
|
||||
import static android.view.MotionEvent.ACTION_DOWN;
|
||||
import static android.view.MotionEvent.ACTION_UP;
|
||||
|
||||
import static com.android.launcher3.Utilities.SINGLE_FRAME_MS;
|
||||
import static com.android.launcher3.util.DefaultDisplay.getSingleFrameMs;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
@@ -41,7 +41,6 @@ import android.widget.FrameLayout;
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.InsettableFrameLayout;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.testing.TestProtocol;
|
||||
import com.android.launcher3.util.MultiValueAlpha;
|
||||
import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
@@ -219,7 +218,7 @@ public abstract class BaseDragLayer<T extends Context & ActivityContext>
|
||||
// This can happen if something goes wrong during a state change/transition.
|
||||
AbstractFloatingView floatingView = (AbstractFloatingView) child;
|
||||
if (floatingView.isOpen()) {
|
||||
postDelayed(() -> floatingView.close(false), SINGLE_FRAME_MS);
|
||||
postDelayed(() -> floatingView.close(false), getSingleFrameMs(getContext()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user