From b603eae9b363ca292d721243819dfd701a194b65 Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Tue, 31 May 2016 15:56:48 -0700 Subject: docs: Added CL commands for data-saver testing Bug: 28951799 Change-Id: I03ae59b1d98b8e58dc859c8158b318718c8a9f13 --- docs/html/preview/features/data-saver.jd | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/html/preview/features/data-saver.jd b/docs/html/preview/features/data-saver.jd index 761556e1ead6..abc47eaa3837 100644 --- a/docs/html/preview/features/data-saver.jd +++ b/docs/html/preview/features/data-saver.jd @@ -179,10 +179,13 @@ if (connMgr.isActiveNetworkMetered()) { Testing with Android Debug Bridge Commands -The Android Debug Bridge (ADB) -provides a few commands that you can use to check and configure network -permissions: - +

+ The Android Debug Bridge (ADB) + 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. +

$ adb shell dumpsys netpolicy @@ -231,4 +234,23 @@ permissions: Removes the specified package UID from the whitelist to block background metered data usage while Data Saver is enabled. + +
+ $ adb shell cmd netpolicy list wifi-networks +
+ +
+ Lists all wifi networks, displaying whether they're metered. +
+ + +
+ $ adb shell cmd netpolicy set metered-network <WIFI_SSID> + true +
+ +
+ Sets wifi with the specified SSID as metered, allowing you to simulate a + metered network on an unmetered network. +
\ No newline at end of file -- cgit v1.2.3-59-g8ed1b