sdk: A few finals don't hurt

And a few language features (HashMap constructors, collapsing
catch blocks, method references)
plus two typos

Change-Id: I9ae2f7c006c5f2f9c7c99eab81059c08bece1202
This commit is contained in:
Michael W
2024-11-15 20:39:22 +01:00
parent 28185f0f54
commit 423cec2b12
13 changed files with 72 additions and 98 deletions

View File

@@ -48,7 +48,7 @@ public final class LineageBatteryLights {
private final Context mContext;
private NotificationManager mNotificationManager;
private final NotificationManager mNotificationManager;
private int mZenMode;
public interface LedUpdater {
@@ -285,7 +285,7 @@ public final class LineageBatteryLights {
com.android.internal.R.integer.config_notificationsBatteryFullARGB),
UserHandle.USER_CURRENT);
// Adustable battery LED brightness.
// Adjustable battery LED brightness.
if (mCanAdjustBrightness) {
// Battery brightness level
mBatteryBrightnessLevel = LineageSettings.System.getIntForUser(resolver,

View File

@@ -38,12 +38,12 @@ public final class LineageNotificationLights {
// Light capabilities
// Whether the notification light is RGB adjustable.
private boolean mMultiColorNotificationLed;
private final boolean mMultiColorNotificationLed;
// Whether the lights HAL supports changing brightness.
private boolean mHALAdjustableBrightness;
private final boolean mHALAdjustableBrightness;
// Whether the light should be considered brightness adjustable
// (via HAL or via modifying RGB values).
private boolean mCanAdjustBrightness;
private final boolean mCanAdjustBrightness;
// Light config
private boolean mAutoGenerateNotificationColor;
@@ -56,10 +56,9 @@ public final class LineageNotificationLights {
private int mDefaultNotificationLedOn;
private int mDefaultNotificationLedOff;
private ArrayMap<String, LedValues> mNotificationPulseCustomLedValues;
private Map<String, String> mPackageNameMappings;
private final ArrayMap<String, Integer> mGeneratedPackageLedColors =
new ArrayMap<String, Integer>();
private final ArrayMap<String, LedValues> mNotificationPulseCustomLedValues;
private final Map<String, String> mPackageNameMappings;
private final ArrayMap<String, Integer> mGeneratedPackageLedColors = new ArrayMap<>();
private int mZenMode;
@@ -455,7 +454,7 @@ public final class LineageNotificationLights {
LineageSettings.System.NOTIFICATION_LIGHT_SCREEN_ON, 0,
UserHandle.USER_CURRENT) != 0);
// Adustable notification LED brightness.
// Adjustable notification LED brightness.
if (mCanAdjustBrightness) {
// Normal brightness.
mNotificationLedBrightnessLevel = LineageSettings.System.getIntForUser(resolver,