• Home
  • History
  • Annotate
  • only in /frameworks/base/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/
History log of /frameworks/base/services/tests/servicestests/assets/NetworkPolicyManagerServiceTest/netpolicy/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3d3308d3e476f62664a9c3c31e6bc95bc879e49e 24-Aug-2016 Felipe Leme <felipeal@google.com> Moar test cases for NetworkPolicyManagerServiceTest.

Before refactoring restrict-background into a UID policy, it's important
to make sure apps receive the proper ACTION_RESTRICT_BACKGROUND_CHANGED
intents.

BUG: 28791717

Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.NetworkPolicyManagerServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Change-Id: I32b2e36750ce4640b57d9b1d29dc53ec641456fa
estrict-background-on.xml
idA-blacklisted-restrict-background-off.xml
idA-blacklisted-restrict-background-on.xml
idA-whitelisted-restrict-background-off.xml
idA-whitelisted-restrict-background-on.xml
6f51a0afe9237d36c374d5c202842292b9ba2a46 25-Aug-2016 Felipe Leme <felipeal@google.com> Fixed getUidsWithPolicy().

UID polices are stored as flag, but getUidsWithPolicy() was checking for
their exact values.

Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.NetworkPolicyManagerServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

BUG: 28791717
Change-Id: I923b4f63636a32e42cadda5bbb59268267e899c0
ids-with-mixed-policies.xml
46b451fa7da6c0323e80616409cf467d5b1fd01f 19-Aug-2016 Felipe Leme <felipeal@google.com> Refactored whitelist restrict background uids.

On Android N, the list of UIDs whitelisted was kept in a separate array
and XML tag, while in reality it should be a new UID
policy (POLICY_ALLOW_METERED_BACKGROUND).

This change refactors NetworkPolicyManagerService to use the new UID
policy, although without removing any of its existing methods (but
marking them as deprecated).

Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.NetworkPolicyManagerServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"

Test: cts-tradefed run commandAndExit cts --skip-device-info --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker --skip-preconditions -m CtsHostsideNetworkTests --abi armeabi-v7a -t com.android.cts.net.HostsideRestrictBackgroundNetworkTests

BUG: 28791717

Change-Id: I39869efda554ca0b736dd2380e439474f91dfbe6
estrict-background-lists-mixed-format.xml
estrict-background-lists-uid-policy-format.xml
e88729d3a106807a094ed15891e0d2ef4fb7f73d 18-Aug-2016 Felipe Leme <felipeal@google.com> Added test case for restrict background lists.

BUG: 28791717

Change-Id: I33372bf7732b0fcb75006844dea387af50bc2582
estrict-background-lists-whitelist-format.xml