blob: a4900fb1eac53fca8e67218d3bfc99427b95f193 [file] [log] [blame]
Tiffany Nguyen34fb8742021-03-18 07:59:20 +00001/*
2 * Copyright (C) 2021 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 com.android.settings.fuelgauge;
18
Yi-Ling Chuang2a9b9cf2023-06-16 20:32:07 +080019import android.content.Context;
20
Yiling Chuang37a35d52024-04-15 07:24:59 +000021import androidx.annotation.NonNull;
22import androidx.annotation.Nullable;
23
pajacechen5dd84602024-01-31 16:11:55 +080024import com.android.settings.fuelgauge.batterytip.BatteryTipPolicy;
25import com.android.settings.fuelgauge.batterytip.detectors.LowBatteryDetector;
Yi-Ling Chuangac892552023-11-07 17:13:40 +080026import com.android.settings.fuelgauge.batterytip.tips.BatteryTip;
27
28import java.util.List;
29
ykhung0f8ee912022-04-18 13:55:23 +080030/** Feature provider implementation for battery settings usage. */
Tiffany Nguyen34fb8742021-03-18 07:59:20 +000031public class BatterySettingsFeatureProviderImpl implements BatterySettingsFeatureProvider {
32
Yi-Ling Chuangee97eaf2023-05-23 14:21:44 +080033 @Override
Yi-Ling Chuang2a9b9cf2023-06-16 20:32:07 +080034 public boolean isManufactureDateAvailable(Context context, long manufactureDateMs) {
Yi-Ling Chuangee97eaf2023-05-23 14:21:44 +080035 return false;
36 }
37
38 @Override
Yi-Ling Chuang2a9b9cf2023-06-16 20:32:07 +080039 public boolean isFirstUseDateAvailable(Context context, long firstUseDateMs) {
Yi-Ling Chuangee97eaf2023-05-23 14:21:44 +080040 return false;
41 }
Wesley Wangbace5632023-09-21 18:54:38 +080042
43 @Override
44 public boolean isBatteryInfoEnabled(Context context) {
45 return false;
46 }
Yi-Ling Chuangac892552023-11-07 17:13:40 +080047
48 @Override
pajacechen98a522c2024-01-19 22:27:32 +080049 public void addBatteryTipDetector(
pajacechen5dd84602024-01-31 16:11:55 +080050 Context context,
51 List<BatteryTip> batteryTips,
52 BatteryInfo batteryInfo,
53 BatteryTipPolicy batteryTipPolicy) {
54 batteryTips.add(new LowBatteryDetector(context, batteryTipPolicy, batteryInfo).detect());
55 }
Yiling Chuang37a35d52024-04-15 07:24:59 +000056
57 @Override
58 @Nullable
59 public CharSequence getWirelessChargingLabel(
60 @NonNull Context context, @NonNull BatteryInfo info) {
61 return null;
62 }
Tiffany Nguyen34fb8742021-03-18 07:59:20 +000063}