LineageParts: Fix line lengths
Change-Id: I09bced5c0fa5cce1717e4656ff209b01419eb36c
diff --git a/src/org/lineageos/lineageparts/PartsActivity.java b/src/org/lineageos/lineageparts/PartsActivity.java
index 3dd61ec..311aba9 100644
--- a/src/org/lineageos/lineageparts/PartsActivity.java
+++ b/src/org/lineageos/lineageparts/PartsActivity.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 The CyanogenMod Project
- * 2017-2019,2021 The LineageOS Project
+ * 2017-2019,2021-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -176,7 +176,8 @@
}
public void startPreferencePanel(String fragmentClass, Bundle args, int titleRes,
- CharSequence titleText, Fragment resultTo, int resultRequestCode) {
+ CharSequence titleText, Fragment resultTo,
+ int resultRequestCode) {
String title = null;
if (titleRes < 0) {
if (titleText != null) {
diff --git a/src/org/lineageos/lineageparts/contributors/ContributorsCloudFragment.java b/src/org/lineageos/lineageparts/contributors/ContributorsCloudFragment.java
index 4e12e9f..815b750 100644
--- a/src/org/lineageos/lineageparts/contributors/ContributorsCloudFragment.java
+++ b/src/org/lineageos/lineageparts/contributors/ContributorsCloudFragment.java
@@ -740,11 +740,10 @@
}
// Total contributors
- String[] args = new String[]{String.valueOf(query.replaceAll("\\|", ""))};
- Cursor c = db.rawQuery(
- "select id, name || case when username is null then '' else ' <'||username||'>' end contributor " +
- "from metadata where lower(filter) like lower('%' || ? || '%') and id > 0 " +
- "order by commits desc", args);
+ String[] args = new String[]{query.replaceAll("\\|", "")};
+ Cursor c = db.rawQuery("select id, name || case when username is null then '' " +
+ "else ' <'||username||'>' end contributor from metadata where lower(filter) like " +
+ "lower('%' || ? || '%') and id > 0 order by commits desc", args);
if (c == null) {
// We don't have a valid cursor reference
return new ArrayList<>();
diff --git a/src/org/lineageos/lineageparts/contributors/ContributorsCloudViewController.java b/src/org/lineageos/lineageparts/contributors/ContributorsCloudViewController.java
index b560ff3..a146fe3 100644
--- a/src/org/lineageos/lineageparts/contributors/ContributorsCloudViewController.java
+++ b/src/org/lineageos/lineageparts/contributors/ContributorsCloudViewController.java
@@ -87,8 +87,7 @@
private boolean mIsDragging;
private boolean mIgnoreDoubleTapScale;
- private static void checkZoomLevels(float minZoom, float midZoom,
- float maxZoom) {
+ private static void checkZoomLevels(float minZoom, float midZoom, float maxZoom) {
if (minZoom >= midZoom) {
throw new IllegalArgumentException(
"MinZoom has to be less than MidZoom");
diff --git a/src/org/lineageos/lineageparts/gestures/KeyHandler.java b/src/org/lineageos/lineageparts/gestures/KeyHandler.java
index 67d42e2..7e02e00 100644
--- a/src/org/lineageos/lineageparts/gestures/KeyHandler.java
+++ b/src/org/lineageos/lineageparts/gestures/KeyHandler.java
@@ -1,6 +1,6 @@
-/**
+/*
* Copyright (C) 2016 The CyanogenMod project
- * 2017-2020 The LineageOS Project
+ * 2017-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,7 +124,8 @@
mProximityTimeOut = resources.getInteger(
org.lineageos.platform.internal.R.integer.config_proximityCheckTimeout);
mDefaultProximity = mContext.getResources().getBoolean(
- org.lineageos.platform.internal.R.bool.config_proximityCheckOnWakeEnabledByDefault);
+ org.lineageos.platform.internal.R.bool.
+ config_proximityCheckOnWakeEnabledByDefault);
mSensorManager = context.getSystemService(SensorManager.class);
mProximitySensor = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
@@ -157,7 +158,8 @@
if (action != 0 && !mEventHandler.hasMessages(GESTURE_REQUEST)) {
final Message msg = getMessageForAction(action);
- final boolean proxWakeEnabled = LineageSettings.System.getInt(mContext.getContentResolver(),
+ final boolean proxWakeEnabled = LineageSettings.System.getInt(
+ mContext.getContentResolver(),
LineageSettings.System.PROXIMITY_ON_WAKE, mDefaultProximity ? 1 : 0) == 1;
if (mProximityWakeSupported && proxWakeEnabled && mProximitySensor != null) {
mGestureWakeLock.acquire(2 * mProximityTimeOut);
diff --git a/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java b/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
index 403e3f1..e5c1625 100644
--- a/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
+++ b/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
@@ -256,7 +256,8 @@
private int getTimeout() {
return LineageSettings.Secure.getInt(mResolver,
- LineageSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT, DEFAULT_BUTTON_TIMEOUT * 1000) / 1000;
+ LineageSettings.Secure.BUTTON_BACKLIGHT_TIMEOUT, DEFAULT_BUTTON_TIMEOUT * 1000)
+ / 1000;
}
private void applyTimeout(int timeout) {
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index 2ee2d7f..f25a3ba 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -385,7 +385,8 @@
LineageSettings.System.KEY_APP_SWITCH_ACTION, Action.APP_SWITCH);
mAppSwitchPressAction = initList(KEY_APP_SWITCH_PRESS, pressAction);
- mAppSwitchLongPressAction = initList(KEY_APP_SWITCH_LONG_PRESS, appSwitchLongPressAction);
+ mAppSwitchLongPressAction = initList(KEY_APP_SWITCH_LONG_PRESS,
+ appSwitchLongPressAction);
hasAnyBindableKey = true;
}
@@ -402,7 +403,8 @@
prefScreen.removePreference(mCameraWakeScreen);
}
// Only show 'Camera sleep on release' if the device has a focus key
- if (res.getBoolean(org.lineageos.platform.internal.R.bool.config_singleStageCameraKey)) {
+ if (res.getBoolean(
+ org.lineageos.platform.internal.R.bool.config_singleStageCameraKey)) {
prefScreen.removePreference(mCameraSleepOnRelease);
}
}
diff --git a/src/org/lineageos/lineageparts/lineagestats/Utilities.java b/src/org/lineageos/lineageparts/lineagestats/Utilities.java
index 8d69690..9b63c64 100644
--- a/src/org/lineageos/lineageparts/lineagestats/Utilities.java
+++ b/src/org/lineageos/lineageparts/lineagestats/Utilities.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 The CyanogenMod Project
- * Copyright (C) 2021 The LineageOS Project
+ * Copyright (C) 2021-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,7 +33,8 @@
public class Utilities {
public static String getUniqueID(Context context) {
- final String id = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
+ final String id = Settings.Secure.getString(context.getContentResolver(),
+ Settings.Secure.ANDROID_ID);
return digest(context.getPackageName() + id);
}
diff --git a/src/org/lineageos/lineageparts/livedisplay/DisplayTemperature.java b/src/org/lineageos/lineageparts/livedisplay/DisplayTemperature.java
index 6d9734d..bb1be6b 100644
--- a/src/org/lineageos/lineageparts/livedisplay/DisplayTemperature.java
+++ b/src/org/lineageos/lineageparts/livedisplay/DisplayTemperature.java
@@ -231,7 +231,8 @@
((mBalanceMin != 0) || (mBalanceMax != 0));
if (mUseBalance) {
- mBalanceCurve = MathUtils.powerCurve(mMin, mConfig.getDefaultDayTemperature(), mMax);
+ mBalanceCurve = MathUtils.powerCurve(mMin, mConfig.getDefaultDayTemperature(),
+ mMax);
mBarMax = mBalanceMax - mBalanceMin;
} else {
mBalanceCurve = null;
diff --git a/src/org/lineageos/lineageparts/livedisplay/PictureAdjustment.java b/src/org/lineageos/lineageparts/livedisplay/PictureAdjustment.java
index 144f7b6..021a793 100644
--- a/src/org/lineageos/lineageparts/livedisplay/PictureAdjustment.java
+++ b/src/org/lineageos/lineageparts/livedisplay/PictureAdjustment.java
@@ -210,7 +210,8 @@
private TextView mValue;
private Range<Float> mRange;
- public ColorSeekBar(IntervalSeekBar seekBar, Range<Float> range, TextView value, int index) {
+ public ColorSeekBar(IntervalSeekBar seekBar, Range<Float> range, TextView value,
+ int index) {
mSeekBar = seekBar;
mValue = value;
mIndex = index;
diff --git a/src/org/lineageos/lineageparts/notificationlight/ApplicationLightPreference.java b/src/org/lineageos/lineageparts/notificationlight/ApplicationLightPreference.java
index cf38f63..dacbf05 100644
--- a/src/org/lineageos/lineageparts/notificationlight/ApplicationLightPreference.java
+++ b/src/org/lineageos/lineageparts/notificationlight/ApplicationLightPreference.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 The CyanogenMod Project
- * 2017,2019,2021 The LineageOS Project
+ * 2017-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -97,7 +97,8 @@
* @param onOffChangeable
*/
public ApplicationLightPreference(Context context, AttributeSet attrs,
- int color, int onValue, int offValue, boolean onOffChangeable) {
+ int color, int onValue, int offValue,
+ boolean onOffChangeable) {
super(context, attrs);
mColorValue = color;
mOnValue = onValue;
@@ -156,7 +157,8 @@
}
private void updatePreferenceViews() {
- final int size = (int) getContext().getResources().getDimension(R.dimen.oval_notification_size);
+ final int size = (int) getContext().getResources().getDimension(
+ R.dimen.oval_notification_size);
if (mLightColorView != null) {
mLightColorView.setEnabled(true);
@@ -314,8 +316,10 @@
return getContext().getResources().getString(R.string.default_time);
}
- String[] timeNames = getContext().getResources().getStringArray(R.array.notification_pulse_length_entries);
- String[] timeValues = getContext().getResources().getStringArray(R.array.notification_pulse_length_values);
+ String[] timeNames = getContext().getResources().getStringArray(
+ R.array.notification_pulse_length_entries);
+ String[] timeValues = getContext().getResources().getStringArray(
+ R.array.notification_pulse_length_values);
for (int i = 0; i < timeValues.length; i++) {
if (Integer.decode(timeValues[i]).equals(time)) {
@@ -331,8 +335,10 @@
return getContext().getResources().getString(R.string.default_time);
}
- String[] timeNames = getContext().getResources().getStringArray(R.array.notification_pulse_speed_entries);
- String[] timeValues = getContext().getResources().getStringArray(R.array.notification_pulse_speed_values);
+ String[] timeNames = getContext().getResources().getStringArray(
+ R.array.notification_pulse_speed_entries);
+ String[] timeValues = getContext().getResources().getStringArray(
+ R.array.notification_pulse_speed_values);
for (int i = 0; i < timeValues.length; i++) {
if (Integer.decode(timeValues[i]).equals(time)) {
diff --git a/src/org/lineageos/lineageparts/notificationlight/BatteryLightSettings.java b/src/org/lineageos/lineageparts/notificationlight/BatteryLightSettings.java
index 4c33f95..6dd71f6 100644
--- a/src/org/lineageos/lineageparts/notificationlight/BatteryLightSettings.java
+++ b/src/org/lineageos/lineageparts/notificationlight/BatteryLightSettings.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 The CyanogenMod Project
- * 2017-2021 The LineageOS Project
+ * 2017-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,10 +86,10 @@
LightsCapabilities.supports(context, LightsCapabilities.LIGHTS_RGB_BATTERY_LED);
mHALAdjustableBrightness = LightsCapabilities.supports(
context, LightsCapabilities.LIGHTS_ADJUSTABLE_BATTERY_LED_BRIGHTNESS);
- final boolean pulsatingLed =
- LightsCapabilities.supports(context, LightsCapabilities.LIGHTS_PULSATING_LED);
- final boolean segmentedBatteryLed =
- LightsCapabilities.supports(context, LightsCapabilities.LIGHTS_SEGMENTED_BATTERY_LED);
+ final boolean pulsatingLed = LightsCapabilities.supports(context,
+ LightsCapabilities.LIGHTS_PULSATING_LED);
+ final boolean segmentedBatteryLed = LightsCapabilities.supports(context,
+ LightsCapabilities.LIGHTS_SEGMENTED_BATTERY_LED);
addPreferencesFromResource(R.xml.battery_light_settings);
getActivity().getActionBar().setTitle(R.string.battery_light_title);
@@ -210,11 +210,14 @@
ContentResolver resolver = getActivity().getContentResolver();
if (key.equals(LOW_COLOR_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.BATTERY_LIGHT_LOW_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.BATTERY_LIGHT_LOW_COLOR, color);
} else if (key.equals(MEDIUM_COLOR_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.BATTERY_LIGHT_MEDIUM_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.BATTERY_LIGHT_MEDIUM_COLOR, color);
} else if (key.equals(FULL_COLOR_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.BATTERY_LIGHT_FULL_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.BATTERY_LIGHT_FULL_COLOR, color);
updateBrightnessPrefColor(color);
}
}
diff --git a/src/org/lineageos/lineageparts/notificationlight/BrightnessPreference.java b/src/org/lineageos/lineageparts/notificationlight/BrightnessPreference.java
index 254dc70..270c7d5 100644
--- a/src/org/lineageos/lineageparts/notificationlight/BrightnessPreference.java
+++ b/src/org/lineageos/lineageparts/notificationlight/BrightnessPreference.java
@@ -297,9 +297,7 @@
dest.writeInt(seekBarBrightness);
}
- public static final Parcelable.Creator<SavedState> CREATOR =
- new Parcelable.Creator<SavedState>() {
-
+ public static final Parcelable.Creator<SavedState> CREATOR = new Parcelable.Creator<>() {
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
diff --git a/src/org/lineageos/lineageparts/notificationlight/LightSettingsDialog.java b/src/org/lineageos/lineageparts/notificationlight/LightSettingsDialog.java
index d7a0229..88bf382 100644
--- a/src/org/lineageos/lineageparts/notificationlight/LightSettingsDialog.java
+++ b/src/org/lineageos/lineageparts/notificationlight/LightSettingsDialog.java
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2010 Daniel Nilsson
* Copyright (C) 2012 The CyanogenMod Project
- * 2017,2019-2021 The LineageOS Project
+ * 2017,2019-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -245,7 +245,8 @@
}
public void setAlphaSliderVisible(boolean visible) {
- mHexColorInput.setFilters(new InputFilter[] { new InputFilter.LengthFilter(visible ? 8 : 6) } );
+ mHexColorInput.setFilters(new InputFilter[] {
+ new InputFilter.LengthFilter(visible ? 8 : 6) } );
mColorPicker.setAlphaSliderVisible(visible);
}
@@ -273,7 +274,9 @@
@SuppressWarnings("unchecked")
public int getPulseSpeedOff() {
// return 0 if 'Always on' is selected
- return getPulseSpeedOn() == 1 ? 0 : ((Pair<String, Integer>) mPulseSpeedOff.getSelectedItem()).second;
+ return getPulseSpeedOn() == 1
+ ? 0
+ : ((Pair<String, Integer>) mPulseSpeedOff.getSelectedItem()).second;
}
public void setPulseSpeedOff(int speedOff) {
@@ -388,7 +391,8 @@
* @param customTime Current time value that might be one of the
* predefined values or a totally custom value
*/
- public PulseSpeedAdapter(int timeNamesResource, int timeValuesResource, Integer customTime) {
+ public PulseSpeedAdapter(int timeNamesResource, int timeValuesResource,
+ Integer customTime) {
this(timeNamesResource, timeValuesResource);
// Check if we also need to add the custom value entry
diff --git a/src/org/lineageos/lineageparts/notificationlight/NotificationLightSettings.java b/src/org/lineageos/lineageparts/notificationlight/NotificationLightSettings.java
index 4c2cb82..8b34b0d 100644
--- a/src/org/lineageos/lineageparts/notificationlight/NotificationLightSettings.java
+++ b/src/org/lineageos/lineageparts/notificationlight/NotificationLightSettings.java
@@ -116,8 +116,8 @@
PreferenceGroup mGeneralPrefs = prefSet.findPreference(GENERAL_SECTION);
// Get the system defined default notification color
- mDefaultColor =
- resources.getColor(com.android.internal.R.color.config_defaultNotificationColor, null);
+ mDefaultColor = resources.getColor(
+ com.android.internal.R.color.config_defaultNotificationColor, null);
mDefaultLedOn = resources.getInteger(
com.android.internal.R.integer.config_defaultNotificationLedOn);
@@ -197,7 +197,8 @@
mGeneralPrefs.removePreference(mAutoGenerateColors);
} else {
mAutoGenerateColors.setOnPreferenceChangeListener(this);
- watch(LineageSettings.System.getUriFor(LineageSettings.System.NOTIFICATION_LIGHT_COLOR_AUTO));
+ watch(LineageSettings.System.getUriFor(
+ LineageSettings.System.NOTIFICATION_LIGHT_COLOR_AUTO));
}
watch(Settings.System.getUriFor(Settings.System.NOTIFICATION_LIGHT_PULSE));
@@ -374,7 +375,8 @@
}
private boolean parsePackageList() {
- final String baseString = LineageSettings.System.getString(getActivity().getContentResolver(),
+ final String baseString = LineageSettings.System.getString(
+ getActivity().getContentResolver(),
LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES);
if (TextUtils.equals(mPackageList, baseString)) {
@@ -412,7 +414,7 @@
mPackageList = value;
}
LineageSettings.System.putString(getActivity().getContentResolver(),
- LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES, value);
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CUSTOM_VALUES, value);
}
/**
@@ -423,25 +425,35 @@
* @param timeon
* @param timeoff
*/
- protected void updateValues(String packageName, Integer color, Integer timeon, Integer timeoff) {
+ protected void updateValues(String packageName, Integer color, Integer timeon,
+ Integer timeoff) {
ContentResolver resolver = getActivity().getContentResolver();
if (packageName.equals(DEFAULT_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, color);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON, timeon);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF, timeoff);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_ON, timeon);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_LED_OFF, timeoff);
refreshDefault();
return;
} else if (packageName.equals(MISSED_CALL_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR, color);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_ON, timeon);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF, timeoff);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_ON, timeon);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_LED_OFF, timeoff);
refreshDefault();
return;
} else if (packageName.equals(VOICEMAIL_PREF)) {
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR, color);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON, timeon);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF, timeoff);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR, color);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_ON, timeon);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_LED_OFF, timeoff);
refreshDefault();
return;
}
@@ -460,9 +472,12 @@
ContentResolver resolver = getActivity().getContentResolver();
// Reset to the framework default colors
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, mDefaultColor);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR, mDefaultColor);
- LineageSettings.System.putInt(resolver, LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR, mDefaultColor);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_DEFAULT_COLOR, mDefaultColor);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_CALL_COLOR, mDefaultColor);
+ LineageSettings.System.putInt(resolver,
+ LineageSettings.System.NOTIFICATION_LIGHT_PULSE_VMAIL_COLOR, mDefaultColor);
refreshDefault();
}
diff --git a/src/org/lineageos/lineageparts/profiles/NFCProfileSelect.java b/src/org/lineageos/lineageparts/profiles/NFCProfileSelect.java
index 2e3f881..8dde72b 100644
--- a/src/org/lineageos/lineageparts/profiles/NFCProfileSelect.java
+++ b/src/org/lineageos/lineageparts/profiles/NFCProfileSelect.java
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 The CyanogenMod Project
- * 2017,2021 The LineageOS Project
+ * 2017,2021-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -88,7 +88,8 @@
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(R.string.profile_settings_title);
- builder.setSingleChoiceItems(profileNames, currentChoice, new DialogInterface.OnClickListener() {
+ builder.setSingleChoiceItems(profileNames, currentChoice,
+ new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
currentChoice = which;
@@ -101,7 +102,8 @@
Profile profile = profiles[currentChoice];
profile.addSecondaryUuid(mProfileUuid);
mProfileManager.updateProfile(profile);
- Toast.makeText(NFCProfileSelect.this, R.string.profile_write_success, Toast.LENGTH_LONG).show();
+ Toast.makeText(NFCProfileSelect.this, R.string.profile_write_success,
+ Toast.LENGTH_LONG).show();
}
finish();
}
diff --git a/src/org/lineageos/lineageparts/profiles/SetupTriggersFragment.java b/src/org/lineageos/lineageparts/profiles/SetupTriggersFragment.java
index a871f2c..e1d9233 100644
--- a/src/org/lineageos/lineageparts/profiles/SetupTriggersFragment.java
+++ b/src/org/lineageos/lineageparts/profiles/SetupTriggersFragment.java
@@ -156,7 +156,8 @@
getBackButton().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
- finishPreferencePanel(SetupTriggersFragment.this, Activity.RESULT_CANCELED, null);
+ finishPreferencePanel(SetupTriggersFragment.this, Activity.RESULT_CANCELED,
+ null);
}
});
}
diff --git a/src/org/lineageos/lineageparts/profiles/triggers/NfcTriggerFragment.java b/src/org/lineageos/lineageparts/profiles/triggers/NfcTriggerFragment.java
index e1c4d3f..cf4a820 100644
--- a/src/org/lineageos/lineageparts/profiles/triggers/NfcTriggerFragment.java
+++ b/src/org/lineageos/lineageparts/profiles/triggers/NfcTriggerFragment.java
@@ -103,7 +103,8 @@
mWriteTagFilters = new IntentFilter[] {
tagDetected
};
- mNfcAdapter.enableForegroundDispatch(getActivity(), getPendingIntent(), mWriteTagFilters, null);
+ mNfcAdapter.enableForegroundDispatch(getActivity(), getPendingIntent(), writeTagFilters,
+ null);
}
@Override
diff --git a/src/org/lineageos/lineageparts/search/LineagePartsSearchIndexablesProvider.java b/src/org/lineageos/lineageparts/search/LineagePartsSearchIndexablesProvider.java
index 72d73e4..6c05721 100644
--- a/src/org/lineageos/lineageparts/search/LineagePartsSearchIndexablesProvider.java
+++ b/src/org/lineageos/lineageparts/search/LineagePartsSearchIndexablesProvider.java
@@ -89,7 +89,8 @@
ref[COLUMN_INDEX_XML_RES_CLASS_NAME] = null;
ref[COLUMN_INDEX_XML_RES_ICON_RESID] = R.drawable.ic_launcher_lineageos;
ref[COLUMN_INDEX_XML_RES_INTENT_ACTION] = i.getAction();
- ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE] = LINEAGEPARTS_ACTIVITY.getPackageName();
+ ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_PACKAGE] = LINEAGEPARTS_ACTIVITY.
+ getPackageName();
ref[COLUMN_INDEX_XML_RES_INTENT_TARGET_CLASS] = LINEAGEPARTS_ACTIVITY.getClassName();
cursor.addRow(ref);
}
diff --git a/src/org/lineageos/lineageparts/widget/CustomDialogPreference.java b/src/org/lineageos/lineageparts/widget/CustomDialogPreference.java
index 46ed2b9..a44a4bd 100644
--- a/src/org/lineageos/lineageparts/widget/CustomDialogPreference.java
+++ b/src/org/lineageos/lineageparts/widget/CustomDialogPreference.java
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2015 The Android Open Source Project
* 2016 The CyanogenMod Project
- * 2017,2019,2021 The LineageOS Project
+ * 2017,2019,2021-2022 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -52,7 +52,8 @@
}
public boolean isDialogOpen() {
- return getDialog() != null && getDialog() instanceof Dialog && ((Dialog)getDialog()).isShowing();
+ return getDialog() != null && getDialog() instanceof Dialog &&
+ ((Dialog)getDialog()).isShowing();
}
public T getDialog() {