1 /*
2  * Copyright (C) 2011 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 
17 package android.net;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 import android.os.Build;
21 import android.os.Parcel;
22 import android.os.Parcelable;
23 
24 /**
25  * @deprecated nobody should be using this, but keep it around returning stub
26  *             values to prevent app crashes.
27  * @hide
28  */
29 @Deprecated
30 public class NetworkQuotaInfo implements Parcelable {
31     public static final long NO_LIMIT = -1;
32 
33     /** {@hide} */
NetworkQuotaInfo()34     public NetworkQuotaInfo() {
35     }
36 
37     /** {@hide} */
NetworkQuotaInfo(Parcel in)38     public NetworkQuotaInfo(Parcel in) {
39     }
40 
41     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
getEstimatedBytes()42     public long getEstimatedBytes() {
43         return 0;
44     }
45 
46     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
getSoftLimitBytes()47     public long getSoftLimitBytes() {
48         return NO_LIMIT;
49     }
50 
51     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
getHardLimitBytes()52     public long getHardLimitBytes() {
53         return NO_LIMIT;
54     }
55 
56     @Override
describeContents()57     public int describeContents() {
58         return 0;
59     }
60 
61     @Override
writeToParcel(Parcel out, int flags)62     public void writeToParcel(Parcel out, int flags) {
63     }
64 
65     @UnsupportedAppUsage
66     public static final @android.annotation.NonNull Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() {
67         @Override
68         public NetworkQuotaInfo createFromParcel(Parcel in) {
69             return new NetworkQuotaInfo(in);
70         }
71 
72         @Override
73         public NetworkQuotaInfo[] newArray(int size) {
74             return new NetworkQuotaInfo[size];
75         }
76     };
77 }
78