am 26a8090a: cherrypick from lmp-docs docs: Listening for restrictions-changed Original Change-Id: I19c7150a9f36de226d00ad6d8db0e9210d5d135d
* commit '26a8090a09bce05398cc52581ea4a5cf05d28d59': cherrypick from lmp-docs docs: Listening for restrictions-changed Original Change-Id: I19c7150a9f36de226d00ad6d8db0e9210d5d135d
This commit is contained in:
@@ -316,8 +316,18 @@ if (!appCanUseCellular) {
|
|||||||
{@link android.content.Intent#ACTION_APPLICATION_RESTRICTIONS_CHANGED
|
{@link android.content.Intent#ACTION_APPLICATION_RESTRICTIONS_CHANGED
|
||||||
ACTION_APPLICATION_RESTRICTIONS_CHANGED} intent. Your app has to listen for
|
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
|
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
|
change.</p>
|
||||||
receiver for this intent:
|
|
||||||
|
<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>
|
</p>
|
||||||
|
|
||||||
<pre>IntentFilter restrictionsFilter =
|
<pre>IntentFilter restrictionsFilter =
|
||||||
|
|||||||
Reference in New Issue
Block a user