Loading src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -109,4 +109,13 @@ public interface PowerUsageFeatureProvider { * Checks whether to display the battery v2. */ boolean isBatteryV2Enabled(); /** * Returns a signal to indicate if the device will need to warn the user they may not make it * to their next charging time. * * @param id Optional string used to identify the caller for metrics. Usually the class name of * the caller */ boolean getEarlyWarningSignal(Context context, String id); } src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.settings.core.FeatureFlags.BATTERY_SETTINGS_V2; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Process; import android.util.FeatureFlagUtils; import android.util.SparseIntArray; Loading Loading @@ -132,4 +131,9 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider public boolean isBatteryV2Enabled() { return FeatureFlagUtils.isEnabled(mContext, BATTERY_SETTINGS_V2); } @Override public boolean getEarlyWarningSignal(Context context, String id) { return false; } } Loading
src/com/android/settings/fuelgauge/PowerUsageFeatureProvider.java +9 −0 Original line number Diff line number Diff line Loading @@ -109,4 +109,13 @@ public interface PowerUsageFeatureProvider { * Checks whether to display the battery v2. */ boolean isBatteryV2Enabled(); /** * Returns a signal to indicate if the device will need to warn the user they may not make it * to their next charging time. * * @param id Optional string used to identify the caller for metrics. Usually the class name of * the caller */ boolean getEarlyWarningSignal(Context context, String id); }
src/com/android/settings/fuelgauge/PowerUsageFeatureProviderImpl.java +5 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,6 @@ import static com.android.settings.core.FeatureFlags.BATTERY_SETTINGS_V2; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Process; import android.util.FeatureFlagUtils; import android.util.SparseIntArray; Loading Loading @@ -132,4 +131,9 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider public boolean isBatteryV2Enabled() { return FeatureFlagUtils.isEnabled(mContext, BATTERY_SETTINGS_V2); } @Override public boolean getEarlyWarningSignal(Context context, String id) { return false; } }