| Tiffany Nguyen | 34fb874 | 2021-03-18 07:59:20 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.settings.fuelgauge; |
| 18 | |
| Yi-Ling Chuang | 2a9b9cf | 2023-06-16 20:32:07 +0800 | [diff] [blame] | 19 | import android.content.Context; |
| 20 | |
| Yiling Chuang | 37a35d5 | 2024-04-15 07:24:59 +0000 | [diff] [blame^] | 21 | import androidx.annotation.NonNull; |
| 22 | import androidx.annotation.Nullable; |
| 23 | |
| pajacechen | 5dd8460 | 2024-01-31 16:11:55 +0800 | [diff] [blame] | 24 | import com.android.settings.fuelgauge.batterytip.BatteryTipPolicy; |
| 25 | import com.android.settings.fuelgauge.batterytip.detectors.LowBatteryDetector; |
| Yi-Ling Chuang | ac89255 | 2023-11-07 17:13:40 +0800 | [diff] [blame] | 26 | import com.android.settings.fuelgauge.batterytip.tips.BatteryTip; |
| 27 | |
| 28 | import java.util.List; |
| 29 | |
| ykhung | 0f8ee91 | 2022-04-18 13:55:23 +0800 | [diff] [blame] | 30 | /** Feature provider implementation for battery settings usage. */ |
| Tiffany Nguyen | 34fb874 | 2021-03-18 07:59:20 +0000 | [diff] [blame] | 31 | public class BatterySettingsFeatureProviderImpl implements BatterySettingsFeatureProvider { |
| 32 | |
| Yi-Ling Chuang | ee97eaf | 2023-05-23 14:21:44 +0800 | [diff] [blame] | 33 | @Override |
| Yi-Ling Chuang | 2a9b9cf | 2023-06-16 20:32:07 +0800 | [diff] [blame] | 34 | public boolean isManufactureDateAvailable(Context context, long manufactureDateMs) { |
| Yi-Ling Chuang | ee97eaf | 2023-05-23 14:21:44 +0800 | [diff] [blame] | 35 | return false; |
| 36 | } |
| 37 | |
| 38 | @Override |
| Yi-Ling Chuang | 2a9b9cf | 2023-06-16 20:32:07 +0800 | [diff] [blame] | 39 | public boolean isFirstUseDateAvailable(Context context, long firstUseDateMs) { |
| Yi-Ling Chuang | ee97eaf | 2023-05-23 14:21:44 +0800 | [diff] [blame] | 40 | return false; |
| 41 | } |
| Wesley Wang | bace563 | 2023-09-21 18:54:38 +0800 | [diff] [blame] | 42 | |
| 43 | @Override |
| 44 | public boolean isBatteryInfoEnabled(Context context) { |
| 45 | return false; |
| 46 | } |
| Yi-Ling Chuang | ac89255 | 2023-11-07 17:13:40 +0800 | [diff] [blame] | 47 | |
| 48 | @Override |
| pajacechen | 98a522c | 2024-01-19 22:27:32 +0800 | [diff] [blame] | 49 | public void addBatteryTipDetector( |
| pajacechen | 5dd8460 | 2024-01-31 16:11:55 +0800 | [diff] [blame] | 50 | Context context, |
| 51 | List<BatteryTip> batteryTips, |
| 52 | BatteryInfo batteryInfo, |
| 53 | BatteryTipPolicy batteryTipPolicy) { |
| 54 | batteryTips.add(new LowBatteryDetector(context, batteryTipPolicy, batteryInfo).detect()); |
| 55 | } |
| Yiling Chuang | 37a35d5 | 2024-04-15 07:24:59 +0000 | [diff] [blame^] | 56 | |
| 57 | @Override |
| 58 | @Nullable |
| 59 | public CharSequence getWirelessChargingLabel( |
| 60 | @NonNull Context context, @NonNull BatteryInfo info) { |
| 61 | return null; |
| 62 | } |
| Tiffany Nguyen | 34fb874 | 2021-03-18 07:59:20 +0000 | [diff] [blame] | 63 | } |