Loading data/fonts/fonts.xml +33 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,39 @@ <font weight="700" style="italic">Roboto-BoldItalic.ttf</font> </family> <!-- Pixel 2020 --> <family name="lustria"> <font weight="400" style="normal">Lustria-Regular.ttf</font> </family> <alias name="lustria" to="lustria" weight="400"/> <family name="karla"> <font weight="400" style="normal">Karla-Regular.ttf</font> </family> <alias name="karla" to="karla" weight="400"/> <family name="fraunces"> <font weight="400" style="normal">Fraunces-Regular.ttf</font> <font weight="600" style="normal">Fraunces-SemiBold.ttf</font> </family> <alias name="fraunces" to="fraunces" weight="400"/> <alias name="fraunces-semi-bold" to="fraunces" weight="600"/> <family name="big-shoulders-text"> <font weight="700" style="normal">BigShouldersText-Bold.ttf</font> <font weight="800" style="normal">BigShouldersText-ExtraBold.ttf</font> </family> <alias name="big-shoulders-text-bold" to="big-shoulders-text" weight="700"/> <alias name="big-shoulders-text-extra-bold" to="big-shoulders-text" weight="800"/> <family name="barlow"> <font weight="700" style="normal">Barlow-Bold.ttf</font> <font weight="500" style="normal">Barlow-Medium.ttf</font> </family> <alias name="barlow-bold" to="barlow" weight="700"/> <alias name="barlow-medium" to="barlow" weight="500"/> <!-- End Pixel 2020 --> <!-- Note that aliases must come after the fonts they reference. --> <alias name="sans-serif-thin" to="sans-serif" weight="100" /> <alias name="sans-serif-light" to="sans-serif" weight="300" /> Loading packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,10 @@ <item>com.android.systemui.toast.ToastUI</item> </string-array> <!-- QS tile shape store width. negative implies fill configuration instead of stroke--> <dimen name="config_qsTileStrokeWidthActive">-1dp</dimen> <dimen name="config_qsTileStrokeWidthInactive">-1dp</dimen> <!-- SystemUI vender service, used in config_systemUIServiceComponents. --> <string name="config_systemUIVendorServiceComponent" translatable="false">com.android.systemui.VendorServices</string> Loading packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +32 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ import static com.android.systemui.qs.tileimpl.QSIconViewImpl.QS_ANIM_LENGTH; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.Drawable; Loading Loading @@ -64,6 +66,8 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { private boolean mTileState; private boolean mCollapsedView; private boolean mShowRippleEffect = true; private float mStrokeWidthActive; private float mStrokeWidthInactive; private final ImageView mBg; private final TextView mDetailText; Loading @@ -83,6 +87,10 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { // Default to Quick Tile padding, and QSTileView will specify its own padding. int padding = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_padding); mIconFrame = new FrameLayout(context); mStrokeWidthActive = context.getResources() .getDimension(R.dimen.config_qsTileStrokeWidthActive); mStrokeWidthInactive = context.getResources() .getDimension(R.dimen.config_qsTileStrokeWidthInactive); int size = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size); addView(mIconFrame, new LayoutParams(size, size)); mBg = new ImageView(getContext()); Loading Loading @@ -206,7 +214,31 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { mHandler.obtainMessage(H.STATE_CHANGED, state).sendToTarget(); } private void updateStrokeShapeWidth(QSTile.State state) { Resources resources = getContext().getResources(); if (!(mBg.getDrawable() instanceof ShapeDrawable)) { return; } ShapeDrawable d = (ShapeDrawable) mBg.getDrawable(); d.getPaint().setStyle(Paint.Style.FILL); switch (state.state) { case Tile.STATE_INACTIVE: if (mStrokeWidthInactive >= 0) { d.getPaint().setStyle(Paint.Style.STROKE); d.getPaint().setStrokeWidth(mStrokeWidthInactive); } break; case Tile.STATE_ACTIVE: if (mStrokeWidthActive >= 0) { d.getPaint().setStyle(Paint.Style.STROKE); d.getPaint().setStrokeWidth(mStrokeWidthActive); } break; } } protected void handleStateChanged(QSTile.State state) { updateStrokeShapeWidth(state); int circleColor = getCircleColor(state.state); boolean allowAnimations = animationsEnabled(); if (circleColor != mCircleColor) { Loading packages/overlays/AccentColorCarbonOverlay/Android.mk 0 → 100644 +29 −0 Original line number Diff line number Diff line # # Copyright 2018, 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_RRO_THEME := AccentColorCarbon LOCAL_PRODUCT_MODULE := true LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res LOCAL_PACKAGE_NAME := AccentColorCarbonOverlay LOCAL_SDK_VERSION := current include $(BUILD_RRO_PACKAGE) packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2020 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. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.theme.color.carbon" android:versionCode="1" android:versionName="1.0"> <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/> <application android:label="@string/accent_color_overlay_name" android:hasCode="false"/> </manifest> Loading
data/fonts/fonts.xml +33 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,39 @@ <font weight="700" style="italic">Roboto-BoldItalic.ttf</font> </family> <!-- Pixel 2020 --> <family name="lustria"> <font weight="400" style="normal">Lustria-Regular.ttf</font> </family> <alias name="lustria" to="lustria" weight="400"/> <family name="karla"> <font weight="400" style="normal">Karla-Regular.ttf</font> </family> <alias name="karla" to="karla" weight="400"/> <family name="fraunces"> <font weight="400" style="normal">Fraunces-Regular.ttf</font> <font weight="600" style="normal">Fraunces-SemiBold.ttf</font> </family> <alias name="fraunces" to="fraunces" weight="400"/> <alias name="fraunces-semi-bold" to="fraunces" weight="600"/> <family name="big-shoulders-text"> <font weight="700" style="normal">BigShouldersText-Bold.ttf</font> <font weight="800" style="normal">BigShouldersText-ExtraBold.ttf</font> </family> <alias name="big-shoulders-text-bold" to="big-shoulders-text" weight="700"/> <alias name="big-shoulders-text-extra-bold" to="big-shoulders-text" weight="800"/> <family name="barlow"> <font weight="700" style="normal">Barlow-Bold.ttf</font> <font weight="500" style="normal">Barlow-Medium.ttf</font> </family> <alias name="barlow-bold" to="barlow" weight="700"/> <alias name="barlow-medium" to="barlow" weight="500"/> <!-- End Pixel 2020 --> <!-- Note that aliases must come after the fonts they reference. --> <alias name="sans-serif-thin" to="sans-serif" weight="100" /> <alias name="sans-serif-light" to="sans-serif" weight="300" /> Loading
packages/SystemUI/res/values/config.xml +4 −0 Original line number Diff line number Diff line Loading @@ -312,6 +312,10 @@ <item>com.android.systemui.toast.ToastUI</item> </string-array> <!-- QS tile shape store width. negative implies fill configuration instead of stroke--> <dimen name="config_qsTileStrokeWidthActive">-1dp</dimen> <dimen name="config_qsTileStrokeWidthInactive">-1dp</dimen> <!-- SystemUI vender service, used in config_systemUIServiceComponents. --> <string name="config_systemUIVendorServiceComponent" translatable="false">com.android.systemui.VendorServices</string> Loading
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileBaseView.java +32 −0 Original line number Diff line number Diff line Loading @@ -18,8 +18,10 @@ import static com.android.systemui.qs.tileimpl.QSIconViewImpl.QS_ANIM_LENGTH; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.Drawable; Loading Loading @@ -64,6 +66,8 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { private boolean mTileState; private boolean mCollapsedView; private boolean mShowRippleEffect = true; private float mStrokeWidthActive; private float mStrokeWidthInactive; private final ImageView mBg; private final TextView mDetailText; Loading @@ -83,6 +87,10 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { // Default to Quick Tile padding, and QSTileView will specify its own padding. int padding = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_padding); mIconFrame = new FrameLayout(context); mStrokeWidthActive = context.getResources() .getDimension(R.dimen.config_qsTileStrokeWidthActive); mStrokeWidthInactive = context.getResources() .getDimension(R.dimen.config_qsTileStrokeWidthInactive); int size = context.getResources().getDimensionPixelSize(R.dimen.qs_quick_tile_size); addView(mIconFrame, new LayoutParams(size, size)); mBg = new ImageView(getContext()); Loading Loading @@ -206,7 +214,31 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView { mHandler.obtainMessage(H.STATE_CHANGED, state).sendToTarget(); } private void updateStrokeShapeWidth(QSTile.State state) { Resources resources = getContext().getResources(); if (!(mBg.getDrawable() instanceof ShapeDrawable)) { return; } ShapeDrawable d = (ShapeDrawable) mBg.getDrawable(); d.getPaint().setStyle(Paint.Style.FILL); switch (state.state) { case Tile.STATE_INACTIVE: if (mStrokeWidthInactive >= 0) { d.getPaint().setStyle(Paint.Style.STROKE); d.getPaint().setStrokeWidth(mStrokeWidthInactive); } break; case Tile.STATE_ACTIVE: if (mStrokeWidthActive >= 0) { d.getPaint().setStyle(Paint.Style.STROKE); d.getPaint().setStrokeWidth(mStrokeWidthActive); } break; } } protected void handleStateChanged(QSTile.State state) { updateStrokeShapeWidth(state); int circleColor = getCircleColor(state.state); boolean allowAnimations = animationsEnabled(); if (circleColor != mCircleColor) { Loading
packages/overlays/AccentColorCarbonOverlay/Android.mk 0 → 100644 +29 −0 Original line number Diff line number Diff line # # Copyright 2018, 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. # LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_RRO_THEME := AccentColorCarbon LOCAL_PRODUCT_MODULE := true LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res LOCAL_PACKAGE_NAME := AccentColorCarbonOverlay LOCAL_SDK_VERSION := current include $(BUILD_RRO_PACKAGE)
packages/overlays/AccentColorCarbonOverlay/AndroidManifest.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2020 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. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.theme.color.carbon" android:versionCode="1" android:versionName="1.0"> <overlay android:targetPackage="android" android:category="android.theme.customization.accent_color" android:priority="1"/> <application android:label="@string/accent_color_overlay_name" android:hasCode="false"/> </manifest>