Home
last modified time | relevance | path

Searched refs:NetworkPolicy (Results 1 – 12 of 12) sorted by relevance

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DNetworkPolicyEditor.java19 import static android.net.NetworkPolicy.CYCLE_NONE;
20 import static android.net.NetworkPolicy.LIMIT_DISABLED;
21 import static android.net.NetworkPolicy.SNOOZE_NEVER;
22 import static android.net.NetworkPolicy.WARNING_DISABLED;
26 import android.net.NetworkPolicy;
51 private ArrayList<NetworkPolicy> mPolicies = Lists.newArrayList();
58 final NetworkPolicy[] policies = mPolicyManager.getNetworkPolicies(); in read()
62 for (NetworkPolicy policy : policies) { in read()
82 final NetworkPolicy[] policies = mPolicies.toArray(new NetworkPolicy[mPolicies.size()]); in writeAsync()
92 public void write(NetworkPolicy[] policies) { in write()
[all …]
/frameworks/base/core/java/android/net/
DNetworkPolicy.java37 public class NetworkPolicy implements Parcelable, Comparable<NetworkPolicy> { class
61 public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, in NetworkPolicy() method in NetworkPolicy
67 public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, in NetworkPolicy() method in NetworkPolicy
81 public NetworkPolicy(Parcel in) { in NetworkPolicy() method in NetworkPolicy
145 public int compareTo(NetworkPolicy another) { in compareTo()
165 if (obj instanceof NetworkPolicy) { in equals()
166 final NetworkPolicy other = (NetworkPolicy) obj; in equals()
193 public static final Creator<NetworkPolicy> CREATOR = new Creator<NetworkPolicy>() {
195 public NetworkPolicy createFromParcel(Parcel in) {
196 return new NetworkPolicy(in);
[all …]
DINetworkPolicyManager.aidl20 import android.net.NetworkPolicy;
48 void setNetworkPolicies(in NetworkPolicy[] policies); in setNetworkPolicies()
49 NetworkPolicy[] getNetworkPolicies(String callingPackage); in getNetworkPolicies()
DNetworkPolicyManager.java20 import static android.net.NetworkPolicy.CYCLE_NONE;
198 public void setNetworkPolicies(NetworkPolicy[] policies) { in setNetworkPolicies()
206 public NetworkPolicy[] getNetworkPolicies() { in getNetworkPolicies()
251 public static long computeLastCycleBoundary(long currentTime, NetworkPolicy policy) { in computeLastCycleBoundary()
281 public static long computeNextCycleBoundary(long currentTime, NetworkPolicy policy) { in computeNextCycleBoundary()
DNetworkPolicy.aidl19 parcelable NetworkPolicy;
/frameworks/base/services/core/java/com/android/server/net/
DNetworkPolicyManagerShellCommand.java33 import android.net.NetworkPolicy;
285 for (NetworkPolicy policy : getWifiPolicies()) { in listWifiNetworks()
309 final NetworkPolicy[] policies = mInterface.getNetworkPolicies(null); in setMeteredWifiNetwork()
312 for (NetworkPolicy policy : policies) { in setMeteredWifiNetwork()
331 final NetworkPolicy policy = newPolicy(ssid); in setMeteredWifiNetwork()
334 final NetworkPolicy[] newPolicies = new NetworkPolicy[policies.length + 1]; in setMeteredWifiNetwork()
343 private List<NetworkPolicy> getWifiPolicies() throws RemoteException { in getWifiPolicies()
355 final NetworkPolicy[] policies = mInterface.getNetworkPolicies(null); in getWifiPolicies()
356 final List<NetworkPolicy> wifiPolicies = new ArrayList<NetworkPolicy>(policies.length); in getWifiPolicies()
357 for (NetworkPolicy policy: policies) { in getWifiPolicies()
[all …]
DNetworkPolicyManagerService.java38 import static android.net.NetworkPolicy.CYCLE_NONE;
39 import static android.net.NetworkPolicy.LIMIT_DISABLED;
40 import static android.net.NetworkPolicy.SNOOZE_NEVER;
41 import static android.net.NetworkPolicy.WARNING_DISABLED;
121 import android.net.NetworkPolicy;
296 final ArrayMap<NetworkTemplate, NetworkPolicy> mNetworkPolicy = new ArrayMap<>();
298 final ArrayMap<NetworkPolicy, String[]> mNetworkRules = new ArrayMap<>();
861 NetworkPolicy policy = mNetworkPolicy.get(template);
881 static NetworkPolicy newWifiPolicy(NetworkTemplate template, boolean metered) { in newWifiPolicy()
882 return new NetworkPolicy(template, CYCLE_NONE, Time.TIMEZONE_UTC, in newWifiPolicy()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DNetworkPolicyManagerServiceTest.java23 import static android.net.NetworkPolicy.LIMIT_DISABLED;
24 import static android.net.NetworkPolicy.WARNING_DISABLED;
65 import android.net.NetworkPolicy;
452 final NetworkPolicy policy = new NetworkPolicy( in testLastCycleBoundaryThisMonth()
463 final NetworkPolicy policy = new NetworkPolicy( in testLastCycleBoundaryLastMonth()
474 final NetworkPolicy policy = new NetworkPolicy( in testLastCycleBoundaryThisMonthFebruary()
485 final NetworkPolicy policy = new NetworkPolicy( in testLastCycleBoundaryLastMonthFebruary()
492 final NetworkPolicy policy = new NetworkPolicy( in testCycleBoundaryLeapYear()
516 final NetworkPolicy policy = new NetworkPolicy( in testNextCycleTimezoneAfterUtc()
524 final NetworkPolicy policy = new NetworkPolicy( in testNextCycleTimezoneBeforeUtc()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
DDataUsageController.java23 import android.net.NetworkPolicy;
128 final NetworkPolicy policy = findNetworkPolicy(template); in getDataUsageInfo()
183 private NetworkPolicy findNetworkPolicy(NetworkTemplate template) { in findNetworkPolicy()
185 final NetworkPolicy[] policies = mPolicyManager.getNetworkPolicies(); in findNetworkPolicy()
189 final NetworkPolicy policy = policies[i]; in findNetworkPolicy()
/frameworks/base/packages/SystemUI/src/com/android/systemui/net/
DNetworkOverLimitActivity.java25 import android.net.NetworkPolicy;
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DSettingsBackupAgent.java27 import android.net.NetworkPolicy;
1278 NetworkPolicy[] policies = networkPolicyManager.getNetworkPolicies(); in getNetworkPolicies()
1285 for (NetworkPolicy policy : policies) { in getNetworkPolicies()
1315 NetworkPolicy[] policies = new NetworkPolicy[length]; in restoreNetworkPolicies()
1322 policies[i] = NetworkPolicy.getNetworkPolicyFromBackup( in restoreNetworkPolicies()
/frameworks/base/
Dcompiled-classes-phone2727 android.net.NetworkPolicy
2728 android.net.NetworkPolicy$1