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

Commit 3d701ad7 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5702333 from b2b70838 to qt-c2f2-release

Change-Id: I8f73a2abbd34ffca376db1a6e396c3d9f168bc6c
parents aba3a557 b2b70838
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4110,6 +4110,15 @@
        M9,10l-2,0l0,-2l-2,0l0,2l-2,0l0,2l2,0l0,2l2,0l0,-2l2,0z
    </string>

    <!-- X path for SignalDrawable as defined on a 24x24 canvas. -->
    <string name="config_signalXPath" translatable="false">
        M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09-2.08L20.59,22L22,20.59l-2.08-2.09   L22,16.41z
    </string>
    <!-- config_signalCutout{Height,Width}Fraction define fraction of the 24x24 canvas that
         should be cut out to display config_signalXPath.-->
    <item name="config_signalCutoutWidthFraction" format="float" type="dimen">11</item>
    <item name="config_signalCutoutHeightFraction" format="float" type="dimen">11</item>

    <!-- A dual tone battery meter draws the perimeter path twice - once to define the shape
     and a second time clipped to the fill level to indicate charge -->
    <bool name="config_batterymeterDualTone">false</bool>
+3 −0
Original line number Diff line number Diff line
@@ -3265,6 +3265,9 @@
  <java-symbol type="string" name="config_batterymeterBoltPath" />
  <java-symbol type="string" name="config_batterymeterPowersavePath" />
  <java-symbol type="bool" name="config_batterymeterDualTone" />
  <java-symbol type="string" name="config_signalXPath" />
  <java-symbol type="dimen" name="config_signalCutoutWidthFraction" />
  <java-symbol type="dimen" name="config_signalCutoutHeightFraction" />

  <java-symbol type="bool" name="config_debugEnableAutomaticSystemServerHeapDumps" />
  <java-symbol type="integer" name="config_debugSystemServerPssThresholdBytes" />
+1 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
    <item>@*android:drawable/ic_wifi_signal_3</item>
    <item>@*android:drawable/ic_wifi_signal_4</item>
    <item>@*android:drawable/perm_group_activity_recognition</item>
    <item>@*android:drawable/perm_group_aural</item>
    <item>@*android:drawable/perm_group_calendar</item>
    <item>@*android:drawable/perm_group_call_log</item>
    <item>@*android:drawable/perm_group_camera</item>
+5 −5
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
    <string name="connected_via_passpoint" msgid="2826205693803088747">"Terhubung melalui %1$s"</string>
    <string name="connected_via_app" msgid="5571999941988929520">"Tersambung melalui <xliff:g id="NAME">%1$s</xliff:g>"</string>
    <string name="available_via_passpoint" msgid="1617440946846329613">"Tersedia melalui %1$s"</string>
    <string name="tap_to_sign_up" msgid="6449724763052579434">"Tap untuk mendaftar"</string>
    <string name="tap_to_sign_up" msgid="6449724763052579434">"Ketuk untuk mendaftar"</string>
    <string name="wifi_connected_no_internet" msgid="8202906332837777829">"Tersambung, tidak ada internet"</string>
    <string name="wifi_limited_connection" msgid="7717855024753201527">"Koneksi terbatas"</string>
    <string name="wifi_status_no_internet" msgid="5784710974669608361">"Tidak ada internet"</string>
@@ -52,7 +52,7 @@
    <string name="osu_opening_provider" msgid="5488997661548640424">"Membuka <xliff:g id="PASSPOINTPROVIDER">%1$s</xliff:g>"</string>
    <string name="osu_connect_failed" msgid="2187750899158158934">"Tidak dapat tersambung"</string>
    <string name="osu_completing_sign_up" msgid="9037638564719197082">"Menyelesaikan pendaftaran…"</string>
    <string name="osu_sign_up_failed" msgid="7296159750352873260">"Tidak dapat menyelesaikan pendaftaran. Tap untuk mencoba lagi."</string>
    <string name="osu_sign_up_failed" msgid="7296159750352873260">"Tidak dapat menyelesaikan pendaftaran. Ketuk untuk mencoba lagi."</string>
    <string name="osu_sign_up_complete" msgid="8207626049093289203">"Pendaftaran selesai. Menyambungkan…"</string>
    <string name="speed_label_very_slow" msgid="1867055264243608530">"Sangat Lambat"</string>
    <string name="speed_label_slow" msgid="813109590815810235">"Lambat"</string>
