Loading core/java/android/view/View.java +1 −2 Original line number Diff line number Diff line Loading @@ -33899,8 +33899,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, int category; switch (getViewRootImpl().intermittentUpdateState()) { case ViewRootImpl.INTERMITTENT_STATE_INTERMITTENT -> category = (sToolkitFrameRateBySizeReadOnlyFlagValue ? FRAME_RATE_CATEGORY_LOW : FRAME_RATE_CATEGORY_NORMAL) | FRAME_RATE_CATEGORY_REASON_INTERMITTENT; FRAME_RATE_CATEGORY_NORMAL | FRAME_RATE_CATEGORY_REASON_INTERMITTENT; case ViewRootImpl.INTERMITTENT_STATE_NOT_INTERMITTENT -> category = mSizeBasedFrameRateCategoryAndReason; default -> category = mLastFrameRateCategory; core/tests/coretests/src/android/view/ViewFrameRateTest.java +3 −6 Original line number Diff line number Diff line Loading @@ -499,12 +499,9 @@ public class ViewFrameRateTest { toolkitFrameRateDefaultNormalReadOnly() ? FRAME_RATE_CATEGORY_NORMAL : FRAME_RATE_CATEGORY_HIGH; } else { // intermittent // Even though this is not a small View, step 3 is triggered by this flag, which // brings intermittent to LOW expectedCategory = toolkitFrameRateBySizeReadOnly() ? FRAME_RATE_CATEGORY_LOW : FRAME_RATE_CATEGORY_NORMAL; // intermittent. // The expected category is normal. expectedCategory = FRAME_RATE_CATEGORY_NORMAL; } mActivityRule.runOnUiThread(() -> { mMovingView.invalidate(); Loading Loading
core/java/android/view/View.java +1 −2 Original line number Diff line number Diff line Loading @@ -33899,8 +33899,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, int category; switch (getViewRootImpl().intermittentUpdateState()) { case ViewRootImpl.INTERMITTENT_STATE_INTERMITTENT -> category = (sToolkitFrameRateBySizeReadOnlyFlagValue ? FRAME_RATE_CATEGORY_LOW : FRAME_RATE_CATEGORY_NORMAL) | FRAME_RATE_CATEGORY_REASON_INTERMITTENT; FRAME_RATE_CATEGORY_NORMAL | FRAME_RATE_CATEGORY_REASON_INTERMITTENT; case ViewRootImpl.INTERMITTENT_STATE_NOT_INTERMITTENT -> category = mSizeBasedFrameRateCategoryAndReason; default -> category = mLastFrameRateCategory;
core/tests/coretests/src/android/view/ViewFrameRateTest.java +3 −6 Original line number Diff line number Diff line Loading @@ -499,12 +499,9 @@ public class ViewFrameRateTest { toolkitFrameRateDefaultNormalReadOnly() ? FRAME_RATE_CATEGORY_NORMAL : FRAME_RATE_CATEGORY_HIGH; } else { // intermittent // Even though this is not a small View, step 3 is triggered by this flag, which // brings intermittent to LOW expectedCategory = toolkitFrameRateBySizeReadOnly() ? FRAME_RATE_CATEGORY_LOW : FRAME_RATE_CATEGORY_NORMAL; // intermittent. // The expected category is normal. expectedCategory = FRAME_RATE_CATEGORY_NORMAL; } mActivityRule.runOnUiThread(() -> { mMovingView.invalidate(); Loading