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

Commit 168456c4 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

Reduce flaky of DataUsageSummaryPreference

- Set SnapshotTimeMs initial value to unknown
- Reserve height for DataUsageSummaryPreference

Bug: 341234382
Test: manual - on Mobile Settings
Change-Id: I9145f666c5f8fd9595bcc047160fd6da17b3091d
parent 1dc5bf02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="172dp"
    android:paddingTop="8dp"
    android:paddingBottom="16dp"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
@@ -37,7 +38,6 @@
        android:id="@+id/usage_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="12dp"
        android:orientation="horizontal">

        <TextView android:id="@+id/data_usage_view"
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.AttrRes;
import android.content.Context;
import android.graphics.Typeface;
import android.icu.text.MessageFormat;
import android.telephony.SubscriptionPlan;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.TextUtils;
@@ -66,7 +67,7 @@ public class DataUsageSummaryPreference extends Preference {
    @Nullable
    private Long mCycleEndTimeMs;
    /** The time of the last update in standard milliseconds since the epoch */
    private long mSnapshotTimeMs;
    private long mSnapshotTimeMs = SubscriptionPlan.TIME_UNKNOWN;
    /** Name of carrier, or null if not available */
    private CharSequence mCarrierName;
    private CharSequence mLimitInfoText;