diff options
author | Jim Miller <jaggies@google.com> | 2014-08-26 17:12:29 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2014-11-05 18:17:56 -0800 |
commit | e303bf443532c2ad756260133f00747bcff11e69 (patch) | |
tree | 35c58c456a33e6a83ea5cad631811683b5861641 /packages/Keyguard | |
parent | 12b239e6d39ad5a35f68e7bcd5f644a793b5cb74 (diff) | |
download | frameworks_base-e303bf443532c2ad756260133f00747bcff11e69.zip frameworks_base-e303bf443532c2ad756260133f00747bcff11e69.tar.gz frameworks_base-e303bf443532c2ad756260133f00747bcff11e69.tar.bz2 |
Update TrustAgentService API after review
This change incorporates API council feedback and enables the
TrustAgent whitelisting API.
It also contains a minor cleanup of DPM's use of UserHandle
to eliminate unnecessary object creation.
Fixes bug 17008504
Change-Id: I63cc50169fde54b34406845818bcaf6aadc1a3db
Diffstat (limited to 'packages/Keyguard')
-rw-r--r-- | packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java index c650a0f..09c7165 100644 --- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java +++ b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java @@ -21,7 +21,7 @@ import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; -import android.os.Bundle; +import android.os.PersistableBundle; import android.preference.PreferenceManager; import android.service.trust.TrustAgentService; import android.support.v4.content.LocalBroadcastManager; @@ -90,8 +90,15 @@ public class SampleTrustAgent extends TrustAgentService } @Override - public boolean onSetTrustAgentFeaturesEnabled(Bundle options) { - Log.v(TAG, "Policy options received: " + options.getStringArrayList(KEY_FEATURES)); + public boolean onConfigure(Configuration config) { + if (config != null && config.options != null) { + for (int i = 0; i < config.options.size(); i++) { + PersistableBundle options = config.options.get(i); + Log.v(TAG, "Policy options received: " + options.toString()); + } + } else { + Log.w(TAG, "onConfigure() called with no options"); + } // TODO: Handle options return true; // inform DPM that we support it } |