Move LockSettingsService into locksettings package.
This service now has a large number of support classes so move them into
their own package to keep things tidy and easier to refactor.
Bug: 37090873
Test: runtest frameworks-services -c com.android.server.locksettings.LockSettingsServiceTests
Test: runtest frameworks-services -c com.android.server.locksettings.LockSettingsShellCommandTest
Test: runtest frameworks-services -c com.android.server.locksettings.SyntheticPasswordTests
Change-Id: Ic3cd00e6565749defd74498a3491c3d9b914ad90
diff --git a/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java b/services/tests/servicestests/src/com/android/server/locksettings/BaseLockSettingsServiceTests.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java
rename to services/tests/servicestests/src/com/android/server/locksettings/BaseLockSettingsServiceTests.java
index 7167e8c..a2b4568 100644
--- a/services/tests/servicestests/src/com/android/server/BaseLockSettingsServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/BaseLockSettingsServiceTests.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java
rename to services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
index be88927..3a4aa2d 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTestable.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTestable.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static org.mockito.Mockito.mock;
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTests.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java
rename to services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTests.java
index 25cc426..2f0ac38 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsServiceTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsServiceTests.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_NONE;
import static com.android.internal.widget.LockPatternUtils.CREDENTIAL_TYPE_PASSWORD;
@@ -25,11 +25,11 @@
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.VerifyCredentialResponse;
-import com.android.server.LockSettingsStorage.CredentialHash;
-import com.android.server.MockGateKeeperService.VerifyHandle;
+import com.android.server.locksettings.LockSettingsStorage.CredentialHash;
+import com.android.server.locksettings.MockGateKeeperService.VerifyHandle;
/**
- * runtest frameworks-services -c com.android.server.LockSettingsServiceTests
+ * runtest frameworks-services -c com.android.server.locksettings.LockSettingsServiceTests
*/
public class LockSettingsServiceTests extends BaseLockSettingsServiceTests {
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java
rename to services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
index 84ebb19..424c08c 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsShellCommandTest.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsShellCommandTest.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC;
import static android.app.admin.DevicePolicyManager.PASSWORD_QUALITY_NUMERIC;
@@ -59,7 +59,7 @@
/**
* Test class for {@link LockSettingsShellCommand}.
*
- * runtest frameworks-services -c com.android.server.LockSettingsShellCommandTest
+ * runtest frameworks-services -c com.android.server.locksettings.LockSettingsShellCommandTest
*/
@SmallTest
@Presubmit
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java
rename to services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
index 18da1a5..4bdd1c5 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTestable.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTestable.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import android.content.Context;
diff --git a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
rename to services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
index 4677904..4665441 100644
--- a/services/tests/servicestests/src/com/android/server/LockSettingsStorageTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/LockSettingsStorageTests.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
@@ -31,7 +31,7 @@
import android.test.AndroidTestCase;
import com.android.internal.widget.LockPatternUtils;
-import com.android.server.LockSettingsStorage.CredentialHash;
+import com.android.server.locksettings.LockSettingsStorage.CredentialHash;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
@@ -39,7 +39,7 @@
import java.util.concurrent.CountDownLatch;
/**
- * runtest frameworks-services -c com.android.server.LockSettingsStorageTests
+ * runtest frameworks-services -c com.android.server.locksettings.LockSettingsStorageTests
*/
public class LockSettingsStorageTests extends AndroidTestCase {
private final byte[] PASSWORD_0 = "thepassword0".getBytes();
diff --git a/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java b/services/tests/servicestests/src/com/android/server/locksettings/MockGateKeeperService.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/MockGateKeeperService.java
rename to services/tests/servicestests/src/com/android/server/locksettings/MockGateKeeperService.java
index bc93341..eefd361 100644
--- a/services/tests/servicestests/src/com/android/server/MockGateKeeperService.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockGateKeeperService.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import android.os.IBinder;
import android.os.RemoteException;
diff --git a/services/tests/servicestests/src/com/android/server/MockLockSettingsContext.java b/services/tests/servicestests/src/com/android/server/locksettings/MockLockSettingsContext.java
similarity index 97%
rename from services/tests/servicestests/src/com/android/server/MockLockSettingsContext.java
rename to services/tests/servicestests/src/com/android/server/locksettings/MockLockSettingsContext.java
index 8bceed4..c76a83e 100644
--- a/services/tests/servicestests/src/com/android/server/MockLockSettingsContext.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockLockSettingsContext.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import android.app.NotificationManager;
import android.app.admin.DevicePolicyManager;
diff --git a/services/tests/servicestests/src/com/android/server/MockStorageManager.java b/services/tests/servicestests/src/com/android/server/locksettings/MockStorageManager.java
similarity index 99%
rename from services/tests/servicestests/src/com/android/server/MockStorageManager.java
rename to services/tests/servicestests/src/com/android/server/locksettings/MockStorageManager.java
index 17c8ec2..ac46bae 100644
--- a/services/tests/servicestests/src/com/android/server/MockStorageManager.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockStorageManager.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import android.content.pm.IPackageMoveObserver;
import android.os.IBinder;
diff --git a/services/tests/servicestests/src/com/android/server/MockSyntheticPasswordManager.java b/services/tests/servicestests/src/com/android/server/locksettings/MockSyntheticPasswordManager.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/MockSyntheticPasswordManager.java
rename to services/tests/servicestests/src/com/android/server/locksettings/MockSyntheticPasswordManager.java
index 9389e48..ddef5dc 100644
--- a/services/tests/servicestests/src/com/android/server/MockSyntheticPasswordManager.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockSyntheticPasswordManager.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.android.server;
+package com.android.server.locksettings;
import android.hardware.weaver.V1_0.IWeaver;
import android.os.RemoteException;
diff --git a/services/tests/servicestests/src/com/android/server/MockWeaverService.java b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/MockWeaverService.java
rename to services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
index 0de50ab..34831cd 100644
--- a/services/tests/servicestests/src/com/android/server/MockWeaverService.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/MockWeaverService.java
@@ -1,4 +1,4 @@
-package com.android.server;
+package com.android.server.locksettings;
import android.hardware.weaver.V1_0.IWeaver;
import android.hardware.weaver.V1_0.WeaverConfig;
diff --git a/services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java b/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
similarity index 98%
rename from services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java
rename to services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
index 3ec71e4..0d35385 100644
--- a/services/tests/servicestests/src/com/android/server/SyntheticPasswordTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/SyntheticPasswordTests.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.server;
+package com.android.server.locksettings;
import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_ENABLED_KEY;
import static com.android.internal.widget.LockPatternUtils.SYNTHETIC_PASSWORD_HANDLE_KEY;
@@ -24,12 +24,12 @@
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.VerifyCredentialResponse;
-import com.android.server.SyntheticPasswordManager.AuthenticationResult;
-import com.android.server.SyntheticPasswordManager.AuthenticationToken;
+import com.android.server.locksettings.SyntheticPasswordManager.AuthenticationResult;
+import com.android.server.locksettings.SyntheticPasswordManager.AuthenticationToken;
/**
- * runtest frameworks-services -c com.android.server.SyntheticPasswordTests
+ * runtest frameworks-services -c com.android.server.locksettings.SyntheticPasswordTests
*/
public class SyntheticPasswordTests extends BaseLockSettingsServiceTests {
diff --git a/services/tests/servicestests/src/com/android/server/WeaverBasedSyntheticPasswordTests.java b/services/tests/servicestests/src/com/android/server/locksettings/WeaverBasedSyntheticPasswordTests.java
similarity index 83%
rename from services/tests/servicestests/src/com/android/server/WeaverBasedSyntheticPasswordTests.java
rename to services/tests/servicestests/src/com/android/server/locksettings/WeaverBasedSyntheticPasswordTests.java
index d85a815..5e56704 100644
--- a/services/tests/servicestests/src/com/android/server/WeaverBasedSyntheticPasswordTests.java
+++ b/services/tests/servicestests/src/com/android/server/locksettings/WeaverBasedSyntheticPasswordTests.java
@@ -1,4 +1,4 @@
-package com.android.server;
+package com.android.server.locksettings;
public class WeaverBasedSyntheticPasswordTests extends SyntheticPasswordTests {