Clean up unused files for Battery Usage in SettingsGoogle, which have
been moved into Settings. Test: make RunSettingsRoboTests Bug: 256123455 Change-Id: I21fe684b9b3a2a748c5d10353e68e15ddf281838
This commit is contained in:
@@ -1,53 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Copyright (C) 2021 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.
|
|
||||||
-->
|
|
||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:settings="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingStart="@dimen/preference_no_icon_padding_start"
|
|
||||||
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/charge"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:fontFamily="@*android:string/config_headlineFontFamily"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:textColor="?android:attr/colorAccent" />
|
|
||||||
|
|
||||||
<com.android.settings.widget.UsageView
|
|
||||||
android:id="@+id/battery_usage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="141dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
settings:sideLabels="@array/battery_labels"
|
|
||||||
android:colorAccent="?android:attr/colorAccent"
|
|
||||||
android:gravity="end"
|
|
||||||
settings:textColor="?android:attr/textColorSecondary" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bottom_summary"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@@ -4582,8 +4582,6 @@
|
|||||||
<string name="power_usage_summary_title">Battery</string>
|
<string name="power_usage_summary_title">Battery</string>
|
||||||
<!-- Activity title summary for App Fuel Gauge summary -->
|
<!-- Activity title summary for App Fuel Gauge summary -->
|
||||||
<string name="power_usage_summary">What has been using the battery</string>
|
<string name="power_usage_summary">What has been using the battery</string>
|
||||||
<!-- Message to show when battery usage data is not available [CHAR LIMIT=30] -->
|
|
||||||
<string name="power_usage_not_available">Battery usage data isn\u2019t available.</string>
|
|
||||||
<!-- Display the battery level and status [CHAR_LIMIT=60] -->
|
<!-- Display the battery level and status [CHAR_LIMIT=60] -->
|
||||||
<string name="power_usage_level_and_status"><xliff:g id="level">%1$s</xliff:g>
|
<string name="power_usage_level_and_status"><xliff:g id="level">%1$s</xliff:g>
|
||||||
- <xliff:g id="status">%2$s</xliff:g></string>
|
- <xliff:g id="status">%2$s</xliff:g></string>
|
||||||
@@ -4631,8 +4629,6 @@
|
|||||||
|
|
||||||
<!-- Title for the screen usage in power use UI [CHAR_LIMIT=60] -->
|
<!-- Title for the screen usage in power use UI [CHAR_LIMIT=60] -->
|
||||||
<string name="device_screen_usage">Screen usage since full charge</string>
|
<string name="device_screen_usage">Screen usage since full charge</string>
|
||||||
<!-- Label for list of apps using battery in power use UI. Note: ^1 should be used in all translations[CHAR_LIMIT=120] -->
|
|
||||||
<string name="power_usage_list_summary">Battery usage since full charge</string>
|
|
||||||
<!-- Temp string used to debug new battery estimates [DO NOT TRANSLATE] -->
|
<!-- Temp string used to debug new battery estimates [DO NOT TRANSLATE] -->
|
||||||
<string name="power_usage_enhanced_debug" translatable="false"><xliff:g id="time">%1$s</xliff:g> left (New ML est)</string>
|
<string name="power_usage_enhanced_debug" translatable="false"><xliff:g id="time">%1$s</xliff:g> left (New ML est)</string>
|
||||||
<!-- Temp string used to debug old battery estimates [DO NOT TRANSLATE] -->
|
<!-- Temp string used to debug old battery estimates [DO NOT TRANSLATE] -->
|
||||||
@@ -4800,8 +4796,6 @@
|
|||||||
<!-- Label for power consumed by Calling -->
|
<!-- Label for power consumed by Calling -->
|
||||||
<string name="power_phone">Voice calls</string>
|
<string name="power_phone">Voice calls</string>
|
||||||
|
|
||||||
<!-- Description for battery usage time for an app, i.e. Used for 30min. Note: ^1 should be used in all translations [CHAR LIMIT=60] -->
|
|
||||||
<string name="battery_used_for">Used for <xliff:g id="time">^1</xliff:g></string>
|
|
||||||
<!-- Description for battery screen usage time for an app, i.e. Screen usage 30min. Note: ^1 should be used in all translations [CHAR LIMIT=60] -->
|
<!-- Description for battery screen usage time for an app, i.e. Screen usage 30min. Note: ^1 should be used in all translations [CHAR LIMIT=60] -->
|
||||||
<string name="battery_screen_usage">Screen usage <xliff:g id="time">^1</xliff:g></string>
|
<string name="battery_screen_usage">Screen usage <xliff:g id="time">^1</xliff:g></string>
|
||||||
<!-- Description for battery usage info for an app, i.e. 60% used by facebook. [CHAR LIMIT=60] -->
|
<!-- Description for battery usage info for an app, i.e. 60% used by facebook. [CHAR LIMIT=60] -->
|
||||||
@@ -4870,9 +4864,6 @@
|
|||||||
<!-- Description for other users aggregated battery usage data [CHAR LIMIT=120] -->
|
<!-- Description for other users aggregated battery usage data [CHAR LIMIT=120] -->
|
||||||
<string name="battery_usage_other_users">Other users</string>
|
<string name="battery_usage_other_users">Other users</string>
|
||||||
|
|
||||||
<!-- Graph subtext displayed to user when enhanced battery estimate is being used [CHAR LIMIT=120] -->
|
|
||||||
<string name="advanced_battery_graph_subtext">Battery left estimate is based on your device usage</string>
|
|
||||||
|
|
||||||
<!-- Description for battery time left, i.e. 50min Estimated time left. [CHAR LIMIT=80]-->
|
<!-- Description for battery time left, i.e. 50min Estimated time left. [CHAR LIMIT=80]-->
|
||||||
<string name="estimated_time_left">Estimated time left</string>
|
<string name="estimated_time_left">Estimated time left</string>
|
||||||
|
|
||||||
|
@@ -20,10 +20,8 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.SparseIntArray;
|
import android.util.SparseIntArray;
|
||||||
|
|
||||||
import com.android.settings.fuelgauge.batteryusage.BatteryHistEntry;
|
|
||||||
import com.android.settingslib.fuelgauge.Estimate;
|
import com.android.settingslib.fuelgauge.Estimate;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,12 +101,6 @@ public interface PowerUsageFeatureProvider {
|
|||||||
*/
|
*/
|
||||||
String getOldEstimateDebugString(String timeRemaining);
|
String getOldEstimateDebugString(String timeRemaining);
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the string to show in the advanced usage battery page when enhanced estimates are
|
|
||||||
* enabled. This string notifies users that the estimate is using enhanced prediction.
|
|
||||||
*/
|
|
||||||
String getAdvancedUsageScreenInfoString();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a signal to indicate if the device will need to warn the user they may not make it
|
* Returns a signal to indicate if the device will need to warn the user they may not make it
|
||||||
* to their next charging time.
|
* to their next charging time.
|
||||||
@@ -143,11 +135,6 @@ public interface PowerUsageFeatureProvider {
|
|||||||
*/
|
*/
|
||||||
Intent getResumeChargeIntent();
|
Intent getResumeChargeIntent();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns battery history data with corresponding timestamp key.
|
|
||||||
*/
|
|
||||||
Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns {@link Set} for hidding applications background usage time.
|
* Returns {@link Set} for hidding applications background usage time.
|
||||||
*/
|
*/
|
||||||
|
@@ -24,10 +24,8 @@ import android.util.ArraySet;
|
|||||||
import android.util.SparseIntArray;
|
import android.util.SparseIntArray;
|
||||||
|
|
||||||
import com.android.internal.util.ArrayUtils;
|
import com.android.internal.util.ArrayUtils;
|
||||||
import com.android.settings.fuelgauge.batteryusage.BatteryHistEntry;
|
|
||||||
import com.android.settingslib.fuelgauge.Estimate;
|
import com.android.settingslib.fuelgauge.Estimate;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/** Implementation of {@code PowerUsageFeatureProvider} */
|
/** Implementation of {@code PowerUsageFeatureProvider} */
|
||||||
@@ -122,11 +120,6 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAdvancedUsageScreenInfoString() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getEarlyWarningSignal(Context context, String id) {
|
public boolean getEarlyWarningSignal(Context context, String id) {
|
||||||
return false;
|
return false;
|
||||||
@@ -158,11 +151,6 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Map<Long, Map<String, BatteryHistEntry>> getBatteryHistory(Context context) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<CharSequence> getHideBackgroundUsageTimeSet(Context context) {
|
public Set<CharSequence> getHideBackgroundUsageTimeSet(Context context) {
|
||||||
return new ArraySet<>();
|
return new ArraySet<>();
|
||||||
|
@@ -70,9 +70,6 @@ public class BatteryEntry {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final int MSG_UPDATE_NAME_ICON = 1;
|
|
||||||
public static final int MSG_REPORT_FULLY_DRAWN = 2;
|
|
||||||
|
|
||||||
private static final String TAG = "BatteryEntry";
|
private static final String TAG = "BatteryEntry";
|
||||||
private static final String PACKAGE_SYSTEM = "android";
|
private static final String PACKAGE_SYSTEM = "android";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user