Reduce flaky of DataUsageSummaryPreference
- Set SnapshotTimeMs initial value to unknown - Reserve height for DataUsageSummaryPreference Bug: 341234382 Test: manual - on Mobile Settings Change-Id: I9145f666c5f8fd9595bcc047160fd6da17b3091d
This commit is contained in:
@@ -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"
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user