blob: a46cddeda2ddfe582d827557c6d9d5e781d55f60 [file] [log] [blame]
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -07001/*
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
17package android.net;
18
Mathew Inwood53f089f2018-08-08 14:44:44 +010019import android.annotation.UnsupportedAppUsage;
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070020import android.os.Parcel;
21import android.os.Parcelable;
22
23/**
Jeff Sharkey43d2a172017-07-12 10:50:42 -060024 * @deprecated nobody should be using this, but keep it around returning stub
25 * values to prevent app crashes.
Jeff Sharkey44a3e0d2011-10-06 10:50:09 -070026 * @hide
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070027 */
Jeff Sharkey43d2a172017-07-12 10:50:42 -060028@Deprecated
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070029public class NetworkQuotaInfo implements Parcelable {
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070030 public static final long NO_LIMIT = -1;
31
32 /** {@hide} */
Jeff Sharkey43d2a172017-07-12 10:50:42 -060033 public NetworkQuotaInfo() {
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070034 }
35
36 /** {@hide} */
37 public NetworkQuotaInfo(Parcel in) {
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070038 }
39
Mathew Inwood53f089f2018-08-08 14:44:44 +010040 @UnsupportedAppUsage
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070041 public long getEstimatedBytes() {
Jeff Sharkey43d2a172017-07-12 10:50:42 -060042 return 0;
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070043 }
44
Mathew Inwood53f089f2018-08-08 14:44:44 +010045 @UnsupportedAppUsage
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070046 public long getSoftLimitBytes() {
Jeff Sharkey43d2a172017-07-12 10:50:42 -060047 return NO_LIMIT;
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070048 }
49
Mathew Inwood53f089f2018-08-08 14:44:44 +010050 @UnsupportedAppUsage
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070051 public long getHardLimitBytes() {
Jeff Sharkey43d2a172017-07-12 10:50:42 -060052 return NO_LIMIT;
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070053 }
54
Jeff Sharkeybfdd6802012-04-09 10:49:19 -070055 @Override
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070056 public int describeContents() {
57 return 0;
58 }
59
Jeff Sharkeybfdd6802012-04-09 10:49:19 -070060 @Override
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070061 public void writeToParcel(Parcel out, int flags) {
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070062 }
63
Mathew Inwood53f089f2018-08-08 14:44:44 +010064 @UnsupportedAppUsage
Jeff Sharkey9e8f83d2019-02-28 12:06:45 -070065 public static final @android.annotation.NonNull Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() {
Jeff Sharkeybfdd6802012-04-09 10:49:19 -070066 @Override
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070067 public NetworkQuotaInfo createFromParcel(Parcel in) {
68 return new NetworkQuotaInfo(in);
69 }
70
Jeff Sharkeybfdd6802012-04-09 10:49:19 -070071 @Override
Jeff Sharkeyf0ceede2011-08-02 17:22:34 -070072 public NetworkQuotaInfo[] newArray(int size) {
73 return new NetworkQuotaInfo[size];
74 }
75 };
76}