Merge "Fix FlakyTest import statement"
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 5cd1d85..c2c4e46 100644
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -80,6 +80,7 @@
import com.android.internal.telephony.MccTable;
import com.android.internal.telephony.OperatorInfo;
import com.android.internal.telephony.Phone;
+import com.android.internal.telephony.PhoneConstantConversions;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.PhoneFactory;
import com.android.internal.telephony.ProxyController;
@@ -1575,16 +1576,16 @@
public int getCallStateForSlot(int slotId) {
Phone phone = PhoneFactory.getPhone(slotId);
return phone == null ? TelephonyManager.CALL_STATE_IDLE :
- DefaultPhoneNotifier.convertCallState(phone.getState());
+ PhoneConstantConversions.convertCallState(phone.getState());
}
@Override
public int getDataState() {
Phone phone = getPhone(mSubscriptionController.getDefaultDataSubId());
if (phone != null) {
- return DefaultPhoneNotifier.convertDataState(phone.getDataConnectionState());
+ return PhoneConstantConversions.convertDataState(phone.getDataConnectionState());
} else {
- return DefaultPhoneNotifier.convertDataState(PhoneConstants.DataState.DISCONNECTED);
+ return PhoneConstantConversions.convertDataState(PhoneConstants.DataState.DISCONNECTED);
}
}
diff --git a/src/com/android/phone/otasp/OtaspSimStateReceiver.java b/src/com/android/phone/otasp/OtaspSimStateReceiver.java
index c0409ba..213aa9f 100644
--- a/src/com/android/phone/otasp/OtaspSimStateReceiver.java
+++ b/src/com/android/phone/otasp/OtaspSimStateReceiver.java
@@ -24,7 +24,6 @@
import android.telephony.TelephonyManager;
import android.util.Log;
import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.ServiceStateTracker;
import com.android.phone.PhoneGlobals;
public class OtaspSimStateReceiver extends BroadcastReceiver {
@@ -36,10 +35,10 @@
@Override
public void onOtaspChanged(int otaspMode) {
logd("onOtaspChanged: otaspMode=" + otaspMode);
- if (otaspMode == ServiceStateTracker.OTASP_NEEDED) {
+ if (otaspMode == TelephonyManager.OTASP_NEEDED) {
logd("otasp activation required, start otaspActivationService");
mContext.startService(new Intent(mContext, OtaspActivationService.class));
- } else if (otaspMode == ServiceStateTracker.OTASP_NOT_NEEDED) {
+ } else if (otaspMode == TelephonyManager.OTASP_NOT_NEEDED) {
OtaspActivationService.updateActivationState(mContext, true);
}
}
diff --git a/tests/src/com/android/phone/RoamingDialogFragmentTest.java b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
index 96a3fda..62633e0 100644
--- a/tests/src/com/android/phone/RoamingDialogFragmentTest.java
+++ b/tests/src/com/android/phone/RoamingDialogFragmentTest.java
@@ -21,6 +21,7 @@
import android.provider.Settings.SettingNotFoundException;
import android.support.test.espresso.matcher.PreferenceMatchers;
import android.support.test.rule.ActivityTestRule;
+import android.support.test.filters.FlakyTest;
import com.google.common.truth.Truth;
import junit.framework.AssertionFailedError;
import org.junit.Before;
@@ -68,6 +69,7 @@
}
}
+ @FlakyTest
@Test
public void dataRoamingDialogPersistsOnRotation() {
// click on the data roaming preference to trigger warning dialog
@@ -82,6 +84,7 @@
}
+ @FlakyTest
@Test
public void dataRoamingEnabledWhenPositiveButtonClicked() throws SettingNotFoundException {
// click on the data roaming preference to trigger warning dialog
@@ -95,6 +98,7 @@
Global.DATA_ROAMING)).isEqualTo(1);
}
+ @FlakyTest
@Test
public void dialogDismissedOnNegativeButtonClicked() {
// click on the data roaming preference to trigger warning dialog
@@ -107,6 +111,7 @@
onView(withText(R.string.roaming_alert_title)).check(doesNotExist());
}
+ @FlakyTest
@Test
public void dataRoamingStaysDisabledWhenDialogCanceled() throws SettingNotFoundException {
// click on the data roaming preference to trigger warning dialog