Files
app_Settings/src/com/android/settings/datausage/lib/NetworkCycleChartData.kt
Chaohui Wang 51fc4bef49 Use single queryDetailsForDevice if possible
To improve performance.

Since queryDetailsForDevice() also aggregated the uids into one,
the apps list in DataUsageList still needs another separated api call.

Fix: 315449973
Test: manual - on DataUsageList page
Test: unit tests
Change-Id: I96c23dd7d0d40ecd183e0fb0f61329db42dae1ab
2023-12-16 02:01:22 +08:00

32 lines
979 B
Kotlin

/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.datausage.lib
import kotlin.time.Duration.Companion.days
/**
* Usage data in a billing cycle with daily data for plotting the usage chart.
*/
data class NetworkCycleChartData(
val total: NetworkUsageData,
val dailyUsage: List<NetworkUsageData>,
) {
companion object {
val BUCKET_DURATION = 1.days
}
}