/frameworks/base/core/tests/coretests/src/android/util/ |
D | StateSetTest.java | 32 int[] stateSet = new int[3]; in testStateSetPositiveMatches() local 35 stateSet[0] = 1; in testStateSetPositiveMatches() 36 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 38 stateSet[0] = 2; in testStateSetPositiveMatches() 39 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 42 assertFalse(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 44 stateSet[1] = 1; in testStateSetPositiveMatches() 45 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() 47 stateSet[2] = 12345; in testStateSetPositiveMatches() 48 assertTrue(StateSet.stateSetMatches(stateSpec, stateSet)); in testStateSetPositiveMatches() [all …]
|
/frameworks/native/services/surfaceflinger/ |
D | LayerVector.cpp | 22 LayerVector::LayerVector(const StateSet stateSet) : mStateSet(stateSet) {} in LayerVector() argument 24 LayerVector::LayerVector(const LayerVector& rhs, const StateSet stateSet) in LayerVector() argument 25 : SortedVector<sp<Layer>>(rhs), mStateSet(stateSet) {} in LayerVector() 62 void LayerVector::traverseInZOrder(StateSet stateSet, const Visitor& visitor) const { in traverseInZOrder() argument 65 auto& state = (stateSet == StateSet::Current) ? layer->getCurrentState() in traverseInZOrder() 70 layer->traverseInZOrder(stateSet, visitor); in traverseInZOrder() 74 void LayerVector::traverseInReverseZOrder(StateSet stateSet, const Visitor& visitor) const { in traverseInReverseZOrder() argument 77 auto& state = (stateSet == StateSet::Current) ? layer->getCurrentState() in traverseInReverseZOrder() 82 layer->traverseInReverseZOrder(stateSet, visitor); in traverseInReverseZOrder()
|
D | LayerVector.h | 41 explicit LayerVector(const StateSet stateSet); 42 LayerVector(const LayerVector& rhs, const StateSet stateSet); 51 void traverseInReverseZOrder(StateSet stateSet, const Visitor& visitor) const; 52 void traverseInZOrder(StateSet stateSet, const Visitor& visitor) const;
|
D | Layer.cpp | 1623 bool Layer::usingRelativeZ(LayerVector::StateSet stateSet) const { in usingRelativeZ() 1624 const bool useDrawing = stateSet == LayerVector::StateSet::Drawing; in usingRelativeZ() 1630 LayerVector::StateSet stateSet, bool* outSkipRelativeZUsers) { in makeTraversalList() argument 1631 LOG_ALWAYS_FATAL_IF(stateSet == LayerVector::StateSet::Invalid, in makeTraversalList() 1633 const bool useDrawing = stateSet == LayerVector::StateSet::Drawing; in makeTraversalList() 1642 LayerVector traverse(stateSet); in makeTraversalList() 1664 void Layer::traverseInZOrder(LayerVector::StateSet stateSet, const LayerVector::Visitor& visitor) { in traverseInZOrder() argument 1672 const LayerVector list = makeTraversalList(stateSet, &skipRelativeZUsers); in traverseInZOrder() 1677 if (skipRelativeZUsers && relative->usingRelativeZ(stateSet)) { in traverseInZOrder() 1684 relative->traverseInZOrder(stateSet, visitor); in traverseInZOrder() [all …]
|
D | Layer.h | 453 void writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet stateSet, 666 void traverseInReverseZOrder(LayerVector::StateSet stateSet, 668 void traverseInZOrder(LayerVector::StateSet stateSet, const LayerVector::Visitor& visitor); 674 void traverseChildrenInZOrder(LayerVector::StateSet stateSet, 750 LayerVector makeTraversalList(LayerVector::StateSet stateSet, bool* outSkipRelativeZUsers); 836 bool usingRelativeZ(LayerVector::StateSet stateSet) const; 923 std::vector<Layer*> getLayersInTree(LayerVector::StateSet stateSet); 929 LayerVector::StateSet stateSet, 931 LayerVector makeChildrenTraversalList(LayerVector::StateSet stateSet,
|
D | SurfaceFlinger.h | 365 explicit State(LayerVector::StateSet set) : stateSet(set), layersSortedByZ(set) {} in State() 378 const LayerVector::StateSet stateSet = LayerVector::StateSet::Invalid; variable
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | StateListDrawable.java | 84 public void addState(int[] stateSet, Drawable drawable) { in addState() argument 86 mStateListState.addStateSet(stateSet, drawable); in addState() 104 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 105 final boolean changed = super.onStateChange(stateSet); in onStateChange() 107 int idx = mStateListState.indexOfStateSet(stateSet); in onStateChange() 109 + Arrays.toString(stateSet) + " found " + idx); in onStateChange() 283 public int findStateDrawableIndex(@NonNull int[] stateSet) { in findStateDrawableIndex() argument 284 return mStateListState.indexOfStateSet(stateSet); in findStateDrawableIndex() 337 int addStateSet(int[] stateSet, Drawable drawable) { in addStateSet() argument 339 mStateSets[pos] = stateSet; in addStateSet() [all …]
|
D | AnimatedStateListDrawable.java | 112 public void addState(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { in addState() argument 117 mState.addStateSet(stateSet, drawable, id); in addState() 144 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 147 final int targetIndex = mState.indexOfKeyframe(stateSet); in onStateChange() 156 changed |= current.setState(stateSet); in onStateChange() 606 int addStateSet(@NonNull int[] stateSet, @NonNull Drawable drawable, int id) { in addStateSet() argument 607 final int index = super.addStateSet(stateSet, drawable); in addStateSet() 612 int indexOfKeyframe(@NonNull int[] stateSet) { in indexOfKeyframe() argument 613 final int index = super.indexOfStateSet(stateSet); in indexOfKeyframe()
|
D | VectorDrawable.java | 512 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 521 if (state.onStateChange(stateSet)) { in onStateChange() 1132 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1133 return mRootGroup.onStateChange(stateSet); in onStateChange() 1431 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1438 changed |= child.onStateChange(stateSet); in onStateChange() 1704 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1938 public boolean onStateChange(int[] stateSet) { in onStateChange() argument 1944 ((ColorStateList) mStrokeColors).getColorForState(stateSet, oldStrokeColor); in onStateChange() 1953 … final int newFillColor = ((ColorStateList) mFillColors).getColorForState(stateSet, oldFillColor); in onStateChange()
|
D | Drawable.java | 841 public boolean setState(@NonNull final int[] stateSet) { in setState() argument 842 if (!Arrays.equals(mStateSet, stateSet)) { in setState() 843 mStateSet = stateSet; in setState() 844 return onStateChange(stateSet); in setState()
|
D | RippleDrawable.java | 249 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 250 final boolean changed = super.onStateChange(stateSet); in onStateChange() 257 for (int state : stateSet) { in onStateChange()
|
D | GradientDrawable.java | 384 final int[] stateSet = getState(); in setStroke() local 385 color = colorStateList.getColorForState(stateSet, 0); in setStroke() 1083 final int[] stateSet = getState(); 1084 final int color = colorStateList.getColorForState(stateSet, 0); 1106 protected boolean onStateChange(int[] stateSet) { 1112 final int newColor = solidColors.getColorForState(stateSet, 0); 1124 final int newColor = strokeColors.getColorForState(stateSet, 0);
|
D | ColorDrawable.java | 226 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | ShapeDrawable.java | 354 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
D | NinePatchDrawable.java | 568 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument
|
/frameworks/base/core/java/android/util/ |
D | StateSet.java | 148 public static boolean stateSetMatches(int[] stateSpec, int[] stateSet) { in stateSetMatches() argument 149 if (stateSet == null) { in stateSetMatches() 153 int stateSetSize = stateSet.length; in stateSetMatches() 170 final int state = stateSet[j]; in stateSetMatches()
|
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/drawable/ |
D | UserIconDrawableTest.java | 60 int[][] stateSet = new int[][] { {} }; in setTintList_shouldBeApplied() local 62 drawable.setTintList(new ColorStateList(stateSet, colors)); in setTintList_shouldBeApplied()
|
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/ |
D | NavigationBarButton.java | 155 public boolean setState(@NonNull int[] stateSet) { in setState() argument 156 boolean needsInvalidate = super.setState(stateSet); in setState()
|
/frameworks/base/core/java/com/android/internal/graphics/drawable/ |
D | AnimationScaleListDrawable.java | 69 protected boolean onStateChange(int[] stateSet) { in onStateChange() argument 70 final boolean changed = super.onStateChange(stateSet); in onStateChange()
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 561 public int getColorForState(@Nullable int[] stateSet, int defaultColor) { in getColorForState() argument 565 if (StateSet.stateSetMatches(stateSpec, stateSet)) { in getColorForState()
|
/frameworks/base/core/java/android/widget/ |
D | DatePickerCalendarDelegate.java | 220 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local 222 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
|
D | ExpandableListView.java | 508 final int stateSet[] = pos.position.flatListPos == pos.groupMetadata.lastChildFlPos in getIndicator() local 511 indicator.setState(stateSet); in getIndicator()
|
D | SearchView.java | 979 final int[] stateSet = focused ? FOCUSED_STATE_SET : EMPTY_STATE_SET; in updateFocusedState() local 982 searchPlateBg.setState(stateSet); in updateFocusedState() 986 submitAreaBg.setState(stateSet); in updateFocusedState()
|
D | TimePickerClockDelegate.java | 384 final int[][] stateSet = new int[][] {{ R.attr.state_activated }, {}}; in applyLegacyColorFixes() local 386 return new ColorStateList(stateSet, colors); in applyLegacyColorFixes()
|
D | SimpleMonthView.java | 713 final int[] stateSet = StateSet.get(stateMask); in drawDays() local 714 dayTextColor = mDayTextColor.getColorForState(stateSet, 0); in drawDays()
|