@@ -338,7 +338,7 @@
    <string name="enable_freeform_support_summary" msgid="8247310463288834487">"Aktifkan dukungan untuk jendela eksperimental berformat bebas."</string>
    <string name="local_backup_password_title" msgid="3860471654439418822">"Sandi backup desktop"</string>
    <string name="local_backup_password_summary_none" msgid="6951095485537767956">"Saat ini backup desktop sepenuhnya tidak dilindungi"</string>
    <string name="local_backup_password_summary_change" msgid="5376206246809190364">"Tap guna mengubah atau menghapus sandi untuk cadangan lengkap desktop"</string>
    <string name="local_backup_password_summary_change" msgid="5376206246809190364">"Ketuk guna mengubah atau menghapus sandi untuk cadangan lengkap desktop"</string>
    <string name="local_backup_password_toast_success" msgid="582016086228434290">"Sandi cadangan baru telah disetel"</string>
    <string name="local_backup_password_toast_confirmation_mismatch" msgid="7805892532752708288">"Sandi baru dan konfirmasinya tidak cocok."</string>
    <string name="local_backup_password_toast_validation_failure" msgid="5646377234895626531">"Gagal menyetel sandi cadangan"</string>
@@ -354,8 +354,8 @@
    <item msgid="5363960654009010371">"Warna yang dioptimalkan untuk konten digital"</item>
  </string-array>
    <string name="inactive_apps_title" msgid="9042996804461901648">"Aplikasi standby"</string>
    <string name="inactive_app_inactive_summary" msgid="5091363706699855725">"Tidak aktif. Tap untuk beralih."</string>
    <string name="inactive_app_active_summary" msgid="4174921824958516106">"Aktif. Tap untuk beralih."</string>
    <string name="inactive_app_inactive_summary" msgid="5091363706699855725">"Tidak aktif. Ketuk untuk beralih."</string>
    <string name="inactive_app_active_summary" msgid="4174921824958516106">"Aktif. Ketuk untuk beralih."</string>
    <string name="standby_bucket_summary" msgid="6567835350910684727">"Status standby aplikasi:<xliff:g id="BUCKET"> %s</xliff:g>"</string>
    <string name="runningservices_settings_title" msgid="8097287939865165213">"Layanan yang sedang berjalan"</string>
    <string name="runningservices_settings_summary" msgid="854608995821032748">"Melihat dan mengontrol layanan yang sedang berjalan"</string>
+32 −28
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Path.Direction;
@@ -33,6 +34,7 @@ import android.graphics.drawable.DrawableWrapper;
import android.os.Handler;
import android.telephony.SignalStrength;
import android.util.LayoutDirection;
import android.util.PathParser;

