summaryrefslogtreecommitdiff
path: root/android/net/NetworkAgentHelper.java
blob: 7ea76658f0b8be9be80ec8815aa19096bd75a027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package android.net;

import android.annotation.NonNull;

/**
 * Wrapper around {@link android.net.NetworkAgent} to help test coverage
 *
 * {@link NetworkAgent} will call non-public method unwanted() when the
 * agent should be disabled.
 */
public class NetworkAgentHelper {
    public static void callUnwanted(@NonNull NetworkAgent networkAgent) {
        System.out.println("NetworkAgentHelper Faking unwanted() call from connectivity manager");
        networkAgent.unwanted();
    }
}