diff options
author | Adrian Roos <roosa@google.com> | 2014-05-16 14:32:06 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-16 14:32:07 +0000 |
commit | 3242f51c936d804c5308971a8cc10a251f9690fe (patch) | |
tree | 96d81eaefd4294a19ac669cfd96f273fece82069 /services | |
parent | 574ed553b0a05628bfb8d47e6955130b3dbe4054 (diff) | |
parent | 7e03dfcb796ef1a6000a5fd5fda03c9e15ea62e1 (diff) | |
download | frameworks_base-3242f51c936d804c5308971a8cc10a251f9690fe.zip frameworks_base-3242f51c936d804c5308971a8cc10a251f9690fe.tar.gz frameworks_base-3242f51c936d804c5308971a8cc10a251f9690fe.tar.bz2 |
Merge "Apply revised TrustAgent API"
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/trust/TrustAgentWrapper.java | 10 | ||||
-rw-r--r-- | services/core/java/com/android/server/trust/TrustManagerService.java | 4 |
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 |