import com.android.settingslib.R;
import com.android.settingslib.Utils;
@@ -48,7 +50,6 @@ public class SignalDrawable extends DrawableWrapper {

    private static final float VIEWPORT = 24f;
    private static final float PAD = 2f / VIEWPORT;
    private static final float CUT_OUT = 7.9f / VIEWPORT;

    private static final float DOT_SIZE = 3f / VIEWPORT;
    private static final float DOT_PADDING = 1.5f / VIEWPORT;
@@ -65,21 +66,6 @@ public class SignalDrawable extends DrawableWrapper {

    private static final long DOT_DELAY = 1000;

    private static float[][] X_PATH = new float[][]{
            {21.9f / VIEWPORT, 17.0f / VIEWPORT},
            {-1.1f / VIEWPORT, -1.1f / VIEWPORT},
            {-1.9f / VIEWPORT, 1.9f / VIEWPORT},
            {-1.9f / VIEWPORT, -1.9f / VIEWPORT},
            {-1.1f / VIEWPORT, 1.1f / VIEWPORT},
            {1.9f / VIEWPORT, 1.9f / VIEWPORT},
            {-1.9f / VIEWPORT, 1.9f / VIEWPORT},
            {1.1f / VIEWPORT, 1.1f / VIEWPORT},
            {1.9f / VIEWPORT, -1.9f / VIEWPORT},
            {1.9f / VIEWPORT, 1.9f / VIEWPORT},
            {1.1f / VIEWPORT, -1.1f / VIEWPORT},
            {-1.9f / VIEWPORT, -1.9f / VIEWPORT},
    };

    private final Paint mForegroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    private final Paint mTransparentPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
    private final int mDarkModeFillColor;
@@ -87,7 +73,11 @@ public class SignalDrawable extends DrawableWrapper {
    private final Path mCutoutPath = new Path();
    private final Path mForegroundPath = new Path();
    private final Path mXPath = new Path();
    private final Matrix mXScaleMatrix = new Matrix();
    private final Path mScaledXPath = new Path();
    private final Handler mHandler;
    private final float mCutoutWidthFraction;
    private final float mCutoutHeightFraction;
    private float mDarkIntensity = -1;
    private final int mIntrinsicSize;
    private boolean mAnimating;
@@ -95,6 +85,14 @@ public class SignalDrawable extends DrawableWrapper {

    public SignalDrawable(Context context) {
        super(context.getDrawable(com.android.internal.R.drawable.ic_signal_cellular));
        final String xPathString = context.getString(
                com.android.internal.R.string.config_signalXPath);
        mXPath.set(PathParser.createPathFromPathData(xPathString));
        updateScaledXPath();
        mCutoutWidthFraction = context.getResources().getFloat(
                com.android.internal.R.dimen.config_signalCutoutWidthFraction);
        mCutoutHeightFraction = context.getResources().getFloat(
                com.android.internal.R.dimen.config_signalCutoutHeightFraction);
        mDarkModeFillColor = Utils.getColorStateListDefaultColor(context,
                R.color.dark_mode_icon_color_single_tone);
        mLightModeFillColor = Utils.getColorStateListDefaultColor(context,
@@ -106,6 +104,15 @@ public class SignalDrawable extends DrawableWrapper {
        setDarkIntensity(0);
    }

    private void updateScaledXPath() {
        if (getBounds().isEmpty()) {
            mXScaleMatrix.setScale(1f, 1f);
        } else {
            mXScaleMatrix.setScale(getBounds().width() / VIEWPORT, getBounds().height() / VIEWPORT);
        }
        mXPath.transform(mXScaleMatrix, mScaledXPath);
    }

    @Override
    public int getIntrinsicWidth() {
        return mIntrinsicSize;
@@ -170,6 +177,7 @@ public class SignalDrawable extends DrawableWrapper {
    @Override
    protected void onBoundsChange(Rect bounds) {
        super.onBoundsChange(bounds);
        updateScaledXPath();
        invalidateSelf();
    }

@@ -205,19 +213,15 @@ public class SignalDrawable extends DrawableWrapper {
            canvas.drawPath(mCutoutPath, mTransparentPaint);
            canvas.drawPath(mForegroundPath, mForegroundPaint);
        } else if (isInState(STATE_CUT)) {
            float cut = (CUT_OUT * width);
            mCutoutPath.moveTo(width - padding, height - padding);
            mCutoutPath.rLineTo(-cut, 0);
            mCutoutPath.rLineTo(0, -cut);
            mCutoutPath.rLineTo(cut, 0);
            mCutoutPath.rLineTo(0, cut);
            float cutX = (mCutoutWidthFraction * width / VIEWPORT);
            float cutY = (mCutoutHeightFraction * height / VIEWPORT);
            mCutoutPath.moveTo(width, height);
            mCutoutPath.rLineTo(-cutX, 0);
            mCutoutPath.rLineTo(0, -cutY);
            mCutoutPath.rLineTo(cutX, 0);
            mCutoutPath.rLineTo(0, cutY);
            canvas.drawPath(mCutoutPath, mTransparentPaint);
            mXPath.reset();
            mXPath.moveTo(X_PATH[0][0] * width, X_PATH[0][1] * height);
            for (int i = 1; i < X_PATH.length; i++) {
                mXPath.rLineTo(X_PATH[i][0] * width, X_PATH[i][1] * height);
            }
            canvas.drawPath(mXPath, mForegroundPaint);
            canvas.drawPath(mScaledXPath, mForegroundPaint);
        }
        if (isRtl) {
            canvas.restore();
Loading