summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-05-16 16:06:28 +0200
committerAdrian Roos <roosa@google.com>2014-05-16 16:06:28 +0200
commit7e03dfcb796ef1a6000a5fd5fda03c9e15ea62e1 (patch)
tree2058b03d3495ac0ecab4869d798c4838d0ab63be /services
parentb0650e8ff3113f9b9dbb6d249339dbd7921b4517 (diff)
downloadframeworks_base-7e03dfcb796ef1a6000a5fd5fda03c9e15ea62e1.zip
frameworks_base-7e03dfcb796ef1a6000a5fd5fda03c9e15ea62e1.tar.gz
frameworks_base-7e03dfcb796ef1a6000a5fd5fda03c9e15ea62e1.tar.bz2
Apply revised TrustAgent API
Bug: 14997466 Change-Id: I81042e058a20f28603a11471882f3dcfc4f8b13c
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/trust/TrustAgentWrapper.java10
-rw-r--r--services/core/java/com/android/server/trust/TrustManagerService.java4
2 files changed, 8 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/trust/TrustAgentWrapper.java b/services/core/java/com/android/server/trust/TrustAgentWrapper.java
index a83fa87..d8d3da1 100644
--- a/services/core/java/com/android/server/trust/TrustAgentWrapper.java
+++ b/services/core/java/com/android/server/trust/TrustAgentWrapper.java
@@ -52,7 +52,7 @@ public class TrustAgentWrapper {
// Trust state
private boolean mTrusted;
- private String mMessage;
+ private CharSequence mMessage;
private final Handler mHandler = new Handler() {
@Override
@@ -60,7 +60,7 @@ public class TrustAgentWrapper {
switch (msg.what) {
case MSG_ENABLE_TRUST:
mTrusted = true;
- mMessage = (String) msg.obj;
+ mMessage = (CharSequence) msg.obj;
boolean initiatedByUser = msg.arg1 != 0;
// TODO: Handle handle user initiated trust changes.
mTrustManagerService.updateTrust(mUserId);
@@ -79,7 +79,8 @@ public class TrustAgentWrapper {
private ITrustAgentServiceCallback mCallback = new ITrustAgentServiceCallback.Stub() {
- public void enableTrust(String userMessage, long durationMs, boolean initiatedByUser) {
+ @Override
+ public void grantTrust(CharSequence userMessage, long durationMs, boolean initiatedByUser) {
if (DEBUG) Slog.v(TAG, "enableTrust(" + userMessage + ", durationMs = " + durationMs
+ ", initiatedByUser = " + initiatedByUser + ")");
@@ -91,6 +92,7 @@ public class TrustAgentWrapper {
}
}
+ @Override
public void revokeTrust() {
if (DEBUG) Slog.v(TAG, "revokeTrust()");
mHandler.sendEmptyMessage(MSG_REVOKE_TRUST);
@@ -155,7 +157,7 @@ public class TrustAgentWrapper {
return mTrusted;
}
- public String getMessage() {
+ public CharSequence getMessage() {
return mMessage;
}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index 9061f96..a39c116 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -221,8 +221,8 @@ public class TrustManagerService extends SystemService {
// Drain preamble.
}
String nodeName = parser.getName();
- if (!"trust_agent".equals(nodeName)) {
- Slog.w(TAG, "Meta-data does not start with trust_agent tag");
+ if (!"trust-agent".equals(nodeName)) {
+ Slog.w(TAG, "Meta-data does not start with trust-agent tag");
return null;
}
TypedArray sa = res