Merge "Use SubscriptionId instead of SubId"
am: da0eb19f50
Change-Id: I089dd5db7281faaa2af5362ab4a94b5c05ffa367
diff --git a/src/com/android/providers/telephony/ServiceStateProvider.java b/src/com/android/providers/telephony/ServiceStateProvider.java
index 8662d39..f4d9b2b 100644
--- a/src/com/android/providers/telephony/ServiceStateProvider.java
+++ b/src/com/android/providers/telephony/ServiceStateProvider.java
@@ -38,8 +38,8 @@
import java.util.HashMap;
import java.util.Objects;
-import static android.provider.Telephony.ServiceStateTable.getUriForSubId;
-import static android.provider.Telephony.ServiceStateTable.getUriForSubIdAndField;
+import static android.provider.Telephony.ServiceStateTable.getUriForSubscriptionId;
+import static android.provider.Telephony.ServiceStateTable.getUriForSubscriptionIdAndField;
import static android.provider.Telephony.ServiceStateTable;
import static android.provider.Telephony.ServiceStateTable.CONTENT_URI;
@@ -314,20 +314,20 @@
// for every field, if the field has changed values, notify via the provider
if (firstUpdate || voiceRegStateChanged(oldSS, newSS)) {
context.getContentResolver().notifyChange(
- getUriForSubIdAndField(subId, VOICE_REG_STATE),
+ getUriForSubscriptionIdAndField(subId, VOICE_REG_STATE),
/* observer= */ null, /* syncToNetwork= */ false);
}
if (firstUpdate || dataRegStateChanged(oldSS, newSS)) {
context.getContentResolver().notifyChange(
- getUriForSubIdAndField(subId, DATA_REG_STATE), null, false);
+ getUriForSubscriptionIdAndField(subId, DATA_REG_STATE), null, false);
}
if (firstUpdate || voiceRoamingTypeChanged(oldSS, newSS)) {
context.getContentResolver().notifyChange(
- getUriForSubIdAndField(subId, VOICE_ROAMING_TYPE), null, false);
+ getUriForSubscriptionIdAndField(subId, VOICE_ROAMING_TYPE), null, false);
}
if (firstUpdate || dataRoamingTypeChanged(oldSS, newSS)) {
context.getContentResolver().notifyChange(
- getUriForSubIdAndField(subId, DATA_ROAMING_TYPE), null, false);
+ getUriForSubscriptionIdAndField(subId, DATA_ROAMING_TYPE), null, false);
}
}
@@ -367,7 +367,7 @@
// notify
if (oldSS == null || voiceRegStateChanged(oldSS, newSS) || dataRegStateChanged(oldSS, newSS)
|| voiceRoamingTypeChanged(oldSS, newSS) || dataRoamingTypeChanged(oldSS, newSS)) {
- context.getContentResolver().notifyChange(getUriForSubId(subId), null, false);
+ context.getContentResolver().notifyChange(getUriForSubscriptionId(subId), null, false);
}
}
}
diff --git a/tests/src/com/android/providers/telephony/ServiceStateProviderTest.java b/tests/src/com/android/providers/telephony/ServiceStateProviderTest.java
index 980190f..0d99386 100644
--- a/tests/src/com/android/providers/telephony/ServiceStateProviderTest.java
+++ b/tests/src/com/android/providers/telephony/ServiceStateProviderTest.java
@@ -52,7 +52,7 @@
import static android.app.job.JobInfo.TriggerContentUri.FLAG_NOTIFY_FOR_DESCENDANTS;
import static android.Manifest.permission.MODIFY_PHONE_STATE;
import static android.provider.Telephony.ServiceStateTable;
-import static android.provider.Telephony.ServiceStateTable.getUriForSubId;
+import static android.provider.Telephony.ServiceStateTable.getUriForSubscriptionId;
import static android.provider.Telephony.ServiceStateTable.getContentValuesForServiceState;
import static org.junit.Assert.assertEquals;
@@ -170,8 +170,8 @@
}
private void verifyServiceStateForSubId(int subId, ServiceState ss) {
- Cursor cursor = mContentResolver.query(getUriForSubId(subId), testProjection, "", null,
- null);
+ Cursor cursor = mContentResolver.query(getUriForSubscriptionId(subId), testProjection, "",
+ null, null);
assertNotNull(cursor);
cursor.moveToFirst();