summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2017-05-01 22:21:38 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-05-01 22:21:38 +0000
commitab6d0d4b35673dcca253255362f048bce7370a4d (patch)
tree40cc2e1c37dd0cec43885a2f10c2313f29626181
parent2ec4d5ae4550794037c357137148331552180da9 (diff)
parent56452404cffee1d4ca70262abecc3df2c765e800 (diff)
hotspot2: update method name for timestamp related APIs am: 8f4f48b96b
am: 56452404cf Change-Id: Ic408c955e7bcdb69d10438b6c55bff30ff8eee79
-rw-r--r--service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java21
-rw-r--r--tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointConfigStoreDataTest.java11
-rw-r--r--tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java11
3 files changed, 23 insertions, 20 deletions
diff --git a/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java b/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
index 270c644c6..de2b9c059 100644
--- a/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
+++ b/service/java/com/android/server/wifi/hotspot2/PasspointXmlUtils.java
@@ -124,14 +124,14 @@ public class PasspointXmlUtils {
XmlUtil.writeNextValue(out, XML_TAG_CREDENTIAL_PRIORITY, config.getCredentialPriority());
XmlUtil.writeNextValue(out, XML_TAG_TRUST_ROOT_CERT_LIST, config.getTrustRootCertList());
XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_CREATION_TIME,
- config.getSubscriptionCreationTimeInMs());
+ config.getSubscriptionCreationTimeInMillis());
XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_EXPIRATION_TIME,
- config.getSubscriptionExpirationTimeInMs());
+ config.getSubscriptionExpirationTimeInMillis());
XmlUtil.writeNextValue(out, XML_TAG_SUBSCRIPTION_TYPE, config.getSubscriptionType());
XmlUtil.writeNextValue(out, XML_TAG_USAGE_LIMIT_TIME_PERIOD,
config.getUsageLimitUsageTimePeriodInMinutes());
XmlUtil.writeNextValue(out, XML_TAG_USAGE_LIMIT_START_TIME,
- config.getUsageLimitStartTimeInMs());
+ config.getUsageLimitStartTimeInMillis());
XmlUtil.writeNextValue(out, XML_TAG_USAGE_LIMIT_DATA_LIMIT,
config.getUsageLimitDataLimit());
XmlUtil.writeNextValue(out, XML_TAG_USAGE_LIMIT_TIME_LIMIT,
@@ -171,10 +171,10 @@ public class PasspointXmlUtils {
config.setTrustRootCertList((Map<String, byte[]>) value);
break;
case XML_TAG_SUBSCRIPTION_CREATION_TIME:
- config.setSubscriptionCreationTimeInMs((long) value);
+ config.setSubscriptionCreationTimeInMillis((long) value);
break;
case XML_TAG_SUBSCRIPTION_EXPIRATION_TIME:
- config.setSubscriptionExpirationTimeInMs((long) value);
+ config.setSubscriptionExpirationTimeInMillis((long) value);
break;
case XML_TAG_SUBSCRIPTION_TYPE:
config.setSubscriptionType((String) value);
@@ -183,7 +183,7 @@ public class PasspointXmlUtils {
config.setUsageLimitUsageTimePeriodInMinutes((long) value);
break;
case XML_TAG_USAGE_LIMIT_START_TIME:
- config.setUsageLimitStartTimeInMs((long) value);
+ config.setUsageLimitStartTimeInMillis((long) value);
break;
case XML_TAG_USAGE_LIMIT_DATA_LIMIT:
config.setUsageLimitDataLimit((long) value);
@@ -260,8 +260,9 @@ public class PasspointXmlUtils {
return;
}
XmlUtil.writeNextSectionStart(out, XML_TAG_SECTION_HEADER_CREDENTIAL);
- XmlUtil.writeNextValue(out, XML_TAG_CREATION_TIME, credential.getCreationTimeInMs());
- XmlUtil.writeNextValue(out, XML_TAG_EXPIRATION_TIME, credential.getExpirationTimeInMs());
+ XmlUtil.writeNextValue(out, XML_TAG_CREATION_TIME, credential.getCreationTimeInMillis());
+ XmlUtil.writeNextValue(out, XML_TAG_EXPIRATION_TIME,
+ credential.getExpirationTimeInMillis());
XmlUtil.writeNextValue(out, XML_TAG_REALM, credential.getRealm());
XmlUtil.writeNextValue(out, XML_TAG_CHECK_AAA_SERVER_CERT_STATUS,
credential.getCheckAaaServerCertStatus());
@@ -519,10 +520,10 @@ public class PasspointXmlUtils {
Object value = XmlUtil.readCurrentValue(in, name);
switch (name[0]) {
case XML_TAG_CREATION_TIME:
- credential.setCreationTimeInMs((long) value);
+ credential.setCreationTimeInMillis((long) value);
break;
case XML_TAG_EXPIRATION_TIME:
- credential.setExpirationTimeInMs((long) value);
+ credential.setExpirationTimeInMillis((long) value);
break;
case XML_TAG_REALM:
credential.setRealm((String) value);
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointConfigStoreDataTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointConfigStoreDataTest.java
index cd3120f9e..8e808efcf 100644
--- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointConfigStoreDataTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointConfigStoreDataTest.java
@@ -107,11 +107,12 @@ public class PasspointConfigStoreDataTest {
config.setSubscriptionUpdate(subscriptionUpdate);
// Subscription parameters.
- config.setSubscriptionCreationTimeInMs(format.parse("2016-02-01T10:00:00Z").getTime());
- config.setSubscriptionExpirationTimeInMs(format.parse("2016-03-01T10:00:00Z").getTime());
+ config.setSubscriptionCreationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
+ config.setSubscriptionExpirationTimeInMillis(
+ format.parse("2016-03-01T10:00:00Z").getTime());
config.setSubscriptionType("Gold");
config.setUsageLimitDataLimit(921890);
- config.setUsageLimitStartTimeInMs(format.parse("2016-12-01T10:00:00Z").getTime());
+ config.setUsageLimitStartTimeInMillis(format.parse("2016-12-01T10:00:00Z").getTime());
config.setUsageLimitTimeLimitInMinutes(120);
config.setUsageLimitUsageTimePeriodInMinutes(99910);
@@ -132,8 +133,8 @@ public class PasspointConfigStoreDataTest {
// Credential configuration.
Credential credential = new Credential();
- credential.setCreationTimeInMs(format.parse("2016-01-01T10:00:00Z").getTime());
- credential.setExpirationTimeInMs(format.parse("2016-02-01T10:00:00Z").getTime());
+ credential.setCreationTimeInMillis(format.parse("2016-01-01T10:00:00Z").getTime());
+ credential.setExpirationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
credential.setRealm("shaken.stirred.com");
credential.setCheckAaaServerCertStatus(true);
Credential.UserCredential userCredential = new Credential.UserCredential();
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
index 82df31783..67f2dcd3a 100644
--- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointXmlUtilsTest.java
@@ -85,11 +85,12 @@ public class PasspointXmlUtilsTest {
config.setSubscriptionUpdate(subscriptionUpdate);
// Subscription parameters.
- config.setSubscriptionCreationTimeInMs(format.parse("2016-02-01T10:00:00Z").getTime());
- config.setSubscriptionExpirationTimeInMs(format.parse("2016-03-01T10:00:00Z").getTime());
+ config.setSubscriptionCreationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
+ config.setSubscriptionExpirationTimeInMillis(
+ format.parse("2016-03-01T10:00:00Z").getTime());
config.setSubscriptionType("Gold");
config.setUsageLimitDataLimit(921890);
- config.setUsageLimitStartTimeInMs(format.parse("2016-12-01T10:00:00Z").getTime());
+ config.setUsageLimitStartTimeInMillis(format.parse("2016-12-01T10:00:00Z").getTime());
config.setUsageLimitTimeLimitInMinutes(120);
config.setUsageLimitUsageTimePeriodInMinutes(99910);
@@ -110,8 +111,8 @@ public class PasspointXmlUtilsTest {
// Credential configuration.
Credential credential = new Credential();
- credential.setCreationTimeInMs(format.parse("2016-01-01T10:00:00Z").getTime());
- credential.setExpirationTimeInMs(format.parse("2016-02-01T10:00:00Z").getTime());
+ credential.setCreationTimeInMillis(format.parse("2016-01-01T10:00:00Z").getTime());
+ credential.setExpirationTimeInMillis(format.parse("2016-02-01T10:00:00Z").getTime());
credential.setRealm("shaken.stirred.com");
credential.setCheckAaaServerCertStatus(true);
Credential.UserCredential userCredential = new Credential.UserCredential();