Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 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 | |
Artur Satayev | 2695800 | 2019-12-10 17:47:52 +0000 | [diff] [blame^] | 19 | import android.compat.annotation.UnsupportedAppUsage; |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 20 | import android.os.Parcel; |
| 21 | import android.os.Parcelable; |
| 22 | |
| 23 | /** |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 24 | * @deprecated nobody should be using this, but keep it around returning stub |
| 25 | * values to prevent app crashes. |
Jeff Sharkey | 44a3e0d | 2011-10-06 10:50:09 -0700 | [diff] [blame] | 26 | * @hide |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 27 | */ |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 28 | @Deprecated |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 29 | public class NetworkQuotaInfo implements Parcelable { |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 30 | public static final long NO_LIMIT = -1; |
| 31 | |
| 32 | /** {@hide} */ |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 33 | public NetworkQuotaInfo() { |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 34 | } |
| 35 | |
| 36 | /** {@hide} */ |
| 37 | public NetworkQuotaInfo(Parcel in) { |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 38 | } |
| 39 | |
Mathew Inwood | 53f089f | 2018-08-08 14:44:44 +0100 | [diff] [blame] | 40 | @UnsupportedAppUsage |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 41 | public long getEstimatedBytes() { |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 42 | return 0; |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 43 | } |
| 44 | |
Mathew Inwood | 53f089f | 2018-08-08 14:44:44 +0100 | [diff] [blame] | 45 | @UnsupportedAppUsage |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 46 | public long getSoftLimitBytes() { |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 47 | return NO_LIMIT; |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 48 | } |
| 49 | |
Mathew Inwood | 53f089f | 2018-08-08 14:44:44 +0100 | [diff] [blame] | 50 | @UnsupportedAppUsage |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 51 | public long getHardLimitBytes() { |
Jeff Sharkey | 43d2a17 | 2017-07-12 10:50:42 -0600 | [diff] [blame] | 52 | return NO_LIMIT; |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 53 | } |
| 54 | |
Jeff Sharkey | bfdd680 | 2012-04-09 10:49:19 -0700 | [diff] [blame] | 55 | @Override |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 56 | public int describeContents() { |
| 57 | return 0; |
| 58 | } |
| 59 | |
Jeff Sharkey | bfdd680 | 2012-04-09 10:49:19 -0700 | [diff] [blame] | 60 | @Override |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 61 | public void writeToParcel(Parcel out, int flags) { |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 62 | } |
| 63 | |
Mathew Inwood | 53f089f | 2018-08-08 14:44:44 +0100 | [diff] [blame] | 64 | @UnsupportedAppUsage |
Jeff Sharkey | 9e8f83d | 2019-02-28 12:06:45 -0700 | [diff] [blame] | 65 | public static final @android.annotation.NonNull Creator<NetworkQuotaInfo> CREATOR = new Creator<NetworkQuotaInfo>() { |
Jeff Sharkey | bfdd680 | 2012-04-09 10:49:19 -0700 | [diff] [blame] | 66 | @Override |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 67 | public NetworkQuotaInfo createFromParcel(Parcel in) { |
| 68 | return new NetworkQuotaInfo(in); |
| 69 | } |
| 70 | |
Jeff Sharkey | bfdd680 | 2012-04-09 10:49:19 -0700 | [diff] [blame] | 71 | @Override |
Jeff Sharkey | f0ceede | 2011-08-02 17:22:34 -0700 | [diff] [blame] | 72 | public NetworkQuotaInfo[] newArray(int size) { |
| 73 | return new NetworkQuotaInfo[size]; |
| 74 | } |
| 75 | }; |
| 76 | } |