1 /* 2 * Copyright (C) 2024 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 com.android.settings.datausage 18 19 data class DataPlanInfo( 20 21 /** The number of registered plans, [0, N] */ 22 val dataPlanCount: Int, 23 24 /** 25 * The size of the first registered plan if one exists or the size of the warning if it is set. 26 * 27 * Set to -1 if no plan information is available. 28 */ 29 val dataPlanSize: Long, 30 31 /** 32 * The "size" of the data usage bar, i.e. the amount of data its rhs end represents. 33 * 34 * Set to -1 if not display a data usage bar. 35 */ 36 val dataBarSize: Long, 37 38 /** The number of bytes used since the start of the cycle. */ 39 val dataPlanUse: Long, 40 41 /** 42 * The ending time of the billing cycle in ms since the epoch. 43 * 44 * Set to `null` if no cycle information is available. 45 */ 46 val cycleEnd: Long?, 47 48 /** The time of the last update in milliseconds since the epoch, or -1 if unknown. */ 49 val snapshotTime: Long, 50 ) 51