Loading core/res/res/values/themes_device_defaults.xml +11 −0 Original line number Diff line number Diff line Loading @@ -753,4 +753,15 @@ easier. <!-- DeviceDefault theme for the default system theme. --> <style name="Theme.DeviceDefault.System" parent="Theme.DeviceDefault.Light.DarkActionBar" /> <style name="ThemeOverlay.DeviceDefault" /> <style name="ThemeOverlay.DeviceDefault.Accent"> <item name="colorAccent">@color/accent_device_default_dark</item> </style> <style name="ThemeOverlay.DeviceDefault.Accent.Light"> <item name="colorAccent">@color/accent_device_default_light</item> </style> </resources> packages/SettingsLib/src/com/android/settingslib/Utils.java +10 −0 Original line number Diff line number Diff line package com.android.settingslib; import android.annotation.ColorInt; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; Loading @@ -8,6 +9,7 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.UserInfo; import android.content.pm.Signature; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; Loading Loading @@ -154,6 +156,14 @@ public class Utils { return statusString; } @ColorInt public static int getColorAccent(Context context) { TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent}); @ColorInt int colorAccent = ta.getColor(0, 0); ta.recycle(); return colorAccent; } /** * Determine whether a package is a "system package", in which case certain things (like * disabling notifications or disabling the package altogether) should be disallowed. Loading packages/SystemUI/res/color/notification_guts_buttons.xml +1 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="@*android:color/material_deep_teal_500" /> android:color="?android:attr/colorAccent" /> <item android:color="@android:color/black" android:alpha=".54" /> </selector> No newline at end of file packages/SystemUI/res/color/qs_detail_progress_track.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- I really don't want to define this, but the View that uses this asset uses both the light and dark accent colors. --> <item android:alpha="0.6" android:drawable="@*android:color/accent_device_default_light" /> </selector> packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:color="@color/current_user_border_color" /> <item android:state_activated="true" android:color="?android:attr/colorAccent" /> <item android:color="@android:color/transparent" /> </selector> No newline at end of file Loading
core/res/res/values/themes_device_defaults.xml +11 −0 Original line number Diff line number Diff line Loading @@ -753,4 +753,15 @@ easier. <!-- DeviceDefault theme for the default system theme. --> <style name="Theme.DeviceDefault.System" parent="Theme.DeviceDefault.Light.DarkActionBar" /> <style name="ThemeOverlay.DeviceDefault" /> <style name="ThemeOverlay.DeviceDefault.Accent"> <item name="colorAccent">@color/accent_device_default_dark</item> </style> <style name="ThemeOverlay.DeviceDefault.Accent.Light"> <item name="colorAccent">@color/accent_device_default_light</item> </style> </resources>
packages/SettingsLib/src/com/android/settingslib/Utils.java +10 −0 Original line number Diff line number Diff line package com.android.settingslib; import android.annotation.ColorInt; import android.content.Context; import android.content.Intent; import android.content.pm.PackageInfo; Loading @@ -8,6 +9,7 @@ import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.UserInfo; import android.content.pm.Signature; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.drawable.Drawable; Loading Loading @@ -154,6 +156,14 @@ public class Utils { return statusString; } @ColorInt public static int getColorAccent(Context context) { TypedArray ta = context.obtainStyledAttributes(new int[]{android.R.attr.colorAccent}); @ColorInt int colorAccent = ta.getColor(0, 0); ta.recycle(); return colorAccent; } /** * Determine whether a package is a "system package", in which case certain things (like * disabling notifications or disabling the package altogether) should be disallowed. Loading
packages/SystemUI/res/color/notification_guts_buttons.xml +1 −1 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:color="@*android:color/material_deep_teal_500" /> android:color="?android:attr/colorAccent" /> <item android:color="@android:color/black" android:alpha=".54" /> </selector> No newline at end of file
packages/SystemUI/res/color/qs_detail_progress_track.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2016 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <!-- I really don't want to define this, but the View that uses this asset uses both the light and dark accent colors. --> <item android:alpha="0.6" android:drawable="@*android:color/accent_device_default_light" /> </selector>
packages/SystemUI/res/color/qs_user_detail_avatar_frame.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,6 +17,6 @@ --> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_activated="true" android:color="@color/current_user_border_color" /> <item android:state_activated="true" android:color="?android:attr/colorAccent" /> <item android:color="@android:color/transparent" /> </selector> No newline at end of file