Loading core/java/android/widget/ProgressBar.java +4 −3 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.view.View; import android.view.ViewDebug; import android.view.ViewHierarchyEncoder; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; Loading Loading @@ -307,6 +306,9 @@ public class ProgressBar extends View { setMax(a.getInt(R.styleable.ProgressBar_max, mMax)); setProgress(a.getInt(R.styleable.ProgressBar_progress, mProgress)); // onProgressRefresh() is only called when the progress changes. So we should set // stateDescription during initialization here. super.setStateDescription(formatStateDescription(mProgress)); setSecondaryProgress(a.getInt( R.styleable.ProgressBar_secondaryProgress, mSecondaryProgress)); Loading Loading @@ -1599,8 +1601,7 @@ public class ProgressBar extends View { } void onProgressRefresh(float scale, boolean fromUser, int progress) { if (AccessibilityManager.getInstance(mContext).isEnabled() && mCustomStateDescription == null) { if (mCustomStateDescription == null) { super.setStateDescription(formatStateDescription(mProgress)); } } Loading Loading
core/java/android/widget/ProgressBar.java +4 −3 Original line number Diff line number Diff line Loading @@ -52,7 +52,6 @@ import android.view.View; import android.view.ViewDebug; import android.view.ViewHierarchyEncoder; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; Loading Loading @@ -307,6 +306,9 @@ public class ProgressBar extends View { setMax(a.getInt(R.styleable.ProgressBar_max, mMax)); setProgress(a.getInt(R.styleable.ProgressBar_progress, mProgress)); // onProgressRefresh() is only called when the progress changes. So we should set // stateDescription during initialization here. super.setStateDescription(formatStateDescription(mProgress)); setSecondaryProgress(a.getInt( R.styleable.ProgressBar_secondaryProgress, mSecondaryProgress)); Loading Loading @@ -1599,8 +1601,7 @@ public class ProgressBar extends View { } void onProgressRefresh(float scale, boolean fromUser, int progress) { if (AccessibilityManager.getInstance(mContext).isEnabled() && mCustomStateDescription == null) { if (mCustomStateDescription == null) { super.setStateDescription(formatStateDescription(mProgress)); } } Loading