summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2015-03-11 00:12:53 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-11 00:12:56 +0000
commitbd5e03b6d996aa39a6f607a55ffd0691a55b1cee (patch)
tree704906b3cb84fd2af3a661d7d41f3461038a1cac /core
parentb7f101225e6fa951df262eeacf235ffa5f6cc7e3 (diff)
parenta43fd03b9b23f9ad0deae9ee69ee80aaa1433cdb (diff)
downloadframeworks_base-bd5e03b6d996aa39a6f607a55ffd0691a55b1cee.zip
frameworks_base-bd5e03b6d996aa39a6f607a55ffd0691a55b1cee.tar.gz
frameworks_base-bd5e03b6d996aa39a6f607a55ffd0691a55b1cee.tar.bz2
Merge "Notify TrustAgentService when device policy configuration no longer applies"
Diffstat (limited to 'core')
-rw-r--r--core/java/android/service/trust/TrustAgentService.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/java/android/service/trust/TrustAgentService.java b/core/java/android/service/trust/TrustAgentService.java
index 706b934..a3178e2 100644
--- a/core/java/android/service/trust/TrustAgentService.java
+++ b/core/java/android/service/trust/TrustAgentService.java
@@ -122,12 +122,14 @@ public class TrustAgentService extends Service {
case MSG_CONFIGURE:
ConfigurationData data = (ConfigurationData) msg.obj;
boolean result = onConfigure(data.options);
- try {
- synchronized (mLock) {
- mCallback.onConfigureCompleted(result, data.token);
+ if (data.token != null) {
+ try {
+ synchronized (mLock) {
+ mCallback.onConfigureCompleted(result, data.token);
+ }
+ } catch (RemoteException e) {
+ onError("calling onSetTrustAgentFeaturesEnabledCompleted()");
}
- } catch (RemoteException e) {
- onError("calling onSetTrustAgentFeaturesEnabledCompleted()");
}
break;
case MSG_TRUST_TIMEOUT:
@@ -203,7 +205,7 @@ public class TrustAgentService extends Service {
* PersistableBundle)}.
* <p>Agents that support configuration options should overload this method and return 'true'.
*
- * @param options bundle containing all options or null if none.
+ * @param options The aggregated list of options or an empty list if no restrictions apply.
* @return true if the {@link TrustAgentService} supports configuration options.
*/
public boolean onConfigure(List<PersistableBundle> options) {