/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/util/ |
D | ThemeResolver.java | 72 public int resolve(@Nullable String theme) { in resolve() argument 73 return resolve(theme, /* suppressDayNight= */ false); in resolve() 77 private int resolve(@Nullable String theme, boolean suppressDayNight) { in resolve() argument 79 useDayNight && !suppressDayNight ? getDayNightThemeRes(theme) : getThemeRes(theme); in resolve() 84 if (oldestSupportedTheme != null && compareThemes(theme, oldestSupportedTheme) < 0) { in resolve() 102 private static int getDayNightThemeRes(@Nullable String theme) { in getDayNightThemeRes() argument 103 if (theme != null) { in getDayNightThemeRes() 104 switch (theme) { in getDayNightThemeRes() 129 private static int getThemeRes(@Nullable String theme) { in getThemeRes() argument 130 if (theme != null) { in getThemeRes() [all …]
|
D | WizardManagerHelper.java | 247 final String theme = intent.getStringExtra(EXTRA_THEME); in isLightTheme() local 248 return isLightTheme(theme, def); in isLightTheme() 260 public static boolean isLightTheme(String theme, boolean def) { in isLightTheme() argument 261 if (THEME_HOLO_LIGHT.equals(theme) in isLightTheme() 262 || THEME_MATERIAL_LIGHT.equals(theme) in isLightTheme() 263 || THEME_GLIF_LIGHT.equals(theme) in isLightTheme() 264 || THEME_GLIF_V2_LIGHT.equals(theme) in isLightTheme() 265 || THEME_GLIF_V3_LIGHT.equals(theme)) { in isLightTheme() 267 } else if (THEME_HOLO.equals(theme) in isLightTheme() 268 || THEME_MATERIAL.equals(theme) in isLightTheme() [all …]
|
/frameworks/base/libs/androidfw/tests/ |
D | Theme_bench.cpp | 41 auto theme = assets.NewTheme(); in BM_ThemeApplyStyleFramework() local 42 theme->ApplyStyle(kStyleId, false /* force */); in BM_ThemeApplyStyleFramework() 58 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; in BM_ThemeApplyStyleFrameworkOld() local 59 theme->applyStyle(kStyleId, false /* force */); in BM_ThemeApplyStyleFrameworkOld() 70 auto theme = assets.NewTheme(); in BM_ThemeGetAttribute() local 71 theme->ApplyStyle(kStyleId, false /* force */); in BM_ThemeGetAttribute() 77 theme->GetAttribute(kAttrId, &value, &flags); in BM_ThemeGetAttribute() 87 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; in BM_ThemeGetAttributeOld() local 88 theme->applyStyle(kStyleId, false /* force */); in BM_ThemeGetAttributeOld() 94 theme->getAttribute(kAttrId, &value, &flags); in BM_ThemeGetAttributeOld()
|
D | Theme_test.cpp | 67 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local 68 EXPECT_EQ(0u, theme->GetChangingConfigurations()); in TEST_F() 69 EXPECT_EQ(&assetmanager, theme->GetAssetManager()); in TEST_F() 73 EXPECT_EQ(kInvalidCookie, theme->GetAttribute(app::R::attr::attr_one, &value, &flags)); in TEST_F() 80 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local 81 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne)); in TEST_F() 87 cookie = theme->GetAttribute(app::R::attr::attr_one, &value, &flags); in TEST_F() 93 cookie = theme->GetAttribute(app::R::attr::attr_two, &value, &flags); in TEST_F() 104 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local 105 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo)); in TEST_F() [all …]
|
D | AttributeResolution_bench.cpp | 66 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyle() local 67 theme->ApplyStyle(app::R::style::StyleTwo); in BM_ApplyStyle() 76 ApplyStyle(theme.get(), &xml_tree, 0u /*def_style_attr*/, 0u /*def_style_res*/, attrs.data(), in BM_ApplyStyle() 147 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyleFramework() local 148 theme->ApplyStyle(Theme_Material_Light); in BM_ApplyStyleFramework() 169 ApplyStyle(theme.get(), &xml_tree, 0x01010084u /*def_style_attr*/, 0u /*def_style_res*/, in BM_ApplyStyleFramework()
|
/frameworks/base/core/java/android/view/ |
D | ContextThemeWrapper.java | 80 public ContextThemeWrapper(Context base, Resources.Theme theme) { in ContextThemeWrapper() argument 82 mTheme = theme; in ContextThemeWrapper() 156 public void setTheme(@Nullable Resources.Theme theme) { in setTheme() argument 157 mTheme = theme; in setTheme() 202 protected void onApplyThemeResource(Resources.Theme theme, int resId, boolean first) { in onApplyThemeResource() argument 203 theme.applyStyle(resId, true); in onApplyThemeResource() 211 final Resources.Theme theme = getBaseContext().getTheme(); in initializeTheme() local 212 if (theme != null) { in initializeTheme() 213 mTheme.setTo(theme); in initializeTheme()
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/items/ |
D | ButtonItem.java | 42 private int theme = R.style.SuwButtonItem; field in ButtonItem 56 theme = a.getResourceId(R.styleable.SuwButtonItem_android_theme, R.style.SuwButtonItem); in ButtonItem() 79 public void setTheme(int theme) { in setTheme() argument 80 this.theme = theme; in setTheme() 86 return theme; in getTheme() 123 if (theme != 0) { in createButton() 124 context = new ContextThemeWrapper(context, theme); in createButton()
|
/frameworks/base/core/java/android/animation/ |
D | AnimatorInflater.java | 104 public static Animator loadAnimator(Resources resources, Theme theme, int id) in loadAnimator() argument 106 return loadAnimator(resources, theme, id, 1); in loadAnimator() 110 public static Animator loadAnimator(Resources resources, Theme theme, int id, in loadAnimator() argument 114 Animator animator = animatorCache.getInstance(id, resources, theme); in loadAnimator() 126 animator = createAnimatorFromXml(resources, theme, parser, pathErrorScale); in loadAnimator() 134 animatorCache.put(id, theme, constantState); in loadAnimator() 136 animator = constantState.newInstance(resources, theme); in loadAnimator() 162 final Theme theme = context.getTheme(); in loadStateListAnimator() local 163 StateListAnimator animator = cache.getInstance(id, resources, theme); in loadStateListAnimator() 176 cache.put(id, theme, constantState); in loadStateListAnimator() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/theme/ |
D | ThemeOverlayManagerTest.java | 16 package com.android.systemui.theme; 18 import static com.android.systemui.theme.ThemeOverlayManager.ANDROID_PACKAGE; 19 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_COLOR; 20 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_FONT; 21 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_ICON_ANDROID; 22 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_ICON_LAUNCHER; 23 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_ICON_SETTINGS; 24 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_ICON_SYSUI; 25 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_ICON_THEME_PICKER; 26 import static com.android.systemui.theme.ThemeOverlayManager.OVERLAY_CATEGORY_SHAPE; [all …]
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/ |
D | ButtonFooterMixin.java | 68 public Button addButton(CharSequence text, @StyleRes int theme) { in addButton() argument 69 Button button = createThemedButton(context, theme); in addButton() 84 public Button addButton(@StringRes int text, @StyleRes int theme) { in addButton() argument 85 Button button = createThemedButton(context, theme); in addButton() 163 private Button createThemedButton(Context context, @StyleRes int theme) { in createThemedButton() argument 166 LayoutInflater inflater = LayoutInflater.from(new ContextThemeWrapper(context, theme)); in createThemedButton()
|
/frameworks/base/core/java/android/app/ |
D | Presentation.java | 186 public Presentation(Context outerContext, Display display, int theme) { in Presentation() argument 187 super(createPresentationContext(outerContext, display, theme), theme, false); in Presentation() local 306 Context outerContext, Display display, int theme) { in createPresentationContext() argument 315 if (theme == 0) { in createPresentationContext() 319 theme = outValue.resourceId; in createPresentationContext() 330 return new ContextThemeWrapper(displayContext, theme) { in createPresentationContext()
|
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/ |
D | NavigationBar.java | 62 int theme = attributes.getResourceId(suwNavBarTheme, 0); in getNavbarTheme() local 63 if (theme == 0) { in getNavbarTheme() 71 theme = isDarkBg ? R.style.SuwNavBarThemeDark : R.style.SuwNavBarThemeLight; in getNavbarTheme() 74 return theme; in getNavbarTheme() 78 final int theme = getNavbarTheme(context); in getThemedContext() local 79 return new ContextThemeWrapper(context, theme); in getThemedContext()
|
/frameworks/base/core/java/com/android/internal/graphics/drawable/ |
D | AnimationScaleListDrawable.java | 78 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflate() argument 80 final TypedArray a = obtainAttributes(r, theme, attrs, in inflate() 85 inflateChildElements(r, parser, attrs, theme); in inflate() 94 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflateChildElements() argument 112 final TypedArray a = obtainAttributes(r, theme, attrs, in inflateChildElements() 127 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements() 239 public void applyTheme(@NonNull Theme theme) { in applyTheme() argument 240 super.applyTheme(theme); in applyTheme()
|
/frameworks/layoutlib/bridge/src/android/content/res/ |
D | ComplexColor_Accessor.java | 36 @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) in createGradientColorFromXmlInner() argument 38 return GradientColor.createFromXmlInner(r, parser, attrs, theme); in createGradientColorFromXmlInner() 42 @NonNull XmlPullParser parser, @NonNull AttributeSet attrs, @Nullable Theme theme) in createColorStateListFromXmlInner() argument 44 return ColorStateList.createFromXmlInner(r, parser, attrs, theme); in createColorStateListFromXmlInner()
|
/frameworks/base/core/java/android/widget/ |
D | ResourceCursorAdapter.java | 114 public void setDropDownViewTheme(Resources.Theme theme) { in setDropDownViewTheme() argument 115 super.setDropDownViewTheme(theme); in setDropDownViewTheme() 117 if (theme == null) { in setDropDownViewTheme() 119 } else if (theme == mInflater.getContext().getTheme()) { in setDropDownViewTheme() 122 final Context context = new ContextThemeWrapper(mContext, theme); in setDropDownViewTheme()
|
/frameworks/base/libs/androidfw/ |
D | AttributeResolution.cpp | 64 bool ResolveAttrs(Theme* theme, uint32_t def_style_attr, uint32_t def_style_res, in ResolveAttrs() argument 68 ALOGI("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x", theme, in ResolveAttrs() 72 AssetManager2* assetmanager = theme->GetAssetManager(); in ResolveAttrs() 82 if (theme->GetAttribute(def_style_attr, &value, &def_style_flags) != kInvalidCookie) { in ResolveAttrs() 143 theme->ResolveAttributeReference(cookie, &value, &config, &type_set_flags, &resid); in ResolveAttrs() 152 ApkAssetsCookie new_cookie = theme->GetAttribute(cur_ident, &value, &type_set_flags); in ResolveAttrs() 205 void ApplyStyle(Theme* theme, ResXMLParser* xml_parser, uint32_t def_style_attr, in ApplyStyle() argument 209 ALOGI("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x xml=0x%p", theme, in ApplyStyle() 213 AssetManager2* assetmanager = theme->GetAssetManager(); in ApplyStyle() 223 if (theme->GetAttribute(def_style_attr, &value, &def_style_flags) != kInvalidCookie) { in ApplyStyle() [all …]
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
D | DrawableInflater.java | 78 @NonNull Resources resources, @Nullable Theme theme, @DrawableRes int id) { in loadDrawable() argument 79 return resources.getDrawable(id, theme); in loadDrawable() 115 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflateFromXml() argument 117 return inflateFromXmlForDensity(name, parser, attrs, 0, theme); in inflateFromXml() 126 @NonNull AttributeSet attrs, int density, @Nullable Theme theme) in inflateFromXmlForDensity() argument 144 drawable.inflate(mRes, parser, attrs, theme); in inflateFromXmlForDensity()
|
D | LevelListDrawable.java | 88 public void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Theme theme) in inflate() argument 90 super.inflate(r, parser, attrs, theme); in inflate() 93 inflateChildElements(r, parser, attrs, theme); in inflate() 97 Theme theme) throws XmlPullParserException, IOException { in inflateChildElements() argument 115 TypedArray a = obtainAttributes(r, theme, attrs, in inflateChildElements() 134 dr = r.getDrawable(drawableRes, theme); in inflateChildElements() 144 dr = Drawable.createFromXmlInner(r, parser, attrs, theme); in inflateChildElements()
|
D | AnimatedStateListDrawable.java | 379 @NonNull AttributeSet attrs, @Nullable Theme theme) in inflate() argument 382 r, theme, attrs, R.styleable.AnimatedStateListDrawable); in inflate() 388 inflateChildElements(r, parser, attrs, theme); in inflate() 394 public void applyTheme(@Nullable Theme theme) { in applyTheme() argument 395 super.applyTheme(theme); in applyTheme() 402 final TypedArray a = theme.resolveAttributes( in applyTheme() 439 Theme theme) throws XmlPullParserException, IOException { in inflateChildElements() argument 456 parseItem(r, parser, attrs, theme); in inflateChildElements() 458 parseTransition(r, parser, attrs, theme); in inflateChildElements() 464 @NonNull AttributeSet attrs, @Nullable Theme theme) in parseTransition() argument [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | ThemedResourceCache.java | 49 public void put(long key, @Nullable Theme theme, @NonNull T entry) { in put() argument 50 put(key, theme, entry, true); in put() 63 public void put(long key, @Nullable Theme theme, @NonNull T entry, boolean usesTheme) { in put() argument 73 entries = getThemedLocked(theme, true); in put() 89 public T get(long key, @Nullable Theme theme) { in get() argument 95 final LongSparseArray<WeakReference<T>> themedEntries = getThemedLocked(theme, false); in get()
|
D | DrawableCache.java | 41 public Drawable getInstance(long key, Resources resources, Resources.Theme theme) { in getInstance() argument 42 final Drawable.ConstantState entry = get(key, theme); in getInstance() 44 return entry.newDrawable(resources, theme); in getInstance()
|
D | ConfigurationBoundResourceCache.java | 43 public T getInstance(long key, Resources resources, Resources.Theme theme) { in getInstance() argument 44 final ConstantState<T> entry = get(key, theme); in getInstance() 46 return entry.newInstance(resources, theme); in getInstance()
|
D | Resources.java | 293 Theme theme = weakThemeRef != null ? weakThemeRef.get() : null; in setImpl() local 294 if (theme != null) { in setImpl() 295 theme.setImpl(mResourcesImpl.newThemeImpl(theme.getKey())); in setImpl() 843 public Drawable getDrawable(@DrawableRes int id, @Nullable Theme theme) in getDrawable() argument 845 return getDrawableForDensity(id, 0, theme); in getDrawable() 901 public Drawable getDrawableForDensity(@DrawableRes int id, int density, @Nullable Theme theme) { in getDrawableForDensity() argument 906 return impl.loadDrawable(this, value, id, density, theme); in getDrawableForDensity() 914 Drawable loadDrawable(@NonNull TypedValue value, int id, int density, @Nullable Theme theme) in loadDrawable() argument 916 return mResourcesImpl.loadDrawable(this, value, id, density, theme); in loadDrawable() 978 public int getColor(@ColorRes int id, @Nullable Theme theme) throws NotFoundException { in getColor() argument [all …]
|
/frameworks/base/core/java/android/service/wallpaper/ |
D | WallpaperSettingsActivity.java | 40 Resources.Theme theme = getTheme(); in onCreate() local 42 theme.applyStyle(com.android.internal.R.style.PreviewWallpaperSettings, true); in onCreate() 44 theme.applyStyle(com.android.internal.R.style.ActiveWallpaperSettings, true); in onCreate()
|
/frameworks/base/core/java/android/view/animation/ |
D | AnimationUtils.java | 368 …public static Interpolator loadInterpolator(Resources res, Theme theme, int id) throws NotFoundExc… in loadInterpolator() argument 372 return createInterpolatorFromXml(res, theme, parser); in loadInterpolator() 390 …private static Interpolator createInterpolatorFromXml(Resources res, Theme theme, XmlPullParser pa… in createInterpolatorFromXml() argument 413 interpolator = new AccelerateInterpolator(res, theme, attrs); in createInterpolatorFromXml() 415 interpolator = new DecelerateInterpolator(res, theme, attrs); in createInterpolatorFromXml() 419 interpolator = new CycleInterpolator(res, theme, attrs); in createInterpolatorFromXml() 421 interpolator = new AnticipateInterpolator(res, theme, attrs); in createInterpolatorFromXml() 423 interpolator = new OvershootInterpolator(res, theme, attrs); in createInterpolatorFromXml() 425 interpolator = new AnticipateOvershootInterpolator(res, theme, attrs); in createInterpolatorFromXml() 429 interpolator = new PathInterpolator(res, theme, attrs); in createInterpolatorFromXml()
|