blob: dc2ebb4451b28d8962f73bb1d81108c77c8bcef3 [file] [log] [blame]
Felipe Lemed17fda42016-04-29 11:12:45 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.server.net;
18
19/**
20 * Network Policy Manager local system service interface.
21 *
22 * @hide Only for use within the system server.
23 */
24public abstract class NetworkPolicyManagerInternal {
25
26 /**
27 * Resets all policies associated with a given user.
28 */
29 public abstract void resetUserState(int userId);
Hugo Benichi938ab4f2017-02-11 17:04:43 +090030
31 /**
32 * @return true if the given uid is restricted from doing networking on metered networks.
33 */
34 public abstract boolean isUidRestrictedOnMeteredNetworks(int uid);
35
36 /**
37 * @return true if networking is blocked on the given interface for the given uid according
38 * to current networking policies.
39 */
40 public abstract boolean isUidNetworkingBlocked(int uid, String ifname);
Felipe Lemed17fda42016-04-29 11:12:45 -070041}