OSDN Git Service

Give CTS the handle it expects to remove PIN.
authorJeff Sharkey <jsharkey@android.com>
Tue, 4 Oct 2016 19:43:35 +0000 (13:43 -0600)
committergitbuildkicker <android-build@google.com>
Tue, 4 Oct 2016 23:48:51 +0000 (16:48 -0700)
When the Direct Boot tests go to remove the PIN set in previous
tests, it needs to find the option that will remove the PIN.  Recent
changes for fingerprint caused this "none" option to be hidden, so
assign the "none" ID to the "skip" option.

Test: cts-tradefed run cts-dev --module CtsAppSecurityHostTestCases --test android.appsecurity.cts.DirectBootHostTest
Bug: 31160946
Change-Id: I0b34cbfae45d1db8ee58a5ef66738414f5e2fc27
(cherry picked from commit 7be1b5923f76e59ef2b0c30a8b53c8ba3942bfd3)

src/com/android/settings/ChooseLockGeneric.java

index ffc9abc..3b592d4 100644 (file)
@@ -394,6 +394,7 @@ public class ChooseLockGeneric extends SettingsActivity {
 
             // Used for testing purposes
             findPreference(KEY_UNLOCK_SET_NONE).setViewId(R.id.lock_none);
+            findPreference(KEY_SKIP_FINGERPRINT).setViewId(R.id.lock_none);
             findPreference(KEY_UNLOCK_SET_PIN).setViewId(R.id.lock_pin);
             findPreference(KEY_UNLOCK_SET_PASSWORD).setViewId(R.id.lock_password);
         }