diff options
author | Adrian Roos <roosa@google.com> | 2014-11-20 16:21:11 +0100 |
---|---|---|
committer | Adrian Roos <roosa@google.com> | 2014-11-20 21:45:04 +0100 |
commit | 50bfeec868157106e8b60abf8964cb24462af182 (patch) | |
tree | 38591fdb7288bc6cde58e1c2d6fa4c0a961c1ab3 /packages/Keyguard/test | |
parent | 6d0e2c9cb948a10137e6b5a4eb00e601622fe8ee (diff) | |
download | frameworks_base-50bfeec868157106e8b60abf8964cb24462af182.zip frameworks_base-50bfeec868157106e8b60abf8964cb24462af182.tar.gz frameworks_base-50bfeec868157106e8b60abf8964cb24462af182.tar.bz2 |
Update KeyguardManager.isDeviceLocked API
Bug: 18414067
Change-Id: I0715714c2c9a122f578ec0c6f508faae12e6f752
Diffstat (limited to 'packages/Keyguard/test')
2 files changed, 9 insertions, 9 deletions
diff --git a/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml b/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml index 63694a8..bb72c12 100644 --- a/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml +++ b/packages/Keyguard/test/SampleTrustAgent/res/layout/sample_trust_agent_settings.xml @@ -48,11 +48,11 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> - <Button android:id="@+id/check_trusted" + <Button android:id="@+id/check_device_locked" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Keyguard in trusted state?" /> - <TextView android:id="@+id/check_trusted_result" + android:text="Device locked?" /> + <TextView android:id="@+id/check_device_locked_result" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" /> diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java index 39a599e..7edf2bb 100644 --- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java +++ b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java @@ -32,7 +32,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi private CheckBox mReportUnlockAttempts; private CheckBox mManagingTrust; - private TextView mCheckTrustedStateResult; + private TextView mCheckDeviceLockedResult; private KeyguardManager mKeyguardManager; @@ -48,7 +48,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi findViewById(R.id.enable_trust).setOnClickListener(this); findViewById(R.id.revoke_trust).setOnClickListener(this); findViewById(R.id.crash).setOnClickListener(this); - findViewById(R.id.check_trusted).setOnClickListener(this); + findViewById(R.id.check_device_locked).setOnClickListener(this); mReportUnlockAttempts = (CheckBox) findViewById(R.id.report_unlock_attempts); mReportUnlockAttempts.setOnCheckedChangeListener(this); @@ -56,7 +56,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi mManagingTrust = (CheckBox) findViewById(R.id.managing_trust); mManagingTrust.setOnCheckedChangeListener(this); - mCheckTrustedStateResult = (TextView) findViewById(R.id.check_trusted_result); + mCheckDeviceLockedResult = (TextView) findViewById(R.id.check_device_locked_result); } @Override @@ -77,7 +77,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi SampleTrustAgent.sendRevokeTrust(this); } else if (id == R.id.crash) { throw new RuntimeException("crash"); - } else if (id == R.id.check_trusted) { + } else if (id == R.id.check_device_locked) { updateTrustedState(); } } @@ -92,7 +92,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi } private void updateTrustedState() { - mCheckTrustedStateResult.setText(Boolean.toString( - mKeyguardManager.isKeyguardInTrustedState())); + mCheckDeviceLockedResult.setText(Boolean.toString( + mKeyguardManager.isDeviceLocked())); } } |