diff --git a/core/res/res/values/colors_device_defaults.xml b/core/res/res/values/colors_device_defaults.xml new file mode 100644 index 0000000000000..e830b64094f43 --- /dev/null +++ b/core/res/res/values/colors_device_defaults.xml @@ -0,0 +1,31 @@ + + + + + + @color/primary_material_dark + @color/primary_material_light + @color/primary_material_settings + @color/primary_dark_material_dark + @color/primary_dark_material_light + @color/primary_dark_material_settings + + @color/secondary_material_settings + + @color/accent_material_light + @color/accent_material_dark + \ No newline at end of file diff --git a/core/res/res/values/colors_material.xml b/core/res/res/values/colors_material.xml index c8ca11689299b..a18abdf9712ce 100644 --- a/core/res/res/values/colors_material.xml +++ b/core/res/res/values/colors_material.xml @@ -26,9 +26,13 @@ @color/material_grey_900 @color/material_grey_100 + @color/material_blue_grey_900 @color/black @color/material_grey_600 @color/material_grey_300 + @color/material_blue_grey_950 + + @color/material_blue_grey_800 @color/material_deep_teal_500 @color/material_deep_teal_200 diff --git a/core/res/res/values/themes_device_defaults.xml b/core/res/res/values/themes_device_defaults.xml index ea1b626a996a0..e5b6c7830adfc 100644 --- a/core/res/res/values/themes_device_defaults.xml +++ b/core/res/res/values/themes_device_defaults.xml @@ -199,25 +199,50 @@ easier. @style/Widget.DeviceDefault.MediaRouteButton + + @color/primary_device_default_dark + @color/primary_dark_device_default_dark + @color/accent_device_default_dark + - - - - + @color/primary_device_default_dark + @color/primary_dark_device_default_dark + @color/accent_device_default_dark - - - - - - - - - - + - + + - - - - - - - - - @@ -510,33 +664,74 @@ easier. @dimen/dialog_fixed_width_minor @dimen/dialog_fixed_height_major @dimen/dialog_fixed_height_minor + + + @color/primary_device_default_light + @color/primary_dark_device_default_light + @color/accent_device_default_light - - - - + + - - diff --git a/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java b/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java index 76ba0a7fbd9f7..579116852cf34 100644 --- a/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java +++ b/packages/SettingsLib/src/com/android/settingslib/HelpUtils.java @@ -24,6 +24,7 @@ import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Resources.Theme; +import android.content.res.TypedArray; import android.net.Uri; import android.text.TextUtils; import android.util.Log; @@ -162,10 +163,9 @@ public class HelpUtils { intent.putExtra(EXTRA_CONTEXT, backupContext); } intent.putExtra(EXTRA_THEME, 1 /* Light, dark action bar */); - Theme theme = context.getTheme(); - TypedValue typedValue = new TypedValue(); - theme.resolveAttribute(android.R.attr.colorPrimary, typedValue, true); - intent.putExtra(EXTRA_PRIMARY_COLOR, context.getColor(typedValue.resourceId)); + TypedArray array = context.obtainStyledAttributes(new int[]{android.R.attr.colorPrimary}); + intent.putExtra(EXTRA_PRIMARY_COLOR, array.getColor(0, 0)); + array.recycle(); } /**