summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-03 12:28:16 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-02-03 12:28:16 +0000
commitb3fc3ce03f469af5d64144b225ddbd09e22ee564 (patch)
tree3f3e8826a39c896f886cb14e9a6f55e9177144bf /core/java
parent134773b38d02b362f582857d30c838efa1141bc8 (diff)
parent5b54abfa84823f711b11f40bddb47af9c69f620f (diff)
Merge "Rename phoneId to slotIndex" am: 4e540a1c59 am: d0045fbffd am: 5b54abfa84
Change-Id: I59bf3ec187cb59d17860b85ad5cead58fc1017c0
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/timedetector/PhoneTimeSuggestion.java32
-rw-r--r--core/java/android/app/timezonedetector/PhoneTimeZoneSuggestion.java36
2 files changed, 34 insertions, 34 deletions
diff --git a/core/java/android/app/timedetector/PhoneTimeSuggestion.java b/core/java/android/app/timedetector/PhoneTimeSuggestion.java
index bd649f88f40a..eab88383fa1d 100644
--- a/core/java/android/app/timedetector/PhoneTimeSuggestion.java
+++ b/core/java/android/app/timedetector/PhoneTimeSuggestion.java
@@ -57,19 +57,19 @@ public final class PhoneTimeSuggestion implements Parcelable {
}
};
- private final int mPhoneId;
+ private final int mSlotIndex;
@Nullable private final TimestampedValue<Long> mUtcTime;
@Nullable private ArrayList<String> mDebugInfo;
private PhoneTimeSuggestion(Builder builder) {
- mPhoneId = builder.mPhoneId;
+ mSlotIndex = builder.mSlotIndex;
mUtcTime = builder.mUtcTime;
mDebugInfo = builder.mDebugInfo != null ? new ArrayList<>(builder.mDebugInfo) : null;
}
private static PhoneTimeSuggestion createFromParcel(Parcel in) {
- int phoneId = in.readInt();
- PhoneTimeSuggestion suggestion = new PhoneTimeSuggestion.Builder(phoneId)
+ int slotIndex = in.readInt();
+ PhoneTimeSuggestion suggestion = new PhoneTimeSuggestion.Builder(slotIndex)
.setUtcTime(in.readParcelable(null /* classLoader */))
.build();
@SuppressWarnings("unchecked")
@@ -87,17 +87,17 @@ public final class PhoneTimeSuggestion implements Parcelable {
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
- dest.writeInt(mPhoneId);
+ dest.writeInt(mSlotIndex);
dest.writeParcelable(mUtcTime, 0);
dest.writeList(mDebugInfo);
}
/**
- * Returns an identifier for the source of this suggestion. When a device has several "phones",
- * i.e. sim slots or equivalent, it is used to identify which one.
+ * Returns an identifier for the source of this suggestion. When a device has several sim slots
+ * or equivalent, it is used to identify which one the suggestion is from.
*/
- public int getPhoneId() {
- return mPhoneId;
+ public int getSlotIndex() {
+ return mSlotIndex;
}
/**
@@ -152,19 +152,19 @@ public final class PhoneTimeSuggestion implements Parcelable {
return false;
}
PhoneTimeSuggestion that = (PhoneTimeSuggestion) o;
- return mPhoneId == that.mPhoneId
+ return mSlotIndex == that.mSlotIndex
&& Objects.equals(mUtcTime, that.mUtcTime);
}
@Override
public int hashCode() {
- return Objects.hash(mPhoneId, mUtcTime);
+ return Objects.hash(mSlotIndex, mUtcTime);
}
@Override
public String toString() {
return "PhoneTimeSuggestion{"
- + "mPhoneId='" + mPhoneId + '\''
+ + "mSlotIndex='" + mSlotIndex + '\''
+ ", mUtcTime=" + mUtcTime
+ ", mDebugInfo=" + mDebugInfo
+ '}';
@@ -177,13 +177,13 @@ public final class PhoneTimeSuggestion implements Parcelable {
*/
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public static final class Builder {
- private final int mPhoneId;
+ private final int mSlotIndex;
@Nullable private TimestampedValue<Long> mUtcTime;
@Nullable private List<String> mDebugInfo;
- /** Creates a builder with the specified {@code phoneId}. */
- public Builder(int phoneId) {
- mPhoneId = phoneId;
+ /** Creates a builder with the specified {@code slotIndex}. */
+ public Builder(int slotIndex) {
+ mSlotIndex = slotIndex;
}
/** Returns the builder for call chaining. */
diff --git a/core/java/android/app/timezonedetector/PhoneTimeZoneSuggestion.java b/core/java/android/app/timezonedetector/PhoneTimeZoneSuggestion.java
index d71ffcb9f772..ebaf951130ca 100644
--- a/core/java/android/app/timezonedetector/PhoneTimeZoneSuggestion.java
+++ b/core/java/android/app/timezonedetector/PhoneTimeZoneSuggestion.java
@@ -66,12 +66,12 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
/**
* Creates an empty time zone suggestion, i.e. one that will cancel previous suggestions with
- * the same {@code phoneId}.
+ * the same {@code slotIndex}.
*/
@NonNull
public static PhoneTimeZoneSuggestion createEmptySuggestion(
- int phoneId, @NonNull String debugInfo) {
- return new Builder(phoneId).addDebugInfo(debugInfo).build();
+ int slotIndex, @NonNull String debugInfo) {
+ return new Builder(slotIndex).addDebugInfo(debugInfo).build();
}
/** @hide */
@@ -135,7 +135,7 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
* The ID of the phone this suggestion is associated with. For multiple-sim devices this
* helps to establish source so filtering / stickiness can be implemented.
*/
- private final int mPhoneId;
+ private final int mSlotIndex;
/**
* The suggestion. {@code null} means there is no current suggestion and any previous suggestion
@@ -165,7 +165,7 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
private List<String> mDebugInfo;
private PhoneTimeZoneSuggestion(Builder builder) {
- mPhoneId = builder.mPhoneId;
+ mSlotIndex = builder.mSlotIndex;
mZoneId = builder.mZoneId;
mMatchType = builder.mMatchType;
mQuality = builder.mQuality;
@@ -175,8 +175,8 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
@SuppressWarnings("unchecked")
private static PhoneTimeZoneSuggestion createFromParcel(Parcel in) {
// Use the Builder so we get validation during build().
- int phoneId = in.readInt();
- PhoneTimeZoneSuggestion suggestion = new Builder(phoneId)
+ int slotIndex = in.readInt();
+ PhoneTimeZoneSuggestion suggestion = new Builder(slotIndex)
.setZoneId(in.readString())
.setMatchType(in.readInt())
.setQuality(in.readInt())
@@ -190,7 +190,7 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
- dest.writeInt(mPhoneId);
+ dest.writeInt(mSlotIndex);
dest.writeString(mZoneId);
dest.writeInt(mMatchType);
dest.writeInt(mQuality);
@@ -203,11 +203,11 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
}
/**
- * Returns an identifier for the source of this suggestion. When a device has several "phones",
- * i.e. sim slots or equivalent, it is used to identify which one.
+ * Returns an identifier for the source of this suggestion. When a device has several sim slots
+ * or equivalent, it is used to identify which one the suggestion is from.
*/
- public int getPhoneId() {
- return mPhoneId;
+ public int getSlotIndex() {
+ return mSlotIndex;
}
/**
@@ -282,7 +282,7 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
return false;
}
PhoneTimeZoneSuggestion that = (PhoneTimeZoneSuggestion) o;
- return mPhoneId == that.mPhoneId
+ return mSlotIndex == that.mSlotIndex
&& mMatchType == that.mMatchType
&& mQuality == that.mQuality
&& Objects.equals(mZoneId, that.mZoneId);
@@ -290,13 +290,13 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
@Override
public int hashCode() {
- return Objects.hash(mPhoneId, mZoneId, mMatchType, mQuality);
+ return Objects.hash(mSlotIndex, mZoneId, mMatchType, mQuality);
}
@Override
public String toString() {
return "PhoneTimeZoneSuggestion{"
- + "mPhoneId=" + mPhoneId
+ + "mSlotIndex=" + mSlotIndex
+ ", mZoneId='" + mZoneId + '\''
+ ", mMatchType=" + mMatchType
+ ", mQuality=" + mQuality
@@ -311,14 +311,14 @@ public final class PhoneTimeZoneSuggestion implements Parcelable {
*/
@SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
public static final class Builder {
- private final int mPhoneId;
+ private final int mSlotIndex;
@Nullable private String mZoneId;
@MatchType private int mMatchType;
@Quality private int mQuality;
@Nullable private List<String> mDebugInfo;
- public Builder(int phoneId) {
- mPhoneId = phoneId;
+ public Builder(int slotIndex) {
+ mSlotIndex = slotIndex;
}
/**