Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d488f85 authored by Eric Schmidt's avatar Eric Schmidt Committed by android-build-merger
Browse files

docs: Added CL commands for data-saver testing am: b603eae9 am: 2d05938a am: d0ef8a01

am: 3fa7b269

Change-Id: I6d7d64cda55b6c0ec497b5d2802d68a821a68242
parents aa314255 3fa7b269
Loading
Loading
Loading
Loading
+26 −4
Original line number Diff line number Diff line
@@ -179,10 +179,13 @@ if (connMgr.isActiveNetworkMetered()) {
  Testing with Android Debug Bridge Commands
</h2>

<p>
  The <a href="{@docRoot}tools/help/adb.html">Android Debug Bridge (ADB)</a>
provides a few commands that you can use to check and configure network
permissions:

  provides a few commands that you can use to test your app in Data Saver
  conditions. You can check and configure network
  permissions or set wireless networks as metered to test your app on unmetered
  networks.
</p>
<dl>
  <dt>
    <code>$ adb shell dumpsys netpolicy</code>
@@ -231,4 +234,23 @@ permissions:
    Removes the specified package UID from the whitelist to block background
    metered data usage while Data Saver is enabled.
  </dd>

  <dt>
    <code>$ adb shell cmd netpolicy list wifi-networks</code>
  </dt>

  <dd>
    Lists all wifi networks, displaying whether they're metered.
  </dd>


  <dt>
    <code>$  adb shell cmd netpolicy set metered-network &lt;WIFI_SSID&gt;
      true</code>
  </dt>

  <dd>
    Sets wifi with the specified SSID as metered, allowing you to simulate a
    metered network on an unmetered network.
  </dd>
</dl>
 No newline at end of file