Loading core/java/android/view/View.java +22 −18 Original line number Diff line number Diff line Loading @@ -33056,7 +33056,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } private float getSizePercentage() { if (mResources == null || getVisibility() != VISIBLE) { float alpha = mTransformationInfo != null ? mTransformationInfo.mAlpha : 1; int visibility = mViewFlags & VISIBILITY_MASK; if (mResources == null || alpha == 0 || visibility != VISIBLE) { return 0; } Loading @@ -33081,11 +33084,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private void votePreferredFrameRate() { // use toolkitSetFrameRate flag to gate the change if (sToolkitSetFrameRateReadOnlyFlagValue) { ViewRootImpl viewRootImpl = getViewRootImpl(); float sizePercentage = getSizePercentage(); int frameRateCateogry = calculateFrameRateCategory(sizePercentage); if (sToolkitSetFrameRateReadOnlyFlagValue && viewRootImpl != null && sizePercentage > 0) { if (viewRootImpl != null && sizePercentage > 0) { if (mPreferredFrameRate < 0) { if (mPreferredFrameRate == REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE) { frameRateCateogry = FRAME_RATE_CATEGORY_NO_PREFERENCE; Loading @@ -33102,6 +33105,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, viewRootImpl.votePreferredFrameRateCategory(frameRateCateogry); } } } /** * Set the current velocity of the View, we only track positive value. Loading
core/java/android/view/View.java +22 −18 Original line number Diff line number Diff line Loading @@ -33056,7 +33056,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } private float getSizePercentage() { if (mResources == null || getVisibility() != VISIBLE) { float alpha = mTransformationInfo != null ? mTransformationInfo.mAlpha : 1; int visibility = mViewFlags & VISIBILITY_MASK; if (mResources == null || alpha == 0 || visibility != VISIBLE) { return 0; } Loading @@ -33081,11 +33084,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private void votePreferredFrameRate() { // use toolkitSetFrameRate flag to gate the change if (sToolkitSetFrameRateReadOnlyFlagValue) { ViewRootImpl viewRootImpl = getViewRootImpl(); float sizePercentage = getSizePercentage(); int frameRateCateogry = calculateFrameRateCategory(sizePercentage); if (sToolkitSetFrameRateReadOnlyFlagValue && viewRootImpl != null && sizePercentage > 0) { if (viewRootImpl != null && sizePercentage > 0) { if (mPreferredFrameRate < 0) { if (mPreferredFrameRate == REQUESTED_FRAME_RATE_CATEGORY_NO_PREFERENCE) { frameRateCateogry = FRAME_RATE_CATEGORY_NO_PREFERENCE; Loading @@ -33102,6 +33105,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, viewRootImpl.votePreferredFrameRateCategory(frameRateCateogry); } } } /** * Set the current velocity of the View, we only track positive value.