diff options
| author | Andrew Solovay <asolovay@google.com> | 2015-03-20 11:44:33 -0700 |
|---|---|---|
| committer | Andrew Solovay <asolovay@google.com> | 2015-04-23 11:35:39 -0700 |
| commit | 26a8090a09bce05398cc52581ea4a5cf05d28d59 (patch) | |
| tree | 08d0f231952d2a7573ddf0f4126241cecf6af82d | |
| parent | 92ae292e864287abcb1a78c117263f64b303b885 (diff) | |
| download | frameworks_base-26a8090a09bce05398cc52581ea4a5cf05d28d59.zip frameworks_base-26a8090a09bce05398cc52581ea4a5cf05d28d59.tar.gz frameworks_base-26a8090a09bce05398cc52581ea4a5cf05d28d59.tar.bz2 | |
cherrypick from lmp-docs docs: Listening for restrictions-changed
Original Change-Id: I19c7150a9f36de226d00ad6d8db0e9210d5d135d
Per bug 19848206, it turns out that APPLICATION_RESTRICTIONS_CHANGED
is only sent to dynamically-declared listeners, *not* to listeners
declared in the manifest. Updated doc to note this. (The code snippet
already showed how to dynamically declare a listener.)
See first comment for doc stage location.
bug: 19848206
Change-Id: I6dc5f39dc6eed71cf2e303564ea906be3832d8a4
| -rw-r--r-- | docs/html/training/enterprise/app-restrictions.jd | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/html/training/enterprise/app-restrictions.jd b/docs/html/training/enterprise/app-restrictions.jd index fc5dfcc..dd2c2c0 100644 --- a/docs/html/training/enterprise/app-restrictions.jd +++ b/docs/html/training/enterprise/app-restrictions.jd @@ -316,8 +316,18 @@ if (!appCanUseCellular) { {@link android.content.Intent#ACTION_APPLICATION_RESTRICTIONS_CHANGED ACTION_APPLICATION_RESTRICTIONS_CHANGED} intent. Your app has to listen for this intent so you can change the app's behavior when the restriction settings - change. The following code shows how to dynamically register a broadcast - receiver for this intent: + change.</p> + +<p class="note"> + <strong>Note:</strong> The {@link + android.content.Intent#ACTION_APPLICATION_RESTRICTIONS_CHANGED + ACTION_APPLICATION_RESTRICTIONS_CHANGED} intent is sent only to listeners + that are dynamically registered, <em>not</em> to listeners that are declared + in the app manifest. +</p> +<p> + The following code shows how to dynamically register a broadcast receiver for + this intent: </p> <pre>IntentFilter restrictionsFilter = |
