/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_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() 70 EXPECT_FALSE(theme->GetAttribute(app::R::attr::attr_one).has_value()); in TEST_F() 77 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local 78 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleOne).has_value()); in TEST_F() 80 auto value = theme->GetAttribute(app::R::attr::attr_one); in TEST_F() 86 value = theme->GetAttribute(app::R::attr::attr_two); in TEST_F() 97 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in TEST_F() local 98 ASSERT_TRUE(theme->ApplyStyle(app::R::style::StyleTwo).has_value()); in TEST_F() [all …]
|
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() 74 theme->GetAttribute(kAttrId); in BM_ThemeGetAttribute() 84 std::unique_ptr<ResTable::Theme> theme{new ResTable::Theme(res_table)}; in BM_ThemeGetAttributeOld() local 85 theme->applyStyle(kStyleId, false /* force */); in BM_ThemeGetAttributeOld() 91 theme->getAttribute(kAttrId, &value, &flags); in BM_ThemeGetAttributeOld()
|
D | AttributeResolution_bench.cpp | 65 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyle() local 66 theme->ApplyStyle(app::R::style::StyleTwo); in BM_ApplyStyle() 75 ApplyStyle(theme.get(), &xml_tree, 0u /*def_style_attr*/, 0u /*def_style_res*/, attrs.data(), in BM_ApplyStyle() 138 std::unique_ptr<Theme> theme = assetmanager.NewTheme(); in BM_ApplyStyleFramework() local 139 theme->ApplyStyle(Theme_Material_Light); in BM_ApplyStyleFramework() 160 ApplyStyle(theme.get(), &xml_tree, 0x01010084u /*def_style_attr*/, 0u /*def_style_res*/, in BM_ApplyStyleFramework()
|
/frameworks/base/core/java/android/app/ |
D | Presentation.java | 192 public Presentation(Context outerContext, Display display, int theme) { in Presentation() argument 193 this(outerContext, display, theme, INVALID_WINDOW_TYPE); in Presentation() 217 public Presentation(@NonNull Context outerContext, @NonNull Display display, int theme, in Presentation() argument 219 super(createPresentationContext(outerContext, display, theme, type), theme, false); in Presentation() local 314 int theme) { in createPresentationContext() argument 315 return createPresentationContext(outerContext, display, theme, INVALID_WINDOW_TYPE); in createPresentationContext() 319 Context outerContext, Display display, int theme, @WindowType int type) { in createPresentationContext() argument 329 if (theme == 0) { in createPresentationContext() 333 theme = outValue.resourceId; in createPresentationContext() 335 return new ContextThemeWrapper(windowContext, theme); in createPresentationContext()
|
/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/packages/SystemUI/compose/core/src/com/android/compose/theme/ |
D | PlatformTheme.kt | 17 package com.android.compose.theme 27 import com.android.compose.theme.typography.TypeScaleTokens 28 import com.android.compose.theme.typography.TypefaceNames 29 import com.android.compose.theme.typography.TypefaceTokens 30 import com.android.compose.theme.typography.TypographyTokens 31 import com.android.compose.theme.typography.platformTypography
|
/frameworks/base/core/java/com/android/internal/widget/remotecompose/core/operations/ |
D | Theme.java | 49 public Theme(int theme) { in Theme() argument 50 this.mTheme = theme; in Theme() 86 public void apply(WireBuffer buffer, int theme) { in apply() argument 88 buffer.writeInt(theme); in apply() 93 int theme = buffer.readInt(); in read() local 94 operations.add(new Theme(theme)); in read()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | MediaRouteDialogPresenter.java | 72 int theme = MediaRouteChooserDialog.isLightTheme(context) in createDialog() local 75 return createDialog(context, routeTypes, extendedSettingsClickListener, theme); in createDialog() 80 int routeTypes, View.OnClickListener extendedSettingsClickListener, int theme) { in createDialog() argument 81 return createDialog(context, routeTypes, extendedSettingsClickListener, theme, in createDialog() 87 View.OnClickListener extendedSettingsClickListener, int theme, in createDialog() argument 93 final MediaRouteChooserDialog d = new MediaRouteChooserDialog(context, theme, in createDialog() 99 return new MediaRouteControllerDialog(context, theme); in createDialog()
|
/frameworks/base/libs/androidfw/ |
D | AttributeResolution.cpp | 66 base::expected<const ResolvedBag*, NullOrIOError> GetStyleBag(Theme* theme, in GetStyleBag() argument 72 std::optional<AssetManager2::SelectedValue> value = theme->GetAttribute(theme_attribute_resid); in GetStyleBag() 75 auto result = theme->GetAssetManager()->ResolveBag(*value); in GetStyleBag() 84 return theme->GetAssetManager()->GetBag(fallback_resid); in GetStyleBag() 90 base::expected<const ResolvedBag*, NullOrIOError> GetXmlStyleBag(Theme* theme, in GetXmlStyleBag() argument 106 if (std::optional<AssetManager2::SelectedValue> result = theme->GetAttribute(value.data)) { in GetXmlStyleBag() 108 return theme->GetAssetManager()->ResolveBag(*result); in GetXmlStyleBag() 113 return theme->GetAssetManager()->GetBag(value.data); in GetXmlStyleBag() 121 base::expected<std::monostate, IOError> ResolveAttrs(Theme* theme, uint32_t def_style_attr, in ResolveAttrs() argument 126 DEBUG_LOG("APPLY STYLE: theme=0x%p defStyleAttr=0x%x defStyleRes=0x%x", theme, def_style_attr, in ResolveAttrs() [all …]
|
/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() 127 animator = createAnimatorFromXml(resources, theme, parser, pathErrorScale); in loadAnimator() 135 animatorCache.put(id, theme, constantState, cacheGeneration); in loadAnimator() 137 animator = constantState.newInstance(resources, theme); in loadAnimator() 163 final Theme theme = context.getTheme(); in loadStateListAnimator() local 164 StateListAnimator animator = cache.getInstance(id, resources, theme); in loadStateListAnimator() 179 cache.put(id, theme, constantState, cacheGeneration); in loadStateListAnimator() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/theme/ |
D | ThemeOverlayApplierTest.java | 16 package com.android.systemui.theme; 18 import static com.android.systemui.theme.ThemeOverlayApplier.ANDROID_PACKAGE; 19 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ACCENT_COLOR; 20 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_DYNAMIC_COLOR; 21 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_FONT; 22 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_ANDROID; 23 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_LAUNCHER; 24 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_SETTINGS; 25 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_SYSUI; 26 import static com.android.systemui.theme.ThemeOverlayApplier.OVERLAY_CATEGORY_ICON_THEME_PICKER; [all …]
|
/frameworks/base/packages/SystemUI/compose/features/src/com/android/systemui/statusbar/phone/ |
D | SystemUIDialogFactoryExt.kt | 45 import com.android.compose.theme.PlatformTheme in <lambda>() 74 theme: Int = SystemUIDialog.DEFAULT_THEME, in <lambda>() 81 theme = theme, in <lambda>() 97 theme: Int = R.style.Theme_SystemUI_BottomSheet, in SystemUIDialogFactory() 103 theme = theme, in SystemUIDialogFactory() 140 theme: Int, in SystemUIDialogFactory() 145 val dialog = create(context, theme, dismissOnDeviceLock, delegate) in SystemUIDialogFactory()
|
/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/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/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/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/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/base/packages/SystemUI/src/com/android/systemui/qs/tiles/impl/screenrecord/domain/ui/ |
D | ScreenRecordTileMapper.kt | 35 private val theme: Resources.Theme, constant in com.android.systemui.qs.tiles.impl.screenrecord.domain.ui.ScreenRecordTileMapper 38 QSTileState.build(resources, theme, config.uiConfig) { in map() 48 resources.getDrawable(iconRes!!, theme), in map() 60 resources.getDrawable(iconRes!!, theme), in map() 73 resources.getDrawable(iconRes!!, theme), in map()
|
/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/content/res/ |
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 | DrawableCache.java | 42 public Drawable getInstance(long key, Resources resources, Resources.Theme theme) { in getInstance() argument 43 final Drawable.ConstantState entry = get(key, theme); in getInstance() 45 return entry.newDrawable(resources, theme); in getInstance()
|
/frameworks/base/graphics/java/android/graphics/drawable/ |
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()
|