Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b97c2e60 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "GSF variations on Quick Settings" into main

parents 336877c1 63ef28b1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -831,6 +831,11 @@
        <item name="android:textColor">?attr/onSurfaceVariant</item>
    </style>

    <style name="TextAppearance.QSEditTitle" >
        <item name="android:fontFamily">"gsf-title-medium-emphasized"</item>
        <item name="android:textColor">?attr/onSurfaceVariant</item>
    </style>

    <style name="QSCustomizeToolbar" parent="@*android:style/Widget.DeviceDefault.Toolbar">
        <item name="android:textColor">?attr/onSurface</item>
        <item name="android:elevation">10dp</item>
+5 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import static android.provider.Settings.System.SHOW_BATTERY_PERCENT;

import static com.android.settingslib.flags.Flags.newStatusBarIcons;
import static com.android.systemui.DejankUtils.whitelistIpcs;
import static com.android.systemui.Flags.gsfQuickSettings;

import static java.lang.annotation.RetentionPolicy.SOURCE;

@@ -33,6 +34,7 @@ import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.UserHandle;
import android.provider.Settings;
@@ -384,6 +386,9 @@ public class BatteryMeterView extends LinearLayout implements DarkReceiver {
        }
        float fontHeight = mBatteryPercentView.getPaint().getFontMetricsInt(null);
        mBatteryPercentView.setLineHeight(TypedValue.COMPLEX_UNIT_PX, fontHeight);
        if (gsfQuickSettings()) {
            mBatteryPercentView.setTypeface(Typeface.create("gsf-label-large", Typeface.NORMAL));
        }
        if (mTextColor != 0) mBatteryPercentView.setTextColor(mTextColor);
        addView(mBatteryPercentView, new LayoutParams(
                LayoutParams.WRAP_CONTENT,
+6 −0
Original line number Diff line number Diff line
@@ -16,8 +16,11 @@

package com.android.systemui.qs;

import static com.android.systemui.Flags.gsfQuickSettings;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.graphics.Typeface;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
@@ -64,6 +67,9 @@ public class QSFooterViewController extends ViewController<QSFooterView> impleme
        mRetailModeInteractor = retailModeInteractor;

        mBuildText = mView.findViewById(R.id.build);
        if (gsfQuickSettings()) {
            mBuildText.setTypeface(Typeface.create("gsf-body-medium", Typeface.NORMAL));
        }
        mPageIndicator = mView.findViewById(R.id.footer_page_indicator);
        mEditButton = mView.findViewById(android.R.id.edit);
    }
+6 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
package com.android.systemui.qs.customize;

import static com.android.systemui.Flags.gsfQuickSettings;

import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
@@ -81,6 +83,10 @@ public class QSCustomizer extends LinearLayout {
        mToolbar.getMenu().add(Menu.NONE, MENU_RESET, 0, com.android.internal.R.string.reset)
                .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
        mToolbar.setTitle(R.string.qs_edit);
        if (gsfQuickSettings()) {
            mToolbar.setTitleTextAppearance(context, R.style.TextAppearance_QSEditTitle);
        }

        mRecyclerView = findViewById(android.R.id.list);
        mTransparentView = findViewById(R.id.customizer_transparent_view);
        DefaultItemAnimator animator = new DefaultItemAnimator();
+7 −0
Original line number Diff line number Diff line
@@ -14,12 +14,15 @@

package com.android.systemui.qs.customize;

import static com.android.systemui.Flags.gsfQuickSettings;

import android.content.ComponentName;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.view.LayoutInflater;
@@ -309,6 +312,10 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
        if (viewType == TYPE_HEADER) {
            View v = inflater.inflate(R.layout.qs_customize_header, parent, false);
            v.setMinimumHeight(calculateHeaderMinHeight(context));
            if (gsfQuickSettings()) {
                ((TextView) v.findViewById(android.R.id.title)).setTypeface(
                        Typeface.create("gsf-label-large", Typeface.NORMAL));
            }
            return new Holder(v);
        }
        if (viewType == TYPE_DIVIDER) {
Loading