summaryrefslogtreecommitdiffstats
path: root/tests/unit/src/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/src/com/android')
-rw-r--r--tests/unit/src/com/android/settings/EncryptionInterstitialTest.java1
-rw-r--r--tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java14
-rw-r--r--tests/unit/src/com/android/settings/SettingsHookTests.java2
-rw-r--r--tests/unit/src/com/android/settings/UserCredentialsTest.java4
-rw-r--r--tests/unit/src/com/android/settings/UtilsTest.java8
-rw-r--r--tests/unit/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java12
-rw-r--r--tests/unit/src/com/android/settings/accounts/AccountsSettingsTest.java4
-rw-r--r--tests/unit/src/com/android/settings/applications/AppOpsSettingsTest.java14
-rw-r--r--tests/unit/src/com/android/settings/applications/ManageApplicationsLaunchTest.java12
-rw-r--r--tests/unit/src/com/android/settings/backup/BackupIntentTest.java4
-rw-r--r--tests/unit/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinishTest.java1
-rw-r--r--tests/unit/src/com/android/settings/bluetooth/Utf8ByteLengthFilterTest.java2
-rw-r--r--tests/unit/src/com/android/settings/core/UserRestrictionTest.java1
-rw-r--r--tests/unit/src/com/android/settings/dashboard/DashboardSummaryInstrumentationTest.java3
-rw-r--r--tests/unit/src/com/android/settings/dashboard/PreferenceThemeTest.java19
-rw-r--r--tests/unit/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java1
-rw-r--r--tests/unit/src/com/android/settings/deviceinfo/PrivateVolumeForgetTest.java3
-rw-r--r--tests/unit/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java20
-rw-r--r--tests/unit/src/com/android/settings/dream/DreamSettingsLaunchTest.java1
-rw-r--r--tests/unit/src/com/android/settings/fuelgauge/batterytip/RestrictAppTest.java1
-rw-r--r--tests/unit/src/com/android/settings/notification/AppNotificationSettingsTest.java5
-rw-r--r--tests/unit/src/com/android/settings/notification/ChannelNotificationSettingsTest.java2
-rw-r--r--tests/unit/src/com/android/settings/notification/ZenModeSettingsIntegrationTest.java2
-rw-r--r--tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java2
-rw-r--r--tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java3
-rw-r--r--tests/unit/src/com/android/settings/print/PrintJobSettingsActivityTest.java3
-rw-r--r--tests/unit/src/com/android/settings/tests/BluetoothRequestPermissionTest.java1
-rw-r--r--tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java23
-rw-r--r--tests/unit/src/com/android/settings/tests/KeepOnScreenTest.java16
-rw-r--r--tests/unit/src/com/android/settings/tests/Manufacturer.java1
-rw-r--r--tests/unit/src/com/android/settings/tests/Operator.java1
-rw-r--r--tests/unit/src/com/android/settings/tests/PrivateVolumeSettingsTest.java10
-rw-r--r--tests/unit/src/com/android/settings/tests/SettingsRestoreAfterCloseTest.java1
-rw-r--r--tests/unit/src/com/android/settings/users/UserSettingsTest.java4
-rw-r--r--tests/unit/src/com/android/settings/utils/FileSizeFormatterTest.java1
-rw-r--r--tests/unit/src/com/android/settings/utils/MockedServiceManager.java1
-rw-r--r--tests/unit/src/com/android/settings/vpn2/AppSettingsTest.java1
-rw-r--r--tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java27
-rw-r--r--tests/unit/src/com/android/settings/wifi/WifiCallingSettingUiTest.java1
-rw-r--r--tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java7
-rw-r--r--tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java15
-rw-r--r--tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java10
42 files changed, 121 insertions, 143 deletions
diff --git a/tests/unit/src/com/android/settings/EncryptionInterstitialTest.java b/tests/unit/src/com/android/settings/EncryptionInterstitialTest.java
index eb61b00958..12610ccf1b 100644
--- a/tests/unit/src/com/android/settings/EncryptionInterstitialTest.java
+++ b/tests/unit/src/com/android/settings/EncryptionInterstitialTest.java
@@ -19,7 +19,6 @@ package com.android.settings;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
diff --git a/tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java b/tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java
index b1d94d46a1..a8a6b7436f 100644
--- a/tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java
+++ b/tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java
@@ -16,6 +16,13 @@
package com.android.settings;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.RootMatchers.isDialog;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static junit.framework.Assert.fail;
+
import android.app.Instrumentation;
import android.app.UiAutomation;
import android.content.Context;
@@ -35,13 +42,6 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.RootMatchers.isDialog;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-import static junit.framework.Assert.fail;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class RegulatoryInfoDisplayActivityTest {
diff --git a/tests/unit/src/com/android/settings/SettingsHookTests.java b/tests/unit/src/com/android/settings/SettingsHookTests.java
index cc7aa89981..ee0bbb6e07 100644
--- a/tests/unit/src/com/android/settings/SettingsHookTests.java
+++ b/tests/unit/src/com/android/settings/SettingsHookTests.java
@@ -16,8 +16,6 @@
package com.android.settings;
-import com.android.settings.Settings;
-
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
diff --git a/tests/unit/src/com/android/settings/UserCredentialsTest.java b/tests/unit/src/com/android/settings/UserCredentialsTest.java
index 8a72797e2c..ad10e4451f 100644
--- a/tests/unit/src/com/android/settings/UserCredentialsTest.java
+++ b/tests/unit/src/com/android/settings/UserCredentialsTest.java
@@ -16,13 +16,13 @@
package com.android.settings;
+import static com.android.settings.UserCredentialsSettings.Credential;
+
import android.os.Parcel;
import android.os.Process;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import static com.android.settings.UserCredentialsSettings.Credential;
-
/**
* User credentials settings fragment tests
*
diff --git a/tests/unit/src/com/android/settings/UtilsTest.java b/tests/unit/src/com/android/settings/UtilsTest.java
index 20e701350a..5048fb5dd3 100644
--- a/tests/unit/src/com/android/settings/UtilsTest.java
+++ b/tests/unit/src/com/android/settings/UtilsTest.java
@@ -16,8 +16,6 @@
package com.android.settings;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNull;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
@@ -27,12 +25,12 @@ import android.os.UserManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
-import java.util.ArrayList;
-import java.util.Arrays;
-
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.ArrayList;
+import java.util.Arrays;
+
public class UtilsTest extends AndroidTestCase {
private static final int TEST_PRIMARY_USER_ID = 10;
private static final int TEST_MANAGED_PROFILE_ID = 11;
diff --git a/tests/unit/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java b/tests/unit/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
index 886f4f0f00..76d173d3ab 100644
--- a/tests/unit/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
+++ b/tests/unit/src/com/android/settings/accessibility/AccessibilityShortcutPreferenceFragmentTest.java
@@ -16,22 +16,18 @@
package com.android.settings.accessibility;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.Matchers.allOf;
-import static org.hamcrest.collection.IsIn.oneOf;
-
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
import static android.support.test.espresso.matcher.ViewMatchers.isChecked;
import static android.support.test.espresso.matcher.ViewMatchers.isNotChecked;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static android.support.test.espresso.matcher.ViewMatchers.withParent;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.Matchers.allOf;
-import android.app.Activity;
import android.app.Instrumentation;
-import android.content.Context;
import android.os.Bundle;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
diff --git a/tests/unit/src/com/android/settings/accounts/AccountsSettingsTest.java b/tests/unit/src/com/android/settings/accounts/AccountsSettingsTest.java
index 7218efe0a3..5ee04083d8 100644
--- a/tests/unit/src/com/android/settings/accounts/AccountsSettingsTest.java
+++ b/tests/unit/src/com/android/settings/accounts/AccountsSettingsTest.java
@@ -26,9 +26,9 @@ import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
-import android.support.test.uiautomator.UiSelector;
-import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiScrollable;
+import android.support.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/unit/src/com/android/settings/applications/AppOpsSettingsTest.java b/tests/unit/src/com/android/settings/applications/AppOpsSettingsTest.java
index 8f53d0bf1b..2ba855be3f 100644
--- a/tests/unit/src/com/android/settings/applications/AppOpsSettingsTest.java
+++ b/tests/unit/src/com/android/settings/applications/AppOpsSettingsTest.java
@@ -15,8 +15,14 @@
*/
package com.android.settings.applications;
+import static android.app.AppOpsManager.MODE_ALLOWED;
+import static android.app.AppOpsManager.MODE_DEFAULT;
+import static android.app.AppOpsManager.MODE_ERRORED;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import android.app.AppOpsManager;
import android.content.Context;
@@ -34,7 +40,6 @@ import android.support.test.uiautomator.Direction;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
-import androidx.recyclerview.widget.RecyclerView;
import android.widget.Switch;
import android.widget.TextView;
@@ -44,12 +49,7 @@ import org.junit.Test;
import java.util.List;
-import static android.app.AppOpsManager.MODE_ALLOWED;
-import static android.app.AppOpsManager.MODE_DEFAULT;
-import static android.app.AppOpsManager.MODE_ERRORED;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import androidx.recyclerview.widget.RecyclerView;
/**
* An abstract parent for testing settings activities that manage an AppOps permission.
diff --git a/tests/unit/src/com/android/settings/applications/ManageApplicationsLaunchTest.java b/tests/unit/src/com/android/settings/applications/ManageApplicationsLaunchTest.java
index e074966eec..a751890940 100644
--- a/tests/unit/src/com/android/settings/applications/ManageApplicationsLaunchTest.java
+++ b/tests/unit/src/com/android/settings/applications/ManageApplicationsLaunchTest.java
@@ -16,6 +16,12 @@
package com.android.settings.applications;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.Matchers.allOf;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.provider.Settings;
@@ -27,12 +33,6 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-import static org.hamcrest.Matchers.allOf;
-
@SmallTest
@RunWith(AndroidJUnit4.class)
public class ManageApplicationsLaunchTest {
diff --git a/tests/unit/src/com/android/settings/backup/BackupIntentTest.java b/tests/unit/src/com/android/settings/backup/BackupIntentTest.java
index 0762e8c33b..ce611d0477 100644
--- a/tests/unit/src/com/android/settings/backup/BackupIntentTest.java
+++ b/tests/unit/src/com/android/settings/backup/BackupIntentTest.java
@@ -16,6 +16,8 @@
package com.android.settings.backup;
+import static com.google.common.truth.Truth.assertThat;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
@@ -31,8 +33,6 @@ import org.junit.runner.RunWith;
import java.util.List;
-import static com.google.common.truth.Truth.assertThat;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class BackupIntentTest {
diff --git a/tests/unit/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinishTest.java b/tests/unit/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinishTest.java
index da25ac0499..e93135df5c 100644
--- a/tests/unit/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinishTest.java
+++ b/tests/unit/src/com/android/settings/biometrics/fingerprint/FingerprintEnrollFinishTest.java
@@ -22,7 +22,6 @@ import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.Intents.intending;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasComponent;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
diff --git a/tests/unit/src/com/android/settings/bluetooth/Utf8ByteLengthFilterTest.java b/tests/unit/src/com/android/settings/bluetooth/Utf8ByteLengthFilterTest.java
index 220211ac19..8cbf29b48e 100644
--- a/tests/unit/src/com/android/settings/bluetooth/Utf8ByteLengthFilterTest.java
+++ b/tests/unit/src/com/android/settings/bluetooth/Utf8ByteLengthFilterTest.java
@@ -21,8 +21,6 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.text.InputFilter;
import android.text.SpannableStringBuilder;
-import com.android.settings.bluetooth.Utf8ByteLengthFilter;
-
public class Utf8ByteLengthFilterTest extends AndroidTestCase {
@SmallTest
diff --git a/tests/unit/src/com/android/settings/core/UserRestrictionTest.java b/tests/unit/src/com/android/settings/core/UserRestrictionTest.java
index dc4a120d77..4fa7b08d13 100644
--- a/tests/unit/src/com/android/settings/core/UserRestrictionTest.java
+++ b/tests/unit/src/com/android/settings/core/UserRestrictionTest.java
@@ -23,7 +23,6 @@ import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.os.UserManager;
-import android.platform.test.annotations.Presubmit;
import android.provider.SearchIndexableResource;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
diff --git a/tests/unit/src/com/android/settings/dashboard/DashboardSummaryInstrumentationTest.java b/tests/unit/src/com/android/settings/dashboard/DashboardSummaryInstrumentationTest.java
index 021013a732..4345b9918f 100644
--- a/tests/unit/src/com/android/settings/dashboard/DashboardSummaryInstrumentationTest.java
+++ b/tests/unit/src/com/android/settings/dashboard/DashboardSummaryInstrumentationTest.java
@@ -19,7 +19,6 @@ package com.android.settings.dashboard;
import static com.google.common.truth.Truth.assertThat;
import android.app.Activity;
-import android.app.Fragment;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
@@ -39,6 +38,8 @@ import org.junit.runner.RunWith;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DashboardSummaryInstrumentationTest {
diff --git a/tests/unit/src/com/android/settings/dashboard/PreferenceThemeTest.java b/tests/unit/src/com/android/settings/dashboard/PreferenceThemeTest.java
index 16e309d1eb..7cf76c63b6 100644
--- a/tests/unit/src/com/android/settings/dashboard/PreferenceThemeTest.java
+++ b/tests/unit/src/com/android/settings/dashboard/PreferenceThemeTest.java
@@ -16,6 +16,15 @@
package com.android.settings.dashboard;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
+import static org.hamcrest.Matchers.allOf;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
@@ -30,16 +39,6 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
-import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
-
-import static org.hamcrest.Matchers.allOf;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class PreferenceThemeTest {
diff --git a/tests/unit/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java b/tests/unit/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
index 0b5ade8fc1..444be93555 100644
--- a/tests/unit/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
+++ b/tests/unit/src/com/android/settings/datetime/timezone/model/TimeZoneDataTest.java
@@ -17,7 +17,6 @@ package com.android.settings.datetime.timezone.model;
import static com.google.common.truth.Truth.assertThat;
-import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
diff --git a/tests/unit/src/com/android/settings/deviceinfo/PrivateVolumeForgetTest.java b/tests/unit/src/com/android/settings/deviceinfo/PrivateVolumeForgetTest.java
index be36e43dbb..5c8f8b5189 100644
--- a/tests/unit/src/com/android/settings/deviceinfo/PrivateVolumeForgetTest.java
+++ b/tests/unit/src/com/android/settings/deviceinfo/PrivateVolumeForgetTest.java
@@ -17,9 +17,8 @@
package com.android.settings.deviceinfo;
-import android.content.Intent;
import android.content.Context;
-
+import android.content.Intent;
import android.os.storage.VolumeRecord;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
diff --git a/tests/unit/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java b/tests/unit/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
index 00b710f802..e0fb1af1fa 100644
--- a/tests/unit/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
+++ b/tests/unit/src/com/android/settings/deviceinfo/StorageDashboardFragmentTest.java
@@ -1,15 +1,5 @@
package com.android.settings.deviceinfo;
-import android.support.test.espresso.intent.rule.IntentsTestRule;
-import android.support.test.filters.SmallTest;
-import android.support.test.runner.AndroidJUnitRunner;
-import com.android.settings.R;
-import com.android.settings.Settings.StorageDashboardActivity;
-import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.intent.Intents.intended;
@@ -18,6 +8,16 @@ import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
+import android.support.test.espresso.intent.rule.IntentsTestRule;
+import android.support.test.filters.SmallTest;
+
+import com.android.settings.R;
+import com.android.settings.Settings.StorageDashboardActivity;
+import com.android.settings.deletionhelper.AutomaticStorageManagerSettings;
+
+import org.junit.Rule;
+import org.junit.Test;
+
@SmallTest
public class StorageDashboardFragmentTest {
diff --git a/tests/unit/src/com/android/settings/dream/DreamSettingsLaunchTest.java b/tests/unit/src/com/android/settings/dream/DreamSettingsLaunchTest.java
index 497fa0a6d7..0993564143 100644
--- a/tests/unit/src/com/android/settings/dream/DreamSettingsLaunchTest.java
+++ b/tests/unit/src/com/android/settings/dream/DreamSettingsLaunchTest.java
@@ -22,6 +22,7 @@ import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/unit/src/com/android/settings/fuelgauge/batterytip/RestrictAppTest.java b/tests/unit/src/com/android/settings/fuelgauge/batterytip/RestrictAppTest.java
index a24a17ae07..788b3ba949 100644
--- a/tests/unit/src/com/android/settings/fuelgauge/batterytip/RestrictAppTest.java
+++ b/tests/unit/src/com/android/settings/fuelgauge/batterytip/RestrictAppTest.java
@@ -20,7 +20,6 @@ import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.google.common.truth.Truth.assertThat;
import android.app.Instrumentation;
diff --git a/tests/unit/src/com/android/settings/notification/AppNotificationSettingsTest.java b/tests/unit/src/com/android/settings/notification/AppNotificationSettingsTest.java
index 16a0b4324a..4d5278a49c 100644
--- a/tests/unit/src/com/android/settings/notification/AppNotificationSettingsTest.java
+++ b/tests/unit/src/com/android/settings/notification/AppNotificationSettingsTest.java
@@ -21,17 +21,13 @@ import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import android.support.test.espresso.intent.Intents;
-
import static android.support.test.espresso.intent.Intents.intended;
import static android.support.test.espresso.intent.matcher.IntentMatchers.hasExtra;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.android.settings.SettingsActivity.EXTRA_SHOW_FRAGMENT;
-
import static org.hamcrest.Matchers.allOf;
import static org.junit.Assert.fail;
@@ -43,6 +39,7 @@ import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
+import android.support.test.espresso.intent.Intents;
import android.support.test.espresso.matcher.ViewMatchers;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
diff --git a/tests/unit/src/com/android/settings/notification/ChannelNotificationSettingsTest.java b/tests/unit/src/com/android/settings/notification/ChannelNotificationSettingsTest.java
index 1244dcda4f..f27bfd4ce1 100644
--- a/tests/unit/src/com/android/settings/notification/ChannelNotificationSettingsTest.java
+++ b/tests/unit/src/com/android/settings/notification/ChannelNotificationSettingsTest.java
@@ -21,9 +21,7 @@ import static android.app.NotificationManager.IMPORTANCE_NONE;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static org.hamcrest.Matchers.allOf;
import static org.junit.Assert.fail;
diff --git a/tests/unit/src/com/android/settings/notification/ZenModeSettingsIntegrationTest.java b/tests/unit/src/com/android/settings/notification/ZenModeSettingsIntegrationTest.java
index d5e7aaeb3e..e7a057c358 100644
--- a/tests/unit/src/com/android/settings/notification/ZenModeSettingsIntegrationTest.java
+++ b/tests/unit/src/com/android/settings/notification/ZenModeSettingsIntegrationTest.java
@@ -1,7 +1,6 @@
package com.android.settings;
import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
@@ -15,7 +14,6 @@ import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java b/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
index 36611cf50b..87a8af8399 100644
--- a/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
+++ b/tests/unit/src/com/android/settings/password/ChooseLockPasswordTest.java
@@ -23,13 +23,11 @@ import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
-
import static org.hamcrest.CoreMatchers.not;
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
-import android.os.SystemClock;
import android.support.test.InstrumentationRegistry;
import android.support.test.espresso.action.ViewActions;
import android.support.test.espresso.matcher.ViewMatchers;
diff --git a/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java b/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
index 3a6c39c5c6..f533056b76 100644
--- a/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
+++ b/tests/unit/src/com/android/settings/password/SetupChooseLockPasswordAppTest.java
@@ -25,9 +25,6 @@ import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
-import static com.google.common.truth.Truth.assertThat;
-
import static org.hamcrest.CoreMatchers.not;
import android.support.test.espresso.action.ViewActions;
diff --git a/tests/unit/src/com/android/settings/print/PrintJobSettingsActivityTest.java b/tests/unit/src/com/android/settings/print/PrintJobSettingsActivityTest.java
index 8fcd0828bb..f5381d4a2b 100644
--- a/tests/unit/src/com/android/settings/print/PrintJobSettingsActivityTest.java
+++ b/tests/unit/src/com/android/settings/print/PrintJobSettingsActivityTest.java
@@ -32,7 +32,6 @@ import android.print.PrintDocumentAdapter;
import android.print.PrintDocumentInfo;
import android.print.PrintJob;
import android.print.PrintManager;
-import androidx.annotation.NonNull;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.LargeTest;
import android.support.test.rule.ActivityTestRule;
@@ -54,6 +53,8 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.util.UUID;
+import androidx.annotation.NonNull;
+
@RunWith(AndroidJUnit4.class)
public class PrintJobSettingsActivityTest {
private static final String EXTRA_PRINT_JOB_ID = "EXTRA_PRINT_JOB_ID";
diff --git a/tests/unit/src/com/android/settings/tests/BluetoothRequestPermissionTest.java b/tests/unit/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
index 442f4b6aa6..0afbcea750 100644
--- a/tests/unit/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
+++ b/tests/unit/src/com/android/settings/tests/BluetoothRequestPermissionTest.java
@@ -30,6 +30,7 @@ import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
+
import com.android.settings.tests.unit.R;
public class BluetoothRequestPermissionTest extends Activity {
diff --git a/tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java b/tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java
index 3e00a45f11..9bf9ac4881 100644
--- a/tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java
+++ b/tests/unit/src/com/android/settings/tests/DrawOverlayDetailsTest.java
@@ -16,28 +16,29 @@
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.core.IsNot.not;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.test.InstrumentationRegistry;
-import android.support.test.uiautomator.UiDevice;
-
-import org.junit.runner.RunWith;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiSelector;
-import org.junit.Test;
+
import com.android.settings.R;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-import static org.hamcrest.core.IsNot.not;
-import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;
+import org.junit.Test;
+import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/tests/unit/src/com/android/settings/tests/KeepOnScreenTest.java b/tests/unit/src/com/android/settings/tests/KeepOnScreenTest.java
index 0b1308e6d0..64eee42340 100644
--- a/tests/unit/src/com/android/settings/tests/KeepOnScreenTest.java
+++ b/tests/unit/src/com/android/settings/tests/KeepOnScreenTest.java
@@ -16,24 +16,24 @@
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.action.ViewActions.click;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static junit.framework.Assert.assertEquals;
+
import android.app.Instrumentation;
import android.content.Context;
import android.content.Intent;
import android.os.BatteryManager;
import android.provider.Settings;
import android.support.test.InstrumentationRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.runner.RunWith;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
-import org.junit.Test;
+
import com.android.settings.R;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.action.ViewActions.click;
-import static android.support.test.espresso.matcher.ViewMatchers.*;
-import static junit.framework.Assert.assertEquals;
+import org.junit.Test;
+import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
@SmallTest
diff --git a/tests/unit/src/com/android/settings/tests/Manufacturer.java b/tests/unit/src/com/android/settings/tests/Manufacturer.java
index a708d1b3d9..6efe30c5a3 100644
--- a/tests/unit/src/com/android/settings/tests/Manufacturer.java
+++ b/tests/unit/src/com/android/settings/tests/Manufacturer.java
@@ -18,6 +18,7 @@ package com.android.settings.tests;
import android.app.Activity;
import android.os.Bundle;
+
import com.android.settings.tests.unit.R;
public class Manufacturer extends Activity {
diff --git a/tests/unit/src/com/android/settings/tests/Operator.java b/tests/unit/src/com/android/settings/tests/Operator.java
index 94bcc78441..6d61405f04 100644
--- a/tests/unit/src/com/android/settings/tests/Operator.java
+++ b/tests/unit/src/com/android/settings/tests/Operator.java
@@ -18,6 +18,7 @@ package com.android.settings.tests;
import android.app.Activity;
import android.os.Bundle;
+
import com.android.settings.tests.unit.R;
public class Operator extends Activity {
diff --git a/tests/unit/src/com/android/settings/tests/PrivateVolumeSettingsTest.java b/tests/unit/src/com/android/settings/tests/PrivateVolumeSettingsTest.java
index ead20cb0f6..d10b20b8a0 100644
--- a/tests/unit/src/com/android/settings/tests/PrivateVolumeSettingsTest.java
+++ b/tests/unit/src/com/android/settings/tests/PrivateVolumeSettingsTest.java
@@ -15,19 +15,19 @@
*/
package com.android.settings.tests;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
+
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class PrivateVolumeSettingsTest {
diff --git a/tests/unit/src/com/android/settings/tests/SettingsRestoreAfterCloseTest.java b/tests/unit/src/com/android/settings/tests/SettingsRestoreAfterCloseTest.java
index 96bc78c9f0..cd9ac9790d 100644
--- a/tests/unit/src/com/android/settings/tests/SettingsRestoreAfterCloseTest.java
+++ b/tests/unit/src/com/android/settings/tests/SettingsRestoreAfterCloseTest.java
@@ -25,6 +25,7 @@ import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.Until;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/unit/src/com/android/settings/users/UserSettingsTest.java b/tests/unit/src/com/android/settings/users/UserSettingsTest.java
index 2ecf161a7b..6d0021aee2 100644
--- a/tests/unit/src/com/android/settings/users/UserSettingsTest.java
+++ b/tests/unit/src/com/android/settings/users/UserSettingsTest.java
@@ -24,9 +24,9 @@ import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject;
-import android.support.test.uiautomator.UiSelector;
-import android.support.test.uiautomator.UiScrollable;
import android.support.test.uiautomator.UiObjectNotFoundException;
+import android.support.test.uiautomator.UiScrollable;
+import android.support.test.uiautomator.UiSelector;
import org.junit.Before;
import org.junit.Test;
diff --git a/tests/unit/src/com/android/settings/utils/FileSizeFormatterTest.java b/tests/unit/src/com/android/settings/utils/FileSizeFormatterTest.java
index c5b050a5a7..d2be760df8 100644
--- a/tests/unit/src/com/android/settings/utils/FileSizeFormatterTest.java
+++ b/tests/unit/src/com/android/settings/utils/FileSizeFormatterTest.java
@@ -18,7 +18,6 @@ package com.android.settings.utils;
import static com.android.settings.utils.FileSizeFormatter.GIGABYTE_IN_BYTES;
import static com.android.settings.utils.FileSizeFormatter.MEGABYTE_IN_BYTES;
-
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
diff --git a/tests/unit/src/com/android/settings/utils/MockedServiceManager.java b/tests/unit/src/com/android/settings/utils/MockedServiceManager.java
index ea04974ddc..a489101665 100644
--- a/tests/unit/src/com/android/settings/utils/MockedServiceManager.java
+++ b/tests/unit/src/com/android/settings/utils/MockedServiceManager.java
@@ -18,7 +18,6 @@ package com.android.settings.testutils;
import android.os.IBinder;
import android.os.ServiceManager;
-import android.util.Log;
import java.lang.reflect.Field;
import java.util.HashMap;
diff --git a/tests/unit/src/com/android/settings/vpn2/AppSettingsTest.java b/tests/unit/src/com/android/settings/vpn2/AppSettingsTest.java
index fe074cc3e1..1a9701d68a 100644
--- a/tests/unit/src/com/android/settings/vpn2/AppSettingsTest.java
+++ b/tests/unit/src/com/android/settings/vpn2/AppSettingsTest.java
@@ -17,7 +17,6 @@
package com.android.settings.vpn2;
import static com.android.settings.vpn2.AppManagementFragment.appHasVpnPermission;
-
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.when;
diff --git a/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java b/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
index 2accbf2aa0..31856f511a 100644
--- a/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
+++ b/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
@@ -17,29 +17,34 @@
package com.android.settings.vpn2;
import static org.mockito.AdditionalMatchers.not;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.any;
+import static org.mockito.Mockito.anyBoolean;
+import static org.mockito.Mockito.argThat;
+import static org.mockito.Mockito.atLeast;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
-import android.content.Context;
-import android.content.Context;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.TextUtils;
import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnProfile;
-import com.android.settings.R;
-import com.android.settings.vpn2.VpnSettings;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.mockito.ArgumentCaptor;
import org.mockito.ArgumentMatcher;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
public class PreferenceListTest extends AndroidTestCase {
private static final String TAG = "PreferenceListTest";
diff --git a/tests/unit/src/com/android/settings/wifi/WifiCallingSettingUiTest.java b/tests/unit/src/com/android/settings/wifi/WifiCallingSettingUiTest.java
index 16617d046b..1a7252fcfb 100644
--- a/tests/unit/src/com/android/settings/wifi/WifiCallingSettingUiTest.java
+++ b/tests/unit/src/com/android/settings/wifi/WifiCallingSettingUiTest.java
@@ -23,7 +23,6 @@ import static android.support.test.espresso.matcher.ViewMatchers.isCompletelyDis
import static android.support.test.espresso.matcher.ViewMatchers.isSelected;
import static android.support.test.espresso.matcher.ViewMatchers.withResourceName;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.anything;
import static org.junit.Assert.assertEquals;
diff --git a/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java b/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
index bc6caf654e..4c8bb998c0 100644
--- a/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
+++ b/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
@@ -24,19 +24,14 @@ import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
import static com.google.common.truth.Truth.assertThat;
-
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.not;
import static org.hamcrest.Matchers.startsWith;
-import static org.mockito.Mockito.atMost;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Activity;
-import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
@@ -70,6 +65,8 @@ import org.mockito.MockitoAnnotations;
import java.util.List;
+import androidx.fragment.app.Fragment;
+
@RunWith(AndroidJUnit4.class)
public class WifiSettingsUiTest {
private static final String TEST_SSID = "\"Test Ssid\"";
diff --git a/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java b/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
index 7bf57983e0..09b317ca93 100644
--- a/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
+++ b/tests/unit/src/com/android/settings/wifi/tether/TetherServiceTest.java
@@ -16,10 +16,6 @@
package com.android.settings.wifi.tether;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
import static android.net.ConnectivityManager.EXTRA_ADD_TETHER_TYPE;
import static android.net.ConnectivityManager.EXTRA_PROVISION_CALLBACK;
import static android.net.ConnectivityManager.EXTRA_REM_TETHER_TYPE;
@@ -31,6 +27,11 @@ import static android.net.ConnectivityManager.TETHERING_USB;
import static android.net.ConnectivityManager.TETHERING_WIFI;
import static android.net.ConnectivityManager.TETHER_ERROR_NO_ERROR;
import static android.net.ConnectivityManager.TETHER_ERROR_PROVISION_FAILED;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyLong;
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
import android.app.Activity;
import android.app.AlarmManager;
@@ -41,12 +42,12 @@ import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.content.SharedPreferences.Editor;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
-import android.content.pm.ResolveInfo;
import android.content.pm.PackageManager;
-import android.content.SharedPreferences;
-import android.content.SharedPreferences.Editor;
+import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
diff --git a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
index b311816c82..96e6c4ee0b 100644
--- a/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
+++ b/tests/unit/src/com/android/settings/wifi/tether/WifiTetherSettingsTest.java
@@ -16,6 +16,11 @@
package com.android.settings.wifi.tether;
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+
import android.app.Instrumentation;
import android.content.Intent;
import android.support.test.InstrumentationRegistry;
@@ -33,11 +38,6 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import static android.support.test.espresso.Espresso.onView;
-import static android.support.test.espresso.assertion.ViewAssertions.matches;
-import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
-import static android.support.test.espresso.matcher.ViewMatchers.withText;
-
@RunWith(AndroidJUnit4.class)
@SmallTest
public class WifiTetherSettingsTest {