Fix Screen Lock Test for HC

Ran into the following issue where resetting the password requires
a secure setting. Remove the code that tried to reset the password
as it isn't essential.

Change-Id: I1a36f9bbc8edaf8f15e824227df9b910673a412c
http://code.google.com/p/android/issues/detail?id=17083
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 289050c..7aa7458 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -73,13 +73,10 @@
     <string name="da_screen_lock_test">Screen Lock Test</string>
     <string name="da_screen_lock_info">This test checks that the DevicePolicyManager\'s lockNow
         method immediately locks the screen. It should lock the screen immediately despite any
-        settings that may specify a timeout.\n\nClick the \"Force Lock\" button to change
-        your password to \"12345\" and lock the screen. Your screen should be locked and require
-        the password to be entered.
+        settings that may specify a timeout.\n\nClick the \"Force Lock\" button to lock the screen. 
+        Your screen should be locked and require the password to be entered.
     </string>
     <string name="da_force_lock">Force Lock</string>
-    <string name="da_lock_password_error">Couldn\'t change the password on the device.
-        Is there another active device administrator?</string>
     <string name="da_lock_success">It appears the screen was locked successfully!</string>
     <string name="da_lock_error">It does not look like the screen was locked...</string>
 
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/admin/ScreenLockTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/admin/ScreenLockTestActivity.java
index 4d6adf3..5520bb7 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/admin/ScreenLockTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/admin/ScreenLockTestActivity.java
@@ -33,8 +33,6 @@
 
 public class ScreenLockTestActivity extends PassFailButtons.Activity {
 
-    private static final String NEW_PASSWORD = "12345";
-
     private static final int ADD_DEVICE_ADMIN_REQUEST_CODE = 1;
 
     private ScreenOffReceiver mReceiver;
@@ -90,20 +88,7 @@
 
     private void handleAddDeviceAdminResult(int resultCode, Intent data) {
         if (resultCode == RESULT_OK) {
-            mDevicePolicyManager.setPasswordMinimumLength(TestDeviceAdminReceiver
-                    .getComponent(this), NEW_PASSWORD.length());
-            mDevicePolicyManager.setPasswordQuality(TestDeviceAdminReceiver
-                    .getComponent(this), DevicePolicyManager.PASSWORD_QUALITY_NUMERIC);
-            if (mDevicePolicyManager.resetPassword(NEW_PASSWORD, 0)) {
-                mDevicePolicyManager.lockNow();
-            } else {
-                new AlertDialog.Builder(this)
-                    .setTitle(R.string.da_screen_lock_test)
-                    .setMessage(R.string.da_lock_password_error)
-                    .setIcon(android.R.drawable.ic_dialog_alert)
-                    .setPositiveButton(android.R.string.ok, null)
-                    .show();
-            }
+            mDevicePolicyManager.lockNow();
         }
     }